[BACK]Return to ox-win.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Diff for /OpenXM/src/kan96xx/Doc/ox-win.sm1 between version 1.21 and 1.22

version 1.21, 2002/10/01 13:00:33 version 1.22, 2003/07/21 07:31:59
Line 1 
Line 1 
 %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.20 2002/08/03 06:02:35 takayama Exp $  %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.21 2002/10/01 13:00:33 takayama Exp $
   
 (ox-win.start.noiconic) boundp {  [(parse) (ox.sm1) pushfile] extension
   /ox-win.start.iconic 0 def  
 }{  
   /ox-win.start.iconic 1 def  
 } ifelse  
   
 /ox-win.sm1.loaded 1 def  
 (ox.sm1.loaded) boundp {  
 }{  
   [(parse) (ox.sm1) pushfile] extension pop  
 } ifelse  
   
 $ox-win.sm1, ---OpenXM protocol module for Microsoft Windows 1/9, 2002  (C) N.Takayama.$ message-quiet  
   
 %%%%%%%%%%%% 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  
   
 %% This variable is used in sm1connectr_win  
 %% It should be set, for example, to c:/cygwin/home/nobuki/OpenXM  
 %% See  kan96xx/win/websm1.bat  
 [(getenv) (OPENXMHOMEWIN)] extension  
 /OpenXM_HOME_WIN set  
 OpenXM_HOME_WIN tag 0 eq {  
   [(getenv) (OpenXM_HOME)] extension  
   /OpenXM_HOME_WIN set  
 } { } ifelse  
 OpenXM_HOME_WIN tag 0 eq {  
   %% Hard encoding:  
   /OpenXM_HOME_WIN  
    (\OpenXM-win)  
 %  (\cygwin\home\nobuki\OpenXM\misc\packages\Windows\OpenXM-win)      
   def  
 } { } ifelse  
   
 /ox.win.set.start {  
   [(stat) (c:\windows\system32\cmd.exe)] extension 0 get  
   0 eq {  
     /ox.win.start.0 [(c:\windows\system32\cmd.exe) (/c) (start)] def  
     /ox.win.start [ox.win.start.0 aload pop  
                    ox-win.start.iconic { (/min) } { } ifelse ] def  
   }{  
    [(stat) (c:\winnt\system32\cmd.exe)] extension 0 get  
    0 eq {  
       /ox.win.start.0 [(c:\winnt\system32\cmd.exe) (/c) (start) ] def  
       /ox.win.start [ox.win.start.0 aload pop  
                      ox-win.start.iconic { (/min) } { } ifelse ] def  
    }{  
      /ox.win.start.0 [ (start) ] def  
      /ox.win.start [ ox.win.start.0 aload pop  
                      ox-win.start.iconic { (/min) } { } ifelse ] def  
    } ifelse  
   } ifelse  
 } def  
 ox.win.set.start  
   
 %%%%%%%%%%%%%%% end configuration  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
 %% Set constants for windows.  
   
 ox.ostype 1 get (cygwin) eq {  
  /oxpath.ox (bin/ox.exe) def  
  /oxpath.oxsm1 (bin/ox_sm1.exe) def  
  /oxpath.oxlog (bin/oxlog.exe) def  
  /oxpath.xterm (start /min ) def  
  /oxpath.null  (  ) def  
  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX  
  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case  
 }{ } ifelse  
   
 ox.ostype 1 get (xcygwin) eq {  
  /oxpath.ox (bin/ox.exe) def  
  /oxpath.oxsm1 (bin/ox_sm1.exe) def  
  /oxpath.oxlog (bin/oxlog.exe) def  
  /oxpath.xterm (/usr/X11R6/bin/xterm -icon -e ) def  
  /oxpath.oxlog.xterm (oxlog /usr/X11R6/bin/xterm -icon -e ) def  
  /oxpath.null  (  ) def  
  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX  
  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case  
 }{ } ifelse  
   
 ox.ostype 1 get (native) eq {  
   /oxpath.ox  
   [ OpenXM_HOME_WIN  
     (\bin\ox.exe)  
   ] cat  
  def  
 }{ } ifelse  
   
 /sm1connectr {  
   ox.ostype 1 get (cygwin) eq {  
     sm1connectr_cygwin  
   }{ } ifelse  
   ox.ostype 1 get (xcygwin) eq {  
     sm1connectr_xcygwin  
   }{ } ifelse  
   ox.ostype 1 get (native) eq {  
     sm1connectr_win  
   }{ } ifelse  
 } def  
   
 %% For cygwin  
 %% How to debug:  
 %% 1. Use start 'c:\cygwin\cygwin.bat' to create a cygwin window.  
 %% 2. Set OpenXM_HOME and run sm1 , (ox.sm1) run, sm1_connectr  
 %% 3. In order to kill a process, use ps and kill -9  
 /sm1connectr_cygwin {  
  [/in-sm1connectr /pass /peer /data /control /sss ] pushVariables  
  [  
  /pass [(oxGenPass)] extension def  
  /peer [(oxGetPort) (localhost)] extension def  
  /data peer 1 get toString def  
  /control peer 3 get toString def  
  peer message  
  [ox.win.start { ( ) } map cat ox_backslash_to_slash  
   ( ox )  
   ( -reverse -ox )  
   [(c:/cygwin) OpenXM_HOME_WIN (/bin/ox_sm1.exe)] cat  
 %  (c:/cygwin/home/TakayamaNobuki/OpenXM/bin/ox_sm1.exe)  
   ( -data ) data ( -control ) control  ( -pass ) pass  
   ( -wait 2 )  
   oxpath.null  
   ( )] cat /sss set  
   sss message  
   sss system  
  [(oxCreateClient2) 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.init  
  ] pop  
  popVariables  
 } def  
   
 %% How to debug:  
 %% 1. Set a batch file to change directory. Start command window.  
 %% 2. Set OpenXMHOMEWIN (cf. debug-tool/asirgui-debug.bat)  
 %%    and run sm1 , (ox.sm1) run, sm1_connectr  
 %% For Native windows system  
 /sm1connectr_win {  
  [/in-sm1connectr /pass /peer /data /control ] pushVariables  
  [  
  /pass [(oxGenPass)] extension def  
  /peer [(oxGetPort) (localhost)] extension def  
  /data peer 1 get toString def  
  /control peer 3 get toString def  
  peer message  
  (Hello ) message  
  [(forkExec) [  
     ox.win.start   aload pop  
 %%(c:\windows\system32\cmd.exe) (/c) (start)  
     oxpath.ox  
     (-reverse)  
     (-ox)  
     [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat  
     (-data)  
      data  
      (-control)  
      control  
      (-pass)  
      pass  
   ]  
   [  ] 3] extension  
   
  [(oxCreateClient2) 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.init  
  ] pop  
  popVariables  
 } def  
   
 %% For cygwin  
 /sm1connectr_xcygwin {  
  [/in-sm1connectr_xcygwin /pass /peer /data /control /sss] pushVariables  
  [  
  (Hello) message  
  /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] getPathNameSm1    
   ( -reverse -ox )  
   [oxpath.oxsm1] getPathNameSm1  
   ( -data ) data ( -control ) control  ( -pass ) pass  
   oxpath.null  
   ( &)] cat /sss set  
  sss message  
  sss system  
  [(oxCreateClient2) 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.init  
  ] pop  
  popVariables  
 } def  
   
 %% Skip it. initializePathNamesForOx    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>