🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #4316

fix for nn/nov broken 'p' command

#4316
From: Wietse Venema
Date: Tue, 15 Jun 1993 20:38
25 lines
1656 bytes
After picking up today the *.dist.tar.Z files from world.std.com and
builing the patched nn under SunOS 4.1.1, I found that the 'p' command
(show previous article) was broken. Each time 'p' was executed, the
display would skip another paragraph of the article.

The error was that setpos() did not reset the file read pointer before
looking for the first blank line after the article headers. The patch
below fixes the problem.

	Wietse

*** more.c-	Sat Sep 26 10:17:38 1992
--- more.c	Tue Jun 15 17:50:24 1993
***************
*** 310,315 ****
--- 310,318 ----
  	struct stat statb;
  
  	ah->hpos = 0;
+ 	/* Always search from the beginning... wietse@wzv.win.tue.nl */
+ 	if (startpos != 0)
+ 		fseek(art, 0L, 0);
  	while (fgets(line, sizeof line, art) != NULL)
  		if (*line == '\n') {		/* end of headers? */
  			ah->fpos = ftell(art);
Technical Details
Message-ID: <1vlbvv$nib@wzv.win.tue.nl>
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!gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!utnut!torn!nott!bnrgate!bnr.co.uk!zaphod.axion.bt.co.uk!uknet!mcsun!sun4nl!tuegate.tue.nl!svin09.info.win.tue.nl!wzv.win.tue.nl!wzv.win.tue.nl!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <1vlbvv$nib@wzv.win.tue.nl>
Subject: fix for nn/nov broken 'p' command
Date: Tue, 15 Jun 1993 20:38:23 +0000
From: wietse@wzv.win.tue.nl (Wietse Venema)
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!gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!utnut!torn!nott!bnrgate!bnr.co.uk!zaphod.axion.bt.co.uk!uknet!mcsun!sun4nl!tuegate.tue.nl!svin09.info.win.tue.nl!wzv.win.tue.nl!wzv.win.tue.nl!not-for-mail
Newsgroups: news.software.nn
Organization: Eindhoven University of Technology, The Netherlands
Lines: 25
NNTP-Posting-Host: wzv.win.tue.nl