version 1.45, 2004/09/17 12:32:11 |
version 1.59, 2015/08/03 21:12:54 |
|
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.44 2004/09/17 11:05:56 takayama Exp $ |
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.58 2013/09/19 10:15:11 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 |
} def |
} def |
|
|
|
(@@@.monitor) boundp { |
|
}{ |
|
/@@@.monitor ( ) def |
|
} ifelse |
|
|
|
/oxMonitor { |
|
/@@@.monitor ( -monitor ) def |
|
} def |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%% basic functions for OX-RFC 100 |
%%% basic functions for OX-RFC 100 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
Line 103 ox.version [(Version)] system_variable gt |
|
Line 112 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 116 ox.version [(Version)] system_variable gt |
|
Line 126 ox.version [(Version)] system_variable gt |
|
$ ex 2. (ox.sm1) run oxNoX (x^2-1). fctr pmat ; $ |
$ ex 2. (ox.sm1) run oxNoX (x^2-1). fctr pmat ; $ |
$ $ |
$ $ |
$cf. extension-oxLog $ |
$cf. extension-oxLog $ |
|
(oxMonitor : ox_sm1 server outputs packet dumps.) |
|
$ ex 1. (ox.sm1) run oxMonitor sm1connectr $ |
] |
] |
] putUsages |
] putUsages |
|
|
Line 684 ox.verbose { oxhelp } { } ifelse |
|
Line 696 ox.verbose { oxhelp } { } ifelse |
|
oxstart100 |
oxstart100 |
@@@.quiet { ( -quiet ) } { } ifelse |
@@@.quiet { ( -quiet ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
( -oxserver bin/ox_sm1 -e ) ( -reverse ) |
Xm_engineLogToStdout { ( -nox -engineLogToStdout ) } { } ifelse %bug.onlyForsm1 |
|
( -oxserver bin/ox_sm1 -e ) ( -reverse ) @@@.monitor |
( -data ) data ( -control ) control pass [1 2] get |
( -data ) data ( -control ) control pass [1 2] get |
( )] cat execve |
( )] cat execve |
[(oxCreateClient2) peer 0 pass 0 get] extension /oxsm1.ccc set |
[(oxCreateClient2) peer 0 pass 0 get] extension /oxsm1.ccc set |
Line 740 ox.verbose { oxhelp } { } ifelse |
|
Line 753 ox.verbose { oxhelp } { } ifelse |
|
[(sm1connectr-ssh) |
[(sm1connectr-ssh) |
[([hostname login-name] sm1connectr-ssh client) |
[([hostname login-name] sm1connectr-ssh client) |
(Starting oxpath.oxsm1-ssh by the launcher oxpath.ox-ssh on the "hostname".) |
(Starting oxpath.oxsm1-ssh by the launcher oxpath.ox-ssh on the "hostname".) |
(cf. oxNoX ) |
(cf. oxNoX ox ) |
(Set the following varialbes to appropriate values:) |
(Set the following varialbes to appropriate values:) |
(oxpath.oxlog.xterm-ssh oxpath.oxsm1-ssh oxpath.ox-ssh myhostname-ssh ) |
(oxpath.oxlog.xterm-ssh oxpath.oxsm1-ssh oxpath.ox-ssh myhostname-ssh ) |
$Example 1: $ |
$Example 1: $ |
Line 793 ox.verbose { oxhelp } { } ifelse |
|
Line 806 ox.verbose { oxhelp } { } ifelse |
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%% Aux functions for ox_asir |
%%% Aux functions for ox_asir |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
/ox_asirConnectMethod { asirconnectr /oxasir.ccc set } def |
/ox_asirConnectMethod { |
|
asirconnectr /oxasir.ccc set |
|
[(getenv) (OX_ASIR_LOAD_FILE)] extension tag 0 eq { 0 } |
|
{ /oxasir.loadfile [$load("$[(getenv) (OX_ASIR_LOAD_FILE)] extension $");$] |
|
cat def |
|
oxasir.ccc oxasir.loadfile oxsubmit |
|
oxasir.ccc oxpopcmo } ifelse |
|
} def |
/oxasir.loadmethod 1 def %% "..." oxsendcmo (load) ox... |
/oxasir.loadmethod 1 def %% "..." oxsendcmo (load) ox... |
/oxasir.verbose 0 def |
/oxasir.verbose 0 def |
/oxasir.ccc load isArray |
/oxasir.ccc load isArray |
Line 1709 oxasir.verbose { |
|
Line 1729 oxasir.verbose { |
|
$ [1 2 ] ] asir.wgr $ |
$ [1 2 ] ] asir.wgr $ |
]] putUsages |
]] putUsages |
|
|
|
/print_tex_form.aux { |
|
/arg1 set |
|
[/f /ans] pushVariables |
|
[ |
|
arg1 /f set |
|
[(UseDsmall)] system_variable /vv set |
|
[(UseDsmall) 1] system_variable |
|
f isArray { |
|
f { print_tex_form.aux } map /ans set |
|
}{ |
|
[$quote($, f toString, $) $] cat /ans set |
|
} ifelse |
|
[(UseDsmall) vv] system_variable |
|
ans /arg1 set |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
/print_tex_form { |
|
/arg1 set |
|
[/f /comm /vv] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/f arg1 def |
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
|
|
oxasir.ccc ( quotetotex_env("conv_rule",7); ) oxsubmit |
|
oxasir.ccc oxpopcmo ; |
|
|
|
f print_tex_form.aux /f set |
|
[$ print_tex_form($, f $); $] cat /comm set |
|
oxasir.ccc comm oxsubmit |
|
oxasir.ccc oxpopcmo /arg1 set |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
[(print_tex_form) |
|
[ (obj print_tex_form str) |
|
]] putUsages |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%% functions to start ox_asir |
%%% functions to start ox_asir |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
Line 1728 oxasir.verbose { |
|
Line 1794 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 1839 oxasir.verbose { |
|
Line 1906 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 |