🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.notes
Article #72

Patch to rs's newsinput.c

#72
From: misko
Date: Fri, 22 May 1987 23:54
70 lines
2346 bytes
In installing Rich Salz's new newsinput.c, I stumbled across a few bugs.
Here is a patch file to fix these bugs.  The newsinput.c patch is for the
new newsinput.c Rich posted a week or so ago.  The patch for expand.c is
for version 1.7.  Sorry, but the patches are in ed format.  I do not have a
diff which will do context diffs.  I think there is a public one floating
around.  If you have one, please send it to me.  Thanks.

Note that the bugs this patch fixes is for 2 problems.  One, the CRC code
was never being run.  This may have been by choice, but as Rich is in the
middle of changing jobs I cannot ask him.  The second one is a problem
where when processing a batch (newsinput -b) a newsgroup will only be
posted to a notesfile the first time it appears in that batch.  I mailed
Rich the fix and he asked me to post it as he was changing jobs.
Note that I changed the #include <sys/file.h> to #include <fcntl.h>.  I 
am running on System V, but from what I was able to check, I believe this
will also work on 4.2 systems.  Also, the patch file makes debug equal to
zero.  This cuts down on a lot of the output.

The patch file follows.

Bill Miskovetz
Cray Research
{ihnp4, lll-lcc, pyramid}!ohlone!misko
415-449-0268

-----------------------------------------------------------

Index: expand.c

215a

void init_group_list ()
{
   
   this_group = 0;
   last_group = 0;

}
.


Index: newsinput.c

833c
#endif	/* CRC_AS_ID */
.
829,830c
	    newsseq = crc32(pbuf, strlen(pbuf));
	    dprintf ("article ID: %s\nnewsseq: %lu\n", header->ident, newsseq);
.
826c
	i = sscanf (header->ident, "<%99[^@]@%99[^>]>", pbuf, field1);
.
823c
#ifdef	CRC_AS_ID
.
795c
    unsigned long    newsseq;
.
259a
    init_group_list ();
.
75c
int debug = 0;
.
17c
#include <fcntl.h>
/* #include <sys/file.h> */
.
Technical Details
Message-ID: <7700002@ohlone>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!lll-tis!ohlone!misko

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!lll-tis!ohlone!misko
From: misko@ohlone
Newsgroups: news.software.notes
Subject: Patch to rs's newsinput.c
Message-ID: <7700002@ohlone>
Date: Fri, 22-May-87 19:54:00 EDT
Article-I.D.: ohlone.7700002
Posted: Fri May 22 19:54:00 1987
Date-Received: Wed, 27-May-87 00:56:32 EDT
Lines: 70
Nf-ID: #N:ohlone:7700002:000:1803
Nf-From: ohlone!misko    May 22 16:54:00 1987