Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!spaf From: spaf@gatech.CSNET (Gene Spafford) Newsgroups: net.news.b Subject: Re: MKXREF (usg) (fixes enclosed) Message-ID: <3003@gatech.CSNET> Date: Thu, 13-Mar-86 17:53:34 EST Article-I.D.: gatech.3003 Posted: Thu Mar 13 17:53:34 1986 Date-Received: Fri, 14-Mar-86 07:57:21 EST References: <352@unirot.UUCP> Reply-To: spaf@gatech.UUCP (Gene Spafford) Organization: The Clouds Project, School of ICS, Georgia Tech Lines: 211 In answer to your questions: 1) I have posted the fix to "rn" for XREF to net.news.b and net.sources.bugs 2) I don't know anything about this. 3) Enclosed are the patches to expire.c that I received from Rick Adams which fix the bug in "expire -r". #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # exp # This archive created: Thu Mar 13 17:51:10 1986 # By: Gene Spafford (The Clouds Project, School of ICS, Georgia Tech) export PATH; PATH=/bin:$PATH echo shar: extracting "'exp'" '(4333 characters)' if test -f 'exp' then echo shar: will not over-write existing file "'exp'" else sed 's/^XX//' << \SHAR_EOF > 'exp' XX*** expire.c.old Mon Jan 20 16:05:32 1986 XX--- expire.c Mon Mar 3 23:45:18 1986 XX*************** XX*** 17,23 XX */ XX XX #ifdef SCCSID XX! static char *SccsId = "@(#)expire.c 2.42 1/17/86"; XX #endif /* SCCSID */ XX XX #include "params.h" XX XX--- 17,23 ----- XX */ XX XX #ifdef SCCSID XX! static char *SccsId = "%W% %G%"; XX #endif /* SCCSID */ XX XX #include "params.h" XX*************** XX*** 470,477 XX * it up again from another feed .. XX */ XX goto nailit; XX! } else XX! rectime = cgtdate(recdate); XX if (dorebuild) { XX register char *cp, *lastslash; XX register struct multhist *mhp; XX XX--- 470,476 ----- XX * it up again from another feed .. XX */ XX goto nailit; XX! } XX if (dorebuild) { XX register char *cp, *lastslash; XX register struct multhist *mhp; XX*************** XX*** 476,481 XX register char *cp, *lastslash; XX register struct multhist *mhp; XX XX /* XX * Format of filename until now was /SPOOL/a/b/c/4 XX * and this code changes it to a.b.c/4 (the correct XX XX--- 475,488 ----- XX register char *cp, *lastslash; XX register struct multhist *mhp; XX XX+ if (recdate[0] == '\0') { XX+ struct stat statb; XX+ if (fstat(fileno(fp), &statb) < 0) XX+ rectime = cgtdate(h.subdate); XX+ else XX+ rectime = statb.st_mtime; XX+ } else XX+ rectime = cgtdate(recdate); XX /* XX * Format of filename until now was /SPOOL/a/b/c/4 XX * and this code changes it to a.b.c/4 (the correct XX*************** XX*** 567,572 XX } XX XX (void) fclose(fp); XX XX if (h.expdate[0]) XX exptime = cgtdate(h.expdate); XX XX--- 574,580 ----- XX } XX XX (void) fclose(fp); XX+ rectime = cgtdate(recdate); XX XX if (h.expdate[0]) XX exptime = cgtdate(h.expdate); XX*************** XX*** 580,586 XX printf("cancel %s\n", filename); XX #else /* !DEBUG */ XX if (verbose) XX! printf("cancel %s\n", filename); XX ulall(p2, &h); XX (void) sprintf(p2, "%s\n", grpsleft); XX if (verbose > 2 && grpsleft[0]) XX XX--- 588,594 ----- XX printf("cancel %s\n", filename); XX #else /* !DEBUG */ XX if (verbose) XX! printf("cancel %s\n", h.ident); XX ulall(p2, &h); XX (void) sprintf(p2, "%s\n", grpsleft); XX if (verbose > 2 && grpsleft[0]) XX*************** XX*** 635,642 XX printf("Garbled article %s.\n", filename); XX (void) fclose(fp); XX continue; XX! } else XX! rectime = cgtdate(recdate); XX tm = localtime(&rectime); XX if ( XX #ifdef USG XX XX--- 643,655 ----- XX printf("Garbled article %s.\n", filename); XX (void) fclose(fp); XX continue; XX! } else { XX! struct stat statb; XX! if (fstat(fileno(fp), &statb) < 0) XX! rectime = cgtdate(h.subdate); XX! else XX! rectime = statb.st_mtime; XX! } XX tm = localtime(&rectime); XX if ( XX #ifdef USG XX*************** XX*** 640,646 XX tm = localtime(&rectime); XX if ( XX #ifdef USG XX! fprintf(nhfd,"%s\t%s%2.2d/%2.2d %2.2d:%2.2d\t%s\n", XX #else /* !USG */ XX fprintf(nhfd,"%s\t%s%02d/%02d %02d:%02d\t%s\n", XX #endif /* !USG */ XX XX--- 653,659 ----- XX tm = localtime(&rectime); XX if ( XX #ifdef USG XX! fprintf(nhfd,"%s\t%s%2.2d/%2.2d/%d %2.2d:%2.2d\t%s\n", XX #else /* !USG */ XX fprintf(nhfd,"%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", XX #endif /* !USG */ XX*************** XX*** 642,648 XX #ifdef USG XX fprintf(nhfd,"%s\t%s%2.2d/%2.2d %2.2d:%2.2d\t%s\n", XX #else /* !USG */ XX! fprintf(nhfd,"%s\t%s%02d/%02d %02d:%02d\t%s\n", XX #endif /* !USG */ XX h.ident, h.expdate[0] ? " " : "", XX tm->tm_mon+1, tm->tm_mday, XX XX--- 655,661 ----- XX #ifdef USG XX fprintf(nhfd,"%s\t%s%2.2d/%2.2d/%d %2.2d:%2.2d\t%s\n", XX #else /* !USG */ XX! fprintf(nhfd,"%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", XX #endif /* !USG */ XX h.ident, h.expdate[0] ? " " : "", XX tm->tm_mon+1, tm->tm_mday, tm->tm_year, XX*************** XX*** 645,651 XX fprintf(nhfd,"%s\t%s%02d/%02d %02d:%02d\t%s\n", XX #endif /* !USG */ XX h.ident, h.expdate[0] ? " " : "", XX! tm->tm_mon+1, tm->tm_mday, XX tm->tm_hour, tm->tm_min, mhp->mh_file) XX == EOF ) XX xerror("History write failed"); XX XX--- 658,664 ----- XX fprintf(nhfd,"%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", XX #endif /* !USG */ XX h.ident, h.expdate[0] ? " " : "", XX! tm->tm_mon+1, tm->tm_mday, tm->tm_year, XX tm->tm_hour, tm->tm_min, mhp->mh_file) XX == EOF ) XX xerror("History write failed"); SHAR_EOF fi # end of overwriting check # End of shell archive exit 0 -- Gene "writing furiously" Spafford The Clouds Project, School of ICS, Georgia Tech, Atlanta GA 30332-0280 CSNet: Spaf @ GATech ARPA: Spaf%GATech.CSNet @ Relay.CS.NET uucp: ...!{akgua,decvax,hplabs,ihnp4,linus,seismo,ulysses}!gatech!spaf