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 / patch5 < prev   
Encoding:
Text File  |  1993-08-12  |  42.7 KB  |  1,502 lines

  1. diff -c gopher+/Makefile:3.8 gopher+/Makefile:3.9
  2. *** gopher+/Makefile:3.8    Thu Aug 12 02:35:15 1993
  3. --- gopher+/Makefile    Thu Aug 12 02:35:15 1993
  4. ***************
  5. *** 1,7 ****
  6.   #********************************************************************
  7.   # $Author: lindner $
  8. ! # $Revision: 3.8 $
  9. ! # $Date: 1993/08/05 22:22:40 $
  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.9 $
  17. ! # $Date: 1993/08/12 06:34:23 $
  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.9  1993/08/12  06:34:23  lindner
  28. + # Added quicktar..
  29. + #
  30.   # Revision 3.8  1993/08/05  22:22:40  lindner
  31.   # warning message for archive
  32.   #
  33. ***************
  34. *** 116,121 ****
  35. --- 119,129 ----
  36.       zip -@ $$HERE.zip <$$HERE/MANIFEST
  37.       @echo "Did you remember to update the patchlevel.h Paul?..."
  38.       @echo "Hmmm...  Hmmmm...."
  39. + quicktar:
  40. +     HERE=`basename $$PWD`; \
  41. +         cd .. ; \
  42. +     /usr/gnu/bin/tar  -T $$HERE/MANIFEST -czvf $$HERE.tar.Z ;\
  43.   
  44.   tags:
  45.       etags `find . -print | egrep '\.[ch]$$'`
  46. diff -c gopher+/conf.h:3.6 gopher+/conf.h:3.7
  47. *** gopher+/conf.h:3.6    Thu Aug 12 02:35:16 1993
  48. --- gopher+/conf.h    Thu Aug 12 02:35:16 1993
  49. ***************
  50. *** 1,7 ****
  51.   /********************************************************************
  52.    * $Author: lindner $
  53. !  * $Revision: 3.6 $
  54. !  * $Date: 1993/08/04 22:07:42 $
  55.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/conf.h,v $
  56.    * $State: Exp $
  57.    *
  58. --- 1,7 ----
  59.   /********************************************************************
  60.    * $Author: lindner $
  61. !  * $Revision: 3.7 $
  62. !  * $Date: 1993/08/12 06:35:08 $
  63.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/conf.h,v $
  64.    * $State: Exp $
  65.    *
  66. ***************
  67. *** 15,20 ****
  68. --- 15,23 ----
  69.    *********************************************************************
  70.    * Revision History:
  71.    * $Log: conf.h,v $
  72. +  * Revision 3.7  1993/08/12  06:35:08  lindner
  73. +  * Don't override CONF_FILE definition, use mail instead of /bin/mail for VMS
  74. +  *
  75.    * Revision 3.6  1993/08/04  22:07:42  lindner
  76.    * Use /bin/mail instead of ucbmail
  77.    *
  78. ***************
  79. *** 130,136 ****
  80.   #endif
  81.   
  82.   #ifndef MAIL_COMMAND
  83. ! #define MAIL_COMMAND "/bin/mail"
  84.   #endif
  85.   
  86.   #ifndef TELNET_COMMAND
  87. --- 133,143 ----
  88.   #endif
  89.   
  90.   #ifndef MAIL_COMMAND
  91. ! #  ifdef VMS
  92. ! #    define MAIL_COMMAND "mail"
  93. ! #  else
  94. ! #    define MAIL_COMMAND "/bin/mail"
  95. ! #  endif
  96.   #endif
  97.   
  98.   #ifndef TELNET_COMMAND
  99. ***************
  100. *** 186,189 ****
  101.   
  102.   /* We need to define this since inetd.conf can only have a few
  103.      arguments, and we need lots of them */
  104. ! #define CONF_FILE    "/usr/local/etc/gopherd.conf"
  105. --- 193,199 ----
  106.   
  107.   /* We need to define this since inetd.conf can only have a few
  108.      arguments, and we need lots of them */
  109. ! #if !defined(CONF_FILE)
  110. ! #  define CONF_FILE    "/usr/local/etc/gopherd.conf"
  111. ! #endif
  112. diff -c gopher+/patchlevel.h:3.5 gopher+/patchlevel.h:3.6
  113. *** gopher+/patchlevel.h:3.5    Thu Aug 12 02:35:17 1993
  114. --- gopher+/patchlevel.h    Thu Aug 12 02:35:17 1993
  115. ***************
  116. *** 5,8 ****
  117.   #define GOPHER_MAJOR_VERSION "2"
  118.   #define GOPHER_MINOR_VERSION "0"
  119.   
  120. ! #define PATCHLEVEL 4
  121. --- 5,8 ----
  122.   #define GOPHER_MAJOR_VERSION "2"
  123.   #define GOPHER_MINOR_VERSION "0"
  124.   
  125. ! #define PATCHLEVEL 5
  126. diff -c gopher+/doc/client.changes:3.9 gopher+/doc/client.changes:3.10
  127. *** gopher+/doc/client.changes:3.9    Thu Aug 12 02:35:20 1993
  128. --- gopher+/doc/client.changes    Thu Aug 12 02:35:20 1993
  129. ***************
  130. *** 1,4 ****
  131. ! $Id: client.changes,v 3.9 1993/08/06 14:41:47 lindner Exp $
  132.   
  133.   Gopher+2.0 patchlevel 3
  134.   -----------------------
  135. --- 1,18 ----
  136. ! $Id: client.changes,v 3.10 1993/08/12 07:34:03 lindner Exp $
  137. ! Gopher+2.0 patchlevel 5
  138. ! -----------------------
  139. !  * Fix for really long strings in some menus
  140. !  * Get rid of the beep during a ^G in CURwgetstr().
  141. !  * Make CURChoice() delete its window when it exits.
  142. !  * Fixes for CMULIB and NETLIB for VMS
  143. !  * Mods for VMS for telnet dialog, argv[0]
  144. !  * use x-troff instead of troff in gopher.rc
  145.   
  146.   Gopher+2.0 patchlevel 3
  147.   -----------------------
  148. diff -c gopher+/doc/gophfilt.1:3.1 gopher+/doc/gophfilt.1:3.2
  149. *** gopher+/doc/gophfilt.1:3.1    Thu Aug 12 02:35:22 1993
  150. --- gopher+/doc/gophfilt.1    Thu Aug 12 02:35:23 1993
  151. ***************
  152. *** 76,81 ****
  153. --- 76,83 ----
  154.   .SH MORE EXAMPLES
  155.   .PP
  156.   Here is an example that demonstrates the usefulness of the gophfilt.
  157. + This specific example only works on the Rutgers campus, but illustrates
  158. + the point
  159.   .PP
  160.   gophfilt -t 0 -p "webster default SPELL" -i flatulence
  161.   .RS 2
  162. diff -c gopher+/doc/server.changes:3.9 gopher+/doc/server.changes:3.10
  163. *** gopher+/doc/server.changes:3.9    Thu Aug 12 02:35:25 1993
  164. --- gopher+/doc/server.changes    Thu Aug 12 02:35:25 1993
  165. ***************
  166. *** 1,4 ****
  167. ! $Id: server.changes,v 3.9 1993/08/06 14:41:51 lindner Exp $
  168.   
  169.   
  170.   Gopher+2.0 patchlevel 4
  171. --- 1,31 ----
  172. ! $Id: server.changes,v 3.10 1993/08/12 07:33:52 lindner Exp $
  173. ! Gopher+2.0 patchlevel 5
  174. ! -----------------------
  175. !  * Added fi for gopherindex install
  176. !  * Fix for error logging and uninitialized gs in ftp.c
  177. !  * Fix for hanging ftp gateway connections, die instead of spinning
  178. !  * Get rid of errant message when using inetd (-u warning)
  179. !  * Fix for text/plain files for gopher0 clients.
  180. !  * Remove extensions from titles for files with multiple views.
  181. !  * Move CMDfromNet() to *after* the chroot() and setuid()
  182. !  * Fix for send_binary bug (not enough params in specialfile()
  183. !  * Fix for wais gateway and Unix client
  184. !  * Fixed bogus reading of .cache+ files
  185. !  * return true for non-existant cache file in Cachetimedout(), not -1
  186. !  * Don't let the security stuff trap ask blocks
  187.   
  188.   
  189.   Gopher+2.0 patchlevel 4
  190. diff -c gopher+/gopher/CURcurses.c:3.9 gopher+/gopher/CURcurses.c:3.12
  191. *** gopher+/gopher/CURcurses.c:3.9    Thu Aug 12 02:35:29 1993
  192. --- gopher+/gopher/CURcurses.c    Thu Aug 12 02:35:29 1993
  193. ***************
  194. *** 1,7 ****
  195.   /********************************************************************
  196.    * $Author: lindner $
  197. !  * $Revision: 3.9 $
  198. !  * $Date: 1993/07/30 17:31:34 $
  199.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.c,v $
  200.    * $State: Exp $
  201.    *
  202. --- 1,7 ----
  203.   /********************************************************************
  204.    * $Author: lindner $
  205. !  * $Revision: 3.12 $
  206. !  * $Date: 1993/08/12 06:32:06 $
  207.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.c,v $
  208.    * $State: Exp $
  209.    *
  210. ***************
  211. *** 15,20 ****
  212. --- 15,31 ----
  213.    *********************************************************************
  214.    * Revision History:
  215.    * $Log: CURcurses.c,v $
  216. +  * Revision 3.12  1993/08/12  06:32:06  lindner
  217. +  * Add needed variable
  218. +  *
  219. +  * Revision 3.11  1993/08/09  20:44:48  lindner
  220. +  * Fix for really long strings
  221. +  *
  222. +  * Revision 3.10  1993/08/09  20:29:50  lindner
  223. +  * Get rid of the beep during a ^G in CURwgetstr().
  224. +  *
  225. +  * Make CURChoice() delete its window when it exits.
  226. +  *
  227.    * Revision 3.9  1993/07/30  17:31:34  lindner
  228.    * Mods to support AskP:
  229.    *
  230. ***************
  231. *** 387,393 ****
  232.              break;
  233.   
  234.         case '\007':  /*** ^G cancel... ***/
  235. -            CURBeep(cur);
  236.              wstandend(win);
  237.              return(-1);
  238.              break;
  239. --- 398,403 ----
  240. ***************
  241. *** 744,751 ****
  242.   
  243.        /** Add the message **/
  244.        for (i=0; i<messheight; i++) {
  245.             wmove(tempwin, 2+i,(winwidth - messlength)/2);
  246. !           waddstr(tempwin, Message[i]);
  247.        }
  248.   
  249.   
  250. --- 754,770 ----
  251.   
  252.        /** Add the message **/
  253.        for (i=0; i<messheight; i++) {
  254. +       int len = strlen(Message[i]), j;
  255.             wmove(tempwin, 2+i,(winwidth - messlength)/2);
  256. !       if (len > messlength) {
  257. !            for (j=0; j < messlength; j++)
  258. !             waddch(tempwin, Message[i][j]);
  259. !       }
  260. !       else
  261. !            waddstr(tempwin, Message[i]);
  262.        }
  263.   
  264.   
  265. ***************
  266. *** 1010,1023 ****
  267.         i = CURwgetch(cur, tempwin);
  268.         wrefresh(tempwin);
  269.         switch (i) {
  270. !       case '\007': return(-1);
  271. !       case '\n':   return(default_choice);
  272.         }
  273.   
  274.         if (i < '1' || i > ('0'+numchoices))
  275.              CURBeep(cur);
  276. !       else
  277.              return(i-'1');
  278.        }      
  279.   
  280.   }
  281. --- 1029,1048 ----
  282.         i = CURwgetch(cur, tempwin);
  283.         wrefresh(tempwin);
  284.         switch (i) {
  285. !       case '\007':
  286. !            delwin(tempwin);
  287. !            return(-1);
  288. !       case '\n':   
  289. !            delwin(tempwin);
  290. !            return(default_choice);
  291.         }
  292.   
  293.         if (i < '1' || i > ('0'+numchoices))
  294.              CURBeep(cur);
  295. !       else {
  296. !            delwin(tempwin);
  297.              return(i-'1');
  298. +       }
  299.        }      
  300.   
  301.   }
  302. diff -c gopher+/gopher/cmuip.opt:3.1 gopher+/gopher/cmuip.opt:3.2
  303. *** gopher+/gopher/cmuip.opt:3.1    Thu Aug 12 02:35:32 1993
  304. --- gopher+/gopher/cmuip.opt    Thu Aug 12 02:35:32 1993
  305. ***************
  306. *** 1,3 ****
  307. ! identification="CMUIP-1.12"
  308.   sys$library:neterror
  309.   sys$share:vaxcrtl.exe/share
  310. --- 1,3 ----
  311. ! identification="CMUIP-2.04"
  312.   sys$library:neterror
  313.   sys$share:vaxcrtl.exe/share
  314. diff -c gopher+/gopher/download.c:3.7 gopher+/gopher/download.c:3.8
  315. *** gopher+/gopher/download.c:3.7    Thu Aug 12 02:35:33 1993
  316. --- gopher+/gopher/download.c    Thu Aug 12 02:35:33 1993
  317. ***************
  318. *** 1,7 ****
  319.   /********************************************************************
  320.    * $Author: lindner $
  321. !  * $Revision: 3.7 $
  322. !  * $Date: 1993/07/30 17:36:54 $
  323.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/download.c,v $
  324.    * $State: Exp $
  325.    *
  326. --- 1,7 ----
  327.   /********************************************************************
  328.    * $Author: lindner $
  329. !  * $Revision: 3.8 $
  330. !  * $Date: 1993/08/09 20:39:55 $
  331.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/download.c,v $
  332.    * $State: Exp $
  333.    *
  334. ***************
  335. *** 15,20 ****
  336. --- 15,23 ----
  337.    *********************************************************************
  338.    * Revision History:
  339.    * $Log: download.c,v $
  340. +  * Revision 3.8  1993/08/09  20:39:55  lindner
  341. +  * fix for VMS
  342. +  *
  343.    * Revision 3.7  1993/07/30  17:36:54  lindner
  344.    * More secure download in /tmp
  345.    *
  346. ***************
  347. *** 151,160 ****
  348. --- 154,170 ----
  349.         }
  350.        }
  351.   
  352. + #ifdef VMS
  353.        if (chdir("/tmp")!=0) {
  354. +       CursesErrorMsg("Can't write to SYS$SCRATCH!");
  355. +       return;
  356. +      }
  357. + #else
  358. +      if (chdir("/tmp")!=0) {
  359.         CursesErrorMsg("Can't write to the /tmp directory!");
  360.         return;
  361.        }
  362. + #endif
  363.   
  364.        /** Make sure we don't overwrite an existing file ... **/
  365.        while (stat(tmpfilename, &buf) == 0) {
  366. diff -c gopher+/gopher/gopher.c:3.27 gopher+/gopher/gopher.c:3.29
  367. *** gopher+/gopher/gopher.c:3.27    Thu Aug 12 02:35:35 1993
  368. --- gopher+/gopher/gopher.c    Thu Aug 12 02:35:35 1993
  369. ***************
  370. *** 1,7 ****
  371.   /********************************************************************
  372.    * $Author: lindner $
  373. !  * $Revision: 3.27 $
  374. !  * $Date: 1993/08/05 03:24:21 $
  375.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $
  376.    * $State: Exp $
  377.    *
  378. --- 1,7 ----
  379.   /********************************************************************
  380.    * $Author: lindner $
  381. !  * $Revision: 3.29 $
  382. !  * $Date: 1993/08/09 20:28:04 $
  383.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $
  384.    * $State: Exp $
  385.    *
  386. ***************
  387. *** 15,20 ****
  388. --- 15,26 ----
  389.    *********************************************************************
  390.    * Revision History:
  391.    * $Log: gopher.c,v $
  392. +  * Revision 3.29  1993/08/09  20:28:04  lindner
  393. +  * Mods for VMS for telnet dialog, argv[0]
  394. +  *
  395. +  * Revision 3.28  1993/08/09  20:17:59  lindner
  396. +  * Fixes for CMULIB and NETLIB for VMS
  397. +  *
  398.    * Revision 3.27  1993/08/05  03:24:21  lindner
  399.    * Fix for control-c on startup
  400.    *
  401. ***************
  402. *** 187,205 ****
  403.        clear();
  404.        Dialogmess[0] = "Warning!!!!!, you are about to leave the Internet";
  405.        Dialogmess[1] = "Gopher program and connect to another host. If";
  406. !      Dialogmess[2] = "you get stuck press the control key and the ] key,";
  407. !      Dialogmess[3] = "and then type quit";
  408.        Dialogmess[4] = "";
  409.        
  410.        if (GSgetPort(ZeGopher) != 0)
  411. !       sprintf(sMessage1,"Connecting to %s, port %d using %s.", GSgetHost(ZeGopher),GSgetPort(ZeGopher), (GSgetType(ZeGopher) == A_TN3270) ? "tn3270" : "telnet");
  412.        else
  413. !       sprintf(sMessage1, "Connecting to %s using %s.", GSgetHost(ZeGopher),(GSgetType(ZeGopher) == A_TN3270) ? "tn3270" : "telnet");
  414.   
  415.        Dialogmess[5] = sMessage1;
  416.   
  417.        if (*GSgetPath(ZeGopher) != '\0')
  418. !       sprintf(sMessage2,"Use the account name \"%s\" to log in",
  419.             GSgetPath(ZeGopher));
  420.        else
  421.         sMessage2[0] = '\0';
  422. --- 193,219 ----
  423.        clear();
  424.        Dialogmess[0] = "Warning!!!!!, you are about to leave the Internet";
  425.        Dialogmess[1] = "Gopher program and connect to another host. If";
  426. !      Dialogmess[2] = "you get stuck press the control key and the";
  427. ! #ifdef VMS
  428. !      Dialogmess[3] = "^ key, and then type q.";
  429. ! #else
  430. !      Dialogmess[3] = "] key, and then type quit";
  431. ! #endif
  432.        Dialogmess[4] = "";
  433.        
  434.        if (GSgetPort(ZeGopher) != 0)
  435. !       sprintf(sMessage1,"Connecting to %.40s, port %d using %s.", 
  436. !           GSgetHost(ZeGopher),GSgetPort(ZeGopher), 
  437. !           (GSgetType(ZeGopher) == A_TN3270) ? "tn3270" : "telnet");
  438.        else
  439. !       sprintf(sMessage1, "Connecting to %.40s using %s.",
  440. !           GSgetHost(ZeGopher),
  441. !           (GSgetType(ZeGopher) == A_TN3270) ? "tn3270" : "telnet");
  442.   
  443.        Dialogmess[5] = sMessage1;
  444.   
  445.        if (*GSgetPath(ZeGopher) != '\0')
  446. !       sprintf(sMessage2,"Use the account name \"%.40s\" to log in",
  447.             GSgetPath(ZeGopher));
  448.        else
  449.         sMessage2[0] = '\0';
  450. ***************
  451. *** 221,227 ****
  452.         RCdisplayCommand(GlobalRC, "Terminal/telnet", GSgetHost(ZeGopher), sTelCmd);
  453.   
  454.         if (GSgetPort(ZeGopher) != 0 && GSgetPort(ZeGopher) != 23) 
  455. ! #if defined(VMS) && defined(MULTINET)
  456.                  sprintf(sTelCmd+strlen(sTelCmd),
  457.                  "/PORT=%d", GSgetPort(ZeGopher));
  458.   #else
  459. --- 235,241 ----
  460.         RCdisplayCommand(GlobalRC, "Terminal/telnet", GSgetHost(ZeGopher), sTelCmd);
  461.   
  462.         if (GSgetPort(ZeGopher) != 0 && GSgetPort(ZeGopher) != 23) 
  463. ! #if defined(VMS) && (defined(MULTINET) || defined(CMUIP))
  464.                  sprintf(sTelCmd+strlen(sTelCmd),
  465.                  "/PORT=%d", GSgetPort(ZeGopher));
  466.   #else
  467. ***************
  468. *** 704,709 ****
  469. --- 718,727 ----
  470.              DispStrings[2] = "Unable to allocate a socket.";
  471.              break;
  472.         case -4:
  473. + #if defined(VMS) && defined(MULTINET)
  474. +            sprintf(DispString2, "%.78s.", vms_errno_string());
  475. +            DispStrings[2] = DispString2;
  476. + #else
  477.              if (errno > 0 && errno <= sys_nerr) {
  478.               sprintf(DispString2, "Connection failed: %s.",
  479.                   sys_errlist[errno]);
  480. ***************
  481. *** 710,715 ****
  482. --- 728,734 ----
  483.               DispStrings[2] = DispString2;
  484.              } else
  485.               DispStrings[2] = "Connection to remote host failed.";
  486. + #endif
  487.              break;
  488.         default:
  489.              DispStrings[2] = "Unknown error.";
  490. ***************
  491. *** 1083,1088 ****
  492. --- 1102,1112 ----
  493.        int Garbled = TRUE;
  494.        boolean Bkmarksfirst = FALSE;
  495.        
  496. + #ifdef VMS
  497. +       argv[0] = "gopher";
  498. + #endif
  499.        for (i=0; i<2; i++) {
  500.         RootGophers[i] = GSnew();
  501.         GSsetType (RootGophers[i], A_DIRECTORY);   
  502. ***************
  503. *** 1143,1151 ****
  504.   
  505.   
  506.        if (errflag) {
  507. - #ifdef VMS
  508. -       argv[0] = "gopher";
  509. - #endif
  510.         
  511.         fprintf(stderr, "Usage: %s [-sSbDr] [-T type] [-p path] [-t title] [hostname port]+\n", argv[0]);
  512.         fprintf(stderr, "     -s      secure mode, users without own account\n");
  513. --- 1167,1172 ----
  514. ***************
  515. *** 1185,1193 ****
  516.   
  517.        /*** If the title hasn't been set, then add a default title **/
  518.        if (GSgetTitle(RootGophers[0]) == NULL) {
  519. !       sprintf(sTmp, "Root gopher server: %s", GSgetHost(RootGophers[0]));
  520.         GSsetTitle(RootGophers[0], sTmp);
  521. !       sprintf(sTmp, "Root gopher server: %s", GSgetHost(RootGophers[1]));
  522.         GSsetTitle(RootGophers[1], sTmp);
  523.        }
  524.   
  525. --- 1206,1214 ----
  526.   
  527.        /*** If the title hasn't been set, then add a default title **/
  528.        if (GSgetTitle(RootGophers[0]) == NULL) {
  529. !       sprintf(sTmp, "Root gopher server: %.59s", GSgetHost(RootGophers[0]));
  530.         GSsetTitle(RootGophers[0], sTmp);
  531. !       sprintf(sTmp, "Root gopher server: %.59s", GSgetHost(RootGophers[1]));
  532.         GSsetTitle(RootGophers[1], sTmp);
  533.        }
  534.   
  535. diff -c gopher+/gopher/gopher.rc:3.6 gopher+/gopher/gopher.rc:3.7
  536. *** gopher+/gopher/gopher.rc:3.6    Thu Aug 12 02:35:39 1993
  537. --- gopher+/gopher/gopher.rc    Thu Aug 12 02:35:39 1993
  538. ***************
  539. *** 1,7 ****
  540.   #********************************************************************
  541.   # $Author: lindner $
  542. ! # $Revision: 3.6 $
  543. ! # $Date: 1993/07/27 05:28:50 $
  544.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.rc,v $
  545.   # $State: Exp $
  546.   #
  547. --- 1,7 ----
  548.   #********************************************************************
  549.   # $Author: lindner $
  550. ! # $Revision: 3.7 $
  551. ! # $Date: 1993/08/12 06:32:43 $
  552.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.rc,v $
  553.   # $State: Exp $
  554.   #
  555. ***************
  556. *** 15,20 ****
  557. --- 15,23 ----
  558.   #*********************************************************************
  559.   # Revision History:
  560.   # $Log: gopher.rc,v $
  561. + # Revision 3.7  1993/08/12  06:32:43  lindner
  562. + # Fix for x-troff
  563. + #
  564.   # Revision 3.6  1993/07/27  05:28:50  lindner
  565.   # Mondo Debug overhaul from Mitra
  566.   #
  567. ***************
  568. *** 42,48 ****
  569.   map: image/ppm,|xv,|pnmtops | lpr
  570.   map: Text/x-dvi,xdvi %s,lpr %s
  571.   map: application/postscript,gspreview %s,lpr %s
  572. ! map: Text/troff,nroff %s|more -d,ptroff %s
  573.   map: Text/richtext,richtext %s|Less -f -r,lpr %s
  574.   #
  575.   # Set preference values for each gopher+ type
  576. --- 45,51 ----
  577.   map: image/ppm,|xv,|pnmtops | lpr
  578.   map: Text/x-dvi,xdvi %s,lpr %s
  579.   map: application/postscript,gspreview %s,lpr %s
  580. ! map: Text/x-troff,nroff %s|more -d,ptroff %s
  581.   map: Text/richtext,richtext %s|Less -f -r,lpr %s
  582.   #
  583.   # Set preference values for each gopher+ type
  584. diff -c gopher+/gopher/netlib.opt:3.1 gopher+/gopher/netlib.opt:3.2
  585. *** gopher+/gopher/netlib.opt:3.1    Thu Aug 12 02:35:40 1993
  586. --- gopher+/gopher/netlib.opt    Thu Aug 12 02:35:40 1993
  587. ***************
  588. *** 1,3 ****
  589. ! identification = "NETLIB-1.12"
  590.   sys$share:netlib_shrxfr/shareable
  591.   sys$share:vaxcrtl/shareable
  592. --- 1,3 ----
  593. ! identification = "NETLIB-2.05"
  594.   sys$share:netlib_shrxfr/shareable
  595.   sys$share:vaxcrtl/shareable
  596. diff -c gopher+/gopherd/Makefile:3.7 gopher+/gopherd/Makefile:3.8
  597. *** gopher+/gopherd/Makefile:3.7    Thu Aug 12 02:35:44 1993
  598. --- gopher+/gopherd/Makefile    Thu Aug 12 02:35:44 1993
  599. ***************
  600. *** 1,7 ****
  601.   #********************************************************************
  602.   # $Author: lindner $
  603. ! # $Revision: 3.7 $
  604. ! # $Date: 1993/08/05 22:20:19 $
  605.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $
  606.   # $State: Exp $
  607.   #
  608. --- 1,7 ----
  609.   #********************************************************************
  610.   # $Author: lindner $
  611. ! # $Revision: 3.8 $
  612. ! # $Date: 1993/08/10 20:26:21 $
  613.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $
  614.   # $State: Exp $
  615.   #
  616. ***************
  617. *** 15,20 ****
  618. --- 15,23 ----
  619.   #*********************************************************************
  620.   # Revision History:
  621.   # $Log: Makefile,v $
  622. + # Revision 3.8  1993/08/10  20:26:21  lindner
  623. + # Added fi for gopherindex install
  624. + #
  625.   # Revision 3.7  1993/08/05  22:20:19  lindner
  626.   # Only install gopherindex if built
  627.   #
  628. ***************
  629. *** 142,148 ****
  630.       $(INSTALL)  $(TARGET) $(SERVERDIR)
  631.       $(INSTALL)  gopherd.conf $(SERVERDIR)
  632.       if [ -f gopherindex ]; then \
  633. !         $(INSTALL)  gopherindex $(SERVERDIR)
  634.       -rm    $(SERVERDIR)/gopherls $(SERVERDIR)/gindexd
  635.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gopherls
  636.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gindexd
  637. --- 145,152 ----
  638.       $(INSTALL)  $(TARGET) $(SERVERDIR)
  639.       $(INSTALL)  gopherd.conf $(SERVERDIR)
  640.       if [ -f gopherindex ]; then \
  641. !         $(INSTALL)  gopherindex $(SERVERDIR); \
  642. !     fi
  643.       -rm    $(SERVERDIR)/gopherls $(SERVERDIR)/gindexd
  644.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gopherls
  645.       -ln     -s $(SERVERDIR)/$(TARGET) $(SERVERDIR)/gindexd
  646. diff -c gopher+/gopherd/ftp.c:3.8 gopher+/gopherd/ftp.c:3.10
  647. *** gopher+/gopherd/ftp.c:3.8    Thu Aug 12 02:35:45 1993
  648. --- gopher+/gopherd/ftp.c    Thu Aug 12 02:35:45 1993
  649. ***************
  650. *** 1,7 ****
  651.   /********************************************************************
  652.    * $Author: lindner $
  653. !  * $Revision: 3.8 $
  654. !  * $Date: 1993/08/03 20:43:54 $
  655.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/ftp.c,v $
  656.    * $State: Exp $
  657.    *
  658. --- 1,7 ----
  659.   /********************************************************************
  660.    * $Author: lindner $
  661. !  * $Revision: 3.10 $
  662. !  * $Date: 1993/08/11 14:41:48 $
  663.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/ftp.c,v $
  664.    * $State: Exp $
  665.    *
  666. ***************
  667. *** 15,20 ****
  668. --- 15,26 ----
  669.    *********************************************************************
  670.    * Revision History:
  671.    * $Log: ftp.c,v $
  672. +  * Revision 3.10  1993/08/11  14:41:48  lindner
  673. +  * Fix for error logging and uninitialized gs
  674. +  *
  675. +  * Revision 3.9  1993/08/11  14:08:39  lindner
  676. +  * Fix for hanging ftp gateway connections
  677. +  *
  678.    * Revision 3.8  1993/08/03  20:43:54  lindner
  679.    * Fix for sites that have @ -> for symbolic links
  680.    *
  681. ***************
  682. *** 148,155 ****
  683.   
  684.        origval = errval = atoi(errcode);
  685.        
  686. !      if (errval > level)           /* If this is not in an expected range */
  687.         Abort(":-(",inputline);    /* display and abort */
  688.        
  689.        if (inputline[3] == '-') /* if a continuance line */
  690.         while (errval == origval)
  691. --- 154,164 ----
  692.   
  693.        origval = errval = atoi(errcode);
  694.        
  695. !      /* If this is not in an expected range */
  696. !      if (errval > level && inputline[3] != '-')           
  697.         Abort(":-(",inputline);    /* display and abort */
  698. +      else if (errval > level)
  699. +       FtpAbort(":-(", inputline);
  700.        
  701.        if (inputline[3] == '-') /* if a continuance line */
  702.         while (errval == origval)
  703. ***************
  704. *** 248,255 ****
  705.        int       ftp_data;
  706.        int       ftp_dataport, nRead;
  707.        int       getting;    
  708. !      GopherObj *gs;
  709.        
  710.        /**** Send PASV and set up the data port ***/
  711.        writestring(ftp_control, "PASV\r\n");
  712.        
  713. --- 257,270 ----
  714.        int       ftp_data;
  715.        int       ftp_dataport, nRead;
  716.        int       getting;    
  717. !      static GopherObj *gs = NULL;
  718.        
  719. +      if (gs == NULL)
  720. +       gs = GSnew();
  721. +      else
  722. +       GSinit(gs);
  723.        /**** Send PASV and set up the data port ***/
  724.        writestring(ftp_control, "PASV\r\n");
  725.        
  726. ***************
  727. *** 560,569 ****
  728.   }
  729.   
  730.   /*--------------------------------*/
  731.   
  732.   
  733.   int
  734. ! Abort(where, complaint)
  735.     char *where;
  736.     char *complaint;
  737.   {
  738. --- 575,605 ----
  739.   }
  740.   
  741.   /*--------------------------------*/
  742. +   
  743. + int
  744. + Abort(where, complaint)
  745. +   char *where;
  746. +   char *complaint;
  747. + {
  748. +      int i;
  749. +      char inputline[BUFSIZ], errmsg[BUFSIZ+20];
  750. +      
  751. +      strcpy(inputline, complaint);
  752. +      
  753. +      ZapCRLF(inputline);
  754. +      sprintf(errmsg, "%c%s:%s\t\terror.host\t1\r\n",A_ERROR, where, inputline);
  755. +      
  756. +      writestring(sockfd, errmsg);
  757. +      bzero(inputline, BUFSIZ);
  758. +      writestring(sockfd, ".\r\n");
  759.   
  760. +      Cleanup();
  761. +      exit(1);
  762. +      ;
  763. + }
  764.   
  765.   int
  766. ! FtpAbort(where, complaint)
  767.     char *where;
  768.     char *complaint;
  769.   {
  770. diff -c gopher+/gopherd/gopherd.c:3.30 gopher+/gopherd/gopherd.c:3.36
  771. *** gopher+/gopherd/gopherd.c:3.30    Thu Aug 12 02:35:48 1993
  772. --- gopher+/gopherd/gopherd.c    Thu Aug 12 02:35:49 1993
  773. ***************
  774. *** 1,7 ****
  775.   /********************************************************************
  776.    * $Author: lindner $
  777. !  * $Revision: 3.30 $
  778. !  * $Date: 1993/08/06 14:42:49 $
  779.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v $
  780.    * $State: Exp $
  781.    *
  782. --- 1,7 ----
  783.   /********************************************************************
  784.    * $Author: lindner $
  785. !  * $Revision: 3.36 $
  786. !  * $Date: 1993/08/12 06:27:35 $
  787.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v $
  788.    * $State: Exp $
  789.    *
  790. ***************
  791. *** 15,20 ****
  792. --- 15,39 ----
  793.    *********************************************************************
  794.    * Revision History:
  795.    * $Log: gopherd.c,v $
  796. +  * Revision 3.36  1993/08/12  06:27:35  lindner
  797. +  * Get rid of errant message when using inetd
  798. +  *
  799. +  * Revision 3.35  1993/08/11  22:47:44  lindner
  800. +  * Fix for gopher0 clients on gopher+ server
  801. +  *
  802. +  * Revision 3.34  1993/08/11  21:34:05  lindner
  803. +  * Remove extensions from titles for files with multiple views.
  804. +  * Move CMDfromNet() to *after* the chroot() and setuid()
  805. +  *
  806. +  * Revision 3.33  1993/08/11  14:39:24  lindner
  807. +  * Fix for send_binary bug
  808. +  *
  809. +  * Revision 3.32  1993/08/11  02:27:40  lindner
  810. +  * Fix for wais gateway and Unix client
  811. +  *
  812. +  * Revision 3.31  1993/08/10  20:26:57  lindner
  813. +  * Fixed bogus reading of .cache+ files
  814. +  *
  815.    * Revision 3.30  1993/08/06  14:42:49  lindner
  816.    * fix for mindex
  817.    *
  818. ***************
  819. *** 434,440 ****
  820.         exit(-1);
  821.        }
  822.   
  823. !      if ( getuid() == 0 && Gdefusername == NULL)
  824.         printf("Warning! You should run the server with the -u option!\n");
  825.   
  826.   
  827. --- 453,459 ----
  828.         exit(-1);
  829.        }
  830.   
  831. !      if ( getuid() == 0 && Gdefusername == NULL && !RunFromInetd)
  832.         printf("Warning! You should run the server with the -u option!\n");
  833.   
  834.   
  835. ***************
  836. *** 775,800 ****
  837.        
  838.        ServerSetArgv("input from %s", CurrentPeerName);
  839.   
  840. -      CMDfromNet(cmd, sockfd);
  841. -      ASKfile = CMDgetAskfile(cmd);  /* Ickkk!  This is a global used only
  842. -                        by printfile  */
  843. -      if (RunIndex) {
  844. -       /*** Run like the old gindexd thing. ***/
  845. -       
  846. -       uchdir("/");
  847. -       strcpy(Data_Dir, "/");
  848. -       if (*CMDgetSelstr(cmd) == '\t')
  849. -            Do_IndexTrans(sockfd, Data_Dir, CMDgetSearch(cmd)+1);
  850. -       else
  851. -            Do_IndexTrans(sockfd, Data_Dir, CMDgetSearch(cmd));
  852. -       Do_IndexTrans(sockfd, Data_Dir, CMDgetSearch(cmd));
  853. -       return(0);
  854. -      }
  855. -      
  856.   #ifdef UMNDES
  857.        if (CMDgetTicket(cmd) != NULL) {
  858.         /*** Test the ticket, and set the appropriate user ***/
  859. --- 794,799 ----
  860. ***************
  861. *** 813,820 ****
  862.              Abortoutput(sockfd, "Can't set UID!"), exit(-1);
  863.         }
  864.   #else  /* UMNDES */
  865.        if (Gdefusername && Setuid_username(Gdefusername)== FALSE)
  866.         Abortoutput(sockfd, "Can't set UID!"), exit(-1);
  867.   
  868. --- 812,817 ----
  869. ***************
  870. *** 836,841 ****
  871. --- 833,862 ----
  872.        }
  873.   
  874.   
  875. +      CMDfromNet(cmd, sockfd);
  876. +      ASKfile = CMDgetAskfile(cmd);  /* Ickkk!  This is a global used only
  877. +                        by printfile  */
  878. +      if (RunIndex) {
  879. +       /*** Run like the old gindexd thing. ***/
  880. +       
  881. +       uchdir("/");
  882. +       strcpy(Data_Dir, "/");
  883. +       if (*CMDgetSelstr(cmd) == '\t')
  884. +            Do_IndexTrans(sockfd, Data_Dir, CMDgetSearch(cmd)+1);
  885. +       else
  886. +            Do_IndexTrans(sockfd, Data_Dir, CMDgetSearch(cmd));
  887. +       Do_IndexTrans(sockfd, Data_Dir, CMDgetSearch(cmd));
  888. +       return(0);
  889. +      }
  890. +      
  891.        /** Extract the view if it exists **/
  892.        if (CMDgetCommand(cmd) != NULL) {
  893.         char *command = CMDgetCommand(cmd);
  894. ***************
  895. *** 894,900 ****
  896.   
  897.                     tmpview = VIgetType(GSgetView(gs,i));
  898.                     if (GSgetType(gs) == '0') {
  899. !                    if (strcmp(tmpview, "Text")==0) {
  900.                       view = VIgetViewnLang(GSgetView(gs, i),(char*)malloc(128));
  901.                       break;
  902.                      }
  903. --- 915,921 ----
  904.   
  905.                     tmpview = VIgetType(GSgetView(gs,i));
  906.                     if (GSgetType(gs) == '0') {
  907. !                    if (strcasecmp(tmpview, "Text/plain")==0) {
  908.                       view = VIgetViewnLang(GSgetView(gs, i),(char*)malloc(128));
  909.                       break;
  910.                      }
  911. ***************
  912. *** 1126,1132 ****
  913.              if (strlen(waisfname) <= 4 ||
  914.              strncmp(&waisfname[strlen(waisfname)-4],".src",4) )
  915.               strcat(waisfname, ".src");
  916. !            SearchRemoteWAIS(sockfd, waisfname, cmd);
  917.              break;
  918.         }
  919.         else if (strncmp(Selstr, "waisdocid:", 10) == 0) {
  920. --- 1147,1153 ----
  921.              if (strlen(waisfname) <= 4 ||
  922.              strncmp(&waisfname[strlen(waisfname)-4],".src",4) )
  923.               strcat(waisfname, ".src");
  924. !            SearchRemoteWAIS(sockfd, waisfname, cmd, view);
  925.              break;
  926.         }
  927.         else if (strncmp(Selstr, "waisdocid:", 10) == 0) {
  928. ***************
  929. *** 1376,1382 ****
  930.        GopherDirObj       *gd;
  931.        struct stat        statbuf;
  932.        boolean            AddItem = TRUE;
  933. - /*     char               *View */
  934.        static char        Pathp[512];
  935.        StrArray           *Linkfiles;
  936.        int                i, cachefd;
  937. --- 1397,1402 ----
  938. ***************
  939. *** 1402,1408 ****
  940.        }
  941.        
  942.   
  943. !      if (Caching && Cachetimedout(".cache+", CACHE_TIME, ".")) {
  944.         if ((cachefd = ropen(".cache+", O_RDONLY)) >=0) {
  945.              GDplusfromNet(gd, cachefd, NULL);
  946.              close(cachefd);
  947. --- 1422,1428 ----
  948.        }
  949.        
  950.   
  951. !      if (Caching && Cachetimedout(".cache+", CACHE_TIME, ".")==FALSE) {
  952.         if ((cachefd = ropen(".cache+", O_RDONLY)) >=0) {
  953.              GDplusfromNet(gd, cachefd, NULL);
  954.              close(cachefd);
  955. ***************
  956. *** 1540,1545 ****
  957. --- 1560,1566 ----
  958.              if (num != -1) {
  959.               if (GSgetType(GDgetEntry(gd,num)) == '\0') {
  960.                GSsetHost(gs, NULL);
  961. +              GSsetTitle(gs, filename);
  962.                GSmerge(GDgetEntry(gd, num), gs);
  963.               }
  964.               gs = GDgetEntry(gd, num);
  965. ***************
  966. *** 2141,2147 ****
  967.              return;
  968.         }
  969.   
  970. !       if (pp = specialfile(sndfile, filename)) {
  971.              fclose(sndfile);
  972.              sndfile = pp;
  973.         }
  974. --- 2162,2168 ----
  975.              return;
  976.         }
  977.   
  978. !       if (pp = specialfile(sockfd, sndfile, filename)) {
  979.              fclose(sndfile);
  980.              sndfile = pp;
  981.         }
  982. diff -c gopher+/gopherd/serverutil.c:3.12 gopher+/gopherd/serverutil.c:3.13
  983. *** gopher+/gopherd/serverutil.c:3.12    Thu Aug 12 02:35:54 1993
  984. --- gopher+/gopherd/serverutil.c    Thu Aug 12 02:35:55 1993
  985. ***************
  986. *** 1,7 ****
  987.   /********************************************************************
  988.    * $Author: lindner $
  989. !  * $Revision: 3.12 $
  990. !  * $Date: 1993/08/06 14:30:47 $
  991.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  992.    * $State: Exp $
  993.    *
  994. --- 1,7 ----
  995.   /********************************************************************
  996.    * $Author: lindner $
  997. !  * $Revision: 3.13 $
  998. !  * $Date: 1993/08/10 20:28:10 $
  999.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  1000.    * $State: Exp $
  1001.    *
  1002. ***************
  1003. *** 15,20 ****
  1004. --- 15,23 ----
  1005.    *********************************************************************
  1006.    * Revision History:
  1007.    * $Log: serverutil.c,v $
  1008. +  * Revision 3.13  1993/08/10  20:28:10  lindner
  1009. +  * return true for non-existant cache file
  1010. +  *
  1011.    * Revision 3.12  1993/08/06  14:30:47  lindner
  1012.    * Fixes for better security logging
  1013.    *
  1014. ***************
  1015. *** 370,380 ****
  1016.   /*
  1017.    * Cache timeout value.
  1018.    *   If cache is less than secs seconds old, it's ok.
  1019. -  *   Otherwise, compare time of cache to dir and all files in dir and dir/.cap.
  1020.    *   If cache is newest, it's ok, otherwise it must be rebuilt.
  1021.    * 
  1022. -  * Not really great for big directories, but better in general for smaller
  1023. -  * directories..
  1024.    */
  1025.   
  1026.   boolean
  1027. --- 373,380 ----
  1028. ***************
  1029. *** 390,401 ****
  1030.        result = rstat(cache, &buf);
  1031.   
  1032.        if (result != 0)
  1033. !       return(-1);
  1034.   
  1035.        time(&now);
  1036.        
  1037.        Debug("Cache now: %d, ", now);
  1038. !      Debug("cahce file: %d\n", buf.st_mtime);
  1039.        
  1040.        if ( now < (buf.st_mtime + secs))
  1041.         return(FALSE);
  1042. --- 390,401 ----
  1043.        result = rstat(cache, &buf);
  1044.   
  1045.        if (result != 0)
  1046. !       return(TRUE);
  1047.   
  1048.        time(&now);
  1049.        
  1050.        Debug("Cache now: %d, ", now);
  1051. !      Debug("cache file: %d\n", buf.st_mtime);
  1052.        
  1053.        if ( now < (buf.st_mtime + secs))
  1054.         return(FALSE);
  1055. diff -c gopher+/gopherd/special.c:3.12 gopher+/gopherd/special.c:3.13
  1056. *** gopher+/gopherd/special.c:3.12    Thu Aug 12 02:35:56 1993
  1057. --- gopher+/gopherd/special.c    Thu Aug 12 02:35:56 1993
  1058. ***************
  1059. *** 1,7 ****
  1060.   /********************************************************************
  1061.    * $Author: lindner $
  1062. !  * $Revision: 3.12 $
  1063. !  * $Date: 1993/08/06 14:30:49 $
  1064.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $
  1065.    * $State: Exp $
  1066.    *
  1067. --- 1,7 ----
  1068.   /********************************************************************
  1069.    * $Author: lindner $
  1070. !  * $Revision: 3.13 $
  1071. !  * $Date: 1993/08/11 22:47:11 $
  1072.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $
  1073.    * $State: Exp $
  1074.    *
  1075. ***************
  1076. *** 15,20 ****
  1077. --- 15,23 ----
  1078.    *********************************************************************
  1079.    * Revision History:
  1080.    * $Log: special.c,v $
  1081. +  * Revision 3.13  1993/08/11  22:47:11  lindner
  1082. +  * Don't let the security stuff trap ask blocks
  1083. +  *
  1084.    * Revision 3.12  1993/08/06  14:30:49  lindner
  1085.    * Fixes for better security logging
  1086.    *
  1087. ***************
  1088. *** 160,167 ****
  1089.         
  1090.         Debug("Executing %s\n", buf);
  1091.   
  1092. !       if (! (pp = Gpopen(sockfd, buf, "r")))
  1093. !            return (FILE *)0;
  1094.         ispipe = 1;
  1095.         
  1096.         Debug("Zcat/popen is okay\n",0);
  1097. --- 163,177 ----
  1098.         
  1099.         Debug("Executing %s\n", buf);
  1100.   
  1101. !       if (EXECargs) {
  1102. !            if (! (pp = Gpopen(sockfd, buf, "r")))
  1103. !             return (FILE *)0;
  1104. !       }
  1105. !       else {
  1106. !            if (! (pp = popen(buf, "r")))
  1107. !             return (FILE *)0;
  1108. !       }
  1109. !             
  1110.         ispipe = 1;
  1111.         
  1112.         Debug("Zcat/popen is okay\n",0);
  1113. diff -c gopher+/gopherd/waisgopher.c:3.8 gopher+/gopherd/waisgopher.c:3.9
  1114. *** gopher+/gopherd/waisgopher.c:3.8    Thu Aug 12 02:35:57 1993
  1115. --- gopher+/gopherd/waisgopher.c    Thu Aug 12 02:35:57 1993
  1116. ***************
  1117. *** 1,7 ****
  1118.   /********************************************************************
  1119.    * $Author: lindner $
  1120. !  * $Revision: 3.8 $
  1121. !  * $Date: 1993/07/29 21:21:53 $
  1122.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/waisgopher.c,v $
  1123.    * $State: Exp $
  1124.    *
  1125. --- 1,7 ----
  1126.   /********************************************************************
  1127.    * $Author: lindner $
  1128. !  * $Revision: 3.9 $
  1129. !  * $Date: 1993/08/11 02:27:43 $
  1130.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/waisgopher.c,v $
  1131.    * $State: Exp $
  1132.    *
  1133. ***************
  1134. *** 15,20 ****
  1135. --- 15,23 ----
  1136.    *********************************************************************
  1137.    * Revision History:
  1138.    * $Log: waisgopher.c,v $
  1139. +  * Revision 3.9  1993/08/11  02:27:43  lindner
  1140. +  * Fix for wais gateway and Unix client
  1141. +  *
  1142.    * Revision 3.8  1993/07/29  21:21:53  lindner
  1143.    * Fix for excess dots in text files
  1144.    *
  1145. ***************
  1146. *** 527,536 ****
  1147.   
  1148.   /******************************************************************/
  1149.   
  1150. ! void SearchRemoteWAIS(sockfd, SourceName, cmd)
  1151.     int sockfd;
  1152.     char *SourceName;
  1153.     CMDobj *cmd;
  1154.   {
  1155.        char *keywords = CMDgetSearch(cmd);
  1156.        char* request_message = NULL; /* arbitrary message limit */
  1157. --- 530,540 ----
  1158.   
  1159.   /******************************************************************/
  1160.   
  1161. ! void SearchRemoteWAIS(sockfd, SourceName, cmd, view)
  1162.     int sockfd;
  1163.     char *SourceName;
  1164.     CMDobj *cmd;
  1165. +   char *view;
  1166.   {
  1167.        char *keywords = CMDgetSearch(cmd);
  1168.        char* request_message = NULL; /* arbitrary message limit */
  1169. ***************
  1170. *** 547,553 ****
  1171.        FILE *Dotsrcfile;
  1172.        char *WaisGatePort=NULL;
  1173.        Source Moo;
  1174. !      char *cp, *view = NULL;
  1175.        boolean isgplus = CMDisGplus(cmd);
  1176.   
  1177.   
  1178. --- 551,557 ----
  1179.        FILE *Dotsrcfile;
  1180.        char *WaisGatePort=NULL;
  1181.        Source Moo;
  1182. !      char *cp;
  1183.        boolean isgplus = CMDisGplus(cmd);
  1184.   
  1185.   
  1186. ***************
  1187. *** 554,567 ****
  1188.        server_name[0] = '\0';  /* null it out */
  1189.        database[0] = '\0';     /* null it out */
  1190.        service[0] = '\0';      /* null it out */
  1191. -      if (CMDgetCommand(cmd) != NULL) {
  1192. -       if (*CMDgetCommand(cmd) == '+')
  1193. -            view = CMDgetCommand(cmd) + 1;
  1194. -       else if (*CMDgetCommand(cmd) == '$')
  1195. -            view = "application/gopher+-menu";
  1196. -      }
  1197.   
  1198.        /**
  1199.         ** Next load up the name of the source...
  1200. --- 558,563 ----
  1201. diff -c gopher+/object/Sockets.c:3.4 gopher+/object/Sockets.c:3.5
  1202. *** gopher+/object/Sockets.c:3.4    Thu Aug 12 02:36:03 1993
  1203. --- gopher+/object/Sockets.c    Thu Aug 12 02:36:03 1993
  1204. ***************
  1205. *** 1,7 ****
  1206.   /********************************************************************
  1207.    * $Author: lindner $
  1208. !  * $Revision: 3.4 $
  1209. !  * $Date: 1993/08/05 03:23:37 $
  1210.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/Sockets.c,v $
  1211.    * $State: Exp $
  1212.    *
  1213. --- 1,7 ----
  1214.   /********************************************************************
  1215.    * $Author: lindner $
  1216. !  * $Revision: 3.5 $
  1217. !  * $Date: 1993/08/09 20:17:10 $
  1218.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/Sockets.c,v $
  1219.    * $State: Exp $
  1220.    *
  1221. ***************
  1222. *** 15,20 ****
  1223. --- 15,23 ----
  1224.    *********************************************************************
  1225.    * Revision History:
  1226.    * $Log: Sockets.c,v $
  1227. +  * Revision 3.5  1993/08/09  20:17:10  lindner
  1228. +  * Fixes for CMULIB and NETLIB for VMS
  1229. +  *
  1230.    * Revision 3.4  1993/08/05  03:23:37  lindner
  1231.    * Changes for CMUIP and NETLIB
  1232.    *
  1233. ***************
  1234. *** 51,56 ****
  1235. --- 54,61 ----
  1236.   #  else
  1237.   #    include iodef
  1238.   #    include ssdef
  1239. + #    include errno
  1240. + #    include perror
  1241.   #  endif        /* if !CMUIP && !NETLIB */
  1242.   
  1243.   #else  /* VMS */
  1244. ***************
  1245. *** 94,99 ****
  1246. --- 99,105 ----
  1247.    * This function returns a socket file descriptor bound to the given port
  1248.    */
  1249.   
  1250. + #if !defined(CMUIP) && !defined(NETLIB)
  1251.   int
  1252.   SOCKbind_to_port(port) 
  1253.     int port;
  1254. ***************
  1255. *** 124,129 ****
  1256. --- 130,136 ----
  1257.       return(sockfd);
  1258.   }
  1259.   
  1260. + #endif
  1261.   
  1262.   /* SOCKconnect performs a connection to socket 'service' on host
  1263.    * 'host'.  Host can be a hostname or ip-address.  If 'host' is null, the
  1264. ***************
  1265. *** 210,219 ****
  1266.        status = TCP_CONNECT (&iSock, &host_desc, port);
  1267.        if ((status & 1) == 0) {
  1268.             NET_DEASSIGN (&iSock);
  1269. !           if (status == SS$_REJECT)
  1270. !                return (-4);
  1271. !           if (status == SS$_ENDOFFILE)
  1272. !                return (-2);
  1273.             return (-1);
  1274.        }
  1275.        return (iSock);
  1276. --- 217,234 ----
  1277.        status = TCP_CONNECT (&iSock, &host_desc, port);
  1278.        if ((status & 1) == 0) {
  1279.             NET_DEASSIGN (&iSock);
  1280. !           if (status == SS$_REJECT || status == SS$_TIMEOUT) {
  1281. !            if (status == SS$_REJECT)
  1282. !             errno = ECONNREFUSED;
  1283. !            else
  1284. !             errno = ETIMEDOUT;
  1285. !            
  1286. !            if (errno < sys_nerr && sys_errlist[errno] == NULL)
  1287. !             sys_errlist[errno] = strerror (errno);
  1288. !            return (-4);
  1289. !       }
  1290. !       if (status == SS$_ENDOFFILE)
  1291. !            return (-2);
  1292.             return (-1);
  1293.        }
  1294.        return (iSock);
  1295. ***************
  1296. *** 227,233 ****
  1297.        } cmu_iosb;
  1298.        static struct {long l; char *a;} ip_dev = {12, "INET$DEVICE:"};
  1299.        globalvalue NET$_CREF;           /* Connection refused */
  1300. !      globalvalue NET$_DSNAMERR;               /* Domain server name error */
  1301.        status = SYS$ASSIGN (&ip_dev, &channel, 0, 0);
  1302.        if ((status & 1) == 0)
  1303.             return (-3);
  1304. --- 242,249 ----
  1305.        } cmu_iosb;
  1306.        static struct {long l; char *a;} ip_dev = {12, "INET$DEVICE:"};
  1307.        globalvalue NET$_CREF;           /* Connection refused */
  1308. !      globalvalue NET$_FTO;            /* Function timedout */
  1309. !      globalvalue NET$_DSNAMERR;       /* Domain server name error */
  1310.        status = SYS$ASSIGN (&ip_dev, &channel, 0, 0);
  1311.        if ((status & 1) == 0)
  1312.             return (-3);
  1313. ***************
  1314. *** 235,247 ****
  1315.             hostname, port, 0, 1, 0, 0);
  1316.        if ((status & 1) == 0 || (cmu_iosb.status & 1) == 0) {
  1317.             SYS$DASSGN (channel);
  1318. !           if (cmu_iosb.status == SS$_ABORT) {
  1319.                  if (cmu_iosb.xxx == NET$_CREF)
  1320. !                     return (-4);
  1321. !                if (cmu_iosb.xxx == NET$_DSNAMERR)
  1322. !                     return (-2);
  1323. !           }
  1324. !           return (-1);
  1325.        }
  1326.        return (channel);
  1327.   #endif
  1328. --- 251,268 ----
  1329.             hostname, port, 0, 1, 0, 0);
  1330.        if ((status & 1) == 0 || (cmu_iosb.status & 1) == 0) {
  1331.             SYS$DASSGN (channel);
  1332. !           if (cmu_iosb.status == SS$_ABORT || cmu_iosb.xxx == NET$_FTO) {
  1333.                  if (cmu_iosb.xxx == NET$_CREF)
  1334. !             errno = ECONNREFUSED;
  1335. !            else
  1336. !             errno = ETIMEDOUT;
  1337. !            if (errno < sys_nerr && sys_errlist[errno] == NULL)
  1338. !             sys_errlist[errno] = strerror (errno);
  1339. !            return(-4);
  1340. !       }
  1341. !       if (cmu_iosb.xxx == NET$_DSNAMERR)
  1342. !            return (-2);
  1343.        }
  1344.        return (channel);
  1345.   #endif
  1346. ***************
  1347. *** 254,259 ****
  1348. --- 275,281 ----
  1349.    *
  1350.    */
  1351.   
  1352. + #if !defined(CMUIP) && !defined(NETLIB)         /* temp - MLH */ 
  1353.   int
  1354.   SOCKlisten(We)
  1355.     struct sockaddr_in *    We;
  1356. ***************
  1357. *** 310,312 ****
  1358. --- 332,336 ----
  1359.        return(sockfd);
  1360.   }
  1361.   
  1362. + #endif
  1363. diff -c gopher+/object/compile.com:3.6 gopher+/object/compile.com:3.7
  1364. *** gopher+/object/compile.com:3.6    Thu Aug 12 02:36:05 1993
  1365. --- gopher+/object/compile.com    Thu Aug 12 02:36:05 1993
  1366. ***************
  1367. *** 56,66 ****
  1368.   $!
  1369.   $ cc getopt.c
  1370.   $!
  1371. - $ library/create libgopher compatible.obj,daarray.obj,-
  1372. -     gdgopherdir.obj,gsgopherobj.obj,-
  1373. -     strstring.obj,blblock.obj,views.obj,util.obj,-
  1374. -     getopt.obj,sockets.obj
  1375. - $!
  1376.   $ CLEANUP:
  1377.   $    verify = f$verify(verify)
  1378.   $exit
  1379. --- 56,61 ----
  1380. diff -c gopher+/object/util.c:3.8 gopher+/object/util.c:3.9
  1381. *** gopher+/object/util.c:3.8    Thu Aug 12 02:36:06 1993
  1382. --- gopher+/object/util.c    Thu Aug 12 02:36:06 1993
  1383. ***************
  1384. *** 1,7 ****
  1385.   /********************************************************************
  1386.    * $Author: lindner $
  1387. !  * $Revision: 3.8 $
  1388. !  * $Date: 1993/08/05 03:23:40 $
  1389.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/util.c,v $
  1390.    * $State: Exp $
  1391.    *
  1392. --- 1,7 ----
  1393.   /********************************************************************
  1394.    * $Author: lindner $
  1395. !  * $Revision: 3.9 $
  1396. !  * $Date: 1993/08/09 20:17:13 $
  1397.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/object/util.c,v $
  1398.    * $State: Exp $
  1399.    *
  1400. ***************
  1401. *** 15,20 ****
  1402. --- 15,23 ----
  1403.    *********************************************************************
  1404.    * Revision History:
  1405.    * $Log: util.c,v $
  1406. +  * Revision 3.9  1993/08/09  20:17:13  lindner
  1407. +  * Fixes for CMULIB and NETLIB for VMS
  1408. +  *
  1409.    * Revision 3.8  1993/08/05  03:23:40  lindner
  1410.    * Changes for CMUIP and NETLIB
  1411.    *
  1412. ***************
  1413. *** 745,755 ****
  1414.               buffer, length, 0, 0, 0, 0);
  1415.        if ((status & 1) == 0)
  1416.             return (-1);
  1417. !      if ((cmu_iosb.status & 1) == 0) {
  1418. !           if (cmu_iosb.status == 44)
  1419. !                exit (cmu_iosb.xxx);
  1420.             return (-1);
  1421. -      }
  1422.        return (cmu_iosb.size);
  1423.   }
  1424.   
  1425. --- 748,755 ----
  1426.               buffer, length, 0, 0, 0, 0);
  1427.        if ((status & 1) == 0)
  1428.             return (-1);
  1429. !      if ((cmu_iosb.status & 1) == 0)
  1430.             return (-1);
  1431.        return (cmu_iosb.size);
  1432.   }
  1433.   
  1434. ***************
  1435. *** 764,774 ****
  1436.               buffer, length, 0, 1, 0, 0);
  1437.        if ((status & 1) == 0)
  1438.             return (-1);
  1439. !      if ((cmu_iosb.status & 1) == 0) {
  1440. !           if (cmu_iosb.status == 44)
  1441. !                exit (cmu_iosb.xxx);
  1442.             return (-1);
  1443. -      }
  1444.        return (cmu_iosb.size);
  1445.   }
  1446.   
  1447. --- 764,771 ----
  1448.               buffer, length, 0, 1, 0, 0);
  1449.        if ((status & 1) == 0)
  1450.             return (-1);
  1451. !      if ((cmu_iosb.status & 1) == 0)
  1452.             return (-1);
  1453.        return (cmu_iosb.size);
  1454.   }
  1455.   
  1456.