home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / gopclitx.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-01-24  |  1.6 KB  |  57 lines

  1. /*
  2.  *        Name: GOPCLITX REXX
  3.  *              VM TCP/IP Network GOPHER Client plain-text processor
  4.  *      Author: Rick Troth, Rice University, Information Systems
  5.  *        Date: 1992-Dec-23
  6.  *
  7.  *       Input: raw ASCII text
  8.  *      Output: plain (EBCDIC) text
  9.  */
  10.  
  11. /*
  12.  *      Copyright 1992 Richard M. Troth.   This software was developed
  13.  *      with resources provided by Rice University and is intended
  14.  *      to serve Rice's user community.   Rice has benefitted greatly
  15.  *      from the free distribution of software,  therefore distribution
  16.  *      of unmodified copies of this material is not restricted.
  17.  *      You may change your own copy as needed.   Neither Rice
  18.  *      University nor any of its employees or students shall be held
  19.  *      liable for damages resulting from the use of this software.
  20.  */
  21.  
  22. /*  Trace "OFF"  */
  23.  
  24. /*  sync with input so that 'CALLPIPE COMMAND' will work  */
  25. 'PEEKTO'
  26.  
  27. 'CALLPIPE COMMAND GLOBALV SELECT GOPHER GET GOPHER'
  28. If gopher = "" Then gopher = "Gopher"
  29.  
  30. 'ADDPIPE *: | DEBLOCK LINEND 0A | DROP LAST 1' ,
  31.         '| CHANGE' '000D002000'x '| TCPA2E' gopher '| *.INPUT:'
  32.  
  33. /*
  34.  *        Name: DROPDOTS REXX
  35.  *              drop trailing lines consisting of only "."
  36.  *              (typically used for end-of-file indication)
  37.  *        Date: 1992-Apr-18, 20
  38.  */
  39.  
  40. dots = 0
  41. 'READTO LINE'
  42. Do While rc = 0
  43.     If Left(line,1) = "." Then Do
  44.         dots = dots + 1
  45.         line.dots = line
  46.         End  /*  If  ..  Do  */
  47.     Else Do
  48.         Do i = 1 to dots;  'OUTPUT' line.i;  End
  49.         dots = 0
  50.         'OUTPUT' line
  51.         End  /*  Else  Do  */
  52.     'READTO LINE'
  53.     End  /*  Do  While  */
  54.  
  55. Exit
  56.  
  57.