Annotation of OpenXM/src/kan96xx/Doc/oxd.sm1, Revision 1.1
1.1 ! takayama 1: % $OpenXM$
! 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
! 13: /gg [(<login method="file"/>) nl ] cat def
! 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
! 31: ( -pass ) pass
! 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:
! 46:
! 47: [(oxCreateClient2) peer 0 pass] extension /oxasir set
! 48: %% 0 means connect from only localhost.
! 49: oxasir asirinit
! 50: /arg1 oxasir def
! 51: ] pop
! 52: popVariables
! 53: arg1
! 54: } def
! 55:
! 56:
! 57: /getFname {
! 58: /arg1 set
! 59: [/in-getFname /comm /i /comm2
! 60: /j
! 61: ] pushVariables
! 62: [
! 63: /comm arg1 def
! 64: comm (array) dc /comm set
! 65: % comm message
! 66: % 34 = "
! 67: /comm2 [ ] def
! 68: 0 1 comm length 1 sub {
! 69: /i set
! 70: comm i get 34 eq {
! 71: [
! 72: i 1 add 1 comm length 1 sub {
! 73: /j set
! 74: comm j get
! 75: } for
! 76: ] /comm2 set
! 77: exit
! 78: } { } ifelse
! 79: } for
! 80: comm2 /comm set
! 81: % comm message
! 82:
! 83: [
! 84: 0 1 comm length 1 sub {
! 85: /i set
! 86: comm i get 34 eq {
! 87: exit
! 88: } {
! 89: comm i get
! 90: } ifelse
! 91: } for
! 92: ] /comm2 set
! 93:
! 94: comm2 {(string) dc} map cat /arg1 set
! 95: ] pop
! 96: popVariables
! 97: arg1
! 98: } def
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>