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

Diff for /OpenXM/src/kan96xx/Doc/httpd-rpc.sm1 between version 1.13 and 1.17

version 1.13, 2002/12/04 00:02:10 version 1.17, 2013/03/07 02:10:32
Line 1 
Line 1 
 %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-rpc.sm1,v 1.12 2002/11/10 07:00:03 takayama Exp $  %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-rpc.sm1,v 1.16 2012/12/23 02:33:16 takayama Exp $
 %% http server by sm1. Used for RPC.  Generic example.  %% http server by sm1. Used for RPC.  Generic example.
   
 [(parse) (httpd.sm1) pushfile] extension pop  [(parse) (httpd.sm1) pushfile] extension pop
   /httpd.textmode 1 def  %% It does not work on some browsers.
   
 /httpd_action {  /httpd_action {
    httpd_action_allow_file_transfer     httpd_action_allow_file_transfer
Line 43  def
Line 44  def
 def  def
   
 /httpd.asirman  /httpd.asirman
  ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.2.1/doc/asir2000/html-eg/man_toc.html")   ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.2.1/doc/asir2000/html-en/man_toc.html")
 def  def
 /httpd.asirman.ja  /httpd.asirman.ja
  ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.2.1/doc/asir2000/html-jp/man_toc.html")   ("http://www.math.sci.kobe-u.ac.jp/OpenXM/1.2.1/doc/asir2000/html-ja/man_toc.html")
 def  def
   
 [(parse) (oxasir.sm1) pushfile] extension  [(parse) (oxasir.sm1) pushfile] extension
Line 81  oxNoX 
Line 82  oxNoX 
       3] extension        3] extension
    }{     }{
       %% On unix.        %% On unix.
       [(sleep 3 ; netscape http://)        [(ostype)] extension 1 get (mac) eq {
           /webrpc.browser (open) def
         } { /webrpc.browser (firefox) def } ifelse
         [(sleep 3 ; ) webrpc.browser ( http://)
                  [(sm1.socket) (gethostname) []] extension                   [(sm1.socket) (gethostname) []] extension
                 (:) httpd.port toString ( & ) ] cat                  (:) httpd.port toString ( & ) ] cat
       system        system
Line 401  oxNoX 
Line 405  oxNoX 
   
 /send-page-result {  /send-page-result {
   /arg1 set    /arg1 set
   [/in-send-page-result /result] pushVariables    [/in-send-page-result /result /hlen /msg1 /msg2] pushVariables
   [    [
    /result arg1 def     /result arg1 def
      /msg1 (<html> <body> <pre>)  def
      /msg2  (</pre> </body> </html>) def
      httpd.textmode { 0 /hlen set }
      { msg1 length msg2 length add 3 add /hlen set } ifelse
    (HTTP/0.9 200 OK) sendln     (HTTP/0.9 200 OK) sendln
    (Connection: close) sendln     (Connection: close) sendln
    [(Content-length: ) result length toString ] cat sendln     [(Content-length: ) result length hlen add toString ] cat sendln
    (Content-Type: text/html) sendln     httpd.textmode
    %(Content-Type: text/plain) sendln  % It does not work on some browsers.     { (Content-Type: text/plain) sendln }  % It does not work on some browsers.
      { (Content-Type: text/html) sendln } ifelse
    0 sendln     0 sendln
   
    (<html> <body> <pre>) sendln     httpd.textmode { } { msg1 sendln } ifelse
    result sendln     result sendln
    (</pre> </body> </html>) sendln     httpd.textmode { } { msg2 sendln } ifelse
    0 sendln     0 sendln
    [(flush)] extension     [(flush)] extension
   ] pop    ] pop

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

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