version 1.16, 2001/09/20 05:57:40 |
version 1.24, 2002/10/24 02:30:15 |
|
|
%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-asir.sm1,v 1.15 2001/08/29 11:18:57 takayama Exp $ |
%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-asir.sm1,v 1.23 2002/10/24 02:12:34 takayama Exp $ |
%% http server by sm1 |
%% http server by sm1 |
|
|
[(parse) (httpd.sm1) pushfile] extension pop |
[(parse) (httpd.sm1) pushfile] extension pop |
|
|
/httpd.initialization |
/httpd.initialization |
%% Put initialization codes here. |
%% Put initialization codes here. |
[ |
[ |
|
(XM_debug=0; ctrl("debug_window",0);) |
("Asirweb version 0.80. "+ |
("Asirweb version 0.80. "+ |
" Risa/Asir oxasir version "+rtostr(version());) |
" Risa/Asir oxasir version "+rtostr(version());) |
] cat |
] cat |
|
|
/httpd.port 1200 rrr add def |
/httpd.port 1200 rrr add def |
httpd.port message |
httpd.port message |
|
|
[(sleep 3; netscape -geometry 800x500 http://localhost:) |
%%[(sleep 3; netscape -geometry 800x500 http://localhost:) |
httpd.port toString |
%% httpd.port toString |
( &)] cat system |
%% ( &)] cat system |
|
[(ostype)] extension 0 get |
|
(windows) eq { |
|
%% On windows. |
|
[(forkExec) |
|
[ |
|
%%(c:\windows\command\start) |
|
ox.win.start.0 aload pop |
|
(iexplore) %% Starting internet explorer (TM). |
|
[(http://localhost:) httpd.port toString] cat |
|
] |
|
[ ] |
|
3] extension |
|
}{ |
|
%% On unix. |
|
[(sleep 3 ; netscape http://localhost:) httpd.port toString ( & ) ] cat |
|
system |
|
} ifelse |
|
|
httpd ; |
httpd ; |
] pop |
] pop |
popVariables |
popVariables |
|
|
{ |
{ |
[(sm1.socket) (select) [httpd.server.fd 0 get -1]] extension |
[(sm1.socket) (select) [httpd.server.fd 0 get -1]] extension |
%% wait for ever |
%% wait for ever |
[(sm1.socket) (read) [httpd.server.fd 0 get ]] extension /ff set |
[(sm1.socket) (readHTTP) [httpd.server.fd 0 get ]] extension /ff set |
ff length 0 eq { |
ff tag 0 eq { |
(connection is closed.) message |
(connection is closed.) message exit |
} |
} |
{ |
{ |
(------------ start ----------------------) message |
(------------ start ----------------------) message |
|
|
( ) message |
( ) message |
httpd.serial 0 eq { |
httpd.serial 0 eq { |
/httpd.com httpd.initialization def |
/httpd.com httpd.initialization def |
|
/httpd.textarea.valid 1 def |
} { } ifelse |
} { } ifelse |
httpd.sendFile tag 0 eq { } |
httpd.sendFile tag 0 eq { } |
{ |
{ |