[news.software.readers] Does vn display double '.' at the beginning of a line?

rickert@mp.cs.niu.edu (Neil Rickert) (06/29/91)

 [Apologies for an earlier (now cancelled) version of this article which
  accidently named 'vnews' instead of 'vn'].

In article <1991Jun28.010404.310@mp.cs.niu.edu> which I posted to
comp.unix.wizards, my message contained the following line, where the '|'
marks the left margin.

	|.156.131.in-addr.arpa/

 A reader replied by email.  In his reply he quoted the line as:

	|..156.131.in-addr.arpa/

which, in this case, destroys the point of my article.

 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?

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

jgd@convex.csd.uwm.edu (John G Dobnick) (06/30/91)

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