Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 Apollo 5/13/85; site apollo.uucp Path: utzoo!utcsri!ubc-vision!uw-beaver!apollo!rees From: rees@apollo.uucp (Jim Rees) Newsgroups: net.bugs,net.news.b Subject: Re: Minor bug in readnews Message-ID: <2a35e2be.1de6@apollo.uucp> Date: Mon, 18-Nov-85 10:42:52 EST Article-I.D.: apollo.2a35e2be.1de6 Posted: Mon Nov 18 10:42:52 1985 Date-Received: Tue, 19-Nov-85 17:40:12 EST References: <539@aaec.OZ> Organization: Apollo Computer, Chelmsford, Mass. Lines: 78 That isn't the only thing wrong with getnextart(). It doesn't work well when you have a new active file (because you just installed news), it writes out newsrc even with the -x flag, and it fills up errlog with one-line, 1000-byte messages when the spool directory isn't available. Here are some fixes for these problems. *************** *** 909,914 } else if (rfq++ || pflag || cflag) return 1; } if (rflag) bit = ngsize + 1; --- 927,933 ----- } else if (rfq++ || pflag || cflag) return 1; + break; } if (rflag) bit = ngsize + 1; *************** *** 914,920 bit = ngsize + 1; else bit = minartno - 1; ! if (uflag) { time_t now; (void) time(&now); if (now - timelastsaved > 5*60 /* 5 minutes */) { --- 933,939 ----- bit = ngsize + 1; else bit = minartno - 1; ! if (uflag && !xflag) { time_t now; (void) time(&now); if (now - timelastsaved > 5*60 /* 5 minutes */) { *************** *** 950,956 fprintf(stderr, "filename = '%s'\n", filename); #endif /* Decide if we want to show this article. */ ! if ((fp = fopen(filename, "r")) == NULL) { /* since there can be holes in legal article numbers, */ /* we wait till we hit 5 consecutive bad articles */ /* before we haul off and scan the directory */ --- 970,997 ----- fprintf(stderr, "filename = '%s'\n", filename); #endif /* Decide if we want to show this article. */ ! if (bit <= 0 || (fp = fopen(filename, "r")) == NULL) { /* since there can be holes in legal article numbers, */ /* we wait till we hit 5 consecutive bad articles */ /* before we haul off and scan the directory */ *************** *** 960,966 dirp = opendir(dirname(groupdir)); if (dirp == NULL) { if (errno != EACCES) ! fprintf(stderr,"Can't open %s", dirname(groupdir)); goto badart; } nextnum = rflag ? minartno - 1 : ngsize + 1; --- 1001,1007 ----- dirp = opendir(dirname(groupdir)); if (dirp == NULL) { if (errno != EACCES) ! fprintf(stderr,"Can't open %s\n", dirname(groupdir)); goto badart; } nextnum = rflag ? minartno - 1 : ngsize + 1;