home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / info-service / gopher / Unix / gopher2.0-patches / patch3 < prev    next >
Encoding:
Text File  |  1993-08-12  |  34.7 KB  |  1,334 lines

  1. diff -c gopher+/Makefile:3.7 gopher+/Makefile:3.8
  2. *** gopher+/Makefile:3.7    Thu Aug 12 02:26:39 1993
  3. --- gopher+/Makefile    Thu Aug 12 02:26:39 1993
  4. ***************
  5. *** 1,7 ****
  6.   #********************************************************************
  7.   # $Author: lindner $
  8. ! # $Revision: 3.7 $
  9. ! # $Date: 1993/07/27 05:32:28 $
  10.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/Makefile,v $
  11.   # $State: Exp $
  12.   #
  13. --- 1,7 ----
  14.   #********************************************************************
  15.   # $Author: lindner $
  16. ! # $Revision: 3.8 $
  17. ! # $Date: 1993/08/05 22:22:40 $
  18.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/Makefile,v $
  19.   # $State: Exp $
  20.   #
  21. ***************
  22. *** 15,20 ****
  23. --- 15,23 ----
  24.   #*********************************************************************
  25.   # Revision History:
  26.   # $Log: Makefile,v $
  27. + # Revision 3.8  1993/08/05  22:22:40  lindner
  28. + # warning message for archive
  29. + #
  30.   # Revision 3.7  1993/07/27  05:32:28  lindner
  31.   # added gophfilt and zip stuff
  32.   #
  33. ***************
  34. *** 111,116 ****
  35. --- 114,121 ----
  36.       find $$HERE -type f -print |grep -v '.o$$' |grep -v '~$$' |grep -v 'CVS' >$$HERE/MANIFEST ; \
  37.       /usr/gnu/bin/tar  -T $$HERE/MANIFEST -czvf $$HERE.tar.Z ;\
  38.       zip -@ $$HERE.zip <$$HERE/MANIFEST
  39. +     @echo "Did you remember to update the patchlevel.h Paul?..."
  40. +     @echo "Hmmm...  Hmmmm...."
  41.   
  42.   tags:
  43.       etags `find . -print | egrep '\.[ch]$$'`
  44. diff -c gopher+/make.com:3.1 gopher+/make.com:3.2
  45. *** gopher+/make.com:3.1    Thu Aug 12 02:26:40 1993
  46. --- gopher+/make.com    Thu Aug 12 02:26:40 1993
  47. ***************
  48. *** 5,10 ****
  49. --- 5,12 ----
  50.           @make UCX
  51.           @make WOLLONGONG
  52.           @make MULTINET
  53. +         @make CMUIP
  54. +             @make NETLIB
  55.   $    exit
  56.   $ ENDIF
  57.   $!
  58. diff -c gopher+/patchlevel.h:3.3 gopher+/patchlevel.h:3.4
  59. *** gopher+/patchlevel.h:3.3    Thu Aug 12 02:26:42 1993
  60. --- gopher+/patchlevel.h    Thu Aug 12 02:26:42 1993
  61. ***************
  62. *** 5,8 ****
  63.   #define GOPHER_MAJOR_VERSION "2"
  64.   #define GOPHER_MINOR_VERSION "0"
  65.   
  66. ! #define PATCHLEVEL 1
  67. --- 5,8 ----
  68.   #define GOPHER_MAJOR_VERSION "2"
  69.   #define GOPHER_MINOR_VERSION "0"
  70.   
  71. ! #define PATCHLEVEL 3
  72. diff -c gopher+/doc/Makefile:3.3 gopher+/doc/Makefile:3.4
  73. *** gopher+/doc/Makefile:3.3    Thu Aug 12 02:26:45 1993
  74. --- gopher+/doc/Makefile    Thu Aug 12 02:26:45 1993
  75. ***************
  76. *** 2,12 ****
  77.   
  78.   install:
  79.       
  80. !     $(INSTALL) -c gopherd.conf.5 $(MAN5DIR)
  81. !     $(INSTALL) -c gopherd.8 $(MAN8DIR)
  82. !     $(INSTALL) -c gopherindex.8 $(MAN8DIR)
  83. !     $(INSTALL) -c gopher.1 $(MAN1DIR)
  84. !     $(INSTALL) -c gophfilt.1 $(MAN1DIR)
  85.   
  86.   clean:
  87.       -rm -f *~
  88. --- 2,12 ----
  89.   
  90.   install:
  91.       
  92. !     $(INSTALL)  gopherd.conf.5 $(MAN5DIR)
  93. !     $(INSTALL)  gopherd.8 $(MAN8DIR)
  94. !     $(INSTALL)  gopherindex.8 $(MAN8DIR)
  95. !     $(INSTALL)  gopher.1 $(MAN1DIR)
  96. !     $(INSTALL)  gophfilt.1 $(MAN1DIR)
  97.   
  98.   clean:
  99.       -rm -f *~
  100. diff -c gopher+/doc/client.changes:3.7 gopher+/doc/client.changes:3.8
  101. *** gopher+/doc/client.changes:3.7    Thu Aug 12 02:26:46 1993
  102. --- gopher+/doc/client.changes    Thu Aug 12 02:26:46 1993
  103. ***************
  104. *** 1,4 ****
  105. ! $Id: client.changes,v 3.7 1993/08/04 22:23:41 lindner Exp $
  106.   
  107.   Gopher+2.0 patchlevel 2
  108.   -----------------------
  109. --- 1,14 ----
  110. ! $Id: client.changes,v 3.8 1993/08/05 22:41:05 lindner Exp $
  111. ! Gopher+2.0 patchlevel 3
  112. ! -----------------------
  113. !  * Should compile for CMUIP and NETLIB on VMS (not tested)
  114. !  * Fix for control-c on startup
  115. !  * Added warning comments in mail_file()
  116.   
  117.   Gopher+2.0 patchlevel 2
  118.   -----------------------
  119. diff -c gopher+/doc/server.changes:3.7 gopher+/doc/server.changes:3.8
  120. *** gopher+/doc/server.changes:3.7    Thu Aug 12 02:26:48 1993
  121. --- gopher+/doc/server.changes    Thu Aug 12 02:26:49 1993
  122. ***************
  123. *** 1,4 ****
  124. ! $Id: server.changes,v 3.7 1993/08/04 22:23:45 lindner Exp $
  125.   
  126.   Gopher 2.0 patchlevel 2
  127.   -----------------------
  128. --- 1,16 ----
  129. ! $Id: server.changes,v 3.8 1993/08/05 22:41:06 lindner Exp $
  130. ! Gopher 2.0 patchlevel 3
  131. ! -----------------------
  132. !  * Only install gopherindex if built
  133. !  * Added fix for dedot to remove quotes for when using system or popen
  134. !  * Log execution of programs
  135. !  * Add one more call to Gpopen for shellindexquery
  136.   
  137.   Gopher 2.0 patchlevel 2
  138.   -----------------------
  139. diff -c /dev/null gopher+/gopher/cmuip.opt:3.1
  140. *** /dev/null    Thu Aug 12 02:26:53 1993
  141. --- gopher+/gopher/cmuip.opt    Thu Aug 12 02:26:54 1993
  142. ***************
  143. *** 0 ****
  144. --- 1,3 ----
  145. + identification="CMUIP-1.12"
  146. + sys$library:neterror
  147. + sys$share:vaxcrtl.exe/share
  148. diff -c gopher+/gopher/compile.com:3.3 gopher+/gopher/compile.com:3.4
  149. *** gopher+/gopher/compile.com:3.3    Thu Aug 12 02:26:55 1993
  150. --- gopher+/gopher/compile.com    Thu Aug 12 02:26:55 1993
  151. ***************
  152. *** 1,7 ****
  153.   $!********************************************************************
  154.   $! $Author: lindner $
  155. ! $! $Revision: 3.3 $
  156. ! $! $Date: 1993/06/22 06:12:53 $
  157.   $! $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/compile.com,v $
  158.   $! $State: Exp $
  159.   $!
  160. --- 1,7 ----
  161.   $!********************************************************************
  162.   $! $Author: lindner $
  163. ! $! $Revision: 3.4 $
  164. ! $! $Date: 1993/08/05 03:24:37 $
  165.   $! $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/compile.com,v $
  166.   $! $State: Exp $
  167.   $!
  168. ***************
  169. *** 15,20 ****
  170. --- 15,23 ----
  171.   $!*********************************************************************
  172.   $! Revision History:
  173.   $! $Log: compile.com,v $
  174. + $! Revision 3.4  1993/08/05  03:24:37  lindner
  175. + $! Changes for CMUIP and NETLIB
  176. + $!
  177.   $! Revision 3.3  1993/06/22  06:12:53  lindner
  178.   $! mods for DEC C
  179.   $!
  180. ***************
  181. *** 40,45 ****
  182. --- 43,50 ----
  183.           @compile UCX
  184.           @compile WOLLONGONG
  185.           @compile MULTINET
  186. +         @compile CMUIP
  187. +         @compile NETLIB
  188.   $    exit
  189.   $ ENDIF
  190.   $!
  191. diff -c gopher+/gopher/gopher.c:3.26 gopher+/gopher/gopher.c:3.27
  192. *** gopher+/gopher/gopher.c:3.26    Thu Aug 12 02:26:57 1993
  193. --- gopher+/gopher/gopher.c    Thu Aug 12 02:26:58 1993
  194. ***************
  195. *** 1,7 ****
  196.   /********************************************************************
  197.    * $Author: lindner $
  198. !  * $Revision: 3.26 $
  199. !  * $Date: 1993/08/04 22:08:47 $
  200.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $
  201.    * $State: Exp $
  202.    *
  203. --- 1,7 ----
  204.   /********************************************************************
  205.    * $Author: lindner $
  206. !  * $Revision: 3.27 $
  207. !  * $Date: 1993/08/05 03:24:21 $
  208.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $
  209.    * $State: Exp $
  210.    *
  211. ***************
  212. *** 15,20 ****
  213. --- 15,23 ----
  214.    *********************************************************************
  215.    * Revision History:
  216.    * $Log: gopher.c,v $
  217. +  * Revision 3.27  1993/08/05  03:24:21  lindner
  218. +  * Fix for control-c on startup
  219. +  *
  220.    * Revision 3.26  1993/08/04  22:08:47  lindner
  221.    * Fix for problems with '=' and '?' and /bin/mail Gripe mods
  222.    *
  223. ***************
  224. *** 750,756 ****
  225.   /*     RCdestroy(GlobalRC);*/
  226.   
  227.        do {
  228. !       GDdestroy(CurrentDir);
  229.        }
  230.        while (popgopher(&CurrentDir) != -1);
  231.        
  232. --- 753,760 ----
  233.   /*     RCdestroy(GlobalRC);*/
  234.   
  235.        do {
  236. !       if (CurrentDir != NULL)
  237. !            GDdestroy(CurrentDir);
  238.        }
  239.        while (popgopher(&CurrentDir) != -1);
  240.        
  241. diff -c gopher+/gopher/link.com:3.1.1.1 gopher+/gopher/link.com:3.2
  242. *** gopher+/gopher/link.com:3.1.1.1    Thu Aug 12 02:27:00 1993
  243. --- gopher+/gopher/link.com    Thu Aug 12 02:27:00 1993
  244. ***************
  245. *** 1,7 ****
  246.   $!********************************************************************
  247.   $! $Author: lindner $
  248. ! $! $Revision: 3.1.1.1 $
  249. ! $! $Date: 1993/02/11 18:02:59 $
  250.   $! $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/link.com,v $
  251.   $! $State: Exp $
  252.   $!
  253. --- 1,7 ----
  254.   $!********************************************************************
  255.   $! $Author: lindner $
  256. ! $! $Revision: 3.2 $
  257. ! $! $Date: 1993/08/05 03:24:39 $
  258.   $! $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/link.com,v $
  259.   $! $State: Exp $
  260.   $!
  261. ***************
  262. *** 15,20 ****
  263. --- 15,23 ----
  264.   $!*********************************************************************
  265.   $! Revision History:
  266.   $! $Log: link.com,v $
  267. + $! Revision 3.2  1993/08/05  03:24:39  lindner
  268. + $! Changes for CMUIP and NETLIB
  269. + $!
  270.   $! Revision 3.1.1.1  1993/02/11  18:02:59  lindner
  271.   $! Gopher+1.2beta release
  272.   $!
  273. ***************
  274. *** 34,39 ****
  275. --- 37,44 ----
  276.           @link UCX
  277.           @link WOLLONGONG
  278.           @link MULTINET
  279. +         @link CMUIP
  280. +         @link NETLIB
  281.   $    exit
  282.   $ ENDIF
  283.   $!
  284. diff -c /dev/null gopher+/gopher/netlib.opt:3.1
  285. *** /dev/null    Thu Aug 12 02:27:01 1993
  286. --- gopher+/gopher/netlib.opt    Thu Aug 12 02:27:01 1993
  287. ***************
  288. *** 0 ****
  289. --- 1,3 ----
  290. + identification = "NETLIB-1.12"
  291. + sys$share:netlib_shrxfr/shareable
  292. + sys$share:vaxcrtl/shareable
  293. diff -c gopher+/gopher/ourutils.c:3.19 gopher+/gopher/ourutils.c:3.20
  294. *** gopher+/gopher/ourutils.c:3.19    Thu Aug 12 02:27:02 1993
  295. --- gopher+/gopher/ourutils.c    Thu Aug 12 02:27:03 1993
  296. ***************
  297. *** 1,7 ****
  298.   /********************************************************************
  299.    * $Author: lindner $
  300. !  * $Revision: 3.19 $
  301. !  * $Date: 1993/08/04 22:07:23 $
  302.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $
  303.    * $State: Exp $
  304.    *
  305. --- 1,7 ----
  306.   /********************************************************************
  307.    * $Author: lindner $
  308. !  * $Revision: 3.20 $
  309. !  * $Date: 1993/08/05 20:40:43 $
  310.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $
  311.    * $State: Exp $
  312.    *
  313. ***************
  314. *** 15,20 ****
  315. --- 15,23 ----
  316.    *********************************************************************
  317.    * Revision History:
  318.    * $Log: ourutils.c,v $
  319. +  * Revision 3.20  1993/08/05  20:40:43  lindner
  320. +  * Added warning message..
  321. +  *
  322.    * Revision 3.19  1993/08/04  22:07:23  lindner
  323.    * Use /bin/mail instead of ucbmail
  324.    *
  325. ***************
  326. *** 184,189 ****
  327. --- 187,198 ----
  328.        
  329.        if (*SaveName == '\0')
  330.         return;
  331. + /*
  332. +  * You should be very careful when you add characters to this list..
  333. +  * 
  334. +  * It could create a nasty security hole!
  335. +  */
  336.        
  337.   #define ACHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789%.@!-_"
  338.               
  339. diff -c gopher+/gopherd/Makefile:3.6 gopher+/gopherd/Makefile:3.7
  340. *** gopher+/gopherd/Makefile:3.6    Thu Aug 12 02:27:08 1993
  341. --- gopher+/gopherd/Makefile    Thu Aug 12 02:27:09 1993
  342. ***************
  343. *** 1,7 ****
  344.   #********************************************************************
  345.   # $Author: lindner $
  346. ! # $Revision: 3.6 $
  347. ! # $Date: 1993/08/04 22:12:01 $
  348.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $
  349.   # $State: Exp $
  350.   #
  351. --- 1,7 ----
  352.   #********************************************************************
  353.   # $Author: lindner $
  354. ! # $Revision: 3.7 $
  355. ! # $Date: 1993/08/05 22:20:19 $
  356.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $
  357.   # $State: Exp $
  358.   #
  359. ***************
  360. *** 15,20 ****
  361. --- 15,23 ----
  362.   #*********************************************************************
  363.   # Revision History:
  364.   # $Log: Makefile,v $
  365. + # Revision 3.7  1993/08/05  22:20:19  lindner
  366. + # Only install gopherindex if built
  367. + #
  368.   # Revision 3.6  1993/08/04  22:12:01  lindner
  369.   # Rebuild server if patchlevel.h changes
  370.   #
  371. ***************
  372. *** 138,144 ****
  373.       -mv $(SERVERDIR)/gopherd.conf $(SERVERDIR)/gopherd.conf.old
  374.       $(INSTALL)  $(TARGET) $(SERVERDIR)
  375.       $(INSTALL)  gopherd.conf $(SERVERDIR)
  376. !     $(INSTALL)  gopherindex $(SERVERDIR)
  377.       -rm    $(SERVERDIR)/gopherls $(SERVERDIR)/gindexd
  378.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gopherls
  379.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gindexd
  380. --- 141,148 ----
  381.       -mv $(SERVERDIR)/gopherd.conf $(SERVERDIR)/gopherd.conf.old
  382.       $(INSTALL)  $(TARGET) $(SERVERDIR)
  383.       $(INSTALL)  gopherd.conf $(SERVERDIR)
  384. !     if [ -f gopherindex ]; then \
  385. !         $(INSTALL)  gopherindex $(SERVERDIR)
  386.       -rm    $(SERVERDIR)/gopherls $(SERVERDIR)/gindexd
  387.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gopherls
  388.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gindexd
  389. diff -c gopher+/gopherd/dedot.c:3.1.1.1 gopher+/gopherd/dedot.c:3.3
  390. *** gopher+/gopherd/dedot.c:3.1.1.1    Thu Aug 12 02:27:09 1993
  391. --- gopher+/gopherd/dedot.c    Thu Aug 12 02:27:10 1993
  392. ***************
  393. *** 1,9 ****
  394.   /********************************************************************
  395.    * $Author: lindner $
  396. !  * $Revision: 3.1.1.1 $
  397. !  * $Date: 1993/02/11 18:02:50 $
  398.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/dedot.c,v $
  399. !  * $Status: $
  400.    *
  401.    * Paul Lindner, University of Minnesota CIS.
  402.    *
  403. --- 1,9 ----
  404.   /********************************************************************
  405.    * $Author: lindner $
  406. !  * $Revision: 3.3 $
  407. !  * $Date: 1993/08/05 22:19:43 $
  408.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/dedot.c,v $
  409. !  * $State: Exp $
  410.    *
  411.    * Paul Lindner, University of Minnesota CIS.
  412.    *
  413. ***************
  414. *** 15,20 ****
  415. --- 15,26 ----
  416.    *********************************************************************
  417.    * Revision History:
  418.    * $Log: dedot.c,v $
  419. +  * Revision 3.3  1993/08/05  22:19:43  lindner
  420. +  * Fix for single quotes
  421. +  *
  422. +  * Revision 3.2  1993/08/05  20:43:07  lindner
  423. +  * Added fix for dedot to remove quotes for when using system or popen
  424. +  *
  425.    * Revision 3.1.1.1  1993/02/11  18:02:50  lindner
  426.    * Gopher+1.2beta release
  427.    *
  428. ***************
  429. *** 49,89 ****
  430.   ** John Sellens jmsellens@watdragon.waterloo.edu
  431.   */
  432.   
  433. ! /* If DOSINGLE is defined, references to '.' are also removed */
  434. ! #define DOSINGLE
  435.   void dedot1();
  436.   void dedot2();
  437.   
  438.   void
  439.   dedot1( src )
  440.   char *src;
  441.   {
  442. !     if ( *src == '.' ) {
  443. !     if (
  444. ! #ifdef DOSINGLE
  445. !     src[1] == '\0' || src[1] == '/' ||
  446. ! #endif
  447. !     ( src[1] == '.' && ( src[2] == '\0' || src[2] == '/' ) ) ) {
  448. !         dedot2( src, src );
  449. !         return;
  450. !     }
  451. !     }
  452. !     while ( *src ) {
  453. !     if ( *src++ == '/' ) {
  454. !         if ( *src == '.' ) {
  455. !         if (
  456. ! #ifdef DOSINGLE
  457. !         src[1] == '\0' || src[1] == '/' ||
  458. ! #endif
  459. !         ( src[1] == '.' && ( src[2] == '\0' || src[2] == '/' ) ) ) {
  460. !             dedot2( src, src );
  461. !             return;
  462. !         }
  463. !         }
  464. !     }
  465. !     }
  466. !     return;
  467.   }
  468.   
  469.   /* copy src to dst, blindly removing (not interpreting) ./ and ../ */
  470. --- 55,106 ----
  471.   ** John Sellens jmsellens@watdragon.waterloo.edu
  472.   */
  473.   
  474. ! void dequote();
  475.   void dedot1();
  476.   void dedot2();
  477.   
  478.   void
  479. + dequote1(src)
  480. +   char *src;
  481. + {
  482. +      char *cp2; 
  483. +      /** Strip out the quotes.. **/
  484. +      while (*src != '\0') {
  485. +       if (*src == '"' || *src == '\'') {
  486. +            for (cp2=src; *cp2 != '\0'; cp2++) {
  487. +             *cp2 = *(cp2+1);
  488. +            }
  489. +       }
  490. +       src++;
  491. +      }
  492. + }
  493. + void
  494.   dedot1( src )
  495.   char *src;
  496.   {
  497. !      dequote1(src);
  498. !      if ( *src == '.' ) {
  499. !       if (src[1] == '\0' || src[1] == '/' ||
  500. !           ( src[1] == '.' && ( src[2] == '\0' || src[2] == '/' ) ) ) {
  501. !            dedot2( src, src );
  502. !            return;
  503. !       }
  504. !      }
  505. !      while ( *src ) {
  506. !       if ( *src++ == '/' ) {
  507. !            if ( *src == '.' ) {
  508. !             if (src[1] == '\0' || src[1] == '/' ||
  509. !             ( src[1] == '.' && ( src[2] == '\0' || src[2] == '/' ) ) ) {
  510. !              dedot2( src, src );
  511. !              return;
  512. !             }
  513. !            }
  514. !       }
  515. !      }
  516. !      return;
  517.   }
  518.   
  519.   /* copy src to dst, blindly removing (not interpreting) ./ and ../ */
  520. ***************
  521. *** 92,137 ****
  522.     char *src;
  523.     char *dst;
  524.   {
  525. !     /*
  526. !     ** We either have /, a filename, ./ or ../
  527. !     */
  528.   
  529. !     while ( *src ) {
  530. !     switch ( *src ) {
  531. !         case '/':
  532. !         /* copy it, and skip any extras e.g. /a///b */
  533. !         *dst++ = *src++;
  534. !         while ( *src == '/' )
  535.               src++;
  536. !         break;
  537. !         case '.':
  538. ! #ifdef DOSINGLE
  539. !         /* don't forget about trailing . and .. */
  540. !         if ( src[1] == '/'  ) {        /* ./ */
  541. !             src += 2;
  542.               break;
  543. !         }
  544. !         if ( src[1] == '\0'  ) {    /* .\0 */
  545. !             src += 1;    /* only 1 so we don't fall off the end */
  546.               break;
  547. !         }
  548. ! #endif
  549. !         if ( src[1] == '.' && src[2] == '/' ) {        /* ../ */
  550. !             src += 3;
  551.               break;
  552. !         }
  553. !         if ( src[1] == '.' && src[2] == '\0' ) {    /* .. */
  554. !             src += 2;    /* don't fall off the end */
  555.               break;
  556. !         }
  557. !         /* must be a filename - fall through */
  558. !         default:
  559. !         /* must be filename - copy it over */
  560. !         while ( *src != '\0' && *src != '/' )
  561.               *dst++ = *src++;
  562. !         break;
  563. !     }
  564. !     }
  565. !     /* and terminate it */
  566. !     *dst = '\0';
  567.   }
  568. --- 109,164 ----
  569.     char *src;
  570.     char *dst;
  571.   {
  572. !      /*
  573. !       ** We either have /, a filename, ./ or ../
  574. !       */
  575. !      int i;
  576.   
  577. !      while ( *src ) {
  578. !       switch ( *src ) {
  579. !       case '"':
  580. !            /* Ignore it.. */
  581. !            src++;
  582. !            break;
  583. !       case '/':
  584. !            /* copy it, and skip any extras e.g. /a///b */
  585. !            *dst++ = *src++;
  586. !            while ( *src == '/' )
  587.               src++;
  588. !            break;
  589. !       case '.':
  590. !            /* don't forget about trailing . and .. */
  591. !            /* Nuke any quotes */
  592. !            for (i=1; src[i] == '"' || *src == '\''; i++)
  593. !             ;
  594. !            
  595. !            if ( src[i] == '/'  ) {        /* ./ */
  596. !             src += i+1;
  597.               break;
  598. !            }
  599. !            if ( src[i] == '\0'  ) {    /* .\0 */
  600. !             src += i;    /* only 1 so we don't fall off the end */
  601.               break;
  602. !            }
  603. !            if ( src[i] == '.' && src[i+2] == '/' ) { /* ../ */
  604. !             src += i+2;
  605.               break;
  606. !            }
  607. !            if ( src[i] == '.' && src[i+2] == '\0' ) {    /* .. */
  608. !             src += i+1;    /* don't fall off the end */
  609.               break;
  610. !            }
  611. !            /* must be a filename - fall through */
  612. !       default:
  613. !            /* must be filename - copy it over */
  614. !            while ( *src != '\0' && *src != '/' && *src != '"')
  615.               *dst++ = *src++;
  616. !            break;
  617. !       }
  618. !      }
  619. !      /* and terminate it */
  620. !      *dst = '\0';
  621.   }
  622. diff -c gopher+/gopherd/gopherd.c:3.27 gopher+/gopherd/gopherd.c:3.28
  623. *** gopher+/gopherd/gopherd.c:3.27    Thu Aug 12 02:27:11 1993
  624. --- gopher+/gopherd/gopherd.c    Thu Aug 12 02:27:11 1993
  625. ***************
  626. *** 1,7 ****
  627.   /********************************************************************
  628.    * $Author: lindner $
  629. !  * $Revision: 3.27 $
  630. !  * $Date: 1993/08/02 17:59:26 $
  631.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v $
  632.    * $State: Exp $
  633.    *
  634. --- 1,7 ----
  635.   /********************************************************************
  636.    * $Author: lindner $
  637. !  * $Revision: 3.28 $
  638. !  * $Date: 1993/08/05 20:47:16 $
  639.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v $
  640.    * $State: Exp $
  641.    *
  642. ***************
  643. *** 15,20 ****
  644. --- 15,23 ----
  645.    *********************************************************************
  646.    * Revision History:
  647.    * $Log: gopherd.c,v $
  648. +  * Revision 3.28  1993/08/05  20:47:16  lindner
  649. +  * Log execution of programs
  650. +  *
  651.    * Revision 3.27  1993/08/02  17:59:26  lindner
  652.    * Fix for Debug syntax error when using DL
  653.    *
  654. ***************
  655. *** 1098,1103 ****
  656. --- 1101,1107 ----
  657.              EXECargs = args;
  658.   
  659.              printfile(sockfd, command, 0, -1, CMDisGplus(cmd));
  660. +            LOGGopher(sockfd, "Executed %s %s", command, args);
  661.         }
  662.         break;
  663.   
  664. diff -c gopher+/gopherd/index.c:3.8 gopher+/gopherd/index.c:3.9
  665. *** gopher+/gopherd/index.c:3.8    Thu Aug 12 02:27:12 1993
  666. --- gopher+/gopherd/index.c    Thu Aug 12 02:27:13 1993
  667. ***************
  668. *** 1,7 ****
  669.   /********************************************************************
  670.    * $Author: lindner $
  671. !  * $Revision: 3.8 $
  672. !  * $Date: 1993/08/04 22:12:43 $
  673.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $
  674.    * $State: Exp $
  675.    *
  676. --- 1,7 ----
  677.   /********************************************************************
  678.    * $Author: lindner $
  679. !  * $Revision: 3.9 $
  680. !  * $Date: 1993/08/05 20:44:02 $
  681.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $
  682.    * $State: Exp $
  683.    *
  684. ***************
  685. *** 15,20 ****
  686. --- 15,23 ----
  687.    *********************************************************************
  688.    * Revision History:
  689.    * $Log: index.c,v $
  690. +  * Revision 3.9  1993/08/05  20:44:02  lindner
  691. +  * Use Gpopen instead of popen, remove extra filtering code
  692. +  *
  693.    * Revision 3.8  1993/08/04  22:12:43  lindner
  694.    * Mods to use Gpopen
  695.    *
  696. ***************
  697. *** 367,384 ****
  698.   
  699.        gd = GDnew(32);
  700.   
  701. -      /*** Clean up the arguments, remove  ; and " and `**/
  702. -      cp = Searchstring;
  703. -      while (*cp != '\0') {
  704. -       if (*cp == ';' ||*cp == '"' || *cp == '`' || *cp == '$')
  705. -            *cp = '.';
  706. -       cp++;
  707. -      }
  708. -       
  709.        sprintf(Command, "\"%s\" \"%s\"", Script, Searchstring);
  710.   
  711. !      Searchprocess = popen(Command, "r");
  712.   
  713.        if (Searchprocess == NULL) {
  714.         writestring(sockfd, ".\r\n");
  715. --- 370,378 ----
  716.   
  717.        gd = GDnew(32);
  718.   
  719.        sprintf(Command, "\"%s\" \"%s\"", Script, Searchstring);
  720.   
  721. !      Searchprocess = Gpopen(Command, "r");
  722.   
  723.        if (Searchprocess == NULL) {
  724.         writestring(sockfd, ".\r\n");
  725. diff -c gopher+/gopherd/serverutil.c:3.10 gopher+/gopherd/serverutil.c:3.11
  726. *** gopher+/gopherd/serverutil.c:3.10    Thu Aug 12 02:27:14 1993
  727. --- gopher+/gopherd/serverutil.c    Thu Aug 12 02:27:14 1993
  728. ***************
  729. *** 1,7 ****
  730.   /********************************************************************
  731.    * $Author: lindner $
  732. !  * $Revision: 3.10 $
  733. !  * $Date: 1993/08/04 22:14:51 $
  734.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  735.    * $State: Exp $
  736.    *
  737. --- 1,7 ----
  738.   /********************************************************************
  739.    * $Author: lindner $
  740. !  * $Revision: 3.11 $
  741. !  * $Date: 1993/08/05 20:46:36 $
  742.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  743.    * $State: Exp $
  744.    *
  745. ***************
  746. *** 15,20 ****
  747. --- 15,23 ----
  748.    *********************************************************************
  749.    * Revision History:
  750.    * $Log: serverutil.c,v $
  751. +  * Revision 3.11  1993/08/05  20:46:36  lindner
  752. +  * Fix for Gpopen for single quotes and !
  753. +  *
  754.    * Revision 3.10  1993/08/04  22:14:51  lindner
  755.    * Mods to use Gpopen
  756.    *
  757. ***************
  758. *** 483,488 ****
  759. --- 486,492 ----
  760.     char *rw;
  761.   {
  762.        int inquote = 0;
  763. +      int insquote = 0;
  764.        int i;
  765.   
  766.        /** Strip out the naughty bits..  **/
  767. ***************
  768. *** 489,497 ****
  769.        for (i=0; cmd[i] != '\0'; i++) {
  770.         switch (cmd[i]) {
  771.         case '"':
  772. !            inquote = 1-inquote;
  773.              break;
  774.              
  775.         case '*':
  776.         case '&':
  777.         case '|':
  778. --- 493,507 ----
  779.        for (i=0; cmd[i] != '\0'; i++) {
  780.         switch (cmd[i]) {
  781.         case '"':
  782. !            if (!insquote)
  783. !             inquote = 1-inquote;
  784.              break;
  785.              
  786. +       case '\'':
  787. +            if (!inquote)
  788. +             insquote = 1-insquote;
  789. +            break;
  790.         case '*':
  791.         case '&':
  792.         case '|':
  793. ***************
  794. *** 500,506 ****
  795.         case '?':
  796.         case '<':
  797.         case '>':
  798. -       case '!':
  799.         case '(':
  800.         case ')':
  801.         case '{':
  802. --- 510,515 ----
  803. ***************
  804. *** 510,522 ****
  805.         case '^':
  806.              /*** Stuff that's okay if quoted.. ***/
  807.   
  808. !            if (!inquote) {
  809. !             LOGGopher("Possible Security Violation '%s'", cmd);
  810.               return(NULL);
  811.              }
  812.              
  813.              break;
  814.   
  815.         case '\\':
  816.         case '`':
  817.         case '\n':
  818. --- 519,532 ----
  819.         case '^':
  820.              /*** Stuff that's okay if quoted.. ***/
  821.   
  822. !            if (!inquote && !insquote) {
  823. !             LOGGopher(0, "Possible Security Violation '%s'", cmd);
  824.               return(NULL);
  825.              }
  826.              
  827.              break;
  828.   
  829. +       case '!':
  830.         case '\\':
  831.         case '`':
  832.         case '\n':
  833. ***************
  834. *** 523,529 ****
  835.         case '$':
  836.              /*** Stuff that shouldn't be in there at all! **/
  837.   
  838. !            LOGGopher("Possible Security Violation '%s'", cmd);
  839.              return(NULL);
  840.   
  841.              break;
  842. --- 533,539 ----
  843.         case '$':
  844.              /*** Stuff that shouldn't be in there at all! **/
  845.   
  846. !            LOGGopher(0, "Possible Security Violation '%s'", cmd);
  847.              return(NULL);
  848.   
  849.              break;
  850. diff -c gopher+/object/Sockets.c:3.3 gopher+/object/Sockets.c:3.4
  851. *** gopher+/object/Sockets.c:3.3    Thu Aug 12 02:27:17 1993
  852. --- gopher+/object/Sockets.c    Thu Aug 12 02:27:18 1993
  853. ***************
  854. *** 1,7 ****
  855.   /********************************************************************
  856.    * $Author: lindner $
  857. !  * $Revision: 3.3 $
  858. !  * $Date: 1993/07/29 20:01:02 $
  859.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/Sockets.c,v $
  860.    * $State: Exp $
  861.    *
  862. --- 1,7 ----
  863.   /********************************************************************
  864.    * $Author: lindner $
  865. !  * $Revision: 3.4 $
  866. !  * $Date: 1993/08/05 03:23:37 $
  867.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/Sockets.c,v $
  868.    * $State: Exp $
  869.    *
  870. ***************
  871. *** 15,20 ****
  872. --- 15,23 ----
  873.    *********************************************************************
  874.    * Revision History:
  875.    * $Log: Sockets.c,v $
  876. +  * Revision 3.4  1993/08/05  03:23:37  lindner
  877. +  * Changes for CMUIP and NETLIB
  878. +  *
  879.    * Revision 3.3  1993/07/29  20:01:02  lindner
  880.    * Removed dead variables
  881.    *
  882. ***************
  883. *** 37,57 ****
  884.   
  885.   /* Socket specific stuff, ugh! */
  886.   #ifdef VMS
  887. ! #include <socket.h>
  888. ! #include <in.h>
  889. ! #include <file.h>
  890. ! #include <inet.h>
  891. ! #include <netdb.h>
  892.   
  893. ! #else
  894. ! #include <sys/types.h>
  895. ! #include <sys/socket.h>
  896. ! #include <netinet/in.h>
  897. ! #include <sys/file.h>
  898. ! #ifndef hpux
  899. ! #include <arpa/inet.h>
  900. ! #endif
  901. ! #include <netdb.h>
  902.   #endif  /* not VMS */
  903.   
  904.   #include "Malloc.h"
  905. --- 40,67 ----
  906.   
  907.   /* Socket specific stuff, ugh! */
  908.   #ifdef VMS
  909. ! #  if !defined(CMUIP) && !defined(NETLIB)
  910. ! #    include <socket.h>
  911. ! #    include <in.h>
  912. ! #    include <file.h>
  913. ! #    include <inet.h>
  914. ! #    include <netdb.h>
  915. ! #    include iodef
  916. ! #    include ssdef
  917. ! #  else
  918. ! #    include iodef
  919. ! #    include ssdef
  920. ! #  endif        /* if !CMUIP && !NETLIB */
  921.   
  922. ! #else  /* VMS */
  923. ! #  include <sys/types.h>
  924. ! #  include <sys/socket.h>
  925. ! #  include <netinet/in.h>
  926. ! #  include <sys/file.h>
  927. ! #  ifndef hpux
  928. ! #    include <arpa/inet.h>
  929. ! #  endif
  930. ! #  include <netdb.h>
  931.   #endif  /* not VMS */
  932.   
  933.   #include "Malloc.h"
  934. ***************
  935. *** 134,139 ****
  936. --- 144,150 ----
  937.     char *hostname;
  938.     int port;
  939.   {
  940. + #if !defined(CMUIP) && !defined(NETLIB)
  941.        struct sockaddr_in Server;
  942.        struct hostent *HostPtr;
  943.        int sockfd = 0;
  944. ***************
  945. *** 177,182 ****
  946. --- 188,252 ----
  947.        }
  948.   
  949.        return(sockfd);
  950. + #else /* !NETLIB && !CMUIP */
  951. + #ifdef NETLIB
  952. +      int status;
  953. +      static int iSock = 0;
  954. +      struct {
  955. +           long len;
  956. +           char *adr;
  957. +      } host_desc;
  958. + #define NET_K_TCP 1
  959. +      status = NET_ASSIGN (&iSock);
  960. +      if ((status & 1) == 0)
  961. +           return (-3);
  962. +      status = NET_BIND (&iSock, NET_K_TCP, 0, 0, 0);
  963. +      if ((status & 1) == 0)
  964. +           return (-3);
  965. +      host_desc.adr = hostname;
  966. +      host_desc.len = strlen (host_desc.adr);
  967. +      status = TCP_CONNECT (&iSock, &host_desc, port);
  968. +      if ((status & 1) == 0) {
  969. +           NET_DEASSIGN (&iSock);
  970. +           if (status == SS$_REJECT)
  971. +                return (-4);
  972. +           if (status == SS$_ENDOFFILE)
  973. +                return (-2);
  974. +           return (-1);
  975. +      }
  976. +      return (iSock);
  977. + #else /* ifdef NETLIB:  assume CMUIP */
  978. +      short channel;
  979. +      int status;
  980. +      struct {
  981. +           short status;
  982. +           short size;
  983. +           long xxx;
  984. +      } cmu_iosb;
  985. +      static struct {long l; char *a;} ip_dev = {12, "INET$DEVICE:"};
  986. +      globalvalue NET$_CREF;           /* Connection refused */
  987. +      globalvalue NET$_DSNAMERR;               /* Domain server name error */
  988. +      status = SYS$ASSIGN (&ip_dev, &channel, 0, 0);
  989. +      if ((status & 1) == 0)
  990. +           return (-3);
  991. +      status = SYS$QIOW (0, channel, IO$_CREATE, &cmu_iosb, 0, 0,
  992. +           hostname, port, 0, 1, 0, 0);
  993. +      if ((status & 1) == 0 || (cmu_iosb.status & 1) == 0) {
  994. +           SYS$DASSGN (channel);
  995. +           if (cmu_iosb.status == SS$_ABORT) {
  996. +                if (cmu_iosb.xxx == NET$_CREF)
  997. +                     return (-4);
  998. +                if (cmu_iosb.xxx == NET$_DSNAMERR)
  999. +                     return (-2);
  1000. +           }
  1001. +           return (-1);
  1002. +      }
  1003. +      return (channel);
  1004. + #endif
  1005. + #endif
  1006.   }
  1007.   
  1008.   
  1009. diff -c gopher+/object/compile.com:3.5 gopher+/object/compile.com:3.6
  1010. *** gopher+/object/compile.com:3.5    Thu Aug 12 02:27:18 1993
  1011. --- gopher+/object/compile.com    Thu Aug 12 02:27:19 1993
  1012. ***************
  1013. *** 35,40 ****
  1014. --- 35,42 ----
  1015.            @compile UCX
  1016.            @compile WOLLONGONG
  1017.            @compile MULTINET
  1018. +          @compile CMUIP
  1019. +              @compile NETLIB
  1020.   $    exit
  1021.   $ ENDIF
  1022.   $ ON CONTROL_Y THEN GOTO CLEANUP
  1023. diff -c gopher+/object/util.c:3.7 gopher+/object/util.c:3.8
  1024. *** gopher+/object/util.c:3.7    Thu Aug 12 02:27:19 1993
  1025. --- gopher+/object/util.c    Thu Aug 12 02:27:20 1993
  1026. ***************
  1027. *** 1,7 ****
  1028.   /********************************************************************
  1029.    * $Author: lindner $
  1030. !  * $Revision: 3.7 $
  1031. !  * $Date: 1993/07/27 05:30:30 $
  1032.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/util.c,v $
  1033.    * $State: Exp $
  1034.    *
  1035. --- 1,7 ----
  1036.   /********************************************************************
  1037.    * $Author: lindner $
  1038. !  * $Revision: 3.8 $
  1039. !  * $Date: 1993/08/05 03:23:40 $
  1040.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/util.c,v $
  1041.    * $State: Exp $
  1042.    *
  1043. ***************
  1044. *** 15,20 ****
  1045. --- 15,23 ----
  1046.    *********************************************************************
  1047.    * Revision History:
  1048.    * $Log: util.c,v $
  1049. +  * Revision 3.8  1993/08/05  03:23:40  lindner
  1050. +  * Changes for CMUIP and NETLIB
  1051. +  *
  1052.    * Revision 3.7  1993/07/27  05:30:30  lindner
  1053.    * Mondo Debug overhaul from Mitra
  1054.    *
  1055. ***************
  1056. *** 75,82 ****
  1057.   #endif
  1058.    
  1059.   
  1060. ! #if defined(VMS) && (defined(WOLLONGONG) || defined(MULTINET))
  1061. ! /* Multinet and Wollongong (non UCX-emulation) use channel numbers */
  1062.   /* for sockets, which are small multiples of 16.  The first 5 */
  1063.   /* channels can be assumed to be already used, so we assume that */
  1064.   /* sockets start at 64, and that only 64 VAXC fds are simultaneously */
  1065. --- 78,85 ----
  1066.   #endif
  1067.    
  1068.   
  1069. ! #if defined(VMS) && (defined(WOLLONGONG) || defined(MULTINET) ||defined(CMUIP)||defined(NETLIB))
  1070. ! /* Multinet and Wollongong,etc. (non UCX-emulation) use channel numbers */
  1071.   /* for sockets, which are small multiples of 16.  The first 5 */
  1072.   /* channels can be assumed to be already used, so we assume that */
  1073.   /* sockets start at 64, and that only 64 VAXC fds are simultaneously */
  1074. ***************
  1075. *** 95,101 ****
  1076.       if (IS_SOCKET(s)) {
  1077.   #ifdef MULTINET
  1078.       return (socket_close(s));
  1079. ! #else /* WOLLONGONG */
  1080.       return (netclose(s));
  1081.   #endif
  1082.       }
  1083. --- 98,104 ----
  1084.       if (IS_SOCKET(s)) {
  1085.   #ifdef MULTINET
  1086.       return (socket_close(s));
  1087. ! #else /* WOLLONGONG, CMUIP, NETLIB */
  1088.       return (netclose(s));
  1089.   #endif
  1090.       }
  1091. ***************
  1092. *** 120,126 ****
  1093.        
  1094.        nleft = nbytes;
  1095.        while (nleft > 0) {
  1096. ! #if defined(VMS) && defined(WOLLONGONG)
  1097.         nread = IS_SOCKET(fd) ? netread(fd, ptr, nleft) : read(fd, ptr, nleft);
  1098.   #else
  1099.   #if defined(VMS) && defined(MULTINET)
  1100. --- 123,129 ----
  1101.        
  1102.        nleft = nbytes;
  1103.        while (nleft > 0) {
  1104. ! #if defined(VMS) && (defined(WOLLONGONG) || defined(CMUIP) || defined(NETLIB))
  1105.         nread = IS_SOCKET(fd) ? netread(fd, ptr, nleft) : read(fd, ptr, nleft);
  1106.   #else
  1107.   #if defined(VMS) && defined(MULTINET)
  1108. ***************
  1109. *** 163,169 ****
  1110.        
  1111.        nleft = nbytes;
  1112.        while(nleft > 0) {
  1113. ! #if defined(VMS) && defined(WOLLONGONG)
  1114.         nwritten = IS_SOCKET(fd) ? netwrite(fd, ptr, nleft) : write(fd, ptr, nleft);
  1115.   #else
  1116.   #if defined(VMS) && defined(MULTINET)
  1117. --- 166,172 ----
  1118.        
  1119.        nleft = nbytes;
  1120.        while(nleft > 0) {
  1121. ! #if defined(VMS) && (defined(WOLLONGONG) || defined(CMUIP) || defined(NETLIB))
  1122.         nwritten = IS_SOCKET(fd) ? netwrite(fd, ptr, nleft) : write(fd, ptr, nleft);
  1123.   #else
  1124.   #if defined(VMS) && defined(MULTINET)
  1125. ***************
  1126. *** 229,235 ****
  1127.        int bytesread = 0;
  1128.   
  1129.        if (recvbufptr == 0 || Oldsockfd != sockfd) {
  1130. ! #if defined(VMS) && defined(WOLLONGONG)
  1131.         recvbufsize = IS_SOCKET(sockfd) ?
  1132.           netread(sockfd, recvbuf, RECVSIZE) : read(sockfd, recvbuf, RECVSIZE);
  1133.   #else
  1134. --- 232,238 ----
  1135.        int bytesread = 0;
  1136.   
  1137.        if (recvbufptr == 0 || Oldsockfd != sockfd) {
  1138. ! #if defined(VMS) && (defined(WOLLONGONG)||defined(CMUIP)||defined(NETLIB))
  1139.         recvbufsize = IS_SOCKET(sockfd) ?
  1140.           netread(sockfd, recvbuf, RECVSIZE) : read(sockfd, recvbuf, RECVSIZE);
  1141.   #else
  1142. ***************
  1143. *** 624,630 ****
  1144. --- 627,782 ----
  1145.   }
  1146.   
  1147.   
  1148. + #if defined(VMS) && defined(NETLIB)
  1149.   /*
  1150. +  * netclose, netread, and netwrite for NETLIB
  1151. +  */
  1152. + #include iodef
  1153. + static struct {
  1154. +      short status;
  1155. +      short size;
  1156. +      long xxx;
  1157. + } netlib_iosb;
  1158. + void netlib_ast (param)
  1159. + int param;
  1160. + {
  1161. +      SYS$SETEF (0);
  1162. + }
  1163. + int netclose (channel)
  1164. + int channel;
  1165. + {
  1166. +      NET_DEASSIGN (&channel);
  1167. +      return (0);
  1168. + }
  1169. + int netread (channel, buffer, length)
  1170. + int channel;
  1171. + char *buffer;
  1172. + int length;
  1173. + {
  1174. +      struct {
  1175. +           long len;
  1176. +           char *adr;
  1177. +      } buffer_desc;
  1178. +      int status;
  1179. +      if (length > 1500) length = 1500;
  1180. +      buffer_desc.len = length;
  1181. +      buffer_desc.adr = buffer;
  1182. +      SYS$CLREF (0);
  1183. +      status = TCP_RECEIVE (&channel, &buffer_desc, &netlib_iosb, netlib_ast, 0);
  1184. +      if ((status & 1) == 0)
  1185. +           return (-1);
  1186. +      SYS$WAITFR (0);
  1187. +      if ((netlib_iosb.status & 1) == 0) {
  1188. +           return (-1);
  1189. +      }
  1190. +      return (netlib_iosb.size);
  1191. + }
  1192. + int netwrite (channel, buffer, length)
  1193. + int channel;
  1194. + char *buffer;
  1195. + int length;
  1196. + {
  1197. +      struct {
  1198. +           long len;
  1199. +           char *adr;
  1200. +      } buffer_desc;
  1201. +      int status;
  1202. +      buffer_desc.len = length;
  1203. +      buffer_desc.adr = buffer;
  1204. +      SYS$CLREF (0);
  1205. +      status = TCP_SEND (&channel, &buffer_desc, 6, &netlib_iosb, netlib_ast, 0);
  1206. +      if ((status & 1) == 0)
  1207. +           return (-1);
  1208. +      SYS$WAITFR (0);
  1209. +      if ((netlib_iosb.status & 1) == 0) {
  1210. +           return (-1);
  1211. +      }
  1212. +      return (netlib_iosb.size);
  1213. + }
  1214. + #endif    /* NETLIB */
  1215. + #if defined(VMS) && defined(CMUIP)
  1216. + /*
  1217. +  * netclose, netread, and netwrite for CMUIP
  1218. +  */
  1219. + #include iodef
  1220. + static struct {
  1221. +      short status;
  1222. +      short size;
  1223. +      long xxx;
  1224. + } cmu_iosb;
  1225. + int netclose (channel)
  1226. +   int channel;
  1227. + {
  1228. +      int status;
  1229. +      status = SYS$QIOW (0, channel, IO$_DELETE, &cmu_iosb, 0, 0,
  1230. +             0, 0, 0, 0, 0, 0);
  1231. +      status = SYS$DASSGN (channel);
  1232. +      return (0);
  1233. + }
  1234. + int netread (channel, buffer, length)
  1235. +   int channel;
  1236. +   char *buffer;
  1237. +   int length;
  1238. + {
  1239. +      int status;
  1240. +      if (length > 1500) length = 1500;
  1241. +      status = SYS$QIOW (0, channel, IO$_READVBLK, &cmu_iosb, 0, 0,
  1242. +             buffer, length, 0, 0, 0, 0);
  1243. +      if ((status & 1) == 0)
  1244. +           return (-1);
  1245. +      if ((cmu_iosb.status & 1) == 0) {
  1246. +           if (cmu_iosb.status == 44)
  1247. +                exit (cmu_iosb.xxx);
  1248. +           return (-1);
  1249. +      }
  1250. +      return (cmu_iosb.size);
  1251. + }
  1252. + int netwrite (channel, buffer, length)
  1253. +   int channel;
  1254. +   char *buffer;
  1255. +   int length;
  1256. + {
  1257. +      int status;
  1258. +      status = SYS$QIOW (0, channel, IO$_WRITEVBLK, &cmu_iosb, 0, 0,
  1259. +             buffer, length, 0, 1, 0, 0);
  1260. +      if ((status & 1) == 0)
  1261. +           return (-1);
  1262. +      if ((cmu_iosb.status & 1) == 0) {
  1263. +           if (cmu_iosb.status == 44)
  1264. +                exit (cmu_iosb.xxx);
  1265. +           return (-1);
  1266. +      }
  1267. +      return (cmu_iosb.size);
  1268. + }
  1269. + #endif    /* CMUIP */
  1270. + /*
  1271.    *  Checks to see if Remote server is up..
  1272.    */
  1273.   
  1274. ***************
  1275. *** 636,639 ****
  1276. --- 788,793 ----
  1277.        ;
  1278.   
  1279.   }
  1280.   
  1281.