Article View: net.sources.bugs
Article #940new vn "%" listing bug
From: tallman
Date: Thu, 19 Feb 1987 00:27
Date: Thu, 19 Feb 1987 00:27
48 lines
1782 bytes
1782 bytes
The new feature in vn that allows one to go to a new newsgroup from the
"%" listing has a bug. If the user mistypes the newsgroup number and
chooses a group that has no news in it the program aborts with "bad
temp file read". The following patch should make it recover gracefully.
*** vn.c Wed Feb 18 17:04:25 1987
--- vn.c.new Wed Feb 18 17:07:37 1987
***************
*** 1188,1193 ****
--- 1188,1194 ----
printf("n - new group, other to return ... ");
c = getnoctl();
}
+ retry:
if (c == 'n')
{
printf("\n");
***************
*** 1197,1204 ****
i = 0;
if (i >= Ncount)
i = Ncount-1;
! find_page((Newsorder[i])->pnum);
! *rec = RECBIAS;
! *hirec = Page.h.artnum + RECBIAS;
}
}
--- 1198,1213 ----
i = 0;
if (i >= Ncount)
i = Ncount-1;
! if ((Newsorder[i])->pages == 0) {
! printf("\nNo news was read for that group\n");
! printf("n - new group, other to return ... ");
! c = getnoctl();
! goto retry;
! }
! else {
! find_page((Newsorder[i])->pnum);
! *rec = RECBIAS;
! *hirec = Page.h.artnum + RECBIAS;
! }
}
}
--
Dave Tallman - tallman@hc.arpa or ihnp4!lanl!hc!tallman
Los Alamos National Laboratory - E-10/Data Systems
Los Alamos, New Mexico - (505) 667-8495
Technical Details
Message-ID:
<525@hc.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!lll-lcc!seismo!sundc!jedi!hi!hc!tallmanShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!lll-lcc!seismo!sundc!jedi!hi!hc!tallman From: tallman@hc.UUCP Newsgroups: net.sources.bugs Subject: new vn "%" listing bug Message-ID: <525@hc.ARPA> Date: Wed, 18-Feb-87 19:27:00 EST Article-I.D.: hc.525 Posted: Wed Feb 18 19:27:00 1987 Date-Received: Sat, 21-Feb-87 06:18:28 EST Organization: Los Alamos National Laboratory Lines: 48 Keywords: newsgroup goto feature