=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/httpd-sm1.sm1,v retrieving revision 1.3 retrieving revision 1.7 diff -u -p -r1.3 -r1.7 --- OpenXM/src/kan96xx/Doc/httpd-sm1.sm1 2001/08/12 03:13:35 1.3 +++ OpenXM/src/kan96xx/Doc/httpd-sm1.sm1 2001/08/21 14:21:29 1.7 @@ -1,4 +1,4 @@ -%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-sm1.sm1,v 1.2 2001/08/10 08:33:03 takayama Exp $ +%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-sm1.sm1,v 1.6 2001/08/21 14:12:45 takayama Exp $ %% http server by sm1 %% Note to run on the Windows (TM). %% (A) You need to set IE (internet explorer) as follows: @@ -23,26 +23,27 @@ ] cat def -[(getenv) (OSTYPE)] extension -tag 0 eq { +[(ostype)] extension 0 get +(windows) eq { + %% Native windows environment or cygwin. [(parse) (ox-win.sm1) pushfile] extension }{ - [(getenv) (OSTYPE)] extension - (cygwin) eq { - [(parse) (ox-win.sm1) pushfile] extension - }{ - [(parse) (ox.sm1) pushfile] extension - } ifelse + [(parse) (ox.sm1) pushfile] extension } ifelse (ox_sm1.started) boundp { } { %% Initialize ox_sm1 - [(getenv) (OSTYPE)] extension - tag 0 eq { - sm1connectr_win %% Assume that it is native Windows. + [(ostype)] extension 0 get + (windows) eq { + [(getenv) (OSTYPE)] extension + (cygwin) eq { + sm1connectr %% Cygwin + }{ + sm1connectr_win %% Native Windows. + } ifelse }{ - sm1connectr %% cygwin or unix. + sm1connectr %% Unix } ifelse ox.ccc oxmathcap ox.ccc oxsetmathcap @@ -60,14 +61,22 @@ tag 0 eq { % [(sleep 3; start iexplore http://localhost:) % httpd.port toString % ( &)] cat system - [(forkExec) - [ - (c:/windows/command/start) - (iexplore) %% Starting internet explorer (TM). - [(http://localhost:) httpd.port toString] cat - ] - [ ] - 3] extension + [(ostype)] extension 0 get + (windows) eq { + %% On windows. + [(forkExec) + [ + (c:/windows/command/start) + (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 ; ] pop popVariables @@ -136,6 +145,7 @@ tag 0 eq { /httpd { /httpd.serial 0 def /httpd.history [ ] def + /httpd.result.history [ 0 ] def { httpd_startserver ; httpd_action ; @@ -250,6 +260,7 @@ tag 0 eq { (: ) ( (in pretty format) ) %%test httpd.result preformatHTML + httpd.result.history httpd.result append /httpd.result.history set ] cat send-page-3 exit %% exit the loop LOOP-A } { exit } ifelse %% metaCommand @@ -350,13 +361,13 @@ tag 0 eq { } def /httpd.sm1man - ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.1.3/doc/asir2000/html-jp/man_toc.html") + ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.1.3/doc/kan96xx/onlinehelp/index.html") def /httpd.sm1man.index ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.1.3/doc/asir2000/html-jp/man_262.html#SEC262") def /httpd.asir.intro - ("http://www.math.sci.kobe-u.ac.jp/~taka/asir-book-html/main") + ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.1.3/doc/kan96xx/ttt/index.html") def /send-menu-1 { @@ -375,8 +386,6 @@ def (HELP:) sendln [( Sm1manual (Ja) , )] cat sendln - [( - Index (Ja) , )] cat sendln [( Intro (Ja) , )] cat sendln } def