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

Diff for /OpenXM/src/kan96xx/Doc/httpd-asir.sm1 between version 1.13 and 1.33

version 1.13, 2001/08/23 00:49:00 version 1.33, 2014/08/30 11:29:12
Line 1 
Line 1 
 %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-asir.sm1,v 1.12 2001/08/23 00:16:55 takayama Exp $  %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-asir.sm1,v 1.32 2014/08/29 11:58:05 takayama Exp $
 %% http server by sm1  %% http server by sm1
   
 [(parse) (httpd.sm1) pushfile] extension pop  [(parse) (httpd.sm1) pushfile] extension pop
   
 /httpd.port 1200 def  /httpd.port 1200 def
 /httpd.image.name (kobeuniv2.jpg) def  /httpd.image.name (kobeuniv2.jpg) def
 /httpd.image.type (jpeg) def  
   
 /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
Line 24  def
Line 24  def
   oxasir.ccc oxsetmathcap    oxasir.ccc oxsetmathcap
 } ifelse  } ifelse
   
   /ox-win.start.iconic 1 def
   /ox.win.set.start {
     [(stat) (c:\windows\system32\cmd.exe)] extension 0 get
     0 eq {
       /ox.win.start.0 [(c:\windows\system32\cmd.exe) (/c) (start)] def
       /ox.win.start [ox.win.start.0 aload pop
                      ox-win.start.iconic { (/min) } { } ifelse ] def
     }{
      [(stat) (c:\winnt\system32\cmd.exe)] extension 0 get
      0 eq {
         /ox.win.start.0 [(c:\winnt\system32\cmd.exe) (/c) (start) ] def
         /ox.win.start [ox.win.start.0 aload pop
                        ox-win.start.iconic { (/min) } { } ifelse ] def
      }{
        /ox.win.start.0 [ (start) ] def
        /ox.win.start [ ox.win.start.0 aload pop
                        ox-win.start.iconic { (/min) } { } ifelse ] def
      } ifelse
     } ifelse
   } def
   
 /webasir { asirweb } def  /webasir { asirweb } def
 /asirweb {  /asirweb {
  [/rrr ] pushVariables   [/rrr /cmd] pushVariables
  [   [
   %% This procedure to generate port number might fail.    %% This procedure to generate port number might fail.
   [(oxGenPass)] extension . (integer) dc  /rrr set    [(oxGenPass)] extension . (integer) dc  /rrr set
Line 34  def
Line 55  def
   /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; firefox -geometry 800x500 http://localhost:)
     httpd.port toString    %%  httpd.port toString
    ( &)] cat system    %% ( &)] cat system
      [(ostype)] extension 0 get
      (windows) eq {
        %% On windows.
         ox.win.set.start
         [(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.
         httpd.port httpd.startBrowserUnix
      } ifelse
   
    httpd ;     httpd ;
   ] pop    ] pop
   popVariables    popVariables
Line 52  def
Line 91  def
   {    {
        [(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
Line 72  def
Line 111  def
           (   ) 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 { }
           {            {
Line 84  def
Line 124  def
                  [Oxserver_history_variable httpd.serial toString] cat                   [Oxserver_history_variable httpd.serial toString] cat
               def                def
               oxasir.ccc                oxasir.ccc
 %% original     (if (1) {)  httpd.com  (; };)                [(if (1) {)  httpd.com  (; };)] cat
                [(if (1) {)  
                 oxserver.vname (=) httpd.com  
                 (; };)  
                 oxserver.vname (;)  
                ] cat  
               oxexecutestring ;                oxexecutestring ;
             }{              }{
               send-page-warning  exit                send-page-warning  exit
Line 97  def
Line 132  def
             [(oxReq) oxasir.ccc SM_dupErrors ] extension pop              [(oxReq) oxasir.ccc SM_dupErrors ] extension pop
   
             [(oxReq) oxasir.ccc SM_popCMO ] extension pop              [(oxReq) oxasir.ccc SM_popCMO ] extension pop
   
               [(oxReq) oxasir.ccc SM_setName oxserver.vname] extension pop
               oxasir.ccc [oxserver.vname (;)] cat oxexecutestring
   
             [(oxReq) oxasir.ccc SM_popString ] extension pop              [(oxReq) oxasir.ccc SM_popString ] extension pop
             [(flush)] extension pop              [(flush)] extension pop
             %% Select inputs for interruption.              %% Select inputs for interruption.
Line 173  def
Line 212  def
   
   
 /httpd.asirman  /httpd.asirman
  ("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/Current/doc/asir2000/html-ja/man_toc.html")
 def  def
 /httpd.asirman.index  /httpd.asirman.contrib
   ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.1.3/doc/asir2000/html-jp/man_262.html#SEC262")    ("http://www.math.sci.kobe-u.ac.jp/OpenXM/Current/doc/asir-contrib/ja/cman-html/cman-ja_toc.html")
 def  def
 /httpd.asir.intro  /httpd.asir.intro
    ("http://www.math.sci.kobe-u.ac.jp/~taka/asir-book-html/main")     ("http://www.math.sci.kobe-u.ac.jp/~taka/asir-book-html/main")
Line 199  def
Line 238  def
   [(<font color="red">    [(<font color="red">
     <a href=) httpd.asirman ( > AsirManual (Ja) </a> </font>, )] cat sendln      <a href=) httpd.asirman ( > AsirManual (Ja) </a> </font>, )] cat sendln
   [(<font color="purple">    [(<font color="purple">
     <a href=) httpd.asirman.index ( > Index (Ja) </a> </font>, )] cat sendln      <a href=) httpd.asirman.contrib ( > AsirContrib (Ja) </a> </font>, )] cat sendln
   [(<font color="blue">    [(<font color="blue">
     <a href=) httpd.asir.intro ( > Intro (Ja) </a> </font>, )] cat sendln      <a href=) httpd.asir.intro ( > Intro (Ja) </a> </font>, )] cat sendln
 } def  } def
Line 231  def
Line 270  def
   
 /metaCommand {  /metaCommand {
   /arg1 set    /arg1 set
   [/in-metaCommand /msg /result /msg2 /nn] pushVariables    [/in-metaCommand /msg /result /msg2 /nn
      /err /fn
     ] pushVariables
   [    [
     /msg arg1 def      /msg arg1 def
     /result 1 def      /result 1 def
Line 240  def
Line 281  def
       msg2 0 get (httpdAsirMeta) eq        msg2 0 get (httpdAsirMeta) eq
       msg2 1 get (Pretty) eq and        msg2 1 get (Pretty) eq and
       {        {
           httpd.image.type tag 0 eq {
             send-page-warning-image
             /skip-image goto
           } {  } ifelse
   
   
         msg2 2 get . (integer) dc /nn set          msg2 2 get . (integer) dc /nn set
   
         %%BUG: This part should be rewritten.  
         %% Reformat the "nn"-th result by tex and send it.          %% Reformat the "nn"-th result by tex and send it.
         httpd.result.history nn get message          %% BUG: index is out of bound. httpd.result.history nn get message
         httpd.image.name httpd.image.type send-image  
           oxasir.ccc
           [$print_$ httpd.image.type $_form(Oxserver_history_variable_$
            nn toString
            $);$
           ] cat
           (cmo)
           executeStringAndSelectInputFromBrowserAndOxserver
           dup 0 get /err set
               1 get /fn set
           err [ ] eq {
              fn 0 get httpd.image.type send-image
           } {
              [err preformatHTML] cat
              send-page-3
           } ifelse
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
           /skip-image
         /result 0 def          /result 0 def
       } { } ifelse        } { } ifelse
     }{ } ifelse      }{ } ifelse
Line 271  def
Line 333  def
   popVariables    popVariables
   arg1    arg1
 } def  } def
   

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.33

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