version 1.2, 2001/08/23 00:49:00 |
version 1.6, 2002/10/17 13:40:28 |
|
|
%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.1 2001/08/23 00:16:55 takayama Exp $ |
%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.5 2001/09/20 05:57:40 takayama Exp $ |
%% common modules for httpd on sm1. |
%% common modules for httpd on sm1. |
/Oxserver_history_variable (Oxserver_history_variable_) def |
/Oxserver_history_variable (Oxserver_history_variable_) def |
|
/httpd.image.type |
|
[(getenv) (OpenXM_PSTOIMG_TYPE)] extension |
|
def |
|
|
|
|
/httpd_startserver { |
/httpd_startserver { |
[(sm1.socket) (open) [httpd.port (localhost)]] extension |
[(sm1.socket) (open) [httpd.port (localhost)]] extension |
/httpd.server.fdAndPort set |
/httpd.server.fdAndPort set |
|
|
httpd_startserver ; |
httpd_startserver ; |
httpd_action ; |
httpd_action ; |
httpd_stopserver ; |
httpd_stopserver ; |
(5 sleep) system |
% (sleep 2) system |
httpd.serial 1 add /httpd.serial set |
httpd.serial 1 add /httpd.serial set |
} loop |
} loop |
} def |
} def |
|
|
0 sendln |
0 sendln |
(<html>) sendln |
(<html>) sendln |
(Shutdown the engine. <br>) sendln |
(Shutdown the engine. <br>) sendln |
(See you! <a href="http://www.openxm.org"> Web/sm1 </a>) sendln |
(See you! <a href="http://www.openxm.org"> Web/asir, Web/sm1 </a>) sendln |
(</html>) sendln |
(</html>) sendln |
0 sendln |
0 sendln |
[(flush)] extension |
[(flush)] extension |
|
|
[(flush)] extension |
[(flush)] extension |
} def |
} def |
|
|
|
/send-page-warning-image { |
|
(HTTP/0.9 200 OK) sendln |
|
(Connection: close) sendln |
|
(Content-Type: text/html) sendln |
|
0 sendln |
|
(Error: Image translation is not supported on this server<br>) sendln |
|
( Check the value of the environmental variable OpenXM_PSTOIMG_TYPE <br>) sendln |
|
0 sendln |
|
[(flush)] extension |
|
} def |
|
|
/stopclient { |
/stopclient { |
[(sm1.socket) (close) [client.fdAndPort 0 get] ] extension message |
[(sm1.socket) (close) [client.fdAndPort 0 get] ] extension message |
} def |
} def |
|
|
arg1 |
arg1 |
} def |
} def |
|
|
/executeStringAndSelectInputFromBrowsersAndOxserver { |
/executeStringAndSelectInputFromBrowserAndOxserver { |
|
/arg3 set |
/arg2 set |
/arg2 set |
/arg1 set |
/arg1 set |
[/in-executeStringAndSelectInputFromBrowsersAndOxserver |
[/in-executeStringAndSelectInputFromBrowserAndOxserver |
/oxserver.ccc |
/oxserver.ccc |
/command.to.oxserver |
/command.to.oxserver |
/sss.engine |
/sss.engine |
|
|
/sss |
/sss |
/err |
/err |
/httpd.result |
/httpd.result |
|
/stringOrCmo |
] pushVariables |
] pushVariables |
% Global var: httpd.server.fd |
% Global var: httpd.server.fd |
[ |
[ |
/oxserver.ccc arg1 def |
/oxserver.ccc arg1 def |
/command.to.oxserver arg2 def |
/command.to.oxserver arg2 def |
|
/stringOrCmo arg3 def |
oxserver.ccc |
oxserver.ccc |
command.to.oxserver |
command.to.oxserver |
oxexecutestring ; |
oxexecutestring ; |
|
|
[(oxReq) oxserver.ccc SM_dupErrors ] extension pop |
[(oxReq) oxserver.ccc SM_dupErrors ] extension pop |
|
|
[(oxReq) oxserver.ccc SM_popCMO ] extension pop |
[(oxReq) oxserver.ccc SM_popCMO ] extension pop |
[(oxReq) oxserver.ccc SM_popString ] extension pop |
stringOrCmo (string) eq { |
|
[(oxReq) oxserver.ccc SM_popString ] extension pop |
|
}{ |
|
[(oxReq) oxserver.ccc SM_popCMO ] extension pop |
|
} ifelse |
[(flush)] extension pop |
[(flush)] extension pop |
%% Select inputs for interruption. |
%% Select inputs for interruption. |
%% Wait by the spin lock. |
%% Wait by the spin lock. |
|
|
sss 0 get { |
sss 0 get { |
[(oxGet) oxserver.ccc] extension /err set |
[(oxGet) oxserver.ccc] extension /err set |
[(oxGet) oxserver.ccc] extension /httpd.result set |
[(oxGet) oxserver.ccc] extension /httpd.result set |
%% oxserver.ccc oxpopstring /httpd.result set |
|
} { |
} { |
oxserver.ccc oxreset |
oxserver.ccc oxreset |
oxserver.ccc ("computation is interrupted.";) oxexecutestring ; |
oxserver.ccc ("computation is interrupted.";) oxexecutestring ; |