🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #7374

Re: [Announce] New version of nn-tk (and nn)

#7374
From: J. Porter Clark
Date: Tue, 26 Mar 1996 00:00
52 lines
2130 bytes
toivo@uwa.edu.au (Toivo Pedaste) writes:

>Its available in:
>	ftp.uwa.edu.au:/pub/nn/contrib
>ie
>	ftp://ftp.uwa.edu.au/pub/nn/contrib/nn-tk.13.tar.gz

I found a tiny bug in novseek() in libnov.c from this package.  It only
affects newsreading directly from a filesystem; i.e., with NNTP
undefined.  The bug is reproducible as follows:

   1. Find a test newsgroup with no articles in it at all and with a
   zero-length or nonexistent .overview file.

   2. Post an article to the test newsgroup.  Use a short Subject line.

   3. Use nn to read the newsgroup and update the .newsrc file.

   4. Post a second article to the test newsgroup.  Use a long Subject
   line.

   5. Use nn to read the newsgroup.  You won't see the second article,
   but .newsrc will be updated nonetheless.

Here's a patch that should fix the problem.  If anybody out there tries
this out and has problems with it, please let me know.  It works for
me.

*** libnov.c.orig	Mon Mar 25 09:40:58 1996
--- libnov.c	Mon Mar 25 19:51:08 1996
***************
*** 159,165 ****
  	/* Seek to middle line. */
  	middle = (upper + lower) / 2;
  	(void)fseek(fp, middle, 0);
! 	while (getc(fp) != '\n' && ++middle <= upper)
  	    continue;
  
  	if (middle >= upper)
--- 159,165 ----
  	/* Seek to middle line. */
  	middle = (upper + lower) / 2;
  	(void)fseek(fp, middle, 0);
! 	while (++middle <= upper && getc(fp) != '\n')
  	    continue;
  
  	if (middle >= upper)
-- 
J. Porter Clark    jpc@hammer.msfc.nasa.gov
NASA/MSFC Flight Data Systems Branch

Technical Details
Message-ID: <4j97oj$d8u@hammer.msfc.nasa.gov>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.windows.x.apps.mbox.zip!not-for-mail
References: <4i5q06$j84@styx.uwa.edu.au>

Show Full Headers
Complete Article Headers
Message-ID: <4j97oj$d8u@hammer.msfc.nasa.gov>
Subject: Re: [Announce] New version of nn-tk (and nn)
Date: Tue, 26 Mar 1996 00:00:00 +0000
From: jpc@hammer.msfc.nasa.gov (J. Porter Clark)
References: <4i5q06$j84@styx.uwa.edu.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.windows.x.apps.mbox.zip!not-for-mail
X-Deja-AN: 144206716
Organization: NASA/MSFC
Newsgroups: news.software.nn,news.software.readers,comp.lang.tcl,comp.windows.x.apps