Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1.chuqui 4/7/84; site nsc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!seismo!hao!hplabs!nsc!chuqui From: chuqui@nsc.UUCP (Chuq Von Rospach) Newsgroups: net.news.b Subject: bug fix to a posted bug fix Message-ID: <829@nsc.UUCP> Date: Sat, 7-Apr-84 18:54:25 EST Article-I.D.: nsc.829 Posted: Sat Apr 7 18:54:25 1984 Date-Received: Mon, 9-Apr-84 05:39:20 EST Organization: National Semiconductor, Sunnyvale Lines: 30 I just tracked down a bug in a routine posted a while back by utcsstat!geoff in the routine findngsize() in rfuncs. The article-id is <1610@utcsstat.UUCP> posted 1/5/84. He rewrote the routine and posted a much faster and intelligent version. Unfortunately, he reversed a comparison, and the thing severely breaks the '-' command in both readnews and vnews. The main symptom is that when you '-' back across a newsgroup boundary the largest message in the group becomes the largest message in the first group in your active file. This, in our case, is general, and it is very disconcerting to see a message like 'Unix Wizards, message 1519 of 30'. The problem is that in one of his comparisons he uses strcmp() instead of !strcmp(), which causes it to succeed on the first try instead of when the two strings match. This causes it to return the wrong value. The corrected line should look like: if (sscanf(buf, "%s "ld",n,&s) == 2 && !strcmp(n,ng)) ^ ^ | | missing character! chuq -- From under the bar at Callahan's: Chuq Von Rospach {amd70,fortune,hplabs,menlo70}!nsc!chuqui (408) 733-2600 x242 A toast! To absent friends... {clink}