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