Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!amdahl!rtech!bobm From: bobm@rtech.UUCP (Bob Mcqueer) Newsgroups: net.sources.bugs Subject: Re: problem with vn Message-ID: <593@rtech.UUCP> Date: Mon, 12-Jan-87 16:28:35 EST Article-I.D.: rtech.593 Posted: Mon Jan 12 16:28:35 1987 Date-Received: Tue, 13-Jan-87 21:39:15 EST References: <754@imagen.UUCP> Organization: Relational Technology, Alameda CA Lines: 29 in article <754@imagen.UUCP>, turner@imagen.UUCP (D'arc Angel) says: > i just installed the new version of vn and have run into a problem, > it seems that a lot of the postings from BITNET have a \0a in the > From: line of the header. This causes gethead to think it has > finished reading the header and return with lin (number of lines in > the atricle) set to zero. Our site doesn't seem to have this problem - our BITNET articles don't seem to have an offending \0 embedded in header lines. If this IS a widespread problem (or even if it isn't, I guess), my suggestion: The problem is that fgets() takes \0 for a line terminator. Rather than special casing a lot of stuff, replace the fgets() call with a special routine that looks explicitly for the \n, and throws away \0's as it comes to them. If this is a widespread problem: 1) I'll incorporate a special "fgets" into vn - this fgets could also handle a buffer size more intelligently, so that in the unlikely event that header lines get to be more than RECLEN characters long, it won't goof anything up either. Then, you could tune RECLEN to a more reasonable limit. 2) This really strikes me as a bug in the posting software someplace - article files simply should not contain \0's -- Bob McQueer {amdahl, sun, mtxinu, hoptoad, cpsc6a}!rtech!bobm