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

Diff for /OpenXM/src/kan96xx/Doc/ox.sm1 between version 1.43 and 1.55

version 1.43, 2004/09/17 07:27:28 version 1.55, 2006/03/03 02:30:09
Line 1 
Line 1 
 %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.42 2004/09/10 13:20:22 takayama Exp $  %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.54 2006/03/03 00:43:02 takayama Exp $
   
 /ox.sm1.myname (ox-new.sm1) def  /ox.sm1.myname (ox-new.sm1) def
   
Line 48  ox.version [(Version)] system_variable gt 
Line 48  ox.version [(Version)] system_variable gt 
   /@@@.Xm_noX Xm_noX def    /@@@.Xm_noX Xm_noX def
 }{  } ifelse  }{  } ifelse
 /Xm_noX @@@.Xm_noX def  /Xm_noX @@@.Xm_noX def
   /Xm_engineLogToStdout 0 def
   
 /oxNoX {  /oxNoX {
    /Xm_noX 1 def     /Xm_noX 1 def
Line 103  ox.version [(Version)] system_variable gt 
Line 104  ox.version [(Version)] system_variable gt 
  (client oxpushcmotag)   (client oxpushcmotag)
  (   )   (   )
  (client oxgetsp --- get stack pointer,  client oxgeterrors --- get all errors)   (client oxgetsp --- get stack pointer,  client oxgeterrors --- get all errors)
    (client oxclearstack --- clear the stack of the ox server.)
  (cleint oxisData, client oxreset, client oxshutdown)   (cleint oxisData, client oxreset, client oxshutdown)
  (oxhelp for this message)   (oxhelp for this message)
  ([(oxWatch) client] extension to start a log.)   ([(oxWatch) client] extension to start a log.)
Line 348  ox.verbose { oxhelp } {  } ifelse
Line 350  ox.verbose { oxhelp } {  } ifelse
   
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 /ox_launch_nox {  /ox_launch_nox {
   /@@@.ox_launch_nox  1 def    Xm_noX /ox_launch_nox.save set
     oxNoX
   ox_launch_aux    ox_launch_aux
     /Xm_noX ox_launch_nox.save def
 } def  } def
 /ox_launch {  /ox_launch {
   /@@@.ox_launch_nox  0 def  
   ox_launch_aux    ox_launch_aux
 } def  } def
   
Line 360  ox.verbose { oxhelp } {  } ifelse
Line 363  ox.verbose { oxhelp } {  } ifelse
  /arg1 set   /arg1 set
  [/in-launch_nox /pass /peer /data /control /name /machine   [/in-launch_nox /pass /peer /data /control /name /machine
   /your-peer /comm /remoteOpenXMbin /remoteServer /myhost    /your-peer /comm /remoteOpenXMbin /remoteServer /myhost
   /argNumber /aaa    /argNumber /aaa  /myssh
  ] pushVariables   ] pushVariables
  [   [
    /aaa arg1 def     /aaa arg1 def
Line 370  ox.verbose { oxhelp } {  } ifelse
Line 373  ox.verbose { oxhelp } {  } ifelse
      aaa 1 get ox_launch_localhost /your-peer set       aaa 1 get ox_launch_localhost /your-peer set
      /LLL.end goto       /LLL.end goto
    } {     } {
      /remoteOpenXMbin aaa 1 get def       /remoteServer aaa 1 get def
      /remoteServer aaa 2 get def       /name aaa 2 get def
      /name aaa 3 get def  
      /myhost aaa 4 get def  
    } ifelse     } ifelse
   
      /myssh [(which) (ssh)] oxshell def
      myssh tag 0 eq {
        (ssh is not found.) error
      } { } ifelse
   
      [(gethostname)] extension /myhost set
   
    /pass ox_encrypt_104_genPass def     /pass ox_encrypt_104_genPass def
    /peer [(oxGetPort) myhost] extension def     /peer [(oxGetPort) myhost] extension def
    /data peer 1 get toString def     /data peer 1 get toString def
    /control peer 3 get toString def     /control peer 3 get toString def
    peer message     peer message
  [(ssh -f ) machine ( -l ) name ( ")     peer 0 get -1 eq {
        (Error in oxGetPort) error
    @@@.ox_launch_nox {     } { } ifelse
    } {   [myssh ( -X -f ) machine ( -l ) name ( )
      remoteOpenXMbin(/oxlog )      [
      ( /usr/X11R6/bin/xterm -icon -e )       (ox100start ) % it must be on a path of the remote host
    } ifelse       @@@.quiet { ( -quiet ) } {  } ifelse
        Xm_noX { ( -nox ) } { } ifelse
   ( ) remoteOpenXMbin (/ox )       ( -oxserver ) remoteServer ( -e )
   ( -reverse -ox ) remoteServer       ( -reverse )
   ( -host ) myhost       ( -host ) myhost
   ( -data ) data ( -control ) control   pass [1 2] get       ( -data ) data ( -control ) control   pass [1 2] get
   oxpath.null      ] cat
   ( ")  
  ] cat /comm set   ] cat /comm set
  (Executing the command : ) messagen comm message message   (Executing the command : ) messagen comm message
   comm system    comm execve 0 lt {
  (sleep 5) system-csh      (Fork exec failed) error
  [(oxCreateClient2) peer 1 pass 0 get] extension /your-peer set    } { } ifelse
   % ipmask must be 1 to accept from a global address.
    [(oxCreateClient2) peer 1 , pass 0 get] extension /your-peer set
  /LLL.end   /LLL.end
  /arg1 your-peer def   /arg1 your-peer def
  ] pop   ] pop
Line 408  ox.verbose { oxhelp } {  } ifelse
Line 417  ox.verbose { oxhelp } {  } ifelse
 } def  } def
   
 [(ox_launch)  [(ox_launch)
 [( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] )  [( [remote-machine remote-ox-server-name remote-login-name] )
  (  ox_launch  client )   (  ox_launch  client )
  $or $   $or $
  $ [(localhost) ox-server-name] ox_launch client$   $ [(localhost) ox-server-name] ox_launch client$
    (This command launches ox server via ssh.)
    (My hostname is set by the function gethostname.)
  (Example 1: )   (Example 1: )
  $ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $   $ [(orange2-clone) $
  $  (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $   $  (bin/ox_sm1) (taka)$
  $ ] ox_launch /@@@.oxmath set $   $ ] ox_launch /@@@.oxsm1 set $
 ]] putUsages  ]] putUsages
   
 [(ox_launch_nox)  [(ox_launch_nox)
 [( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] )  [( [remote-machine remote-ox-server-name remote-login-name] )
  (  ox_launch_nox  client )   (  ox_launch_nox  client )
  (Example 1: )   (Example 1: )
  $ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $   $ [(tau.math.kobe-u.ac.jp) $
  $  (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $   $  (bin/ox_math) (taka) $
  $ ] ox_launch_nox /@@@.oxmath set $   $ ] ox_launch_nox /@@@.oxmath set $
 ]] putUsages  ]] putUsages
   
Line 438  ox.verbose { oxhelp } {  } ifelse
Line 449  ox.verbose { oxhelp } {  } ifelse
     /data peer 1 get toString def      /data peer 1 get toString def
     /control peer 3 get toString def      /control peer 3 get toString def
     peer message      peer message
     [oxpath.oxlog.xterm  oxpath.ox ( -reverse -ox ) oxserver      [
        oxstart100
        @@@.quiet { ( -quiet ) } {  } ifelse
        Xm_noX { ( -nox ) } { } ifelse
        ( -oxserver ) oxserver ( -e )
        ( -reverse )
      ( -data ) data ( -control ) control   pass [1 2] get       ( -data ) data ( -control ) control   pass [1 2] get
       oxpath.null      ] cat execve
      ( &)] cat system-csh  
     [(oxCreateClient2) peer 0 pass 0 get] extension /my-peer set      [(oxCreateClient2) peer 0 pass 0 get] extension /my-peer set
                          %% 0 means connect from only localhost.                           %% 0 means connect from only localhost.
     /arg1 my-peer def      /arg1 my-peer def
Line 671  ox.verbose { oxhelp } {  } ifelse
Line 686  ox.verbose { oxhelp } {  } ifelse
   oxstart100    oxstart100
   @@@.quiet { ( -quiet ) } {  } ifelse    @@@.quiet { ( -quiet ) } {  } ifelse
   Xm_noX { ( -nox ) } {  } ifelse    Xm_noX { ( -nox ) } {  } ifelse
     Xm_engineLogToStdout { ( -nox -engineLogToStdout ) } { } ifelse %bug.onlyForsm1
   ( -oxserver bin/ox_sm1 -e ) ( -reverse )    ( -oxserver bin/ox_sm1 -e ) ( -reverse )
   ( -data ) data ( -control ) control   pass [1 2] get    ( -data ) data ( -control ) control   pass [1 2] get
   ( )] cat execve    ( )] cat execve
Line 1715  oxasir.verbose {
Line 1731  oxasir.verbose {
   oxstart100    oxstart100
   @@@.quiet { ( -quiet ) } {  } ifelse    @@@.quiet { ( -quiet ) } {  } ifelse
   Xm_noX { ( -nox ) } {  } ifelse    Xm_noX { ( -nox ) } {  } ifelse
     Xm_engineLogToStdout { ( -nox -engineLogToStdout ) } { } ifelse %bug.onlyForasir
   ( -oxserver bin/ox_asir -e ) ( -reverse )    ( -oxserver bin/ox_asir -e ) ( -reverse )
   ( -data ) data ( -control ) control   pass [1 2] get    ( -data ) data ( -control ) control   pass [1 2] get
   ( )] cat execve    ( )] cat execve
Line 1826  oxasir.verbose {
Line 1843  oxasir.verbose {
   ] pop    ] pop
   popVariables    popVariables
   arg1    arg1
 } def  
   
   } def
   
   [[(lines),[10,-1]],
    [(where),[(shell), (length)]],
    [(reason_of_error), (invalid argument)],
    [(asir_where),[[(toplevel),10],[(string),(foo),3],[(string),(hoge),-1]]
   ]
   /i1 set
   %% /translateErrorForCfep.sampleInput  set
   
   [(translateErrorForCfep)
   [
    (translate the error packet defined in ox-rfc-103 into series of commands for cfep.)
   ]
   ] putUsages
   /translateErrorForCfep {
     /arg1 set
     [/ee /ans /tt /lf /i /nn /ee.orig /tt2] pushVariables
     [
      /ee arg1 def
      {
       ee etag 257 eq {
         ee (body) dc 1 get /ee set  ee /ee.orig set
         ee length 3 gt {
           ee 3 get /ee set
           ee [[(reason_of_error) ee.orig 2 get toString ]] join /ee set
         }{
           %% nn should be 2, [serial, common error no, short message]
           ee length /nn set
           nn 0 gt {
             /ee [(reason_of_error) ee nn 1 sub get toString ] def
           } {  /ee [ ] def } ifelse
         } ifelse
       }{ } ifelse
       ee etag 6 eq not { /ans [ ] def exit } { } ifelse
       /ans [ ] def
       /lf 12 (string) dc def  % line feed.
       ans [(Begin) nl lf] join /ans set
   
       ee (lines) getNode  /tt set
       tt tag 0 eq {
         ee (parse_error_at) getNode /tt set
       } { } ifelse
       tt isArray {
         tt length 0 gt {
            ans
            [(gotoLine, ) tt 0 get toString  nl lf] join /ans set
         }{ } ifelse
       } { } ifelse
       tt isInteger {
         [(gotoLine, ) tt toString  nl lf] join /ans set
       } { } ifelse
   
       ee (where) getNode  /tt set
       tt isArray {
         tt length 0 gt {
            ans
            [(findAndSelect, ) tt 0 get (string) dc  nl lf] join /ans set
         }{ } ifelse
         1 1, tt length 1 sub {
           /i set
            ans
            [(findAndShow, ) tt i get (string) dc  nl lf] join /ans set
         } for
       } { } ifelse
   
       ee (reason_of_error) getNode  /tt set
       tt tag 0 eq {
         ee (reason_of_parse_error) getNode /tt set
       } { } ifelse
       tt tag 0 eq not {
         ans [(printErrorMessage, )
              tt (string) dc localizedString  % for translation.
              nl lf] join /ans set
       }{ } ifelse
   
   %% Keyword from asir.  [(asir_where) [[(toplevel),3],[(string),(foo),3],[(filename),(func),4]]]
       ee (asir_where) getNode  /tt set
       tt (toplevel) getNode /tt2 set
       tt2 isInteger, tt2 tag 15 eq, or {
         ans [(gotoLine, ) tt2 toString  nl lf] join /ans set
       } { } ifelse
       tt isArray {
         0 1 tt length 1 sub {
            /i set
           tt i get /tt2 set
           tt2 (string) getNode tag 0 eq { }
           {
              tt2 length 2 gt {
                 tt2 2 get /tt2 set
                 tt2 isInteger, tt2 tag 15 eq, or {
                   tt2 toString .. /tt2 set
                   tt2 (-1).. gt, tt2 (4294967295).. lt, and {
                     ans [(gotoLine, ) tt2 toString  nl lf] join /ans set
                   } { } ifelse
                 } { } ifelse
              }{ } ifelse
           } ifelse
         } for
       }{ } ifelse
   
       exit
      } loop
      ans [(End) nl lf] join /ans set
      ans cat /arg1 set
     ] pop
     popVariables
     arg1
   } def
   
   /oxclearstack {
     /arg1 set
     [/cl /n] pushVariables
     [
       /cl arg1 def
       cl oxgetsp /n set
       n tag 0 eq { /n 0 def } { } ifelse
       n tag 15 eq { n (integer) dc /n set } { } ifelse
       cl n oxpops
     ] pop
     popVariables
   } def

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.55

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