Annotation of OpenXM/src/kan96xx/Doc/oxd.sm1, Revision 1.2
1.2 ! takayama 1: % $OpenXM: OpenXM/src/kan96xx/Doc/oxd.sm1,v 1.1 2002/10/20 13:13:36 takayama Exp $
1.1 takayama 2: [(parse) (oxasir.sm1) pushfile] extension
3: % It has not yet been finished.
4: /asirconnectr {
5: [/in-asirconnectr /pass /peer /data /control
6: /comm /oxd /ff /fname /nl
7: /oxasir] pushVariables
8: [
9: /nl 10 (string) dc def
10: [(sm1.socket) (connect) [8089]] extension /oxd set
11: [(sm1.socket) (select) [oxd 0 get -1]] extension
12: [(sm1.socket) (read) [oxd 0 get]] extension /ff set
1.2 ! takayama 13: /gg [(<login method="file">) nl ] cat def
1.1 takayama 14: ff message gg message
15: [(sm1.socket) (write) [oxd 0 get gg]] extension
16: [(flush)] extension
17:
18: [(sm1.socket) (select) [oxd 0 get -1]] extension
19: [(sm1.socket) (read) [oxd 0 get]] extension /ff set
20: ff getFname /fname set
21: fname message
22: [(touch ) fname ] cat system
23:
24: /peer [(oxGetPort) (localhost)] extension def
25: /data peer 1 get toString def
26: /control peer 3 get toString def
27: % /pass 0 (string) dc def % empty password
28: /pass (hoge) def
29: peer message
30: [(ox -ox ox_asir ) ( -reverse ) ( -data ) data ( -control ) control
1.2 ! takayama 31: ( -pass ) pass ( -finish )
1.1 takayama 32: ] cat /comm set
33:
34: /gg [ (<done/>) nl ] cat def
35: ff message gg message
36: [(sm1.socket) (write) [oxd 0 get gg]] extension
37:
38: [(sm1.socket) (select) [oxd 0 get -1]] extension
39: [(sm1.socket) (read) [oxd 0 get]] extension /ff set
40: % read ?
41:
42: /gg [(<launch> ) comm ( </launch> ) nl ] cat def
43: ff message gg message
44: [(sm1.socket) (write) [oxd 0 get gg]] extension
45:
1.2 ! takayama 46: %% Check if the launching is successful or not. Not yet written.
1.1 takayama 47:
48: [(oxCreateClient2) peer 0 pass] extension /oxasir set
49: %% 0 means connect from only localhost.
50: oxasir asirinit
51: /arg1 oxasir def
52: ] pop
53: popVariables
54: arg1
55: } def
56:
57:
58: /getFname {
59: /arg1 set
60: [/in-getFname /comm /i /comm2
61: /j
62: ] pushVariables
63: [
64: /comm arg1 def
65: comm (array) dc /comm set
66: % comm message
67: % 34 = "
68: /comm2 [ ] def
69: 0 1 comm length 1 sub {
70: /i set
71: comm i get 34 eq {
72: [
73: i 1 add 1 comm length 1 sub {
74: /j set
75: comm j get
76: } for
77: ] /comm2 set
78: exit
79: } { } ifelse
80: } for
81: comm2 /comm set
82: % comm message
83:
84: [
85: 0 1 comm length 1 sub {
86: /i set
87: comm i get 34 eq {
88: exit
89: } {
90: comm i get
91: } ifelse
92: } for
93: ] /comm2 set
94:
95: comm2 {(string) dc} map cat /arg1 set
96: ] pop
97: popVariables
98: arg1
99: } def
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>