[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
$! CGIWASD.COM                                                     'f$verify(0)
$! DECnet object for WASD HTTPd DECnet-based CGI scripting.
$! STARTUP_DECNET.COM expects this to be located in WASD_ROOT:[CGI-BIN].
$! 24-APR-2003  MGD  a little "exception"al handling
$! 15-AUG-1998  MGD  reuse
$! 07-JAN-1998  MGD  initial
$!
$ delsym = "delete/symbol"
$ delsym/global/all
$ delsym/local/all
$ on warning then $exit
$ open/read/write/share net$link SYS$NET
$ reuseLoop:
$    if f$trnlnm("CGIEOF","LNM$PROCESS") .nes. "" then deassign/process CGIEOF
$    if f$trnlnm("CGIREUSE","LNM$PROCESS") .nes. ""
$    then
$       deassign/process CGIREUSE
$       readNetLink = "read/error=endReuseLoop/end=endReuseLoop net$link Line"
$    else
$       readNetLink = "read/error=endReuseLoop/end=endReuseLoop/time=30 net$link Line"
$    endif
$    define/process/nolog sys$output net$link
$    define/process/nolog sys$input net$link
$    define/process/nolog http$input net$link
$    linkLoop:
$       readNetLink
$'Line'
$       goto linkLoop
$    endLinkLoop:
$    DoIt:
$       if f$trnlnm("CGIREUSE","LNM$PROCESS") .nes. ""
$       then
$          cgiReused = 'f$trnlnm("CGIREUSED","LNM$PROCESS")' + 1
$          define/process/nolog CGIREUSED 'cgiReused'
$       endif   
$       readNetLink
$       on warning then $continue
$'Line'
$!      'f$verify(0)
$       delsym = "delete/symbol"
$       delsym/global/all
$       delsym/local/all
$       on warning then $exit
$       write sys$output f$trnlnm("CGIEOF","LNM$PROCESS")
$    endDoIt:
$    deassign/process sys$output
$    deassign/process sys$input
$    deassign/process http$input
$    if f$trnlnm("CGIREUSE","LNM$PROCESS") .nes. "" then goto reuseLoop
$ endReuseLoop:
$ if f$trnlnm("CGIREUSED","LNM$PROCESS") .nes. "" then deassign/process CGIREUSED
$ close net$link
$ exit