arnold@skeeve.UUCP (Arnold D. Robbins) (01/27/89)
See the announcement in unix-pc.general for what this is and why you might want it. ---------------------------------------------------------------- From gatech!ncar!ames!amdcad!sun!pitstop!sundc!seismo!uunet!rick Wed Jan 25 13:16:25 EST 1989 Article 1799 of news.software.b: Path: emory!gatech!ncar!ames!amdcad!sun!pitstop!sundc!seismo!uunet!rick >From: rick@uunet.UU.NET (Rick Adams) Newsgroups: news.software.b Subject: Patch #17 for news 2.11 source Summary: part three of three Message-ID: <47350@uunet.UU.NET> Date: 25 Jan 89 03:28:01 GMT References: <47348@uunet.UU.NET> <47349@uunet.UU.NET> Organization: UUNET Communications Services, Arlington, VA Lines: 1441 Description: This is the third part of three patches. After applying this you should be at patchlevel 17. Fix: apply this in the same manner as patch 15 and 16. Don't forget the "make update". Index: readr.c Prereq: 2.66 *** old/readr.c Fri Dec 4 02:52:24 1987 --- readr.c Sun Jan 22 22:18:21 1989 *************** *** 1,3 /* ! * This software is Copyright (c) 1986 by Rick Adams. * --- 1,3 ----- /* ! * This software is Copyright 1986, 1989 by Rick Adams. * *************** *** 18,20 #ifdef SCCSID ! static char *SccsId = "@(#)readr.c 2.66 11/30/87"; #endif /* SCCSID */ --- 18,20 ----- #ifdef SCCSID ! static char *SccsId = "@(#)readr.c 2.70 1/22/89"; #endif /* SCCSID */ *************** *** 32,34 ! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr;ongsize = pngsize #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) --- 32,34 ----- ! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) *************** *** 53,55 static int rfq = 0; /* for last article */ - static long ongsize; /* Previous ngsize */ static long pngsize; /* Printing ngsize */ --- 53,54 ----- static int rfq = 0; /* for last article */ static long pngsize; /* Printing ngsize */ *************** *** 56,58 static char *bptr; /* temp pointer. */ - static struct srec srec; /* srec for sys file entries */ static char *tfilename; /* temporary file name */ --- 55,56 ----- static char *bptr; /* temp pointer. */ static char *tfilename; /* temporary file name */ *************** *** 70,72 static FILE *fp; /* current article to be printed*/ - static int holdup; /* 1 iff should stop before hdr */ static int ignorenews; /* 1 iff readnews -p > /dev/null*/ --- 68,69 ----- static FILE *fp; /* current article to be printed*/ static int ignorenews; /* 1 iff readnews -p > /dev/null*/ *************** *** 157,159 int nlines; ! int (*ointr)(); #ifdef SIGCONT --- 154,156 ----- int nlines; ! SIGNAL_TYPE ointr; #ifdef SIGCONT *************** *** 159,161 #ifdef SIGCONT ! int (*ocont)(); #endif /* SIGCONT */ --- 156,158 ----- #ifdef SIGCONT ! SIGNAL_TYPE ocont; #endif /* SIGCONT */ *************** *** 552,554 (void) strcpy(bfr, groupdir); ! selectng(ogroupdir, TRUE, PERHAPS); (void) strcpy(groupdir, ogroupdir); --- 549,551 ----- (void) strcpy(bfr, groupdir); ! selectng(ogroupdir, FALSE, PERHAPS); (void) strcpy(groupdir, ogroupdir); *************** *** 647,649 } ! cancel_command() --- 644,646 ----- } ! cancel_command() *************** *** 650,651 { int notauthor; --- 647,649 ----- { + register char *poster; int notauthor; *************** *** 651,652 int notauthor; tfilename = filename; --- 649,652 ----- int notauthor; + char *tailpath(); + tfilename = filename; *************** *** 662,668 readmode = SPEC; ! (void) strcpy(rcbuf, hptr->path); ! ptr1 = index(rcbuf, ' '); ! if (ptr1) ! *ptr1 = 0; ! notauthor = STRCMP(username, rcbuf); if (uid != ROOTID && uid && notauthor) { --- 662,665 ----- readmode = SPEC; ! poster = tailpath(hptr); ! notauthor = STRCMP(username, poster); if (uid != ROOTID && uid && notauthor) { *************** *** 668,670 if (uid != ROOTID && uid && notauthor) { ! fprintf(ofp, "Can't cancel what you didn't write.\n"); return FALSE; --- 665,669 ----- if (uid != ROOTID && uid && notauthor) { ! fprintf(ofp, ! "You (%s) can't cancel someone else's (%s) article.\n", ! username,poster); return FALSE; *************** *** 682,684 } ! reply_command() --- 681,683 ----- } ! reply_command() *************** *** 829,831 } - xmit_command() --- 828,829 ----- } xmit_command() *************** *** 832,833 { tfilename = filename; --- 830,837 ----- { + #ifdef u370 + static struct srec srec; + #else /* !u370 */ + struct srec srec; + #endif /* !u370 */ + tfilename = filename; *************** *** 856,858 } ! next_ng_command() --- 860,862 ----- } ! next_ng_command() *************** *** 891,893 back(); ! selectng(bptr, TRUE, TRUE); return FALSE; --- 895,897 ----- back(); ! selectng(bptr, FALSE, TRUE); return FALSE; *************** *** 894,896 } ! caesar_command() --- 898,900 ----- } ! caesar_command() *************** *** 915,917 } ! /* --- 919,921 ----- } ! /* *************** *** 964,966 pout(ofp); - holdup = TRUE; } --- 968,969 ----- pout(ofp); } *************** *** 970,972 } ! /* --- 973,975 ----- } ! /* *************** *** 983,985 register DIR *dirp; ! register struct direct *dir; #endif /* !SERVER */ --- 986,988 ----- register DIR *dirp; ! register DIRECTORY_STRUCT *dir; #endif /* !SERVER */ *************** *** 1103,1105 (void) get_server(workspace,sizeof(workspace)); ! if (*workspace != CHAR_OK) { if (rflag) --- 1106,1108 ----- (void) get_server(workspace,sizeof(workspace)); ! if (*workspace != '2') { if (rflag) *************** *** 1258,1260 #ifdef SERVER ! (void) unlink(active_name()); close_server(); --- 1261,1266 ----- #ifdef SERVER ! if (active_name() != NULL) ! (void) unlink(active_name()); ! if (article_name() != NULL) ! (void) unlink(article_name()); close_server(); Index: recmail.c Prereq: 1.16 *** old/recmail.c Wed Oct 7 16:54:25 1987 --- recmail.c Tue Jan 17 13:09:30 1989 *************** *** 1,3 /* ! * This software is Copyright (c) 1986 by Rick Adams. * --- 1,3 ----- /* ! * This software is Copyright 1986, 1989 by Rick Adams. * *************** *** 22,24 #ifdef SCCSID ! static char *SccsId = "@(#)recmail.c 1.16 9/24/87"; #endif /* SCCSID */ --- 22,24 ----- #ifdef SCCSID ! static char *SccsId = "@(#)recmail.c 1.18 1/17/89"; #endif /* SCCSID */ *************** *** 39,41 FILE *fd; ! char *tmpf; FILE *errfd; --- 39,41 ----- FILE *fd; ! static char tmpf[] = "/tmp/rmXXXXXX"; FILE *errfd; *************** *** 41,43 FILE *errfd; ! char *errf; char linebuf[1024]; --- 41,43 ----- FILE *errfd; ! static char errf[] = "/tmp/rmXXXXXX"; char linebuf[1024]; *************** *** 49,51 ! tmpf = mktemp("/tmp/rmXXXXXX"); (void) close(creat(tmpf,0666)); --- 49,51 ----- ! mktemp(tmpf); (void) close(creat(tmpf,0666)); *************** *** 52,54 fd = fopen(tmpf, "w"); ! errf = mktemp("/tmp/rmXXXXXX"); (void) close(creat(errf,0666)); --- 52,54 ----- fd = fopen(tmpf, "w"); ! mktemp(errf); (void) close(creat(errf,0666)); *************** *** 67,70 } ! else if (fputs(linebuf, fd) == EOF) ! goto werror; if (linebuf[0] == '\n') --- 67,73 ----- } ! else { ! fputs(linebuf, fd); ! if (ferror(fd)) ! goto werror; ! } if (linebuf[0] == '\n') *************** *** 82,84 while (fgets(linebuf, sizeof linebuf, stdin) != NULL) { ! if (fputs(linebuf, fd) == EOF) { werror: --- 85,88 ----- while (fgets(linebuf, sizeof linebuf, stdin) != NULL) { ! fputs(linebuf, fd); ! if (ferror(fd)) { werror: *************** *** 162,163 exit (0); } --- 166,168 ----- exit (0); + /*NOTREACHED*/ } Index: recnews.c Prereq: 2.18 *** old/recnews.c Fri Dec 4 02:52:27 1987 --- recnews.c Tue Jan 17 13:09:30 1989 *************** *** 50,52 #ifdef SCCSID ! static char *SccsId = "@(#)recnews.c 2.18 12/4/87"; #endif /* SCCSID */ --- 50,52 ----- #ifdef SCCSID ! static char *SccsId = "@(#)recnews.c 2.20 1/17/89"; #endif /* SCCSID */ *************** *** 253,254 exit(0); } --- 253,255 ----- exit(0); + /*NOTREACHED*/ } *************** *** 390,392 register char *bcp = cmd-1; ! while (*cmd && *cmd != '"') *bcp++ = *cmd++; --- 391,398 ----- register char *bcp = cmd-1; ! while (*cmd) { ! if(*cmd == '\\') { ! cmd++; ! *bcp++ = *cmd++; ! } else if (*cmd == '"') ! break; *bcp++ = *cmd++; *************** *** 392,393 *bcp++ = *cmd++; *bcp = '\0'; --- 398,400 ----- *bcp++ = *cmd++; + } *bcp = '\0'; *************** *** 419,421 { ! register f, r, (*hstat)(), (*istat)(), (*qstat)(); int status; --- 426,429 ----- { ! register int f, r; ! SIGNAL_TYPE hstat, istat, qstat; int status; Index: rfuncs.c Prereq: 2.44 *** old/rfuncs.c Fri Dec 4 02:52:29 1987 --- rfuncs.c Thu Jan 19 00:06:44 1989 *************** *** 1,3 /* ! * This software is Copyright (c) 1986 by Rick Adams. * --- 1,3 ----- /* ! * This software is Copyright 1986, 1989 by Rick Adams. * *************** *** 18,20 #ifdef SCCSID ! static char *SccsId = "@(#)rfuncs.c 2.44 11/30/87"; #endif /* SCCSID */ --- 18,20 ----- #ifdef SCCSID ! static char *SccsId = "@(#)rfuncs.c 2.47 1/19/89"; #endif /* SCCSID */ *************** *** 620,622 ! static char *newactivename = "/tmp/newsaXXXXXX"; #endif /* SORTACTIVE */ --- 620,622 ----- ! static char newactivename[] = "/tmp/newsaXXXXXX"; #endif /* SORTACTIVE */ *************** *** 678,679 if (tp->rcindex < 0) { if (++line > LINES) --- 678,684 ----- if (tp->rcindex < 0) { + /* + ** If there aren't any articles in the group, skip it. + */ + if (tp->maxart == 0) + continue; if (++line > LINES) *************** *** 709,712 } else { - fprintf(stderr, "Duplicate .newsrc line or bad group %s\n", - rcline[lastline]); lentab[lastline] = 0; --- 714,715 ----- } else { lentab[lastline] = 0; *************** *** 769,771 register DIR *dirp; ! register struct direct *dir; #endif /* !SERVER */ --- 772,774 ----- register DIR *dirp; ! register DIRECTORY_STRUCT *dir; #endif /* !SERVER */ *************** *** 775,777 unsigned int alloc_size; ! int (*old_sig) (); extern lg_trap(); --- 778,780 ----- unsigned int alloc_size; ! SIGNAL_TYPE old_sig; extern lg_trap(); *************** *** 806,808 #ifdef SERVER ! for(i = lowgp; i < highgp; i++){ #else /* !SERVER */ --- 809,811 ----- #ifdef SERVER ! for(i = lowgp; i <= highgp; i++){ #else /* !SERVER */ *************** *** 898,900 } - #endif /* !SMALL_ADDRESS_SPACE */ --- 901,902 ----- } *************** *** 908 } --- 910,911 ----- } + #endif /* !SMALL_ADDRESS_SPACE */ Index: rfuncs2.c Prereq: 1.36 *** old/rfuncs2.c Fri Dec 4 02:52:30 1987 --- rfuncs2.c Tue Jan 17 13:09:31 1989 *************** *** 18,20 #ifdef SCCSID ! static char *SccsId = "@(#)rfuncs2.c 1.36 11/30/87"; #endif /* SCCSID */ --- 18,20 ----- #ifdef SCCSID ! static char *SccsId = "@(#)rfuncs2.c 1.37 1/17/89"; #endif /* SCCSID */ *************** *** 302,303 */ /* ARGSUSED */ --- 302,304 ----- */ + #ifndef fileno /* ARGSUSED */ *************** *** 303,304 /* ARGSUSED */ qfflush(fp) --- 304,306 ----- /* ARGSUSED */ + #endif /* !defined fileno */ qfflush(fp) Index: sendbatch.sh Prereq: 1.16 *** old/sendbatch.sh Fri Dec 4 02:52:32 1987 --- sendbatch.sh Sun Jan 15 23:04:11 1989 *************** *** 1,2 ! : '@(#)sendbatch.sh 1.16 12/1/87' --- 1,2 ----- ! : '@(#)sendbatch.sh 1.20 1/15/89' *************** *** 2,6 ! cflags= ! LIM=50000 ! MINDF=MINDISKFREE MAXBATCH=MAXPERBATCH --- 2,6 ----- ! LIB=LIBDIR ! BATCH=BATCHDIR ! LIM=50000 MAXBATCH=MAXPERBATCH *************** *** 6,9 MAXBATCH=MAXPERBATCH ! SPOOLDISK=SPOOL_DISK ! CMD='LIBDIR/batch BATCHDIR/$rmt $BLIM' ECHO= --- 6,10 ----- MAXBATCH=MAXPERBATCH ! RNEWS=rnews ! UUX_FLAGS="UUXFLAGS" ! CMD='$LIB/batch $BATCH/$rmt $BLIM' ECHO= *************** *** 11,12 C7= DOIHAVE= --- 12,14 ----- C7= + cflags= DOIHAVE= *************** *** 12,14 DOIHAVE= ! RNEWS=rnews --- 14,17 ----- DOIHAVE= ! SPOOLDISK=SPOOL_DISK ! MINDF=MINDISKFREE *************** *** 17,19 case $rmt in - -[bBC]*) cflags="$cflags $rmt"; continue;; -s*) LIM=`expr "$rmt" : '-s\(.*\)'` --- 20,21 ----- case $rmt in -s*) LIM=`expr "$rmt" : '-s\(.*\)'` *************** *** 20,23 continue;; ! -c7) COMP='| LIBDIR/compress $cflags' ! C7='| LIBDIR/encode' ECHO='echo "#! c7unbatch"' --- 22,33 ----- continue;; ! -m*) MAXBATCH=`expr "$rmt" : '-m\(.*\)'` ! continue;; ! +m*) MAXBATCH='' ! continue;; ! -r*) RNEWS=`expr "$rmt" : '-r\(.*\)'` ! continue;; ! -u*) UUX_FLAGS=`expr "$rmt" : '-u\(.*\)'` ! continue;; ! -c7) COMP='| $LIB/compress $cflags' ! C7='| $LIB/encode' ECHO='echo "#! c7unbatch"' *************** *** 24,26 continue;; ! -c) COMP='| LIBDIR/compress $cflags' ECHO='echo "#! cunbatch"' --- 34,36 ----- continue;; ! -c) COMP='| $LIB/compress $cflags' ECHO='echo "#! cunbatch"' *************** *** 27,28 continue;; -o*) ECHO=`expr "$rmt" : '-o\(.*\)'` --- 37,44 ----- continue;; + +c*) COMP='' + C7='' + ECHO='' + cflags='' + continue;; + -[bBC]*) cflags="$cflags $rmt"; continue;; -o*) ECHO=`expr "$rmt" : '-o\(.*\)'` *************** *** 30,31 continue;; -i*) DOIHAVE=`expr "$rmt" : '-i\(.*\)'` --- 46,50 ----- continue;; + +o*) ECHO='' + RNEWS=rnews + continue;; -i*) DOIHAVE=`expr "$rmt" : '-i\(.*\)'` *************** *** 36,38 continue;; ! -m*) MAXBATCH=`expr "$rmt" : '-m\(.*\)'` continue;; --- 55,57 ----- continue;; ! +i*) DOIHAVE='' continue;; *************** *** 38,39 continue;; esac --- 57,62 ----- continue;; + -D*) SPOOLDISK=`expr "$rmt" : '-D\(.*\)'` + continue;; + +D*) SPOOLDISK='' + continue;; esac *************** *** 40,44 ! df=`df $SPOOLDISK | awk "\\$6 == \\"$SPOOLDISK\" {print \\$4} ! \\$1 == \\"$SPOOLDISK\\" {print \\$3}"` ! if test ! -z "$df" -a \( "$df" -lt $MINDF \) then --- 63,65 ----- ! if test -n "$SPOOLDISK" then *************** *** 44,47 then ! echo not enough space on $SPOOLDISK: $df ! continue fi --- 65,77 ----- then ! df=`df $SPOOLDISK | awk ' ! $6 == "'$SPOOLDISK'" {print $4;exit} ! $1 == "'$SPOOLDISK'" && NF == 7 {print $4;exit} ! $2 == "'$SPOOLDISK'" {print $5;exit} ! $1 == "'$SPOOLDISK'" {print $3;exit} ! '` ! if test ! -z "$df" -a \( "$df" -lt $MINDF \) ! then ! echo $rmt: not enough space on $SPOOLDISK: $df ! continue ! fi fi *************** *** 48,50 ! if test -s /tmp/uuq.output then --- 78,80 ----- ! if test -n "$MAXBATCH" then *************** *** 50,54 then ! q=`echo "$rmt" | sed 's/\(.......\).*/\1/'` ! q=`awk "\\$1 == \\"$q:\\" { print \\$4;exit}" </tmp/uuq.output` ! if test ! -z "$q" -a \( "$q" -gt $MAXBATCH \) then --- 80,83 ----- then ! du=`du "/usr/spool/uucp/$rmt" | sed 's/ .*/000/'` ! if test ! -z "$du" -a \( "$du" -gt $MAXBATCH \) then *************** *** 54,56 then ! echo $rmt already has $q bytes queued continue --- 83,85 ----- then ! echo $rmt already has $du Kbytes queued continue *************** *** 66,68 ! : make sure $? is zero sentbytes=0 --- 95,106 ----- ! # only do ihave processing once, not every time through loop ! if test -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave ! then ! mv $BATCH/$rmt.ihave $BATCH/$rmt.$$ ! $LIB/inews -t "cmsg ihave $DOIHAVE" -n to.$rmt.ctl < \ ! $BATCH/$rmt.$$ ! rm $BATCH/$rmt.$$ ! fi ! ! # make sure $? is zero sentbytes=0 *************** *** 69,73 while test $? -eq 0 -a $sentbytes -le $MAXBATCH -a \ ! \( \( $sentbytes -eq 0 -a -s BATCHDIR/$rmt \) -o \ ! -s BATCHDIR/$rmt.work -o \ ! \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) do --- 107,110 ----- while test $? -eq 0 -a $sentbytes -le $MAXBATCH -a \ ! \( \( $sentbytes -eq 0 -a -s $BATCH/$rmt \) -o \ ! -s $BATCH/$rmt.work \) do *************** *** 73,75 do ! if test -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave then --- 110,113 ----- do ! (eval $ECHO; eval $CMD $COMP $C7) | ! if test -s $BATCH/$rmt.cmd then *************** *** 75,81 then ! mv BATCHDIR/$rmt.ihave BATCHDIR/$rmt.$$ ! LIBDIR/inews -t "cmsg ihave $DOIHAVE" -n to.$rmt.ctl < \ ! BATCHDIR/$rmt.$$ ! rm BATCHDIR/$rmt.$$ ! else --- 113,115 ----- then ! $BATCH/$rmt.cmd else *************** *** 81,90 else ! (eval $ECHO; eval $CMD $COMP $C7) | ! if test -s BATCHDIR/$rmt.cmd ! then ! BATCHDIR/$rmt.cmd ! else ! uux - UUXFLAGS $rmt!$RNEWS ! fi ! sentbytes=`expr $sentbytes + $LIM` fi --- 115,117 ----- else ! uux - $UUX_FLAGS $rmt!$RNEWS fi *************** *** 90,91 fi done --- 117,119 ----- fi + sentbytes=`expr $sentbytes + $LIM` done Index: sendnews.c Prereq: 2.13 *** old/sendnews.c Wed Oct 7 16:54:57 1987 --- sendnews.c Tue Jan 17 13:09:31 1989 *************** *** 5,7 #ifdef SCCSID ! static char *SccsId = "@(#)sendnews.c 2.13 9/24/87"; #endif /* SCCSID */ --- 5,7 ----- #ifdef SCCSID ! static char *SccsId = "@(#)sendnews.c 2.14 1/17/89"; #endif /* SCCSID */ *************** *** 77,78 exit(0); } --- 77,79 ----- exit(0); + /*NOTREACHED*/ } Index: uname.c Prereq: 2.17 *** old/uname.c Mon Nov 23 19:13:34 1987 --- uname.c Sun Jan 15 19:49:05 1989 *************** *** 1,3 /* ! * This software is Copyright (c) 1986 by Rick Adams. * --- 1,3 ----- /* ! * This software is Copyright 1986, 1989 by Rick Adams. * *************** *** 23,25 #ifdef SCCSID ! static char *SccsId = "@(#)uname.c 2.17 11/19/87"; #endif /* SCCSID */ --- 23,25 ----- #ifdef SCCSID ! static char *SccsId = "@(#)uname.c 2.18 1/15/89"; #endif /* SCCSID */ *************** *** 27,29 #ifdef BSD2_10 ! #include <shortnames.h> #endif /* BSD2_10 */ --- 27,29 ----- #ifdef BSD2_10 ! #include <short_names.h> #endif /* BSD2_10 */ *************** *** 43,46 gethostname(uptr->nodename, sizeof (uptr->nodename)); ! for (cp = uptr->nodename; *cp == '\0'; cp++) ! if (isupper(*cp)) *cp = tolower(*cp); cp = mydomain(); --- 43,47 ----- gethostname(uptr->nodename, sizeof (uptr->nodename)); ! for (cp = uptr->nodename; *cp != '\0'; cp++) ! if (isupper(*cp)) ! *cp = tolower(*cp); cp = mydomain(); Index: uurec.c Prereq: 2.11 *** old/uurec.c Tue Mar 24 13:52:00 1987 --- uurec.c Tue Jan 17 13:09:31 1989 *************** *** 5,7 #ifdef SCCSID ! static char *SccsId = "@(#)uurec.c 2.11 3/21/87"; #endif /* SCCSID */ --- 5,7 ----- #ifdef SCCSID ! static char *SccsId = "@(#)uurec.c 2.13 1/17/89"; #endif /* SCCSID */ *************** *** 32,35 ! #ifdef debug ! # define RNEWS "cat" #endif --- 32,36 ----- ! #undef DEBUG ! #ifdef DEBUG ! # define RNEWS "/bin/cat" #endif *************** *** 44,46 { ! char buf[BFSZ], fbuf[BFSZ]; char bfr[BFSZ], *pbfr = bfr; --- 45,47 ----- { ! char buf[BFSZ], fbuf[BFSZ], senderbuf[BFSZ]; char bfr[BFSZ], *pbfr = bfr; *************** *** 53,54 frmflg = FALSE; while (fgets(buf, BFSZ, stdin) != NULL) { --- 54,56 ----- frmflg = FALSE; + senderbuf[0] = '\0'; while (fgets(buf, BFSZ, stdin) != NULL) { *************** *** 54,56 while (fgets(buf, BFSZ, stdin) != NULL) { ! #ifdef debug printf("%o\t%s", mode|type(buf), buf); --- 56,58 ----- while (fgets(buf, BFSZ, stdin) != NULL) { ! #ifdef DEBUG printf("%o\t%s", mode|type(buf), buf); *************** *** 60,61 case FROM | SKIPPING: if (frmflg) --- 62,64 ----- case FROM | SKIPPING: + strcpy(senderbuf, buf); if (frmflg) *************** *** 64,65 p = fbuf; frmflg = TRUE; --- 67,71 ----- p = fbuf; + #ifdef DEBUG + printf("From: %s\n", p); + #endif frmflg = TRUE; *************** *** 81,83 format = A; ! #ifdef debug printf("format = %d\n", format); --- 87,89 ----- format = A; ! #ifdef DEBUG printf("format = %d\n", format); *************** *** 114,116 fprintf(pipe, "%s\n", fbuf); ! } else fputs(buf+1, pipe); --- 120,136 ----- fprintf(pipe, "%s\n", fbuf); ! } else { ! if (senderbuf[0] != '\0') { ! register char *cp; ! #ifdef DEBUG ! printf("senderbuf: %s", ! senderbuf); ! #endif ! cp = index(senderbuf, ' '); ! if (cp != NULL) { ! fprintf(pipe, ! "Sender: %s", ! cp); ! } ! senderbuf[0] = '\0'; ! } fputs(buf+1, pipe); *************** *** 116,117 fputs(buf+1, pipe); } --- 136,138 ----- fputs(buf+1, pipe); + } } *************** *** 130,131 exit(0); } --- 151,153 ----- exit(0); + /*NOTREACHED*/ } *************** *** 147,148 return(OTHER); --- 169,173 ----- + if (strncmp(p, "From: ", 6) == 0) + return (FROM); + return(OTHER); *************** *** 189,192 garbled: ! strcat(buf, "???!"); ! return(buf+4); } --- 214,217 ----- garbled: ! strcat(buf, "GARBLED"); ! return(buf+7); } Index: virtterm.c Prereq: 1.14 *** old/virtterm.c Wed Oct 7 16:55:19 1987 --- virtterm.c Sun Jan 15 19:49:06 1989 *************** *** 7,9 #ifdef SCCSID ! static char *SccsId = "@(#)virtterm.c 1.14 9/24/87"; #endif /* SCCSID */ --- 7,9 ----- #ifdef SCCSID ! static char *SccsId = "@(#)virtterm.c 1.15 1/15/89"; #endif /* SCCSID */ *************** *** 104,107 int _dir = 1; - int _shifttop, _shiftbot; - int _shift; int _scratched; --- 104,105 ----- int _dir = 1; int _scratched; *************** *** 108,109 int vputc(); --- 106,108 ----- int vputc(); + static int _shifttop, _shiftbot, _shift; *************** *** 401,403 } - for (; i <= bot; i++) for (; i <= bot; i++) --- 400,401 ----- } for (; i <= bot; i++) *************** *** 583,585 { ! char direct[20]; char rel[MAXPLEN*10 + MAXLLEN*10]; /* longest move is full screen */ --- 581,583 ----- { ! char direct[MAXPLEN*2]; char rel[MAXPLEN*10 + MAXLLEN*10]; /* longest move is full screen */ Index: visual.c Prereq: 1.40 *** old/visual.c Fri Dec 4 02:52:37 1987 --- visual.c Sun Jan 22 22:18:19 1989 *************** *** 6,8 #ifdef SCCSID ! static char *SccsId = "@(#)visual.c 1.40 11/30/87"; #endif /* SCCSID */ --- 6,8 ----- #ifdef SCCSID ! static char *SccsId = "@(#)visual.c 1.44 1/22/89"; #endif /* SCCSID */ *************** *** 69,71 ! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr;ongsize = pngsize #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) --- 69,71 ----- ! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) *************** *** 158,160 static int rfq = 0; /* for last article */ - static long ongsize; /* Previous ngsize */ static long pngsize; /* Printing ngsize */ --- 158,159 ----- static int rfq = 0; /* for last article */ static long pngsize; /* Printing ngsize */ *************** *** 161,163 static char *bptr; /* temp pointer. */ - static char *tfilename; /* temporary file name */ static char ofilename1[BUFLEN]; /* previous file name */ --- 160,161 ----- static char *bptr; /* temp pointer. */ static char ofilename1[BUFLEN]; /* previous file name */ *************** *** 171,173 static long oobit; /* last bit, really */ - static int dgest = 0; static FILE *fp; /* current article to be printed*/ --- 169,170 ----- static long oobit; /* last bit, really */ static FILE *fp; /* current article to be printed*/ *************** *** 260,262 (void) strcpy(prompt, "more? "); ! else #ifdef DIGPAGE --- 257,261 ----- (void) strcpy(prompt, "more? "); ! else { ! int percent; ! #ifdef DIGPAGE *************** *** 262,264 #ifdef DIGPAGE ! (void) sprintf(prompt, "more(%d%%)? ", ((((endsuba > 0) ? --- 261,263 ----- #ifdef DIGPAGE ! percent = ((((endsuba > 0) ? *************** *** 265,267 endsuba : (dlinno + ARTWLEN)) - ! hdrend) * 100) / maxlinno); #else /* !DIGPAGE */ --- 264,266 ----- endsuba : (dlinno + ARTWLEN)) - ! hdrend) * 100) / maxlinno; #else /* !DIGPAGE */ *************** *** 267,270 #else /* !DIGPAGE */ ! (void) sprintf(prompt, "more(%d%%)? ", ! ((dlinno + ARTWLEN - hdrend) * 100) / maxlinno); #endif /* !DIGPAGE */ --- 266,269 ----- #else /* !DIGPAGE */ ! percent = ! ((dlinno + ARTWLEN - hdrend) * 100) / maxlinno; #endif /* !DIGPAGE */ *************** *** 270,271 #endif /* !DIGPAGE */ } else { --- 269,275 ----- #endif /* !DIGPAGE */ + if (percent > 100 || + (percent == 100 && !feof(fp))) + (void) sprintf(prompt, "more? "); + else (void) sprintf(prompt, "more(%d%%)? ", percent); + } } else { *************** *** 686,687 /* escape to shell */ --- 690,692 ----- + #ifndef NOSHELL /* escape to shell */ *************** *** 717,719 } ! /* mail reply */ --- 722,724 ----- } ! #endif /* NOSHELL */ /* mail reply */ *************** *** 951,953 { ! register char *poster, *r; int notauthor; --- 956,958 ----- { ! register char *poster; int notauthor; *************** *** 953,955 int notauthor; ! char *senderof(); --- 958,960 ----- int notauthor; ! char *tailpath(); *************** *** 955,964 ! poster = senderof(h); ! /* only compare up to '.' or ' ' */ ! r = index(poster,'.'); ! if (r == NULL) ! r = index(poster,' '); ! if (r != NULL) ! *r = '\0'; ! tfilename = filename; notauthor = STRCMP(username, poster); --- 960,962 ----- ! poster = tailpath(h); notauthor = STRCMP(username, poster); *************** *** 965,967 if (uid != ROOTID && uid && notauthor) { ! msg("Can't cancel what you didn't write."); return; --- 963,966 ----- if (uid != ROOTID && uid && notauthor) { ! msg("You (%s) can't cancel someone else's (%s) article.", ! username,poster); return; *************** *** 1149,1151 register DIR *dirp; ! register struct direct *dir; #endif /* !SERVER */ --- 1148,1150 ----- register DIR *dirp; ! register DIRECTORY_STRUCT *dir; #endif /* !SERVER */ *************** *** 1166,1168 } - dgest = 0; --- 1165,1166 ----- } *************** *** 1198,1199 #ifdef SERVER if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) --- 1196,1198 ----- #ifdef SERVER + if (article_name() != NULL) (void) unlink(article_name()); if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) *************** *** 1237,1239 (void) get_server(workspace,sizeof(workspace)); ! if (*workspace != CHAR_OK) { if (rflag) --- 1236,1238 ----- (void) get_server(workspace,sizeof(workspace)); ! if (*workspace != '2') { if (rflag) *************** *** 1740,1742 int i; ! int (*savequit)(); char *env[100], **envp, **oenvp; --- 1739,1741 ----- int i; ! SIGNAL_TYPE savequit; char *env[100], **envp, **oenvp; *************** *** 2421,2423 int getpgrp(); ! #if defined(BSD4_2) || defined(BSD4_1C) int tpgrp; --- 2420,2422 ----- int getpgrp(); ! #if defined(BSD4_2) int tpgrp; *************** *** 2699,2701 #ifdef SERVER ! (void) unlink(active_name()); close_server(); --- 2698,2703 ----- #ifdef SERVER ! if (active_name() != NULL) ! (void) unlink(active_name()); ! if (article_name() != NULL) ! (void) unlink(article_name()); close_server(); Index: vnews.help *** old/vnews.help Tue Mar 24 13:52:05 1987 --- vnews.help Tue Jan 17 13:45:31 1989 *************** *** 1,2 ! Vnews commands: (each may be preceded by a non-negative count) --- 1,2 ----- ! Vnews commands: ( may be preceded by a non-negative count) V 2.2 1/17/89 *************** *** 5,7 e Mark current article as unread < Go to article with given ID ! + Go forwards count articles p Go to parent article - Go to previous article ug Unsubscribe to this group --- 5,7 ----- e Mark current article as unread < Go to article with given ID ! + or = Go forwards count articles p Go to parent article - Go to previous article ug Unsubscribe to this group Index: patchlevel.h Prereq: 16 *** .d/patchlevel.h Fri Dec 4 02:52:37 1987 --- patchlevel.h Tue Jan 24 14:52:11 1989 *************** *** 1,2 ! #define PATCHLEVEL 16 --- 1,2 ----- ! #define PATCHLEVEL 17 *************** *** 2,3 ! #define NEWS_VERSION "B 2.11 1/23/89" --- 2,3 ----- ! #define NEWS_VERSION "B 2.11 1/24/89" --- end of patch 17 --- -- "Crack-pot societies of all kinds sprang up everwhere, advocating everything from absolutism to anarchy. Queer cults arose, preaching free love, the imminent end of the world, and many other departures from the norm of thought." E.E. "Doc" Smith, Children of the Lens, 1954 | Arnold Robbins, skeeve!arnold