🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #204

Re: Does vn display double '.' at the beginning of a line?

#204
From: John G Dobnick
Date: Sun, 30 Jun 1991 04:03
76 lines
2954 bytes
From article <1991Jun28.204841.21467@mp.cs.niu.edu>, by rickert@mp.cs.niu.edu (Neil Rickert):
> 
>  This looks like the doubling of '.' at the beginning of the line by
> nntp, which is supposed to be undoubled at the receiving site.
> 
>  My correspondent says he uses vn via nntp.
> 
>  Question:  Is vn broken?

Something's broken.  Vn shows the symptoms, but see my comments
below for my analysis of the real problem.

Anyway, I fixed this locally a long time back.  I include my (very
hacked up) RCS diffs for this problem.  The code may not be
particularly pretty, but it's worked fine for two years.  Note the
comments for why I consider this an NNTP bug.  At the very least, 
the NNTP library exhibits non-orthogonal behavior.

Hope this helps.

***************
*** 1,7 ****
  
  /*
   * $Log:	std.c,v $
--- 1,18 ----
  
  /*
   * $Log:	std.c,v $
+  * Revision 1.4  89/07/14  06:31:21  jgd
+  * Trim the "gecos" field so it contains only the user's name.
+  * 
+  * Fix problem with reading NNTP images to cure the "duplicate period"
+  * problem in column one.  (NNTP specs say that if a "." appears in column
+  * one, it will be doubled for transmission across the network.  The supplied
+  * NNTP library routines handle this nicely for *transmission*, but fail
+  * to remove the extra "." upon reception -- the user program is required
+  * to do this.  What a crock!)  The code here is (essentially) copied from
+  * rn(1).
+  * 
***************
*** 1674,1679 ****
--- 1690,1696 ----
  char *buf;
  int len;
  {
+ 	int i;
  	if (get_server(buf,len-1) < 0)
  		return(NULL);
  
***************
*** 1686,1691 ****
--- 1703,1715 ----
  
  	if (buf[0] == '.' && buf[1] == '\n')
  		return(NULL);
+ 
+ 	if (buf[0] == '.')
+ 	{
+ 		len = strlen(buf);
+ 		for (i = 0; i < len; ++i)
+ 			buf[i] = buf[i + 1];
+ 	}
  
  	return(buf);
  }

-- 
John G Dobnick  (JGD2)
Computing Services Division @ University of Wisconsin - Milwaukee
INTERNET: jgd@uwm.edu                      ATTnet: (414) 229-5727
UUCP: uunet!uwm!jgd

"Knowing how things work is the basis for appreciation,
and is thus a source of civilized delight."  -- William Safire
Technical Details
Message-ID: <13625@uwm.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!uwm.edu!convex.csd.uwm.edu!jgd
References: <1991Jun28.204841.21467@mp.cs.niu.edu>

Show Full Headers
Complete Article Headers
Message-ID: <13625@uwm.edu>
Subject: Re: Does vn display double '.' at the beginning of a line?
Date: Sun, 30 Jun 1991 04:03:26 +0000
From: jgd@convex.csd.uwm.edu (John G Dobnick)
References: <1991Jun28.204841.21467@mp.cs.niu.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!uwm.edu!convex.csd.uwm.edu!jgd
Newsgroups: news.software.readers,news.software.b
Sender: news@uwm.edu
Reply-To: jgd@convex.csd.uwm.edu
Followup-To: news.software.readers
Lines: 75
Originator: jgd@convex.csd.uwm.edu