Path: utzoo!mnetor!uunet!husc6!mit-eddie!apollo!rees From: rees@apollo.uucp (Jim Rees) Newsgroups: news.software.b Subject: Re: Missing history file?? Message-ID: <3b1ffbdd.b8ab@apollo.uucp> Date: 28 Mar 88 15:44:00 GMT References: <1219@cos.com> <4326@b-tech.UUCP> Organization: Apollo Computer, Chelmsford, Mass. Lines: 95 Here are the patches to inews to make it work with C news expire. You also need to apply some patches to C expire but I don't have those handy right now. You should also #define CHIST in your defs.h. diff -c -b src/control.c control.c *** src/control.c Mon Nov 30 10:00:17 1987 --- control.c Thu Jan 14 18:07:58 1988 *************** *** 626,631 **** --- 645,653 ---- struct tm *tm; log("Can't cancel %s: non-existent", argv[1]); (void) time(&t); + #ifdef CHIST + sprintf(bfr, "%s\t%ld~-\tcancelled", argv[1], t); + #else tm = localtime(&t); #ifdef USG sprintf(bfr,"%s\t%2.2d/%2.2d/%d %2.2d:%2.2d\tcancelled", *************** *** 634,639 **** --- 656,662 ---- #endif /* !USG */ argv[1], tm->tm_mon+1, tm->tm_mday, tm->tm_year, tm->tm_hour, tm->tm_min); + #endif /* CHIST */ savehist(bfr); return -1; } *************** *** 657,663 **** #endif /* ORGDISTRIB */ STRCMP(header.distribution, "local") == 0)) su = 1; ! while (*p) { q = index(p, ' '); if (q) *q = '\0'; --- 680,686 ---- #endif /* ORGDISTRIB */ STRCMP(header.distribution, "local") == 0)) su = 1; ! while (q && *p) { q = index(p, ' '); if (q) *q = '\0'; diff -c -b src/inews.c inews.c *** src/inews.c Mon Nov 30 10:00:38 1987 --- inews.c Fri Mar 4 14:03:20 1988 *************** *** 902,907 **** --- 935,941 ---- int is_invalid = FALSE; int exitcode = 0; long now; + char expbuf[80]; #ifdef DOXREFS register char *nextref = header.xref; #endif /* DOXREFS */ *************** *** 916,931 **** } (void) time(&now); ! tm = gmtime(&now); if (header.expdate[0]) addhist(" "); ! #ifdef USG ! sprintf(bfr,"%2.2d/%2.2d/%d %2.2d:%2.2d\t", ! #else /* !USG */ ! sprintf(bfr,"%02d/%02d/%d %02d:%02d\t", ! #endif /* !USG */ ! tm->tm_mon+1, tm->tm_mday, tm->tm_year,tm->tm_hour, tm->tm_min); ! addhist(bfr); log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL ? "queued" : (mode==PROC ? "received" : "posted"), header.ident, header.nbuf, header.title, header.from); --- 950,964 ---- } (void) time(&now); ! #ifdef CHIST ! sprintf(expbuf, "%ld~%s\t", now, (header.expdate[0] ? header.expdate : "-")); ! addhist(expbuf); ! #else if (header.expdate[0]) addhist(" "); ! addhist(arpadate(&now)); ! addhist("\t"); ! #endif log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL ? "queued" : (mode==PROC ? "received" : "posted"), header.ident, header.nbuf, header.title, header.from);