=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/httpd.sm1,v retrieving revision 1.6 retrieving revision 1.13 diff -u -p -r1.6 -r1.13 --- OpenXM/src/kan96xx/Doc/httpd.sm1 2002/10/17 13:40:28 1.6 +++ OpenXM/src/kan96xx/Doc/httpd.sm1 2002/11/03 12:43:03 1.13 @@ -1,11 +1,22 @@ -%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.5 2001/09/20 05:57:40 takayama Exp $ +%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.12 2002/10/30 13:23:06 takayama Exp $ %% common modules for httpd on sm1. /Oxserver_history_variable (Oxserver_history_variable_) def /httpd.image.type [(getenv) (OpenXM_PSTOIMG_TYPE)] extension def +[(getenv) (OXWEB_DEBUG)] extension tag 0 eq { + /httpd.debug 0 def +} { + /httpd.debug 1 def +} ifelse +[(getenv) (OXWEB_TAKE_LOG)] extension tag 0 eq { + /httpd.take.log 0 def +} { + /httpd.take.log 1 def +} ifelse + /httpd_startserver { [(sm1.socket) (open) [httpd.port (localhost)]] extension /httpd.server.fdAndPort set @@ -27,7 +38,7 @@ def /sendln { /arg1 set - [/in-sendln /mmm] pushVariables + [/in-sendln /mmm /i] pushVariables [ arg1 /mmm set mmm tag 5 eq { [mmm 10 (string) dc] cat /mmm set @@ -37,7 +48,8 @@ def [(sm1.socket) (select) [httpd.server.fd 0 get 0]] extension { (Warning (sendln): your peer closed the connection. Do not send the data.) message } { - [(sm1.socket) (write) [httpd.server.fd 0 get mmm]] extension message + [(sm1.socket) (write) [httpd.server.fd 0 get mmm]] extension /i set + httpd.debug { i message } { } ifelse } ifelse ] pop popVariables @@ -74,6 +86,7 @@ def httpd_startserver ; httpd_action ; httpd_stopserver ; + httpd.take.log { (date) system } { } ifelse % (sleep 2) system httpd.serial 1 add /httpd.serial set } loop @@ -127,7 +140,11 @@ def %%( ) sendln %%test. It does not work always?! %%( Pretty format ) sendln %%test. It works. - (