[BACK]Return to httpd.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Diff for /OpenXM/src/kan96xx/Doc/httpd.sm1 between version 1.3 and 1.10

version 1.3, 2001/08/23 02:08:41 version 1.10, 2002/10/23 13:38:50
Line 1 
Line 1 
 %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.2 2001/08/23 00:49:00 takayama Exp $  %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.9 2002/10/21 10:43:52 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
Line 70 
Line 74 
     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
Line 89 
Line 93 
    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
Line 123 
Line 127 
    %%(<img src="hoge.jpeg"> <img>) sendln %%test.  It does not work always?!     %%(<img src="hoge.jpeg"> <img>) sendln %%test.  It does not work always?!
    %%(<a href="hoge.jpeg"> Pretty format </a>) sendln %%test. It works.     %%(<a href="hoge.jpeg"> Pretty format </a>) sendln %%test. It works.
   
    (<FORM NAME="myFORM">) sendln    [(getenv) (OXWEB_POST)] extension tag 0 eq {
       (<FORM NAME="myFORM">) sendln  % use get
     }{
       (<FORM NAME="myFORM" METHOD="POST">) sendln
     } ifelse
    (<INPUT TYPE=submit VALUE="submit">) sendln     (<INPUT TYPE=submit VALUE="submit">) sendln
    [(<textarea name=) httpd.textarea.name     [(<textarea name=) httpd.textarea.name
     ( rows=10 cols="80" wrap="soft"></textarea>)] cat sendln      ( rows=10 cols="80" wrap="soft"></textarea>)] cat sendln
Line 174 
Line 182 
    [(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
Line 303 
Line 322 
   arg1    arg1
 } def  } def
   
 %% remove GET /?msg=  %% remove GET /?msg= or msg=
 /removeGET {  /removeGET {
   /arg1 set    /arg1 set
   [/in-removeGET /s /s2 /i /j /i0    [/in-removeGET /s /s2 /i /j /i0
    /tname     /tname  /nnn
   ] pushVariables    ] pushVariables
   [    [
      /s arg1 def       /s arg1 def
      /httpd.textarea.valid 1 def       /httpd.textarea.valid 0 def
      s 1 copy /s2 set       s 1 copy /s2 set
      s (array) dc /s set       s (array) dc /s set
        /nnn httpd.textarea.name.aaa length 6 sub def
   
      /tname  [  ] def       /tname  [  ] def
      0 1 s length 1 sub {       0 1 s length 1 sub {
        /i0 set         /i0 set
        s i0 get 61 eq {  %% 61 is =         s i0 get 61 eq {  %% 61 is =
          i0 1 add /i0 set           i0 1 add /i0 set
          tname message  
            [
             << tname length 1 sub  >> -1
             << tname length nnn sub >> dup 0 ge { } { pop 0 } ifelse
             {
                /i set
                tname i get
             } for
            ] reverse /tname set
            (GET /?) (array) dc tname join /tname set
   
          httpd.textarea.name.aaa message           httpd.textarea.name.aaa message
          tname httpd.textarea.name.aaa eq {           tname httpd.textarea.name.aaa eq {
            /httpd.textarea.valid 1 def             /httpd.textarea.valid 1 def
          } {           } {
            /httpd.textarea.valid 0 def             /httpd.textarea.valid 0 def
              httpd.textarea.name.aaa { (string) dc } map cat message
            (Warning: got an invalid name for the text field.) message             (Warning: got an invalid name for the text field.) message
          } ifelse           } ifelse
          exit           exit
Line 337 
Line 368 
      i0 1 s length 1 sub {       i0 1 s length 1 sub {
        /i set         /i set
        s2 j << s i get (string) dc >> put         s2 j << s i get (string) dc >> put
          j s2 length 1 sub lt { s2 j 1 add ( ) put } { } ifelse
          %% might cause a BUG. It should be improved.
        j 1 add /j set         j 1 add /j set
      } for       } for
      /arg1 s2 def       /arg1 s2 def

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.10

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>