Annotation of OpenXM/src/kan96xx/Doc/httpd-rpc-8090.sm1, Revision 1.1
1.1 ! takayama 1: % $OpenXM$
! 2: %% This file overrides definitions in httpd-rpc.sm1
! 3: %% See also httpd-rpc.sh
! 4:
! 5: [(parse) (httpd-rpc.sm1) pushfile] extension pop
! 6: /httpd.textarea.name (rpc) def
! 7:
! 8: /httpd.oxasir.timer 1 def %% 1 to use timer, but it accepts only one command
! 9: %% 0 not to use timer. It accepts programs.
! 10:
! 11:
! 12: %% /httpd_action { } def
! 13:
! 14: /httpd.title
! 15: (<H1><font color="green">OpenXM/Risa/Asir Online</font></H2><br>)
! 16: def
! 17:
! 18: /httpd.msg1
! 19: [
! 20: (Input example---factorization:<font color="blue"> fctr(x^3-1)</font>)
! 21: (<br>)
! 22: [(<font color="blue">
! 23: <a href=) httpd.asirman ( > AsirManual (En) </a> </font>, )] cat
! 24: [(<font color="blue">
! 25: <a href=) httpd.asirman.ja ( > AsirManual (Ja) </a> </font>)] cat
! 26: httpd.oxasir.timer {
! 27: (<br> It accepts only one command. The limit of CPU time is 30 seconds.
! 28: <font color="red"> Do not put <font color="blue"> ; </font>
! 29: (semi-colon) after the command.
! 30: </font>)
! 31: }{ } ifelse
! 32: (<br>)
! 33: [(You can also retrieve the result by GET /?) httpd.textarea.name (=) ( encoded_codes HTTP/1.0)]
! 34: (<br>)
! 35: ] cat
! 36: def
! 37:
! 38: %% A sample macro
! 39: /cookedCommand.simplest {
! 40: /arg1 set
! 41: [/in-cookedCommand /httpd.com] pushVariables
! 42: [
! 43: /httpd.com arg1 def
! 44: [(if (1) {) httpd.com (; };)] cat
! 45: /arg1 set
! 46: ] pop
! 47: popVariables
! 48: arg1
! 49: } def
! 50: /cookedCommand {
! 51: /arg1 set
! 52: [/in-cookedCommand /httpd.com /fff] pushVariables
! 53: [
! 54: /httpd.com arg1 def
! 55: httpd.oxasir.timer not {
! 56: [(if (1) {) httpd.com (; };)] cat
! 57: /fff set
! 58: }{
! 59: [$timer(30,$ httpd.com
! 60: $,"Computation is aborted with the resource limit ( 30 seconds) or there was a syntax error.");$
! 61: ] cat
! 62: /fff set
! 63: } ifelse
! 64: (cooked command is ) messagen fff message
! 65: /arg1 fff def
! 66: ] pop
! 67: popVariables
! 68: arg1
! 69: } def
! 70: /httpd.refusedCommands
! 71: [(shell) (eval_str) (ox_) (sm1_)
! 72: (m_start) (m_N_) (m_Inverse) (m_TexForm) %(m_)
! 73: (connect) (load) (bload) (bsave)
! 74: (end) (quit) (output) (bload27) (open)
! 75: (plot) (ctrl) (debug) (error) (port) (bind) (accept)
! 76: (draw) (peek) (poke)
! 77: ]
! 78: def
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>