Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!ut-sally!pyramid!csg From: csg@pyramid.UUCP (Carl S. Gutekunst) Newsgroups: net.bugs,net.news.b Subject: Re: 2.10.3 unbatch bug and fix Message-ID: <200@pyramid.UUCP> Date: Wed, 19-Mar-86 19:59:09 EST Article-I.D.: pyramid.200 Posted: Wed Mar 19 19:59:09 1986 Date-Received: Sat, 22-Mar-86 02:30:48 EST References: <243@micropro.UUCP> Reply-To: csg@pyramid.UUCP (Carl S. Gutekunst) Lines: 39 Xref: watmath net.bugs:757 net.news.b:1327 In article <243@micropro.UUCP> mojo writes: >Yikes! I lost two days of news. Hasn't anyone *used* the 2.10.3 >unbatcher? It doesn't work. > >53,54c53,54 >< while (strncmp(buf, "#! rnews ", 9) >< || strncmp(buf, "! rnews ", 8)) { /* kludge for bug */ >--- >> while (!strncmp(buf, "#! rnews ", 9) >> && !strncmp(buf, "! rnews ", 8)) { /* kludge for bug */ Which version of 2.10.3? We have 6/6/85, which is missing the second test. I'll bet a nickel that yours is later, and somebody was trying to fix the "article eater" bug without working out their boolean algebra first.... But your fix isn't correct either. Try this: while (strncmp(buf, "#! rnews ", 9) && strncmp(buf, "! rnews ", 8)) { /* kludge for bug */ That is, the body of the loop is executed only when both strncmp functions return non-zero, meaning that the line was neither "#! rnews" nor "! rnews". What your patch will do is execute the body of the loop only when the buffer is simultaneously equal to both strings! All of which is moot, since I'm painfully familiar with at least one article eater, and this kludge will not catch it reliably. (The real "bug repellant" fix requires a complete rewrite of unbatch's inner loop; it's not difficult, so I suppose I really should go back and work it into the code. Being as none of our adjacent sites have the bug, I've gotten lazy. :-)) >(I don't know how to make a context diff, or don't >have the utility. Is it PD?) You get a context diff with the "-c" option on the BSD diff utility. USG sites get to lose, unfortunately.... -- Carl S. Gutekunst {allegra,cmcl2,decwrl,hplabs,topaz,ut-sally}!pyramid!csg Pyramid Technology Corp, Mountain View, CA +1 415 965 7200