version 1.17, 2001/08/22 03:23:25 |
version 1.22, 2003/01/01 02:03:41 |
|
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.16 2001/08/22 02:36:34 takayama Exp $ |
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.21 2002/11/08 14:18:00 takayama Exp $ |
|
|
|
/ox.sm1.loaded 1 def |
%%%%%%%%%%%% Configuration: Specify your server path |
%%%%%%%%%%%% Configuration: Specify your server path |
%%%%% ox, ox_sm1, oxlog are contained in kxx.tgz |
%%%%% ox, ox_sm1, oxlog are contained in kxx.tgz |
%%%%% These should be under /usr/local/lib/sm1 or LOAD_SM1_PATH |
%%%%% These should be under /usr/local/lib/sm1 or LOAD_SM1_PATH |
|
|
oxpath.oxlog.xterm message |
oxpath.oxlog.xterm message |
} def |
} def |
|
|
/ox.ccc.init { ox.ccc ( [(oxPrintMessage) 0] extension pop ) oxsubmit } def |
/ox.ccc.init { |
|
ox.ccc ( [(oxPrintMessage) 0] extension pop ) oxsubmit |
|
(Ox103_loaded) boundp |
|
{ ox.ccc ox103_sm1_init } |
|
{ } ifelse |
|
} def |
|
|
/ox.verbose 0 def |
/ox.verbose 0 def |
/ox.version (2.981105) def |
/ox.version (2.981105) def |
Line 143 ox.version [(Version)] system_variable gt |
|
Line 150 ox.version [(Version)] system_variable gt |
|
(oxpopcmo1, oxpopcmo2, sm1connect2, sm1connect3) |
(oxpopcmo1, oxpopcmo2, sm1connect2, sm1connect3) |
(sm1connectr ox_launch, ox_launch_nox) |
(sm1connectr ox_launch, ox_launch_nox) |
(oxNoX : set an environment to invoke oxlog without xterm and to call oxlog with >& /dev/null) |
(oxNoX : set an environment to invoke oxlog without xterm and to call oxlog with >& /dev/null) |
|
(oxresetAll, oxIsInterruptable, [(oxGetClientList)] extension ) |
$ ex 1. (ox.sm1) run oxNoX sm1connectr $ |
$ ex 1. (ox.sm1) run oxNoX sm1connectr $ |
$ ex 2. (oxasir.sm1) run oxNoX (x^2-1). fctr pmat ; $ |
$ ex 2. (oxasir.sm1) run oxNoX (x^2-1). fctr pmat ; $ |
] |
] |
|
|
] |
] |
] putUsages |
] putUsages |
|
|
|
/ox_get_os { |
|
[/in-ox_get_ox /os1 /os2] pushVariables |
|
[ |
|
/os1 [(ostype)] extension 0 get def |
|
os1 (windows) eq { |
|
[(getenv) (WINDOWID)] extension tag 0 eq not { |
|
%% expect cygwin X |
|
/os2 (xcygwin) def |
|
}{ |
|
[(getenv) (OSTYPE)] extension tag 0 eq not |
|
[(getenv) (MACHTYPE)] extension tag 0 eq not or |
|
[(getenv) (PWD)] extension tag 0 eq not or |
|
{ |
|
%% expect cygwin environment |
|
/os2 (cygwin) def |
|
}{ |
|
%% expect the native windows environment |
|
/os2 (native) def |
|
} ifelse |
|
} ifelse |
|
}{ |
|
/os2 null def |
|
} ifelse |
|
/arg1 [os1 os2] def |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
/ox.ostype ox_get_os def |
|
|
|
/ox_backslash_to_slash { |
|
/arg1 set |
|
[/in-ox_backslash_to_slash /sss ] pushVariables |
|
[ |
|
/sss arg1 def |
|
sss (array) dc /sss set |
|
sss { dup 92 eq { pop 47 } { } ifelse } map |
|
{ (string) dc } map cat /arg1 set |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
/ox_slash_to_backslash { |
|
/arg1 set |
|
[/in-ox_slash_to_backslash /sss ] pushVariables |
|
[ |
|
/sss arg1 def |
|
sss (array) dc /sss set |
|
sss { dup 47 eq { pop 92 } { } ifelse } map |
|
{ (string) dc } map cat /arg1 set |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
/oxIsInterruptable { |
|
/arg1 set % Client Object |
|
[/in-ox_get_server_name /mcap /ans /sname] pushVariables |
|
[ |
|
/mcap arg1 def |
|
/ans 0 def |
|
mcap tag 6 eq { |
|
mcap 10 get tag 6 eq { |
|
mcap 10 get 1 get 0 get 1 get /sname set |
|
}{ /sname ( ) def } ifelse |
|
}{ |
|
/sname ( ) def |
|
} ifelse |
|
(ox_sm1) sname isSubstr -1 eq { |
|
} { /ans 1 def } ifelse |
|
(ox_asir) sname isSubstr -1 eq { |
|
} { /ans 1 def } ifelse |
|
/arg1 ans def |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
/oxresetAll { |
|
[(oxGetClientList)] extension |
|
{ dup oxIsInterruptable { oxreset } { pop } ifelse } map |
|
} def |
|
|
|
/oxrpc2 { |
|
/arg2 set |
|
/arg1 set |
|
[/in-oxrpc2 /pid /n /comm /i] pushVariables |
|
[ |
|
/pid arg1 def |
|
/comm arg2 def |
|
/n comm length def |
|
n 1 sub -1 1 { |
|
/i set |
|
pid comm i get oxsendcmo |
|
} for |
|
pid n 1 sub oxsendcmo |
|
pid comm 0 get oxexec |
|
] pop |
|
popVariables |
|
} def |
|
|
|
[(oxrpc2) |
|
[(Remote procedure call by using oxexec) |
|
(client [function-name arg1 arg2 ...] oxrpc2 ) |
|
(cf. ox-cmo-rpc in Risa/Asir) |
|
(Example: ) |
|
$ (oxasir.sm1) run (x^2-1). fctr $ |
|
(oxasir.ccc [(igcd) (6).. (10)..] oxrpc2) |
|
(oxasir.ccc oxpopcmo :: ) |
|
] |
|
] putUsages |
|
|
|
|
[(ostype)] extension 0 get |
[(ostype)] extension 0 get |
(windows) eq { |
(windows) eq { |
|
(ox-win.sm1.loaded) boundp { |
|
}{ |
|
[(parse) (ox-win.sm1) pushfile] extension |
|
} ifelse |
}{ |
}{ |
initializePathNamesForOx %% This should be |
initializePathNamesForOx %% This should be |
} ifelse |
} ifelse |