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

File: [local] / OpenXM / src / kan96xx / Doc / httpd-rpc-8090.sm1 (download)

Revision 1.2, Wed Dec 4 00:02:10 2002 UTC (21 years, 5 months ago) by takayama
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.1: +2 -1 lines

Added new keywords for refusing of execution on asir-online.

% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-rpc-8090.sm1,v 1.2 2002/12/04 00:02:10 takayama Exp $
%% This file overrides definitions in httpd-rpc.sm1
%% See also httpd-rpc.sh

[(parse) (httpd-rpc.sm1) pushfile] extension pop
/httpd.textarea.name (rpc) def

/httpd.oxasir.timer 1 def  %% 1 to use timer, but it accepts only one command
                           %% 0 not to use timer. It accepts programs.


%% /httpd_action {  } def

/httpd.title  
  (<H1><font color="green">OpenXM/Risa/Asir Online</font></H2><br>) 
def

/httpd.msg1 
 [
  (Input example---factorization:<font color="blue"> fctr(x^3-1)</font>) 
  (<br>) 
  [(<font color="blue"> 
    <a href=) httpd.asirman ( > AsirManual (En) </a> </font>, )] cat 
  [(<font color="blue"> 
    <a href=) httpd.asirman.ja ( > AsirManual (Ja) </a> </font>)] cat 
   httpd.oxasir.timer {
    (<br> It accepts only one command. The limit of CPU time is 30 seconds.
          <font color="red"> Do not put <font color="blue"> ; </font> 
                             (semi-colon) after the command. 
          </font>) 
   }{ } ifelse  
   (<br>) 
  [(You can also retrieve the result by GET /?) httpd.textarea.name (=) ( encoded_codes  HTTP/1.0)] 
   (<br>) 
 ] cat 
def

%% A sample macro
/cookedCommand.simplest {
  /arg1 set
  [/in-cookedCommand /httpd.com] pushVariables
  [
    /httpd.com arg1 def
    [(if (1) {)  httpd.com  (; };)] cat
    /arg1 set
  ] pop
  popVariables
  arg1
} def
/cookedCommand {
  /arg1 set
  [/in-cookedCommand /httpd.com /fff] pushVariables
  [
    /httpd.com arg1 def
    httpd.oxasir.timer not {
      [(if (1) {)  httpd.com  (; };)] cat
      /fff set
    }{
     [$timer(30,$   httpd.com
        $,"Computation is aborted with the resource limit ( 30 seconds) or there was a syntax error.");$
     ] cat
      /fff set
    } ifelse
    (cooked command is ) messagen fff message
    /arg1 fff def
  ] pop
  popVariables
  arg1
} def
/httpd.refusedCommands 
   [(shell) (eval_str) (ox_) (sm1_)  
    (m_start) (m_N_) (m_Inverse) (m_TexForm) %(m_) 
    (connect) (load)  (bload) (bsave) 
    (end) (quit) (output) (bload27) (open)
    (plot) (ctrl) (debug) (error) (port) (bind) (accept)
    (draw)  (peek) (poke)
    (write_string_to_a_file) (_filter)
   ]
def