home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / comm / tcp / bbgopher / rexx / gopher.rexx next >
OS/2 REXX Batch file  |  1995-04-19  |  965b  |  19 lines

  1. /*
  2.  * $VER: gopher.rexx 1.0 (19.4.95)
  3.  * Copyright (c) 1995 Jason M. Weber
  4.  * Freely distributable
  5.  */
  6. options results; signal on SYNTAX; signal on ERROR; signal on IOERR
  7. tr=transmit; se=sendstring; gu=getuser
  8. if ~show('p', AMITCP) then signal notcp
  9. gu 1202244;nu=result-1;if nu<1 then signal noargs;gu 1302307;mo=result;fi=''
  10. changewhere 'Gopher'; do a=2 to nu;gu 1302307+61*(a-1);fi=strip(fi' 'result);end
  11. sendstring '#4 bbgopher '||mo' '||fi'}';bufferflush;exit
  12. NOARGS:; se '#4 bbgopher}';bufferflush;exit
  13. NOTCP:; tr 'n1AmiTCP must be running to use Gopher.  Please notify SysOp.';bufferflush;exit
  14. SYNTAX:;ERROR:;IOERR:;e1=' c9Errorcf: ca'rc' cf(ca'errortext(rc)'cf)'
  15. e2='  c9Linecf: ce'left(sigl,4)'c9Filecf:';gu 1311992;a=result
  16. gu 1311960;b=result;c='cb"ce'a||b'cb"';e2=e2' 'c;tr e1;tr e2;logentry e1
  17. logentry e2;e=sourceline(sigl);do while e~='';e3='c9Sourcecf: cd'
  18. e3=e3||left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
  19.