🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #1495

Re: Error in Nn Chopping Up Digests

#1495
From: Kim F. Storm
Date: Fri, 22 Mar 1991 16:10
91 lines
3299 bytes
rawdon@rex.cs.tulane.edu (Michael Rawdon) writes:

>I talked with Kim Storm about it, and after he looked at one of the digests
>on rec.humor.funny that it messed up, he said it's because the moderator
>is creating the digests "wrong", i.e., in a format nn isn't designed to
>handle.  I need to send him (the moderator) e-mail to let him know this...

I have produced a patch which is supposed to let nn handle the "broken"
r.h.f digests, and I would like some feedback on this patch to know if
it breaks on other digests or folders (I haven't seen any problems with
it, but you never can tell).

The patch also allows nn to split folders which does not have a
blank line to separate the body of one article from the header of the
next.

If somebody want to test this out, please do so.  But be aware that it
is a preliminary patch which must be removed before you install the
next official patch.  Line numbers may be a little off due to the
removal of other unrelated patches to digest.c:


*** LAST/digest.c	Fri Oct  5 19:07:04 1990
--- digest.c	Fri Mar 15 15:26:46 1991
***************
*** 258,263 ****
--- 261,267 ----
      int	   line_type[BACKUP_LINES];
      register int backup_index, backup_count;
      int    more_header_lines, end_or_asterisks, blanks;
+     int    colon_lines;
      char   line[1024];
      register char *cp;
      char **dg_hdr_field();
***************
*** 274,279 ****
--- 278,284 ----
  
   next_line:
      more_header_lines = 0;
+     colon_lines = 0;
  
   next_possible_header_line:
      digest.dg_lines++;
***************
*** 390,399 ****
--- 395,420 ----
      }
  
      if (blanks)
+ 	goto next_possible_header_line;
+ /* must be able to handle continued lines in sub-digest headers...
  	goto next_line;
+ */
  
      if (!dg_hdr_field(line, 0))
+     {
+ 	char *colon;
+ 	if (colon = strchr(line, ':')) {
+ 	    for (cp = line; cp < colon; cp++)
+ 		if (!isascii(*cp) || isspace(*cp)) break;
+ 	    if (cp == colon) {
+ 		TEST("COLON", 0, 0);
+ 		colon_lines++;
+ 		line_type[backup_index] = LN_HEADER;
+ 	    }
+ 	}
+ 	
  	goto next_possible_header_line;
+     }
  
      TEST("HEADER", 0, 0);
  
***************
*** 405,412 ****
--- 426,436 ----
  
      TEST("\nSearch for start of header\n", 0, 0);
  
+     colon_lines += more_header_lines;
      for (;;) {
  	fseek(f, backup_p[backup_index], 0);
+ 	if (line_type[backup_index] == LN_HEADER)
+ 	    if (--colon_lines <= 0) break;
  	--digest.dg_lines;
  	if (--backup_count == 0) break;
  	decrease_index();

-- 
Kim F. Storm  <storm@texas.dk>		No news is good news,
Texas Instruments A/S, Denmark		  but nn is better!
Technical Details
Message-ID: <780@texas.dk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
References: <6511@rex.cs.tulane.edu> <1445@geovision.gvc.com> <6588@rex.cs.tulane.edu>

Show Full Headers
Complete Article Headers
Message-ID: <780@texas.dk>
Subject: Re: Error in Nn Chopping Up Digests
Date: Fri, 22 Mar 1991 16:10:29 +0000
From: storm@texas.dk (Kim F. Storm)
References: <6511@rex.cs.tulane.edu> <1445@geovision.gvc.com> <6588@rex.cs.tulane.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
Newsgroups: news.software.nn
Organization: Texas Instruments, Denmark
Lines: 91