=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/ox.sm1,v retrieving revision 1.5 retrieving revision 1.13 diff -u -p -r1.5 -r1.13 --- OpenXM/src/kan96xx/Doc/ox.sm1 1999/11/11 01:35:07 1.5 +++ OpenXM/src/kan96xx/Doc/ox.sm1 2000/12/05 11:20:26 1.13 @@ -1,4 +1,4 @@ -%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.4 1999/11/04 12:08:43 takayama Exp $ +%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.12 2000/12/03 08:19:54 takayama Exp $ %%%%%%%%%%%% Configuration: Specify your server path %%%%% ox, ox_sm1, oxlog are contained in kxx.tgz %%%%% These should be under /usr/local/lib/sm1 or LOAD_SM1_PATH @@ -73,7 +73,7 @@ ox.version [(Version)] system_variable gt /SM_popCMO 262 def /SM_executeFunction 269 def -/SM_DUMMY_sendcmo 280 def +/SM_DUMMY_sendcmo 2147418112 1 add def %%% SM_PRIVATE+1 /SM_sync_ball 281 def /SM_pops 265 def @@ -355,7 +355,7 @@ ox.verbose { oxhelp } { } ifelse /oxreset { /arg1 set [(oxReq) arg1 SM_control_reset_connection] extension pop - [(oxGetFromControl) arg1 ] extension pop +%% [(oxGetFromControl) arg1 ] extension pop [(oxGet) arg1] extension message } def @@ -696,6 +696,19 @@ ox.verbose { } { } ifelse } { } ifelse + %% Else first try to find it in OpenXM_HOME + [(getenv) (OpenXM_HOME)] extension /tname set + tname isString + { + tname addSlash /tname set + [tname (lib/sm1/)] cat /tname set + [(stat) [tname fname] cat] extension + 0 get isInteger %% The file was found. + { /fullname [tname fname] cat def + /getPathNameSm1.LLL goto + } { } ifelse + } { } ifelse + %% Else try to find it in /usr/local/lib/sm1 [(stat) [(/usr/local/lib/sm1/) fname] cat] extension 0 get isInteger %% The file was found. @@ -706,8 +719,11 @@ ox.verbose { %% Otherwise error. [(getPathNameSm1: The file ) fname ( could not be found ) - (neigher in LOAD_SM1_PATH=) + (neigher in LOAD\_SM1\_PATH=) [(getenv) (LOAD_SM1_PATH)] extension + ( nor in OpenXM\_HOME/lib/sm1=) + [(getenv) (OpenXM_HOME)] extension + (/lib/sm1) ( nor in /usr/local/lib/sm1) ] cat /getPathNameSm1.errorMessage set getPathNameSm1.errorMessage message @@ -722,8 +738,9 @@ ox.verbose { [(getPathNameSm1) [([fname] getPathNameSm1 fullname) (string fname, fullname) - (This command searches the fname in /usr/local/lib/sm1 and LOAD_SM1_PATH) - (and returns the fullname.) + (This command searches the fname in LOAD_SM1_PATH, ) + (OpenXM_HOME/lib/sm1, and /usr/local/lib/sm1) + (It returns the fullname.) ]] putUsages /getPathNameAsir { @@ -738,13 +755,6 @@ ox.verbose { /getPathNameAsir.LLL goto } { } ifelse - %% Else first try to find it in /usr/local/lib/asir - [(stat) [(/usr/local/lib/asir/) fname] cat] extension - 0 get isInteger %% The file was found. - { /fullname [(/usr/local/lib/asir/) fname] cat def - /getPathNameAsir.LLL goto - } { } ifelse - %% Else try to find it in ASIR_LIBDIR [(getenv) (ASIR_LIBDIR)] extension /tname set tname isString @@ -757,10 +767,19 @@ ox.verbose { } { } ifelse + %% Else try to find it in /usr/local/lib/asir + [(stat) [(/usr/local/lib/asir/) fname] cat] extension + 0 get isInteger %% The file was found. + { /fullname [(/usr/local/lib/asir/) fname] cat def + /getPathNameAsir.LLL goto + } { } ifelse + %% Otherwise error. - [ (getPathNameAsir: The file ) fname + [ (getPathNameAsir: The file ) + fname (ox_asir) eq + {(ox\_asir)} { fname }ifelse ( could not be found ) - (neigher in /usr/local/lib/asir nor in ASIR_LIBDIR. ) + (neigher in /usr/local/lib/asir nor in ASIR\_LIBDIR. ) ] cat /getPathNameAsir.errorMessage set getPathNameAsir.errorMessage message ] pop popVariables getPathNameAsir.errorMessage error @@ -792,13 +811,21 @@ ox.verbose { /arg1 set [/in-launch_nox /pass /peer /data /control /name /machine /your-peer /comm /remoteOpenXMbin /remoteServer /myhost + /argNumber /aaa ] pushVariables [ - /machine arg1 0 get def - /remoteOpenXMbin arg1 1 get def - /remoteServer arg1 2 get def - /name arg1 3 get def - /myhost arg1 4 get def + /aaa arg1 def + /argNumber aaa length def + /machine aaa 0 get def + machine (localhost) eq argNumber 5 lt and { + aaa 1 get ox_launch_localhost /your-peer set + /LLL.end goto + } { + /remoteOpenXMbin aaa 1 get def + /remoteServer aaa 2 get def + /name aaa 3 get def + /myhost aaa 4 get def + } ifelse /pass [(oxGenPass)] extension def /peer [(oxGetPort) myhost] extension def @@ -824,6 +851,7 @@ ox.verbose { comm system (sleep 5) system-csh [(oxCreateClient2) peer 1 pass] extension /your-peer set + /LLL.end /arg1 your-peer def ] pop popVariables @@ -833,6 +861,8 @@ ox.verbose { [(ox_launch) [( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] ) ( ox_launch client ) + $or $ + $ [(localhost) ox-server-name] ox_launch client$ (Example 1: ) $ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $ $ (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $ @@ -855,11 +885,56 @@ ox.verbose { /com arg1 def [(/bin/csh -c ") com (")] cat /com2 set - %% com2 message + %%com2 message com2 system ] pop popVariables } def +/ox_launch_localhost { + /arg1 set + [/in-ox_launch_localhost /pass /peer /data /control /oxserver + /my-peer] pushVariables + [ + /oxserver arg1 def + /pass [(oxGenPass)] extension def + /peer [(oxGetPort) (localhost)] extension def + /data peer 1 get toString def + /control peer 3 get toString def + peer message + [oxpath.oxlog.xterm oxpath.ox ( -reverse -ox ) oxserver + ( -data ) data ( -control ) control ( -pass ) pass + oxpath.null + ( &)] cat system-csh + [(oxCreateClient2) peer 0 pass] extension /my-peer set + %% 0 means connect from only localhost. + (The server is binded to the variable ox.ccc) message + /arg1 my-peer def + ] pop + popVariables + arg1 +} def + +%% Test code for oxCreateControl_RFC_101 +/sm1connect101 { + [/in-sm1connectr /pass /peer /data /control ] pushVariables + [ + /pass [(oxGenPass)] extension def + /peer [(oxGetPort) (localhost)] extension def + /peer [ peer 0 get peer 1 get ] def %% BUG, close the rest. + /data peer 1 get toString def + peer message + [(/home/nobuki/OpenXM/src/oxc/oxc) + ( -c ) pass ( -h ) (localhost) ( -p ) data ( -x ) + oxpath.null + ( &)] cat system-csh + + [(oxCreateControl_RFC_101) peer 0 pass] extension /ox.ccc set + %% 0 means connect from only localhost. + (The server is binded to the variable ox.ccc) message + ox.ccc + ] pop + popVariables +} def initializePathNamesForOx %% This should be