Thread View: net.sources.bugs
2 messages
2 total messages
Started by tallman
Thu, 19 Feb 1987 00:27
new vn "%" listing bug
Author: 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
Re: new vn "%" listing bug
Author: bobm
Date: Sat, 21 Feb 1987 17:28
Date: Sat, 21 Feb 1987 17:28
25 lines
1469 bytes
1469 bytes
OOPS. Should have caught that. Thanks. Actually, I should have
done a visual pick on that list. Using the internal newsgroup index
is a trifle crude, also. It was a relatively quick way to add the
feature while I was doing other enhancements, however.
BTW, the posting of vn to mod.sources recently is pretty much exactly
what came out in net.sources. It contains the much-discussed "continued
header line from BITNET" bug. I sent mail with a correction to sources@mirror,
which I should have done before he had a chance to bring it out. So, if
anyone pulls off that copy, at least go into reader.c and change the
line in gethead():
if (index(bufr,':') == NULL)
to
if (bufr[0] == '\n')
or maybe that was "buf". I forget. Of course, the rest of the fix (a
check for 0 where the calling routine divides by "artlin") ought to
be done, too, but this one-liner will prevent the cases that occurred.
--
Bob McQueer
{amdahl, sun, mtxinu, hoptoad, cpsc6a}!rtech!bobm
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads