home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / infosyst / gopher / 1149 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  18.3 KB

  1. Path: sparky!uunet!gatech!destroyer!caen!batcomputer!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!grivel!alsvid!mark
  2. From: mark@alsvid.une.edu.au (Mark Garrett Internet: mark@arvak.une.edu.au Phone: +61 66 20 3859)
  3. Newsgroups: comp.infosystems.gopher
  4. Subject: More bugs gopher1.1b1 (beta programmers as well as code)
  5. Message-ID: <BxrI8o.Ir0@alsvid.une.edu.au>
  6. Date: 15 Nov 92 14:43:36 GMT
  7. Organization: University of New England - Northern Rivers (Lismore)
  8. Lines: 658
  9.  
  10.  
  11. I feel like being abusive, I'll attempt not to be. I'd like to ask one question?
  12.  
  13.     Who has put in the work on gopher1.1b1 ?? One of you has not been
  14. coding in C for long. If there are some inexperienced programmers working on
  15. this software for my sake and others please vet their code changes.
  16.  
  17.     strlen returns the length of a string not counting the null
  18. terminator!!!!! please inscribe this into them... So that when they malloc
  19. space or whatever they allow for that one extra. 
  20.  
  21.     Here is a diff of my 1.1b1 against the release version.
  22. I hope this helps somebody else with the code, which I might add has some
  23. major advantages despite my flame about coding. 
  24.  
  25.     Cheers
  26.         Mark :)
  27.  
  28. diff -cr gopher1.1b1-DIST/Makefile gopher1.1b1/Makefile
  29. *** gopher1.1b1-DIST/Makefile    Wed Oct 14 15:58:25 1992
  30. --- gopher1.1b1/Makefile    Thu Nov 12 21:25:38 1992
  31. ***************
  32. *** 54,56 ****
  33. --- 54,57 ----
  34.       HERE=`basename $$PWD`; \
  35.       cd ..; tar cvf - $$HERE| compress - > $$HERE.tar.Z
  36.   
  37. + # DO NOT DELETE THIS LINE -- make depend depends on it.
  38. diff -cr gopher1.1b1-DIST/Makefile.config gopher1.1b1/Makefile.config
  39. *** gopher1.1b1-DIST/Makefile.config    Sat Oct 31 04:48:21 1992
  40. --- gopher1.1b1/Makefile.config    Mon Nov 16 00:47:04 1992
  41. ***************
  42. *** 9,21 ****
  43.   # Your favorite C compiler
  44.   #
  45.   
  46. ! CC = cc
  47.   
  48.   #------------------------------------------------
  49.   # Optimization level.
  50.   #
  51.   
  52. ! OPT=-g
  53.   #OPT=-O
  54.   
  55.   #------------------------------------------------
  56. --- 9,21 ----
  57.   # Your favorite C compiler
  58.   #
  59.   
  60. ! CC = gcc2.3.1
  61.   
  62.   #------------------------------------------------
  63.   # Optimization level.
  64.   #
  65.   
  66. ! OPT=-g -O2
  67.   #OPT=-O
  68.   
  69.   #------------------------------------------------
  70. ***************
  71. *** 30,36 ****
  72.   #
  73.   #     -DPTX        for Sequent Dynix/ptx
  74.   
  75. ! GSYSTYPE=
  76.   
  77.   #------------------------------------------------
  78.   # The ranlib command on your system.  A/UX (and probably other sysv's
  79. --- 30,36 ----
  80.   #
  81.   #     -DPTX        for Sequent Dynix/ptx
  82.   
  83. ! GSYSTYPE= -DBSD
  84.   
  85.   #------------------------------------------------
  86.   # The ranlib command on your system.  A/UX (and probably other sysv's
  87. ***************
  88. *** 49,59 ****
  89.   # Where shall we install stuff?
  90.   #
  91.   
  92.   CLIENTDIR    = /usr/local/bin
  93. ! CLIENTLIB       = /usr/local/lib/
  94. ! SERVERDIR    = /usr/local/etc
  95. ! MAN1DIR        = /usr/local/man/man1
  96. ! MAN8DIR        = /usr/local/man/man8
  97.   
  98.   
  99.   
  100. --- 49,62 ----
  101.   # Where shall we install stuff?
  102.   #
  103.   
  104. + #CLIENTDIR    = /usr/local/bin
  105. + #CLIENTLIB       = /usr/local/lib/
  106. + #SERVERDIR    = /usr/local/etc
  107.   CLIENTDIR    = /usr/local/bin
  108. ! CLIENTLIB       = /usr/local/gopher1.1/lib/
  109. ! SERVERDIR    = /usr/local/gopher1.1/etc
  110. ! MAN1DIR        = /usr/man/man1
  111. ! MAN8DIR        = /usr/man/man8
  112.   
  113.   
  114.   
  115. ***************
  116. *** 73,81 ****
  117.   #       admin.viccol.edu.au
  118.   #       pub/dl/describe-1.8.tar.Z  or higher...
  119.   #
  120. ! SERVEROPTS    = #-DDL # -DLOADRESTRICT
  121. ! DLPATH        = /home/mudhoney/lindner/src/describe
  122. ! #DLOBJS        = $(DLPATH)/getdesc.o $(DLPATH)/enddesc.o
  123.   
  124.   
  125.   #--------------------------------------------------
  126. --- 76,85 ----
  127.   #       admin.viccol.edu.au
  128.   #       pub/dl/describe-1.8.tar.Z  or higher...
  129.   #
  130. ! SERVEROPTS    = -DDL # -DLOADRESTRICT
  131. ! #DLPATH        = /home/mudhoney/lindner/src/describe
  132. ! DLPATH        = /usr/users/cno/mark/cwis/gopher/dl
  133. ! DLOBJS        = $(DLPATH)/getdesc.o $(DLPATH)/enddesc.o
  134.   
  135.   
  136.   #--------------------------------------------------
  137. ***************
  138. *** 98,104 ****
  139.   
  140.   OTHERLIBS    =  $(HPLIBS) $(UMAXLIBS) $(SEQLIBS) $(PTXLIBS)
  141.   
  142. ! CLIENTLIBS     = -lcurses -ltermcap -lgopher $(OTHERLIBS)
  143.   SERVERLIBS     = -lm -lgopher $(OTHERLIBS) $(LOADLIBS)
  144.   
  145.   
  146. --- 102,108 ----
  147.   
  148.   OTHERLIBS    =  $(HPLIBS) $(UMAXLIBS) $(SEQLIBS) $(PTXLIBS)
  149.   
  150. ! CLIENTLIBS     = -lcursesX -ltermcap -lgopher $(OTHERLIBS)
  151.   SERVERLIBS     = -lm -lgopher $(OTHERLIBS) $(LOADLIBS)
  152.   
  153.   
  154. ***************
  155. *** 108,114 ****
  156.   # the domain name a null string.  Otherwise put in the rest of
  157.   # your domain name that `hostname` doesn't return.
  158.   
  159. ! DOMAIN        = .micro.umn.edu
  160.   
  161.   
  162.   #-----------------------------------------------------------------
  163. --- 112,119 ----
  164.   # the domain name a null string.  Otherwise put in the rest of
  165.   # your domain name that `hostname` doesn't return.
  166.   
  167. ! #DOMAIN        = .micro.umn.edu
  168. ! DOMAIN        = .une.edu.au
  169.   
  170.   
  171.   #-----------------------------------------------------------------
  172. ***************
  173. *** 119,125 ****
  174.   # overridden on the command line.
  175.   # 
  176.   
  177. ! SERVERDATA    = /home/mudhoney/gopher-data
  178.   SERVERPORT    = 70
  179.   
  180.   
  181. --- 124,130 ----
  182.   # overridden on the command line.
  183.   # 
  184.   
  185. ! SERVERDATA    = /usr/local/gopher1.1/gopher-data
  186.   SERVERPORT    = 70
  187.   
  188.   
  189. diff -cr gopher1.1b1-DIST/conf.h gopher1.1b1/conf.h
  190. *** gopher1.1b1-DIST/conf.h    Sat Oct 31 10:10:30 1992
  191. --- gopher1.1b1/conf.h    Sun Nov 15 18:41:47 1992
  192. ***************
  193. *** 13,20 ****
  194.    * CLIENT1_HOST or CLIENT2_HOST
  195.    */
  196.   
  197. ! #define CLIENT1_HOST "gopher.tc.umn.edu"
  198. ! #define CLIENT2_HOST "gopher2.tc.umn.edu"
  199.   
  200.   #define CLIENT1_PORT 70
  201.   #define CLIENT2_PORT  70
  202. --- 13,22 ----
  203.    * CLIENT1_HOST or CLIENT2_HOST
  204.    */
  205.   
  206. ! #define CLIENT1_HOST "alsvid.une.edu.au"
  207. ! #define CLIENT2_HOST "alsvid.une.edu.au"
  208. ! /* #define CLIENT1_HOST "gopher.tc.umn.edu" */
  209. ! /* #define CLIENT2_HOST "gopher2.tc.umn.edu" */
  210.   
  211.   #define CLIENT1_PORT 70
  212.   #define CLIENT2_PORT  70
  213. ***************
  214. *** 70,76 ****
  215.   #endif
  216.   
  217.   #ifndef IMAGE_COMMAND 
  218. ! #define IMAGE_COMMAND "xloadimage -fork"
  219.   #endif
  220.   
  221.   /****************** gopherd configuration ***********************/
  222. --- 72,78 ----
  223.   #endif
  224.   
  225.   #ifndef IMAGE_COMMAND 
  226. ! #define IMAGE_COMMAND "xv"
  227.   #endif
  228.   
  229.   /****************** gopherd configuration ***********************/
  230. Common subdirectories: gopher1.1b1-DIST/doc and gopher1.1b1/doc
  231. Common subdirectories: gopher1.1b1-DIST/emacs and gopher1.1b1/emacs
  232. Common subdirectories: gopher1.1b1-DIST/examples and gopher1.1b1/examples
  233. Common subdirectories: gopher1.1b1-DIST/gopher and gopher1.1b1/gopher
  234. Common subdirectories: gopher1.1b1-DIST/gopherd and gopher1.1b1/gopherd
  235. Only in gopher1.1b1: ir
  236. Common subdirectories: gopher1.1b1-DIST/mindexd and gopher1.1b1/mindexd
  237. Common subdirectories: gopher1.1b1-DIST/misc and gopher1.1b1/misc
  238. Common subdirectories: gopher1.1b1-DIST/object and gopher1.1b1/object
  239. Only in gopher1.1b1: ui
  240. Only in gopher1.1b1/doc: gopger.1-DIST
  241. diff -cr gopher1.1b1-DIST/doc/gopher.1 gopher1.1b1/doc/gopher.1
  242. *** gopher1.1b1-DIST/doc/gopher.1    Sat Aug  1 03:34:16 1992
  243. --- gopher1.1b1/doc/gopher.1    Sun Nov 15 19:44:30 1992
  244. ***************
  245. *** 3,9 ****
  246.   gopher \- connect to gopher document server
  247.   .SH SYNOPSIS
  248.   .B gopher
  249. ! .RI [ -sb ]
  250.   .RI [ -t
  251.   .IR title]
  252.   .RI [ -p 
  253. --- 3,9 ----
  254.   gopher \- connect to gopher document server
  255.   .SH SYNOPSIS
  256.   .B gopher
  257. ! .RI [ -sSb ]
  258.   .RI [ -t
  259.   .IR title]
  260.   .RI [ -p 
  261. ***************
  262. *** 23,28 ****
  263. --- 23,31 ----
  264.   .PP
  265.   -s means "secure mode" which means that you can't save or print the
  266.   files that you browse.
  267. + .PP
  268. + -S means "very secure mode" which means that you can't save,  print or
  269. + mail the files that you browse.
  270.   .PP
  271.   -b starts the client on the bookmark page.
  272.   
  273. Common subdirectories: gopher1.1b1-DIST/emacs/forms and gopher1.1b1/emacs/forms
  274. Common subdirectories: gopher1.1b1-DIST/examples/.cap and gopher1.1b1/examples/.cap
  275. Common subdirectories: gopher1.1b1-DIST/examples/Sample Directory and gopher1.1b1/examples/Sample Directory
  276. Common subdirectories: gopher1.1b1-DIST/examples/Sample Directory/.cap and gopher1.1b1/examples/Sample Directory/.cap
  277. Common subdirectories: gopher1.1b1-DIST/examples/Sample Directory/wais-index and gopher1.1b1/examples/Sample Directory/wais-index
  278. Only in gopher1.1b1/gopher: .gdbinit
  279. diff -cr gopher1.1b1-DIST/gopher/cso.c gopher1.1b1/gopher/cso.c
  280. *** gopher1.1b1-DIST/gopher/cso.c    Sat Nov  7 03:14:11 1992
  281. --- gopher1.1b1/gopher/cso.c    Mon Nov 16 00:59:36 1992
  282. ***************
  283. *** 58,64 ****
  284.              else {
  285.               Fields[numfields] = strdup(cp);
  286.              }
  287. !            Responses[numfields] = (char *) malloc(sizeof(char)*80);
  288.              *Responses[numfields] = '\0';
  289.              *(Responses[numfields]+1) = '\0';
  290.              numfields++;
  291. --- 58,64 ----
  292.              else {
  293.               Fields[numfields] = strdup(cp);
  294.              }
  295. !            Responses[numfields] = (char *) malloc(sizeof(char)*80 + 1); /* allow 80 + terminator MG */
  296.              *Responses[numfields] = '\0';
  297.              *(Responses[numfields]+1) = '\0';
  298.              numfields++;
  299. diff -cr gopher1.1b1-DIST/gopher/globals.h gopher1.1b1/gopher/globals.h
  300. *** gopher1.1b1-DIST/gopher/globals.h    Wed Oct 14 18:07:16 1992
  301. --- gopher1.1b1/gopher/globals.h    Sun Nov 15 19:40:12 1992
  302. ***************
  303. *** 79,81 ****
  304. --- 79,83 ----
  305.   int  Load_Index_or_Dir();
  306.   void GetOneOption(/* */);
  307.   void check_sock(/* int, char* */);
  308. + #define VERY (-1)
  309. Only in gopher1.1b1/gopher: globals.h-DIST
  310. diff -cr gopher1.1b1-DIST/gopher/gopher.c gopher1.1b1/gopher/gopher.c
  311. *** gopher1.1b1-DIST/gopher/gopher.c    Thu Nov  5 11:33:02 1992
  312. --- gopher1.1b1/gopher/gopher.c    Mon Nov 16 01:00:18 1992
  313. ***************
  314. *** 93,99 ****
  315.        static char *response[2];
  316.   
  317.        if (inputline == NULL) {
  318. !       inputline = (char *) malloc(sizeof(char)*256);
  319.         if (inputline == NULL)
  320.              perror("Out of memory"), exit(-1);
  321.         *inputline = '\0';
  322. --- 93,99 ----
  323.        static char *response[2];
  324.   
  325.        if (inputline == NULL) {
  326. !       inputline = (char *) malloc(sizeof(char)*256 + 1); /* allow 256 + terminator */
  327.         if (inputline == NULL)
  328.              perror("Out of memory"), exit(-1);
  329.         *inputline = '\0';
  330. ***************
  331. *** 809,819 ****
  332.   
  333.        sTmp[0] = '\0';
  334.   
  335. !      while ((c = getopt(argc, argv, "Dsbp:t:")) != -1)
  336.         switch (c) {
  337.         case 's':
  338.              SecureMode = TRUE;
  339.              break;
  340.         case 'p':
  341.              GSsetPath(RootGophers[0], optarg);
  342.              GSsetPath(RootGophers[1], optarg);
  343. --- 809,822 ----
  344.   
  345.        sTmp[0] = '\0';
  346.   
  347. !      while ((c = getopt(argc, argv, "DsSbp:t:")) != -1)
  348.         switch (c) {
  349.         case 's':
  350.              SecureMode = TRUE;
  351.              break;
  352. +       case 'S':
  353. +            SecureMode = VERY;
  354. +            break;
  355.         case 'p':
  356.              GSsetPath(RootGophers[0], optarg);
  357.              GSsetPath(RootGophers[1], optarg);
  358. ***************
  359. *** 834,840 ****
  360.   
  361.   
  362.        if (errflag) {
  363. !       fprintf(stderr, "Usage: %s [-sb] [-p path] [-t title] [hostname port]+\n", argv[0]);
  364.         exit(-1);
  365.        }
  366.   
  367. --- 837,843 ----
  368.   
  369.   
  370.        if (errflag) {
  371. !       fprintf(stderr, "Usage: %s [-sSb] [-p path] [-t title] [hostname port]+\n", argv[0]);
  372.         exit(-1);
  373.        }
  374.   
  375. Only in gopher1.1b1/gopher: gopher.c-DIST
  376. diff -cr gopher1.1b1-DIST/gopher/ourutils.c gopher1.1b1/gopher/ourutils.c
  377. *** gopher1.1b1-DIST/gopher/ourutils.c    Sat Oct 31 07:48:38 1992
  378. --- gopher1.1b1/gopher/ourutils.c    Sun Nov 15 19:31:25 1992
  379. ***************
  380. *** 131,138 ****
  381.   
  382.        if (!SecureMode)
  383.         printf(", <m> to mail, <s> to save, or <p> to print:");
  384. !      else
  385.         printf(", <m> to mail:");
  386.   
  387.        fflush(stdout);
  388.        noecho();
  389. --- 131,142 ----
  390.   
  391.        if (!SecureMode)
  392.         printf(", <m> to mail, <s> to save, or <p> to print:");
  393. !      else {
  394. !     if (SecureMode == VERY)
  395. !       printf(":");
  396. !     else
  397.         printf(", <m> to mail:");
  398. +      }
  399.   
  400.        fflush(stdout);
  401.        noecho();
  402. ***************
  403. *** 153,158 ****
  404. --- 157,163 ----
  405.              case ' ':
  406.               break;
  407.              case 'm':
  408. +           if (SecureMode != VERY)
  409.               mail_file(Filename, Realname);
  410.               break;
  411.   
  412. Common subdirectories: gopher1.1b1-DIST/misc/Indexing and gopher1.1b1/misc/Indexing
  413. Common subdirectories: gopher1.1b1-DIST/misc/Logging and gopher1.1b1/misc/Logging
  414. Common subdirectories: gopher1.1b1-DIST/misc/NeXT and gopher1.1b1/misc/NeXT
  415. Common subdirectories: gopher1.1b1-DIST/misc/Radio and gopher1.1b1/misc/Radio
  416. Common subdirectories: gopher1.1b1-DIST/misc/archie-gopher-gw and gopher1.1b1/misc/archie-gopher-gw
  417. Common subdirectories: gopher1.1b1-DIST/misc/beeper and gopher1.1b1/misc/beeper
  418. Common subdirectories: gopher1.1b1-DIST/misc/go500 and gopher1.1b1/misc/go500
  419. Common subdirectories: gopher1.1b1-DIST/misc/gopher2ftp and gopher1.1b1/misc/gopher2ftp
  420. Common subdirectories: gopher1.1b1-DIST/misc/gopherdist and gopher1.1b1/misc/gopherdist
  421. Common subdirectories: gopher1.1b1-DIST/misc/gopherhunt and gopher1.1b1/misc/gopherhunt
  422. Common subdirectories: gopher1.1b1-DIST/misc/gophertree and gopher1.1b1/misc/gophertree
  423. Common subdirectories: gopher1.1b1-DIST/misc/shell-utils and gopher1.1b1/misc/shell-utils
  424. Common subdirectories: gopher1.1b1-DIST/misc/tstb and gopher1.1b1/misc/tstb
  425. Common subdirectories: gopher1.1b1-DIST/misc/waisfetch and gopher1.1b1/misc/waisfetch
  426. Common subdirectories: gopher1.1b1-DIST/misc/Radio/radio and gopher1.1b1/misc/Radio/radio
  427. Common subdirectories: gopher1.1b1-DIST/misc/Radio/radiod and gopher1.1b1/misc/Radio/radiod
  428. diff -cr gopher1.1b1-DIST/object/Makefile gopher1.1b1/object/Makefile
  429. *** gopher1.1b1-DIST/object/Makefile    Wed Sep  9 00:03:47 1992
  430. --- gopher1.1b1/object/Makefile    Sun Nov 15 22:28:57 1992
  431. ***************
  432. *** 20,25 ****
  433.   clean:
  434.       rm -f $(TARGET) $(OBJS) *.out *~ core
  435.   
  436. ! STRstring.o:     STRstring.h
  437. ! GDgopherdir.o:     GDgopherdir.h
  438. ! GSgopherobj.o:    GSgopherobj.h
  439. --- 20,25 ----
  440.   clean:
  441.       rm -f $(TARGET) $(OBJS) *.out *~ core
  442.   
  443. ! STRstring.o:     STRstring.c STRstring.h
  444. ! GDgopherdir.o:     GDgopherdir.c GDgopherdir.h
  445. ! GSgopherobj.o:    GSgopherobj.c GSgopherobj.h
  446. Only in gopher1.1b1/object: RCS
  447. diff -cr gopher1.1b1-DIST/object/STRstring.c gopher1.1b1/object/STRstring.c
  448. *** gopher1.1b1-DIST/object/STRstring.c    Sat Oct 31 07:18:46 1992
  449. --- gopher1.1b1/object/STRstring.c    Mon Nov 16 01:03:50 1992
  450. ***************
  451. *** 1,6 ****
  452. --- 1,29 ----
  453. + static char RCSIDSTRstrings[] = "@(#) $Header: /usr/users/cno/mark/cwis/gopher/gopher1.1b1/object/RCS/STRstring.c,v 1.4 1992/11/15 11:05:02 mark Exp mark $";
  454. + /*
  455. + **    $Log: STRstring.c,v $
  456. +  * Revision 1.4  1992/11/15  11:05:02  mark
  457. +  * add sanity checks for st == NULL
  458. +  *
  459. +  * Revision 1.3  1992/11/15  10:32:03  mark
  460. +  * fix STRcat need to pass st to STRset
  461. +  *
  462. +  * Revision 1.2  1992/11/15  10:30:38  mark
  463. +  * fix STRnewSet need to allow for null terminator in malloc
  464. +  *
  465. +  * Revision 1.1  1992/11/15  10:29:20  mark
  466. +  * Initial revision
  467. +  *
  468. + **
  469. + **    Add RCS and start some buf fixes
  470. + **
  471. + */
  472.   #include "STRstring.h"
  473.   #include "String.h"
  474.   #include "Malloc.h"
  475. + #ifdef EBUG
  476. + #include <stdio.h>
  477. + #endif
  478.   
  479.   /*
  480.    * Make a new string, however use supplied parameter to set it.
  481. ***************
  482. *** 18,24 ****
  483.        if (in == NULL)
  484.         return(temp);
  485.   
  486. !      len = strlen(in);
  487.   
  488.        temp->data = (char *) malloc(len * sizeof(char*));
  489.        strcpy(temp->data, in);
  490. --- 41,47 ----
  491.        if (in == NULL)
  492.         return(temp);
  493.   
  494. !      len = strlen(in) + 1; /* allow for null termination.... MG */
  495.   
  496.        temp->data = (char *) malloc(len * sizeof(char*));
  497.        strcpy(temp->data, in);
  498. ***************
  499. *** 50,59 ****
  500. --- 73,90 ----
  501.   STRdestroy(st)
  502.     String *st;
  503.   {
  504. +    if (st) { /* sanity check, never trust someone knocking at the door */
  505.        if (st->data != NULL)
  506.         free(st->data);
  507.   
  508.        free(st);
  509. +    }
  510. + #ifdef EBUG
  511. +     else {
  512. +         fprintf(stderr,"STRdestroy:Attempt to destroy non existant st \n");
  513. +     exit (1);
  514. +     }
  515. + #endif
  516.   }
  517.   
  518.   
  519. ***************
  520. *** 65,74 ****
  521. --- 96,120 ----
  522.   STRinit(st) 
  523.     String *st;
  524.   {
  525. +    if (st) { /* sanity check, never trust someone knocking at the door */
  526.        st->len  = 0;
  527. + #ifdef EBUG
  528. +     fprintf(stderr, "st = %08x\n", st);
  529. +     fprintf(stderr,"%08x:", st->data);
  530. +     if (st->data) fprintf(stderr,"%08x:\"%s\"\n", st->data, st->data);
  531. +     else fprintf(stderr,"\"(null)\"\n");
  532. + #endif
  533.        if (st->data != NULL)
  534.         free(st->data);
  535.        st->data = NULL;
  536. +    }
  537. + #ifdef EBUG
  538. +     else {
  539. +         fprintf(stderr,"STRinit:Attempt to destroy non existant st \n");
  540. +     exit (1);
  541. +     }
  542. + #endif
  543.   }
  544.   
  545.   /*
  546. ***************
  547. *** 82,87 ****
  548. --- 128,134 ----
  549.   {
  550.        register int len;
  551.   
  552. +    if (st) { /* sanity check, never trust someone knocking at the door */
  553.        if (str == NULL)
  554.         return;
  555.   
  556. ***************
  557. *** 112,117 ****
  558. --- 159,171 ----
  559.              strcpy(st->data, str);
  560.         }
  561.        }
  562. +    }
  563. + #ifdef EBUG 
  564. +     else {
  565. +         fprintf(stderr,"STRset:Attempt to destroy non existant st \n");
  566. +     exit (1);
  567. +     }
  568. + #endif
  569.   }
  570.   
  571.   /*
  572. ***************
  573. *** 126,131 ****
  574. --- 180,186 ----
  575.        int len;
  576.        char *temp;
  577.   
  578. +    if (st) { /* sanity check, never trust someone knocking at the door */
  579.        if (cp == NULL)
  580.         return(NULL);
  581.        
  582. ***************
  583. *** 140,150 ****
  584.        strcpy(temp, STRget(st));
  585.        strcat(temp, cp);
  586.   
  587. !      STRset(temp);
  588.        
  589.        free(temp);
  590.   
  591.        return(st);
  592.   }
  593.   
  594.   
  595. --- 195,212 ----
  596.        strcpy(temp, STRget(st));
  597.        strcat(temp, cp);
  598.   
  599. !      STRset(st,temp); /* original code did not pass st */
  600.        
  601.        free(temp);
  602.   
  603.        return(st);
  604. +    }
  605. + #ifdef EBUG 
  606. +     else {
  607. +         fprintf(stderr,"STRcat:Attempt to destroy non existant st \n");
  608. +     exit (1);
  609. +     }
  610. + #endif
  611.   }
  612.   
  613.   
  614. Only in gopher1.1b1/object: STRstring.c-DIST
  615. Only in gopher1.1b1/object: STRstring.c.bak
  616. diff -cr gopher1.1b1-DIST/object/compatible.c gopher1.1b1/object/compatible.c
  617. *** gopher1.1b1-DIST/object/compatible.c    Sat Nov  7 05:21:39 1992
  618. --- gopher1.1b1/object/compatible.c    Mon Nov 16 00:39:36 1992
  619. ***************
  620. *** 9,19 ****
  621.   
  622.   /*** For machines that don't have strstr ***/
  623.   
  624. ! #if defined(NOSTRSTR) || defined(mips) || defined(sequent) || defined(n16)
  625.   
  626.   char *
  627.   strstr(host_name, cp)
  628. !   char host_name[256];
  629.     char *cp;
  630.   {
  631.        int i, j;
  632. --- 9,19 ----
  633.   
  634.   /*** For machines that don't have strstr ***/
  635.   
  636. ! #if defined(NOSTRSTR) || (defined(mips) && !defined(ultrix)) || defined(sequent) || defined(n16)
  637.   
  638.   char *
  639.   strstr(host_name, cp)
  640. ! char host_name[256];
  641.     char *cp;
  642.   {
  643.        int i, j;
  644. ***************
  645. *** 62,68 ****
  646.           char *temp;
  647.   
  648.           if (str == NULL) return(NULL);
  649. !         len = strlen(str);
  650.   
  651.           temp = (char *) malloc(sizeof(char) * len);
  652.   
  653. --- 62,68 ----
  654.           char *temp;
  655.   
  656.           if (str == NULL) return(NULL);
  657. !         len = strlen(str) + 1; /* GOTCHA... must add 1 for null terminator */
  658.   
  659.           temp = (char *) malloc(sizeof(char) * len);
  660.   
  661. Only in gopher1.1b1/object: diff
  662. -- 
  663. Mark Garrett    Internet:  mark@arvak.une.edu.au    Phone:     +61 66 20 3859
  664.    University of New England, Northern Rivers, Lismore NSW Australia.
  665.