rick@seismo.UUCP (Rick Adams) (09/19/84)
For those of you (like me) that are paranoid about running ed scripts blindly, here is a diff -c of the changed routines. ---rick diff -c -b NEW/Makefile.usg OLD/Makefile.usg *** NEW/Makefile.usg Mon Sep 17 19:27:02 1984 --- OLD/Makefile.usg Tue Sep 18 16:41:18 1984 *************** *** 1,4 ! # @(#)Makefile.usg 2.27 9/17/84 # Makefile for System III, System V and other USG based systems # definitions --- 1,4 ----- ! # @(#)Makefile.usg 2.25 9/3/84 # Makefile for System III, System V and other USG based systems # definitions *************** *** 38,44 process.o rpathinit.o digest.o $(OBJECTS) VOBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o process.o rpathinit.o \ $(OBJECTS) visual.o virtterm.o ! EXPOBJS= expire.o header.o funcs.o getdate.o iextern.o epathinit.o \ funcs2.o ndir.o $(MISC) SRCS = funcs.c funcs2.c header.c --- 38,44 ----- process.o rpathinit.o digest.o $(OBJECTS) VOBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o process.o rpathinit.o \ $(OBJECTS) visual.o virtterm.o ! EXPOBJS= expire.o header.o funcs.o getdate.o rextern.o epathinit.o \ funcs2.o ndir.o $(MISC) SRCS = funcs.c funcs2.c header.c *************** *** 48,54 digest.c $(SRCS) VSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c process.c $(SRCS) \ visual.c virtterm.c ! EXPSRCS = expire.c header.c funcs.c getdate.c iextern.c \ funcs2.c OSRCS = uurec.c recnews.c sendnews.c batch.c unbatch.c caesar.c \ recmail.c compress.c --- 48,54 ----- digest.c $(SRCS) VSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c process.c $(SRCS) \ visual.c virtterm.c ! EXPSRCS = expire.c header.c funcs.c getdate.c rextern.c \ funcs2.c OSRCS = uurec.c recnews.c sendnews.c batch.c unbatch.c caesar.c \ recmail.c compress.c *************** *** 133,139 postnews: Makefile $(POBJECTS) $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews ! postnews.o: postnews.c defs.h params.h header.h $(CC) $(CFLAGS) -c postnews.c readnews.o: readnews.c rparams.h defs.h params.h header.h --- 133,139 ----- postnews: Makefile $(POBJECTS) $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews ! postnews.o: postnews.c defs.h $(CC) $(CFLAGS) -c postnews.c readnews.o: readnews.c rparams.h defs.h params.h header.h *************** *** 155,161 $(CC) $(CFLAGS) -c checknews.c vnews: $(VOBJECTS) ! $(CC) $(LFLAGS) $(VOBJECTS) -ltermlib $(LIBS) -o $@ visual.o: visual.c rparams.h defs.h params.h ndir.h header.h $(CC) $(CFLAGS) -c visual.c --- 155,161 ----- $(CC) $(CFLAGS) -c checknews.c vnews: $(VOBJECTS) ! $(CC) $(LFLAGS) $(VOBJECTS) -ltermcap $(LIBS) -o $@ visual.o: visual.c rparams.h defs.h params.h ndir.h header.h $(CC) $(CFLAGS) -c visual.c *************** *** 194,200 compress: compress.c $(CC) -o compress compress.c ! recmail: recmail.c defs.h params.h header.h $(CC) $(CFLAGS) -s recmail.c -o recmail process.o: process.c rparams.h defs.h params.h header.h --- 194,200 ----- compress: compress.c $(CC) -o compress compress.c ! recmail: recmail.c $(CC) $(CFLAGS) -s recmail.c -o recmail process.o: process.c rparams.h defs.h params.h header.h *************** *** 228,235 sendnews.o: sendnews.c defs.h $(CC) $(CFLAGS) -c sendnews.c ! fullname.o: defs.h params.h header.h ! $(CC) $(CFLAGS) -c fullname.c expire: Makefile $(EXPOBJS) $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) --- 228,234 ----- sendnews.o: sendnews.c defs.h $(CC) $(CFLAGS) -c sendnews.c ! fullname.o: defs.h expire: Makefile $(EXPOBJS) $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) diff -c -b NEW/Makefile.v7 OLD/Makefile.v7 *** NEW/Makefile.v7 Mon Sep 17 19:26:56 1984 --- OLD/Makefile.v7 Tue Sep 18 16:41:56 1984 *************** *** 1,4 ! # @(#)Makefile.v7 2.28 9/17/84 # Makefile for V7, 4.1BSD, and other Research V7 based systems # definitions --- 1,4 ----- ! # @(#)Makefile.v7 2.26 9/3/84 # Makefile for V7, 4.1BSD, and other Research V7 based systems # definitions *************** *** 38,44 process.o rpathinit.o digest.o $(OBJECTS) VOBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o process.o rpathinit.o \ $(OBJECTS) visual.o virtterm.o ! EXPOBJS= expire.o header.o funcs.o getdate.o iextern.o epathinit.o \ funcs2.o ndir.o $(MISC) SRCS = funcs.c funcs2.c header.c --- 38,44 ----- process.o rpathinit.o digest.o $(OBJECTS) VOBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o process.o rpathinit.o \ $(OBJECTS) visual.o virtterm.o ! EXPOBJS= expire.o header.o funcs.o getdate.o rextern.o epathinit.o \ funcs2.o ndir.o $(MISC) SRCS = funcs.c funcs2.c header.c *************** *** 48,54 digest.c $(SRCS) VSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c process.c $(SRCS) \ visual.c virtterm.c ! EXPSRCS = expire.c header.c funcs.c getdate.c iextern.c \ funcs2.c OSRCS = uurec.c recnews.c sendnews.c batch.c unbatch.c caesar.c \ recmail.c compress.c --- 48,54 ----- digest.c $(SRCS) VSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c process.c $(SRCS) \ visual.c virtterm.c ! EXPSRCS = expire.c header.c funcs.c getdate.c rextern.c \ funcs2.c OSRCS = uurec.c recnews.c sendnews.c batch.c unbatch.c caesar.c \ recmail.c compress.c *************** *** 133,139 postnews: Makefile $(POBJECTS) $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews ! postnews.o: postnews.c defs.h params.h header.h $(CC) $(CFLAGS) -c postnews.c readnews.o: readnews.c rparams.h defs.h params.h header.h --- 133,139 ----- postnews: Makefile $(POBJECTS) $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews ! postnews.o: postnews.c defs.h $(CC) $(CFLAGS) -c postnews.c readnews.o: readnews.c rparams.h defs.h params.h header.h *************** *** 155,161 $(CC) $(CFLAGS) -c checknews.c vnews: $(VOBJECTS) ! $(CC) $(LFLAGS) $(VOBJECTS) -ltermlib $(LIBS) -o $@ visual.o: visual.c rparams.h defs.h params.h ndir.h header.h $(CC) $(CFLAGS) -c visual.c --- 155,161 ----- $(CC) $(CFLAGS) -c checknews.c vnews: $(VOBJECTS) ! $(CC) $(LFLAGS) $(VOBJECTS) -ltermcap $(LIBS) -o $@ visual.o: visual.c rparams.h defs.h params.h ndir.h header.h $(CC) $(CFLAGS) -c visual.c *************** *** 194,200 compress: compress.c $(CC) -o compress compress.c ! recmail: recmail.c defs.h params.h header.h $(CC) $(CFLAGS) -s recmail.c -o recmail process.o: process.c rparams.h defs.h params.h header.h --- 194,200 ----- compress: compress.c $(CC) -o compress compress.c ! recmail: recmail.c $(CC) $(CFLAGS) -s recmail.c -o recmail process.o: process.c rparams.h defs.h params.h header.h *************** *** 228,235 sendnews.o: sendnews.c defs.h $(CC) $(CFLAGS) -c sendnews.c ! fullname.o: defs.h params.h header.h ! $(CC) $(CFLAGS) -c fullname.c expire: Makefile $(EXPOBJS) $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) --- 228,234 ----- sendnews.o: sendnews.c defs.h $(CC) $(CFLAGS) -c sendnews.c ! fullname.o: defs.h expire: Makefile $(EXPOBJS) $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) diff -c -b NEW/compress.c OLD/compress.c *** NEW/compress.c Wed Sep 12 21:32:03 1984 --- OLD/compress.c Tue Sep 18 16:43:08 1984 *************** *** 21,27 * */ #ifndef lint ! static char *SccsId = "@(#)compress.c 1.6 9/12/84"; #endif !lint #include <stdio.h> --- 21,27 ----- * */ #ifndef lint ! static char *SccsId = "@(#)compress.c 1.5 9/4/84"; #endif !lint #include <stdio.h> *************** *** 160,166 zcat_flg = 1; } ! #ifdef BSD4_2 /* 4.2BSD dependent - take it out if not */ setlinebuf( stderr ); #endif BSD4_2 --- 160,166 ----- zcat_flg = 1; } ! #ifdef BSD42 /* 4.2BSD dependent - take it out if not */ setlinebuf( stderr ); #endif BSD42 *************** *** 163,169 #ifdef BSD4_2 /* 4.2BSD dependent - take it out if not */ setlinebuf( stderr ); ! #endif BSD4_2 /* Argument Processing * All flags are optional. --- 163,169 ----- #ifdef BSD42 /* 4.2BSD dependent - take it out if not */ setlinebuf( stderr ); ! #endif BSD42 /* Argument Processing * All flags are optional. *************** *** 278,284 } /* Generate output filename */ strcpy(ofname, *fileptr); ! #ifndef BSD4_2 /* Short filenames */ if ((cp=rindex(ofname,'/')) != NULL) cp++; else cp = ofname; if (strlen(cp) > 12) { --- 278,284 ----- } /* Generate output filename */ strcpy(ofname, *fileptr); ! #ifndef BSD42 /* Short filenames */ if ((cp=rindex(ofname,'/')) != NULL) cp++; else cp = ofname; if (strlen(cp) > 12) { *************** *** 285,291 fprintf(stderr,"%s: filename too long to tack on .Z\n",cp); continue; } ! #endif BSD4_2 /* Long filenames allowed */ strcat(ofname, ".Z"); } /* Check for overwrite of existing file */ --- 285,291 ----- fprintf(stderr,"%s: filename too long to tack on .Z\n",cp); continue; } ! #endif BSD42 /* Long filenames allowed */ strcat(ofname, ".Z"); } /* Check for overwrite of existing file */ diff -c -b NEW/control.c OLD/control.c *** NEW/control.c Wed Sep 12 21:31:21 1984 --- OLD/control.c Tue Sep 18 16:46:01 1984 *************** *** 6,12 */ #ifndef lint ! static char *SccsId = "@(#)control.c 2.30 9/12/84"; #endif !lint #include "iparams.h" --- 6,12 ----- */ #ifndef lint ! static char *SccsId = "@(#)control.c 2.29 9/3/84"; #endif !lint #include "iparams.h" *************** *** 26,38 { register char *ctlmsgtext; ! if (strncmp(h->title, "cmsg ", 5) == 0) { ! register char *cp1, *cp2; ! cp1 = h->title; ! cp2 = h->title + 5; ! while(*cp1++ = *cp2++) ! ; ! } if (*h->ctlmsg) ctlmsgtext = h->ctlmsg; --- 26,33 ----- { register char *ctlmsgtext; ! if (strncmp(h->title, "cmsg ", 5) == 0) ! strcpy(h->title, h->title+5); if (*h->ctlmsg) ctlmsgtext = h->ctlmsg; *************** *** 118,126 char **argv; { char tl[256], ng[256]; - #ifdef u370 - static struct hbuf htmp; - #else !u370 struct hbuf htmp; #endif !u370 --- 113,118 ----- char **argv; { char tl[256], ng[256]; struct hbuf htmp; if (argc < 2) *************** *** 122,128 static struct hbuf htmp; #else !u370 struct hbuf htmp; - #endif !u370 if (argc < 2) xerror("ihave: Not enough arguments."); --- 114,119 ----- { char tl[256], ng[256]; struct hbuf htmp; if (argc < 2) xerror("ihave: Not enough arguments."); *************** *** 147,152 c_sendme(argc, argv) char **argv; { int i; FILE *fp; struct srec srec; --- 138,144 ----- c_sendme(argc, argv) char **argv; { + struct srec srec; int i; FILE *fp; struct hbuf h; *************** *** 149,158 { int i; FILE *fp; - struct srec srec; - #ifdef u370 - static struct hbuf h; - #else !u370 struct hbuf h; #endif !u370 --- 141,146 ----- struct srec srec; int i; FILE *fp; struct hbuf h; if (argc < 2) *************** *** 154,160 static struct hbuf h; #else !u370 struct hbuf h; - #endif !u370 if (argc < 2) xerror("sendme: Not enough arguments."); --- 142,147 ----- int i; FILE *fp; struct hbuf h; if (argc < 2) xerror("sendme: Not enough arguments."); *************** *** 234,239 char **argv; { FILE *fd; #ifndef MANUALLY int rc; #endif MANUALLY --- 221,228 ----- char **argv; { FILE *fd; + char *groupname; + char groupdir[128]; #ifndef MANUALLY int rc; #endif MANUALLY *************** *** 240,247 if (argc < 1) xerror("rmgroup: Not enough arguments."); ! if (!validng(argv[1])) ! return; #ifdef NOTIFY fd = mailhdr((struct hbuf *)NULL, "rmgroup control message"); --- 229,238 ----- if (argc < 1) xerror("rmgroup: Not enough arguments."); ! groupname = argv[1]; ! verifyname(groupname); ! if (groupname[0] == '.' || groupname[0] <= ' ') ! xerror("Illegal group name in rmgroup"); strcpy(groupdir, dirname(groupname)); if (access(groupdir, 0)) { *************** *** 243,248 if (!validng(argv[1])) return; #ifdef NOTIFY fd = mailhdr((struct hbuf *)NULL, "rmgroup control message"); if (fd != NULL) { --- 234,249 ----- if (groupname[0] == '.' || groupname[0] <= ' ') xerror("Illegal group name in rmgroup"); + strcpy(groupdir, dirname(groupname)); + if (access(groupdir, 0)) { + /* + * If the group already is gone, it's a nonfatal error - we + * want to propagate the message anyway, since what probably + * happened is somebody locally already removed it. + */ + log("Cannot remove newsgroup '%s'", groupname); + return; + } #ifdef NOTIFY fd = mailhdr((struct hbuf *)NULL, "rmgroup control message"); if (fd != NULL) { *************** *** 265,271 #ifndef MANUALLY /* We let the shell do all the work. See the rmgrp shell script. */ setuid(geteuid()); /* otherwise it won't rmdir the dir */ ! sprintf(bfr, "exec %s/rmgroup %s", LIB, argv[1]); rc = system(bfr); log("system(%s) status %d", bfr, rc); #endif --- 266,272 ----- #ifndef MANUALLY /* We let the shell do all the work. See the rmgrp shell script. */ setuid(geteuid()); /* otherwise it won't rmdir the dir */ ! sprintf(bfr, "exec %s/rmgroup %s", LIB, groupname); rc = system(bfr); log("system(%s) status %d", bfr, rc); #endif *************** *** 513,521 xmitmsg(tosys, title, ng) char *tosys, *title, *ng; { - #ifdef u370 - static struct hbuf h; - #else !u370 struct hbuf h; #endif !u370 struct srec srec; --- 514,519 ----- xmitmsg(tosys, title, ng) char *tosys, *title, *ng; { struct hbuf h; struct srec srec; FILE *tfp; *************** *** 517,523 static struct hbuf h; #else !u370 struct hbuf h; - #endif !u370 struct srec srec; FILE *tfp; char *fname; --- 515,520 ----- char *tosys, *title, *ng; { struct hbuf h; struct srec srec; FILE *tfp; char *fname; *************** *** 556,561 * forking off a shell, you get a bare process. You must have exactly * one argument, and the command must be mail. */ #define RDR 0 #define WTR 1 static int mopen_pid[20]; --- 553,560 ----- * forking off a shell, you get a bare process. You must have exactly * one argument, and the command must be mail. */ + #include <stdio.h> + #include <signal.h> #define RDR 0 #define WTR 1 static int mopen_pid[20]; diff -c -b NEW/defs.dist OLD/defs.dist *** NEW/defs.dist Mon Sep 17 19:26:51 1984 --- OLD/defs.dist Tue Sep 18 16:47:56 1984 *************** *** 10,16 * to be news_version below. */ ! /* @(#)defs.dist 2.38 9/18/84 */ #define NEWS_VERSION "B 2.10.2 9/18/84" --- 10,16 ----- * to be news_version below. */ ! /* @(#)defs.dist 2.35 9/5/84 */ #define NEWS_VERSION "B 2.10.2 9/5/84" *************** *** 12,18 /* @(#)defs.dist 2.37 9/17/84 */ ! #define NEWS_VERSION "B 2.10.2 9/17/84" #define DAYS (60L*60L*24L) #define WEEKS (7*DAYS) --- 12,18 ----- /* @(#)defs.dist 2.35 9/5/84 */ ! #define NEWS_VERSION "B 2.10.2 9/5/84" #define DAYS (60L*60L*24L) #define WEEKS (7*DAYS) diff -c -b NEW/expire.c OLD/expire.c *** NEW/expire.c Wed Sep 12 21:30:21 1984 --- OLD/expire.c Tue Sep 18 16:43:46 1984 *************** *** 5,11 */ #ifndef lint ! static char *SccsId = "@(#)expire.c 2.32 9/12/84"; #endif lint #include "params.h" --- 5,11 ----- */ #ifndef lint ! static char *SccsId = "@(#)expire.c 2.31 9/3/84"; #endif lint #include "params.h" *************** *** 21,26 /* Number of array entries to allocate at a time. */ #define SPACE_INCREMENT 1000 extern int errno; char NARTFILE[BUFSIZ], OARTFILE[BUFSIZ]; char PAGFILE[BUFLEN], DIRFILE[BUFLEN]; --- 21,27 ----- /* Number of array entries to allocate at a time. */ #define SPACE_INCREMENT 1000 + extern char groupdir[BUFSIZ], rcbuf[BUFLEN]; extern int errno; char NARTFILE[BUFSIZ], OARTFILE[BUFSIZ]; char PAGFILE[BUFLEN], DIRFILE[BUFLEN]; *************** *** 34,41 int usepost = 0; int frflag = 0; int updateactive = 0; ! char baduser[BUFLEN]; ! extern char filename[], nbuf[]; /* * This code uses realloc to get more of the multhist array. --- 35,41 ----- int usepost = 0; int frflag = 0; int updateactive = 0; ! char baduser[BUFLEN], filename[BUFLEN]; /* * This code uses realloc to get more of the multhist array. *************** *** 60,68 struct passwd *pw; struct group *gp; char arpat[LBUFLEN]; - char ngpat[LBUFLEN]; - char afline[BUFLEN]; - struct hbuf h; main(argc, argv) int argc; --- 60,65 ----- struct passwd *pw; struct group *gp; char arpat[LBUFLEN]; main(argc, argv) int argc; *************** *** 69,74 char **argv; { register FILE *fp = NULL; register time_t now, newtime; char *p1, *p2, *p3; FILE *ohfd, *nhfd; --- 66,72 ----- char **argv; { register FILE *fp = NULL; + struct hbuf h; register time_t now, newtime; char ngpat[LBUFLEN]; char afline[BUFLEN]; *************** *** 70,75 { register FILE *fp = NULL; register time_t now, newtime; char *p1, *p2, *p3; FILE *ohfd, *nhfd; DIR *ngdirp = NULL; --- 68,75 ----- register FILE *fp = NULL; struct hbuf h; register time_t now, newtime; + char ngpat[LBUFLEN]; + char afline[BUFLEN]; char *p1, *p2, *p3; FILE *ohfd, *nhfd; DIR *ngdirp; *************** *** 72,78 register time_t now, newtime; char *p1, *p2, *p3; FILE *ohfd, *nhfd; ! DIR *ngdirp = NULL; static struct direct *ngdir; char fn[BUFLEN]; int uid, gid, duid, dgid; --- 72,78 ----- char afline[BUFLEN]; char *p1, *p2, *p3; FILE *ohfd, *nhfd; ! DIR *ngdirp; static struct direct *ngdir; char fn[BUFLEN]; int uid, gid, duid, dgid; *************** *** 262,269 closedir(ngdirp); if (fgets(afline, BUFLEN, ohfd) == NULL) goto out; ! strcpy(nbuf, afline); ! p1 = index(nbuf, ' '); if (p1 == NULL) p1 = index(nbuf, '\n'); if (p1 != NULL) --- 262,269 ----- closedir(ngdirp); if (fgets(afline, BUFLEN, ohfd) == NULL) goto out; ! strcpy(groupdir, afline); ! p1 = index(groupdir, ' '); if (p1 == NULL) p1 = index(groupdir, '\n'); if (p1 != NULL) *************** *** 265,271 strcpy(nbuf, afline); p1 = index(nbuf, ' '); if (p1 == NULL) ! p1 = index(nbuf, '\n'); if (p1 != NULL) *p1 = NULL; if (!ngmatch(nbuf, ngpat)) --- 265,271 ----- strcpy(groupdir, afline); p1 = index(groupdir, ' '); if (p1 == NULL) ! p1 = index(groupdir, '\n'); if (p1 != NULL) *p1 = NULL; if (!ngmatch(groupdir, ngpat)) *************** *** 268,274 p1 = index(nbuf, '\n'); if (p1 != NULL) *p1 = NULL; ! if (!ngmatch(nbuf, ngpat)) continue; /* Change a group name from --- 268,274 ----- p1 = index(groupdir, '\n'); if (p1 != NULL) *p1 = NULL; ! if (!ngmatch(groupdir, ngpat)) continue; /* Change a group name from *************** *** 273,279 /* Change a group name from a.b.c to a/b/c */ ! for (p1=nbuf; *p1; p1++) if (*p1 == '.') *p1 = '/'; --- 273,279 ----- /* Change a group name from a.b.c to a/b/c */ ! for (p1=groupdir; *p1; p1++) if (*p1 == '.') *p1 = '/'; *************** *** 277,283 if (*p1 == '.') *p1 = '/'; ! if ((ngdirp = opendir(nbuf)) == NULL) continue; } --- 277,283 ----- if (*p1 == '.') *p1 = '/'; ! if ((ngdirp = opendir(groupdir)) == NULL) continue; } *************** *** 283,289 } ngdir = readdir(ngdirp); /* Continue looking if not an article. */ ! } while ( ngdir == NULL || !islegal(fn,nbuf,ngdir->d_name)); p2 = fn; if (verbose > 2) --- 283,289 ----- } ngdir = readdir(ngdirp); /* Continue looking if not an article. */ ! } while ( ngdir == NULL || !islegal(fn,groupdir,ngdir->d_name)); p2 = fn; if (verbose > 2) *************** *** 301,308 if (!p2) continue; p2++; ! strcpy(nbuf, p2); ! p3 = index(nbuf, '/'); if (p3) *p3 = 0; else { --- 301,308 ----- if (!p2) continue; p2++; ! strcpy(groupdir, p2); ! p3 = index(groupdir, '/'); if (p3) *p3 = 0; else { *************** *** 316,322 strcpy(h.recdate, p1+1); goto checkdate; } ! if (!ngmatch(nbuf, ngpat)) { fputs(afline, nhfd); *p1 = 0; remember(afline); --- 316,322 ----- strcpy(h.recdate, p1+1); goto checkdate; } ! if (!ngmatch(groupdir, ngpat)) { fputs(afline, nhfd); *p1 = 0; remember(afline); *************** *** 437,443 if (!dorebuild) remember(h.ident); if (verbose > 2) ! printf("Good article %s\n", h.ident); } } --- 437,443 ----- if (!dorebuild) remember(h.ident); if (verbose > 2) ! printf("Good article %s\n", rcbuf); } } *************** *** 512,518 if (fgets(afline, BUFLEN, ohfd) == NULL) continue; ! if (sscanf(afline,"%s %ld %ld %c",nbuf,&maxart, &minart, &cansub) < 4) xerror("Active file corrupt"); minart = maxart > 0 ? maxart : 1L; --- 512,518 ----- if (fgets(afline, BUFLEN, ohfd) == NULL) continue; ! if (sscanf(afline,"%s %ld %ld %c",groupdir,&maxart, &minart, &cansub) < 4) xerror("Active file corrupt"); minart = maxart > 0 ? maxart : 1L; *************** *** 518,524 minart = maxart > 0 ? maxart : 1L; /* Change a group name from a.b.c to a/b/c */ ! for (p1=nbuf; *p1; p1++) if (*p1 == '.') *p1 = '/'; --- 518,524 ----- minart = maxart > 0 ? maxart : 1L; /* Change a group name from a.b.c to a/b/c */ ! for (p1=groupdir; *p1; p1++) if (*p1 == '.') *p1 = '/'; *************** *** 522,529 if (*p1 == '.') *p1 = '/'; ! gdsize = strlen(nbuf); ! if ((ngdirp = opendir(nbuf)) != NULL) { while (ngdir = readdir(ngdirp)) { nbuf[gdsize] = '/'; strcpy(&nbuf[gdsize+1], ngdir->d_name); --- 522,529 ----- if (*p1 == '.') *p1 = '/'; ! gdsize = strlen(groupdir); ! if ((ngdirp = opendir(groupdir)) != NULL) { while (ngdir = readdir(ngdirp)) { groupdir[gdsize] = '/'; strcpy(&groupdir[gdsize+1],ngdir->d_name); *************** *** 525,532 gdsize = strlen(nbuf); if ((ngdirp = opendir(nbuf)) != NULL) { while (ngdir = readdir(ngdirp)) { ! nbuf[gdsize] = '/'; ! strcpy(&nbuf[gdsize+1], ngdir->d_name); /* We have to do a stat because of micro.6809 */ if (stat(nbuf, &stbuf) < 0 || !(stbuf.st_mode&S_IFREG) ) --- 525,532 ----- gdsize = strlen(groupdir); if ((ngdirp = opendir(groupdir)) != NULL) { while (ngdir = readdir(ngdirp)) { ! groupdir[gdsize] = '/'; ! strcpy(&groupdir[gdsize+1],ngdir->d_name); /* We have to do a stat because of micro.6809 */ if (stat(groupdir,&stbuf) < 0 || !(stbuf.st_mode&S_IFREG) ) *************** *** 528,534 nbuf[gdsize] = '/'; strcpy(&nbuf[gdsize+1], ngdir->d_name); /* We have to do a stat because of micro.6809 */ ! if (stat(nbuf, &stbuf) < 0 || !(stbuf.st_mode&S_IFREG) ) continue; n = atol(ngdir->d_name); --- 528,534 ----- groupdir[gdsize] = '/'; strcpy(&groupdir[gdsize+1],ngdir->d_name); /* We have to do a stat because of micro.6809 */ ! if (stat(groupdir,&stbuf) < 0 || !(stbuf.st_mode&S_IFREG) ) continue; n = atol(ngdir->d_name); diff -c -b NEW/fullname.c OLD/fullname.c *** NEW/fullname.c Mon Sep 17 19:26:47 1984 --- OLD/fullname.c Tue Sep 18 16:44:11 1984 *************** *** 14,20 */ #ifndef lint ! static char *SccsId = "@(#)fullname.c 1.8 9/17/84"; #endif !lint #include "params.h" --- 14,20 ----- */ #ifndef lint ! static char *SccsId = "@(#)fullname.c 1.7 8/14/84"; #endif !lint #include <stdio.h> *************** *** 17,23 static char *SccsId = "@(#)fullname.c 1.8 9/17/84"; #endif !lint ! #include "params.h" #ifndef LOCALNAME /* --- 17,29 ----- static char *SccsId = "@(#)fullname.c 1.7 8/14/84"; #endif !lint ! #include <stdio.h> ! #include <ctype.h> ! #include <pwd.h> ! #ifdef USG ! struct passwd *getpwent(), *getpwuid(), *getpwnam(); ! #endif USG ! #include "defs.h" #ifndef LOCALNAME /* *************** *** 28,34 fullname(un) char *un; { ! static char inbuf[BUFLEN]; struct passwd *pw; pw = getpwnam(un); --- 34,40 ----- fullname(un) char *un; { ! static char inbuf[100]; struct passwd *pw; pw = getpwnam(un); *************** *** 51,58 fullname(un) char *un; { ! static char inbuf[BUFLEN]; ! char fbuf[BUFLEN]; FILE *fd; char *p, *index(), *getenv(); int pid; --- 57,64 ----- fullname(un) char *un; { ! static char inbuf[100]; ! char fbuf[100]; FILE *fd; char *p, *index(), *getenv(); int pid; diff -c -b NEW/funcs.c OLD/funcs.c *** NEW/funcs.c Wed Sep 12 21:29:22 1984 --- OLD/funcs.c Tue Sep 18 16:45:06 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)funcs.c 2.20 9/12/84"; #endif !lint #include "params.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)funcs.c 2.19 8/28/84"; #endif !lint #include "params.h" *************** *** 12,19 #include <fcntl.h> #endif !v7 - extern char *Progname; - /* * Append NGDELIM to string. */ --- 12,17 ----- #include <fcntl.h> #endif !v7 /* * Append NGDELIM to string. */ *************** *** 354,359 int arg1, arg2, arg3; { char buffer[128]; fflush(stdout); sprintf(buffer, message, arg1, arg2, arg3); --- 352,358 ----- int arg1, arg2, arg3; { char buffer[128]; + extern char *Progname; fflush(stdout); sprintf(buffer, message, arg1, arg2, arg3); diff -c -b NEW/iextern.c OLD/iextern.c *** NEW/iextern.c Wed Sep 12 21:29:06 1984 --- OLD/iextern.c Tue Sep 18 16:43:11 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)iextern.c 2.12 9/12/84"; #endif !lint #include "iparams.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)iextern.c 2.11 8/28/84"; #endif !lint #include "iparams.h" *************** *** 16,22 struct hbuf header; /* general-use header structure */ char bfr[LBUFLEN]; /* general-use scratch area */ char nbuf[LBUFLEN]; /* local newsgroup buffer */ ! char filename[BUFLEN]; /* general-use file name */ #ifndef ROOTID int ROOTID; /* special users id # */ --- 16,22 ----- struct hbuf header; /* general-use header structure */ char bfr[LBUFLEN]; /* general-use scratch area */ char nbuf[LBUFLEN]; /* local newsgroup buffer */ ! char filename[NAMELEN]; /* general-use file name */ #ifndef ROOTID int ROOTID; /* special users id # */ diff -c -b NEW/ifuncs.c OLD/ifuncs.c *** NEW/ifuncs.c Wed Sep 12 21:28:59 1984 --- OLD/ifuncs.c Tue Sep 18 16:45:39 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)ifuncs.c 2.35 9/12/84"; #endif !lint #include "iparams.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)ifuncs.c 2.33 9/3/84"; #endif !lint #include "iparams.h" *************** *** 64,71 } if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || ! ngmatch(h.distribution, srec.s_nbuf) || ! ngmatch(h.nbuf, h.distribution)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { if (nsent) strcat(sentbuf, ", "); --- 64,70 ----- } if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || ! ngmatch(h.distribution, srec.s_nbuf)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { if (nsent) strcat(sentbuf, ", "); *************** *** 364,370 sprintf(sfname, "%s/%s", userhome, PARTIAL); if ((tofd = fopen(sfname, "a")) == NULL) ! xerror("Cannot save partial news in %s", sfname); time(&tim); fprintf(tofd, "----- News saved at %s\n", arpadate(&tim)); while ((c = getc(fromfd)) != EOF) --- 363,369 ----- sprintf(sfname, "%s/%s", userhome, PARTIAL); if ((tofd = fopen(sfname, "a")) == NULL) ! xerror("Cannot save partial news"); time(&tim); fprintf(tofd, "----- News saved at %s\n", arpadate(&tim)); while ((c = getc(fromfd)) != EOF) *************** *** 491,497 register char *s1, *s2; register FILE *f; register char *os1; - int ngroups = 1; char tbuf[BUFLEN], ngcheck[AFSIZ]; f = xfopen(ACTIVE, "r"); --- 490,495 ----- register char *s1, *s2; register FILE *f; register char *os1; char tbuf[BUFLEN], ngcheck[AFSIZ]; f = xfopen(ACTIVE, "r"); *************** *** 525,531 /* there shouldn't be blanks, but give the jerk a break */ if (*s1 == NGDELIM || *s1 == ' ') { *s2++ = '\0'; - ngroups++; while (*++s1 == NGDELIM || *s1 == ' ') ; /* remove extra commas */ } else --- 523,528 ----- /* there shouldn't be blanks, but give the jerk a break */ if (*s1 == NGDELIM || *s1 == ' ') { *s2++ = '\0'; while (*++s1 == NGDELIM || *s1 == ' ') ; /* remove extra commas */ } else *************** *** 587,593 /* check for local only distribution on incoming newsgroups. This might occur if someone posted to general,net.unix */ ! if(isproc && ngroups > 1 && index(os1, '.') == NULL) { logerr("Local group '%s' removed", os1); tbufcpy(os1, s1); s1 = os1; --- 584,590 ----- /* check for local only distribution on incoming newsgroups. This might occur if someone posted to general,net.unix */ ! if(isproc && index(os1, '.') == NULL) { logerr("Local group '%s' removed", os1); tbufcpy(os1, s1); s1 = os1; *************** *** 650,657 struct hbuf *hp; char *logname; { ! register char *fn, *p; ! char buf[BUFLEN]; char *fullname(), *getenv(); int fd; --- 647,655 ----- struct hbuf *hp; char *logname; { ! char *fn; ! static char buf[100]; ! char buf2[100]; char *fullname(), *getenv(); char *p; int fd; *************** *** 653,658 register char *fn, *p; char buf[BUFLEN]; char *fullname(), *getenv(); int fd; fn = getenv("NAME"); --- 651,657 ----- static char buf[100]; char buf2[100]; char *fullname(), *getenv(); + char *p; int fd; fn = getenv("NAME"); *************** *** 658,664 fn = getenv("NAME"); if (fn == NULL) { ! sprintf(buf, "%s/%s", userhome, ".name"); fd = open(buf, 0); if (fd >= 0) { read(fd, buf, sizeof buf); --- 657,663 ----- fn = getenv("NAME"); if (fn == NULL) { ! sprintf(buf, "%s/%s", getenv("HOME"), ".name"); fd = open(buf, 0); if (fd >= 0) { read(fd, buf2, sizeof buf2); *************** *** 661,667 sprintf(buf, "%s/%s", userhome, ".name"); fd = open(buf, 0); if (fd >= 0) { ! read(fd, buf, sizeof buf); close(fd); if (buf[0] >= 'A') { fn = buf; --- 660,666 ----- sprintf(buf, "%s/%s", getenv("HOME"), ".name"); fd = open(buf, 0); if (fd >= 0) { ! read(fd, buf2, sizeof buf2); close(fd); if (buf2[0] >= 'A') fn = buf2; *************** *** 663,670 if (fd >= 0) { read(fd, buf, sizeof buf); close(fd); ! if (buf[0] >= 'A') { ! fn = buf; for (p=fn; *p; p++) if (*p < ' ') *p = '\0'; --- 662,669 ----- if (fd >= 0) { read(fd, buf2, sizeof buf2); close(fd); ! if (buf2[0] >= 'A') ! fn = buf2; for (p=fn; *p; p++) if (*p < ' ') *p = 0; *************** *** 667,674 fn = buf; for (p=fn; *p; p++) if (*p < ' ') ! *p = '\0'; ! } } } --- 666,672 ----- fn = buf2; for (p=fn; *p; p++) if (*p < ' ') ! *p = 0; } } diff -c -b NEW/makeactive.sh OLD/makeactive.sh *** NEW/makeactive.sh Mon Sep 17 19:26:41 1984 --- OLD/makeactive.sh Tue Sep 18 16:43:45 1984 *************** *** 1,6 : "Create active file and newsgroup hierarchy for new machine" : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" ! : '@(#)makeactive 1.10 9/17/84' LIBDIR=$1 SPOOLDIR=$2 NEWSUSR=$3 --- 1,6 ----- : "Create active file and newsgroup hierarchy for new machine" : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" ! : '@(#)makeactive 1.9 9/4/84' LIBDIR=$1 SPOOLDIR=$2 NEWSUSR=$3 *************** *** 228,234 *) echo Active file is in unrecognized format. Not upgraded.;; esac fi ! if test $# -eq 3 -o $# -eq 2 then (sed '/^!net/!d s/^!// --- 228,234 ----- *) echo Active file is in unrecognized format. Not upgraded.;; esac fi ! if test $# -eq 3 -o $3 -eq -2 then (sed '/^!net/!d s/^!// diff -c -b NEW/postnews.c OLD/postnews.c *** NEW/postnews.c Tue Sep 18 19:05:12 1984 --- OLD/postnews.c Tue Sep 18 16:50:41 1984 *************** *** 5,11 */ #ifndef lint ! static char *SccsId = "@(#)postnews.c 1.16 9/18/84"; #endif !lint #include "params.h" --- 5,11 ----- */ #ifndef lint ! static char *SccsId = "@(#)postnews.c 1.13 9/5/84"; #endif !lint #include <stdio.h> *************** *** 8,14 static char *SccsId = "@(#)postnews.c 1.16 9/18/84"; #endif !lint ! #include "params.h" char tempfname[50]; /* file name used for making article */ char original[BUFLEN]; /* file name of original, used in followup */ --- 8,23 ----- static char *SccsId = "@(#)postnews.c 1.13 9/5/84"; #endif !lint ! #include <stdio.h> ! #include <ctype.h> ! #include <sys/types.h> ! #include <sys/stat.h> ! #include <pwd.h> ! #ifdef USG ! struct passwd *getpwent(), *getpwuid(), *getpwnam(); ! #endif USG ! #include "defs.h" ! #define ARCHIVES_DEF "NEWSARCHIVE" char tempfname[50]; /* file name used for making article */ char original[BUFLEN]; /* file name of original, used in followup */ *************** *** 103,109 edit_article(); post_checks(); - if(ccname[0]) save_article(); post_article(); } --- 112,117 ----- edit_article(); post_checks(); save_article(); post_article(); } *************** *** 375,380 time_t timenow, time(); char *today, *ctime(); in = xfopen(tempfname, "r"); out = xfopen(ccname, "a"); timenow = time((time_t)0); --- 383,389 ----- time_t timenow, time(); char *today, *ctime(); + in = xfopen(tempfname, "r"); out = xfopen(ccname, "a"); timenow = time((time_t)0); *************** *** 441,447 strcpy(homedir, p); ! p = getenv("NEWSARCHIVE"); if (p == NULL) sprintf(ccname, "%s/author_copy", homedir); else --- 450,456 ----- strcpy(homedir, p); ! p = getenv(ARCHIVES_DEF); if (p == NULL) sprintf(ccname, "%s/author_copy", homedir); else *************** *** 647,654 register char *baseart; { /* subject */ ! if (article_line(baseart, "Subject: ", buf)) { ! if (!prefix(buf+9, "Re:")) sprintf(subject, "Re: %s", buf+9); else strcpy(subject, buf+9); --- 656,662 ----- register char *baseart; { /* subject */ ! if (article_line(baseart, "Subject: ", buf)) sprintf(subject, "Re: %s", buf+9); else strcpy(subject, "Re: orphan response"); *************** *** 651,658 if (!prefix(buf+9, "Re:")) sprintf(subject, "Re: %s", buf+9); else - strcpy(subject, buf+9); - } else strcpy(subject, "Re: orphan response"); /* newsgroup */ --- 659,664 ----- if (article_line(baseart, "Subject: ", buf)) sprintf(subject, "Re: %s", buf+9); else strcpy(subject, "Re: orphan response"); /* newsgroup */ diff -c -b NEW/process.c OLD/process.c *** NEW/process.c Tue Sep 18 19:05:02 1984 --- OLD/process.c Tue Sep 18 16:40:53 1984 *************** *** 2,10 * process - process options for readnews */ ! #ifndef lint ! static char *SccsId = "@(#)process.c 2.10 9/18/84"; ! #endif !lint #include "rparams.h" --- 2,8 ----- * process - process options for readnews */ ! static char *SccsId = "@(#)process.c 2.9 4/20/84"; #include "rparams.h" *************** *** 23,29 's', NGDELIM, FALSE, STRING, ANY, UNKNOWN,header.nbuf, 'x', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'h', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, - #ifdef TMAIL 'M', '\0', FALSE, OPTION, UNKNOWN, MAIL, (char *)NULL, #else !TMAIL '\377', '\0', FALSE, OPTION, UNKNOWN, UNKNOWN,(char *)NULL, --- 21,26 ----- 's', NGDELIM, FALSE, STRING, ANY, UNKNOWN,header.nbuf, 'x', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'h', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'M', '\0', FALSE, OPTION, UNKNOWN, MAIL, (char *)NULL, 'f', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'u', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, *************** *** 25,33 'h', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, #ifdef TMAIL 'M', '\0', FALSE, OPTION, UNKNOWN, MAIL, (char *)NULL, - #else !TMAIL - '\377', '\0', FALSE, OPTION, UNKNOWN, UNKNOWN,(char *)NULL, - #endif !TMAIL 'f', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'u', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'e', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, --- 22,27 ----- 'x', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'h', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'M', '\0', FALSE, OPTION, UNKNOWN, MAIL, (char *)NULL, 'f', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'u', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, 'e', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, *************** *** 57,63 goto found; } /* unknown option letter */ - #ifdef TMAIL fprintf(stderr, "Usage: readnews [ -a [ date ]] [ -n newsgroups ] [ -t titles ] [ -lprxhfuM ]\n"); #else !TMAIL fprintf(stderr, "Usage: readnews [ -a [ date ]] [ -n newsgroups ] [ -t titles ] [ -lprxhfu ]\n"); --- 51,56 ----- goto found; } /* unknown option letter */ fprintf(stderr, "Usage: readnews [ -a [ date ]] [ -n newsgroups ] [ -t titles ] [ -lprxhfuM ]\n"); fprintf(stderr, "\t[ -c [ ``mailer'' ]]\n\n"); fprintf(stderr, " readnews -s\n"); *************** *** 59,67 /* unknown option letter */ #ifdef TMAIL fprintf(stderr, "Usage: readnews [ -a [ date ]] [ -n newsgroups ] [ -t titles ] [ -lprxhfuM ]\n"); - #else !TMAIL - fprintf(stderr, "Usage: readnews [ -a [ date ]] [ -n newsgroups ] [ -t titles ] [ -lprxhfu ]\n"); - #endif !TMAIL fprintf(stderr, "\t[ -c [ ``mailer'' ]]\n\n"); fprintf(stderr, " readnews -s\n"); exit(1); --- 52,57 ----- } /* unknown option letter */ fprintf(stderr, "Usage: readnews [ -a [ date ]] [ -n newsgroups ] [ -t titles ] [ -lprxhfuM ]\n"); fprintf(stderr, "\t[ -c [ ``mailer'' ]]\n\n"); fprintf(stderr, " readnews -s\n"); exit(1); diff -c -b NEW/readr.c OLD/readr.c *** NEW/readr.c Tue Sep 18 19:04:58 1984 --- OLD/readr.c Tue Sep 18 16:48:53 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)readr.c 2.48 9/18/84"; #endif !lint #include "rparams.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)readr.c 2.46 9/5/84"; #endif !lint #include "rparams.h" *************** *** 611,616 int edit = 1; char *ed; FILE *tfp; char *replyname(); char subj[BUFLEN]; char folbuf[BUFLEN]; --- 611,617 ----- int edit = 1; char *ed; FILE *tfp; + char curberk[BUFLEN]; char *replyname(); char subj[BUFLEN]; char folbuf[BUFLEN]; *************** *** 648,653 *ptr1 = ' '; *rcbuf = '\0'; pathptr = replyname(hptr);; for (ptr1 = address, ptr2 = pathptr; *ptr2; ptr1++, ptr2++) { if (index("\"\\$", *ptr2)) --- 649,655 ----- *ptr1 = ' '; *rcbuf = '\0'; + *curberk = '\0'; pathptr = replyname(hptr);; for (ptr1 = address, ptr2 = pathptr; *ptr2; ptr1++, ptr2++) { if (index("\"\\$", *ptr2)) diff -c -b NEW/recmail.c OLD/recmail.c *** NEW/recmail.c Mon Sep 17 19:26:26 1984 --- OLD/recmail.c Tue Sep 18 16:44:20 1984 *************** *** 7,13 */ #ifndef lint ! static char *SccsId = "@(#)recmail.c 1.9 9/17/84"; #endif !lint #include "params.h" --- 7,13 ----- */ #ifndef lint ! static char *SccsId = "@(#)recmail.c 1.8 8/14/84"; #endif !lint #include <stdio.h> *************** *** 10,16 static char *SccsId = "@(#)recmail.c 1.9 9/17/84"; #endif !lint ! #include "params.h" #ifndef MAILER #define MAILER "/bin/mail" --- 10,21 ----- static char *SccsId = "@(#)recmail.c 1.8 8/14/84"; #endif !lint ! #include <stdio.h> ! #include <ctype.h> ! #include <pwd.h> ! #ifdef USG ! struct passwd *getpwent(), *getpwuid(), *getpwnam(); ! #endif USG #ifndef MAILER #define MAILER "/bin/mail" diff -c -b NEW/rfuncs2.c OLD/rfuncs2.c *** NEW/rfuncs2.c Wed Sep 12 21:27:09 1984 --- OLD/rfuncs2.c Tue Sep 18 16:42:46 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)rfuncs2.c 1.18 9/12/84"; #endif !lint #include "rparams.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)rfuncs2.c 1.17 9/3/84"; #endif !lint #include "rparams.h" *************** *** 47,55 register char *file, *to; { register FILE *ufp, *hfp; - #ifdef u370 - static struct hbuf hh; - #else !u370 struct hbuf hh; #endif !u370 int isprogram = 0; --- 47,52 ----- register char *file, *to; { register FILE *ufp, *hfp; struct hbuf hh; int isprogram = 0; int isnew = 1; *************** *** 51,57 static struct hbuf hh; #else !u370 struct hbuf hh; - #endif !u370 int isprogram = 0; int isnew = 1; register int i; --- 48,53 ----- { register FILE *ufp, *hfp; struct hbuf hh; int isprogram = 0; int isnew = 1; register int i; *************** *** 318,326 { register FILE *ifp, *ofp; register int c; - #ifdef u370 - static struct hbuf hh; - #else !u370 struct hbuf hh; #endif !u370 char TRANS[BUFLEN]; --- 314,319 ----- { register FILE *ifp, *ofp; register int c; struct hbuf hh; char TRANS[BUFLEN]; *************** *** 322,328 static struct hbuf hh; #else !u370 struct hbuf hh; - #endif !u370 char TRANS[BUFLEN]; #ifdef DEBUG --- 315,320 ----- register FILE *ifp, *ofp; register int c; struct hbuf hh; char TRANS[BUFLEN]; #ifdef DEBUG diff -c -b NEW/rparams.h OLD/rparams.h *** NEW/rparams.h Wed Sep 12 21:26:54 1984 --- OLD/rparams.h Tue Sep 18 16:47:59 1984 *************** *** 2,8 * rparams.h - parameters for readnews, rfuncs, and readr. */ ! /* @(#)rparams.h 2.16 9/12/84 */ #include "params.h" --- 2,8 ----- * rparams.h - parameters for readnews, rfuncs, and readr. */ ! /* @(#)rparams.h 2.15 9/5/84 */ #include "params.h" diff -c -b NEW/sendnews.c OLD/sendnews.c *** NEW/sendnews.c Mon Sep 17 19:26:22 1984 --- OLD/sendnews.c Tue Sep 18 16:43:23 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)sendnews.c 2.9 9/17/84"; #endif !lint #include <stdio.h> --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)sendnews.c 2.8 8/14/84"; #endif !lint #include <stdio.h> *************** *** 54,60 } #ifdef debug ! printf("/bin/mail %s\n", *argv); sprintf(buffer, "cat"); #else sprintf(buffer, "/bin/mail %s", *argv); --- 54,60 ----- } #ifdef debug ! printf("mail %s\n", *argv); sprintf(buffer, "cat"); #else sprintf(buffer, "mail %s", *argv); *************** *** 57,63 printf("/bin/mail %s\n", *argv); sprintf(buffer, "cat"); #else ! sprintf(buffer, "/bin/mail %s", *argv); #endif out = popen(buffer, "w"); uname(&ubuf); --- 57,63 ----- printf("mail %s\n", *argv); sprintf(buffer, "cat"); #else ! sprintf(buffer, "mail %s", *argv); #endif out = popen(buffer, "w"); uname(&ubuf); diff -c -b NEW/virtterm.c OLD/virtterm.c *** NEW/virtterm.c Mon Sep 17 19:27:10 1984 --- OLD/virtterm.c Tue Sep 18 16:46:06 1984 *************** *** 1,5 /* ! * Virtual terminal handler * Written by Kenneth Almquist, AGS Computers (HO 4C601, X7105). * Modified by Stephen Hemminger, to use TERMCAP (without curses) */ --- 1,5 ----- /* ! * Virtual terminal handler for the HP-2621 terminal. * Written by Kenneth Almquist, AGS Computers (HO 4C601, X7105). * Modified by Stephen Hemminger, to use TERMCAP (without curses) */ *************** *** 3,8 * Written by Kenneth Almquist, AGS Computers (HO 4C601, X7105). * Modified by Stephen Hemminger, to use TERMCAP (without curses) */ #ifndef lint static char *SccsId = "@(#)virtterm.c 1.5 9/14/84"; --- 3,9 ----- * Written by Kenneth Almquist, AGS Computers (HO 4C601, X7105). * Modified by Stephen Hemminger, to use TERMCAP (without curses) */ + static char *SccsId = "@(#)virtterm.c 1.4 7/17/84"; #include <stdio.h> #include <ctype.h> *************** *** 4,13 * Modified by Stephen Hemminger, to use TERMCAP (without curses) */ - #ifndef lint - static char *SccsId = "@(#)virtterm.c 1.5 9/14/84"; - #endif !lint - #include <stdio.h> #include <ctype.h> --- 5,10 ----- */ static char *SccsId = "@(#)virtterm.c 1.4 7/17/84"; #include <stdio.h> #include <ctype.h> *************** *** 66,71 extern char *getenv(), *strcpy(); #define ULINE 0200 /* Constants accessable by user */ int hasscroll; /* scrolling type, 0 == no scrolling */ --- 63,69 ----- extern char *getenv(), *strcpy(); #define ULINE 0200 + #define CURSEEN 1 /* Constants accessable by user */ int hasscroll; /* scrolling type, 0 == no scrolling */ *************** *** 328,333 return; } _dir = 1; _amove(_row, _col); vflush(); /* flush output buffer */ _scratched = 0; --- 326,332 ----- return; } _dir = 1; + if (CURSEEN) _amove(_row, _col); vflush(); /* flush output buffer */ _scratched = 0; *************** *** 471,479 lp = &_virt[i]; if (lp->flags & DIRTY) { lp = &_virt[i]; ! for (p = &lp->l[lp->len]; --p >= lp->l && *p == ' ';) ! ; ! lp->len = (int) (p - lp->l) + 1; if (lp->len == _actual[i].len && strncmp(lp->l, _actual[i].l, lp->len) == 0) lp->flags &= ~DIRTY; } --- 470,477 ----- lp = &_virt[i]; if (lp->flags & DIRTY) { lp = &_virt[i]; ! for (p = &lp->l[lp->len]; --p >= lp->l && *p == ' ';); ! lp->len = p + 1 - lp->l; if (lp->len == _actual[i].len && strncmp(lp->l, _actual[i].l, lp->len) == 0) lp->flags &= ~DIRTY; } *************** *** 506,513 len = vp->len; eval = 0; } ! for (j = 0; j < len && vp->l[j] == ap->l[j]; j++) ! ; if (j == len) return; first = j; --- 504,510 ----- len = vp->len; eval = 0; } ! for (j = 0; j < len && vp->l[j] == ap->l[j]; j++); if (j == len) return; first = j; *************** *** 646,653 if (CV && plodstr - saveplod >= strlen(direct)) { register char *p; plodstr = saveplod; ! for (p = direct ; *plodstr = *p++ ; plodstr++) ! ; } return 0; } --- 643,649 ----- if (CV && plodstr - saveplod >= strlen(direct)) { register char *p; plodstr = saveplod; ! for (p = direct ; *plodstr = *p++ ; plodstr++); } return 0; } diff -c -b NEW/visual.c OLD/visual.c *** NEW/visual.c Tue Sep 18 19:04:37 1984 --- OLD/visual.c Tue Sep 18 16:50:10 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)visual.c 1.15 9/18/84"; static char Author[] = "@(#)visual interface written by Kenneth Almquist"; #endif !lint --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)visual.c 1.12 9/5/84"; static char Author[] = "@(#)visual interface written by Kenneth Almquist"; #endif !lint *************** *** 252,258 #endif || (prflags & HDRONLY) && artlines > hdrend) { atend = 0; ! if (prflags&HDRONLY || maxlinno == 0) strcpy(prompt,"more? "); else sprintf(prompt,"more(%d%%)? ",((dlinno+ARTWLEN-hdrend)*100)/maxlinno); --- 252,258 ----- #endif || (prflags & HDRONLY) && artlines > hdrend) { atend = 0; ! if (prflags&HDRONLY) strcpy(prompt,"more? "); else sprintf(prompt,"more(%d%%)? ",((dlinno+ARTWLEN-hdrend)*100)/maxlinno); *************** *** 846,852 fprintf(rfp, "To: %s\n", p); fprintf(rfp, "Subject: %s\n", subj); fprintf(rfp, "In-reply-to: your article %s\n", h->ident); ! sprintf(rcbuf, "%s -t < %s; rm -f %s", MAILPARSER, tf, tf); nogomsg = "Mail not sent"; putc('\n', rfp); fstat(fileno(rfp), &statb); --- 846,852 ----- fprintf(rfp, "To: %s\n", p); fprintf(rfp, "Subject: %s\n", subj); fprintf(rfp, "In-reply-to: your article %s\n", h->ident); ! sprintf(rcbuf, "exec %s -t < %s; rm %s", MAILPARSER, tf, tf); nogomsg = "Mail not sent"; putc('\n', rfp); fstat(fileno(rfp), &statb); *************** *** 1114,1122 if (verbose) { sprintf(linebuf, "From: %s", hp->from); tfappend(linebuf); sprintf(linebuf, "Path: %s", hp->path); tfappend(linebuf); ! if (hp->organization[0]) { ! sprintf(linebuf, "Organization: %s", hp->organization); ! tfappend(linebuf); } } else { --- 1114,1121 ----- if (verbose) { sprintf(linebuf, "From: %s", hp->from); tfappend(linebuf); sprintf(linebuf, "Path: %s", hp->path); tfappend(linebuf); ! if (hp->organization[0]) ! sprintf(linebuf, "Organization: %s", hp->organization), tfappend(linebuf); } else { if (p1 != NULL) *************** *** 1118,1124 sprintf(linebuf, "Organization: %s", hp->organization); tfappend(linebuf); } - } else { if (p1 != NULL) *--p1 = '\0'; /* bump over the '(' */ --- 1117,1122 ----- if (hp->organization[0]) sprintf(linebuf, "Organization: %s", hp->organization), tfappend(linebuf); } else { if (p1 != NULL) *--p1 = '\0'; /* bump over the '(' */ *************** *** 1167,1177 if (hp->followto[0]) sprintf(linebuf, "Followup-To: %s", hp->followto), tfappend(linebuf); } ! else if (strcmp(bfr, groupdir) != 0) { ! sprintf(linebuf, "Newsgroups: %s", bfr); ! tfappend(linebuf); ! timer(); ! } } #ifdef MYDB --- 1165,1172 ----- if (hp->followto[0]) sprintf(linebuf, "Followup-To: %s", hp->followto), tfappend(linebuf); } ! else if (strcmp(bfr, groupdir) != 0) ! sprintf(linebuf, "Newsgroups: %s", bfr), tfappend(linebuf); } *************** *** 1174,1179 } } #ifdef MYDB char * --- 1169,1177 ----- sprintf(linebuf, "Newsgroups: %s", bfr), tfappend(linebuf); } + + + #ifdef MYDB *************** *** 1176,1181 #ifdef MYDB char * findparent(id, num) char *id; --- 1174,1180 ----- #ifdef MYDB + char * findparent(id, num) char *id; *************** *** 1977,1988 struct tchars tchars; /* special characters, including interrupt */ #endif #ifdef SIGTSTP ! int getpgrp(); ! #if defined(BSD4_2) || defined(BSD4_1C) ! int tpgrp; ! #else BSD4_1 ! short tpgrp; ! #endif BSD4_1 retry: #ifdef BSD4_2 --- 1976,1985 ----- struct tchars tchars; /* special characters, including interrupt */ #endif #ifdef SIGTSTP ! /* How to get/change terminal modes in a job control environment. ! This code is right from the 4.1 bsd jobs(3) manual page. ! */ ! int tpgrp, getpgrp(); retry: #ifdef BSD4_2
john@sol1.UUCP (john) (10/15/84)
> > For those of you (like me) that are paranoid about running > ed scripts blindly, here is a diff -c of the changed > routines. > > ---rick Would someone please post or mail us the 2.10.2 diffs in the -e format. Our diff does not support the '-c' (System III). Thanks, John Korsmeyer THE SOLUTION akgua!sol1!john