[BACK]Return to oxrfc103.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Annotation of OpenXM/src/kan96xx/Doc/oxrfc103.sm1, Revision 1.1

1.1     ! takayama    1: % $OpenXM$
        !             2: (oxasir.sm1.loaded) boundp
        !             3: {  }
        !             4: {
        !             5:   [(parse) (oxasir.sm1) pushfile] extension
        !             6: } ifelse
        !             7:
        !             8: /ctrlC-hook {
        !             9:   ox103_reset
        !            10: } def
        !            11:
        !            12: [(ox103_reset)
        !            13:  [(ox103_reset broadcasts the OX reset to all processes)
        !            14:   (cf. ctrlC-hook, register_hander)
        !            15: ]] putUsages
        !            16: /ox103_reset {
        !            17:   [/in-ox103_reset /L /n /i] pushVariables
        !            18:   [
        !            19:      /L [(oxGetClientList)] extension def
        !            20:     (In ox103_reset...) message
        !            21:      /n L length def
        !            22:      0 1 n 1 sub {
        !            23:        /i set
        !            24:        L i get oxreset
        !            25:      } for
        !            26:      (Done) message
        !            27:   ] pop
        !            28:   popVariables
        !            29: } def
        !            30:
        !            31: %%%%%%%
        !            32: /ox103_asir_init {
        !            33:   /arg1 set
        !            34:   [/ttt] pushVariables
        !            35:   [
        !            36:     /ttt arg1 def
        !            37:     %% ttt oxsetmathcap     ttt oxmathcap  %% It is done in asirinit
        !            38:     %% Do nothing special for now.
        !            39:   ] pop
        !            40:   popVariables
        !            41: } def
        !            42: /ox103_sm1_init {
        !            43:   /arg1 set
        !            44:   [/ttt] pushVariables
        !            45:   [
        !            46:     /ttt arg1 def
        !            47:     ttt oxsetmathcap
        !            48:     ttt oxmathcap
        !            49:     ttt ([(parse) (oxrfc103.sm1) pushfile] extension ) oxsubmit
        !            50:   ] pop
        !            51:   popVariables
        !            52: } def
        !            53: %%%
        !            54:
        !            55: /Xm_rfc103_shared [ ] def
        !            56:
        !            57: [(ox103_set_shared_variable)
        !            58:  [(value name 2 ox103_set_shared_variable)
        !            59:   (It broadcasts the <<value>> of a shared variable <<name>>)
        !            60:   (to all processes.)
        !            61:   (cf. Xm_rfc103_shared, )
        !            62:   $Example:  (2).. (hoge) 2 ox103_set_shared_variable$
        !            63: ]] putUsages
        !            64: /ox103_set_shared_variable {
        !            65:   /arg0 set  %% Dummy to be called by rpc2. Number of args
        !            66:   /arg1 set  %% Name
        !            67:   /arg2 set  %% Value,  [Name Value] not [Value Name]
        !            68:   [/in-ox103_set_shared_variable /Name /Value
        !            69:    /Found /N /i  /L
        !            70:   ] pushVariables
        !            71:   [
        !            72:     /Name arg1 def
        !            73:     /Value arg2 def
        !            74:     Value message
        !            75:     /Found 0 def
        !            76:     /N  Xm_rfc103_shared length def
        !            77:     0 1 N 1 sub {
        !            78:       /i set
        !            79:       Xm_rfc103_shared i get 0 get
        !            80:       Name eq {
        !            81:         Xm_rfc103_shared i [Name Value] put
        !            82:         /Found 1 def
        !            83:         exit
        !            84:       } {  } ifelse
        !            85:     } for
        !            86:     Found 1 eq { }
        !            87:     {
        !            88:       Xm_rfc103_shared [Name Value] append
        !            89:       /Xm_rfc103_shared set
        !            90:     } ifelse
        !            91:     /L [(oxGetClientList)] extension def
        !            92:     0 1 L length 1 sub {
        !            93:       /i set
        !            94:       L i get [(ox103_set_shared_variable) Name Value] oxrpc2
        !            95:     } for
        !            96:
        !            97:     (ox103_set_shared_variable: Xm_rfc103_shared=) message
        !            98:     Xm_rfc103_shared message
        !            99:     %% [(parse) [(/) Name ( ) Value toString ( def )] cat] extension
        !           100:     %% Add $ $ when Value is a string.
        !           101:
        !           102:     /arg1 [Name Value] def
        !           103:   ] pop
        !           104:   popVariables
        !           105:   arg1
        !           106: } def
        !           107:
        !           108: /ox103_test {
        !           109:   (x^2-1). fctr
        !           110:   oxasir.ccc ( sm1_start(); ) oxexecutestring
        !           111:   sm1connectr
        !           112: } def
        !           113:
        !           114: (oxrfc103, 2003, 1/1) message
        !           115: /Ox103_loaded 1 def

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>