rsk@pucc-j (Wombat) (05/10/86)
I have recently seen several requests for the patches to rn 4.3 (which have come out over a considerable period of time). After responding to some of these individually, I have concluded that enough folks are missing one or more of these to make posting them worthwhile. This article and the three following contain patches 1-27 for rn 4.3. Rich Kulawiec, pucc-j!rsk, rsk@asc.purdue.edu # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # patch.1 # patch.2 # patch.3 # patch.4 # patch.5 # patch.6 # patch.7 # patch.8 # patch.9 # This archive created: Fri May 9 17:38:07 1986 # By: Wombat (Purdue University) cat << \SHAR_EOF > patch.1 Patch #: 1 Priority: MEDIUM Subject: backpage can confuse header parser resulting in bad reply address From: pmontgom@sdcrdcf.UUCP (Peter Montgomery) Description: If you use the 'b' backpage command to get back to the first page of an article, the article header is reparsed wrong, and references to %T, %t, %[relay-version], %[posting-version], %[path], and %[from] will be incorrect. Repeat-By: Go to an article more than one page long. Go forward one page, then use 'b' to back up. Then type 'r' to mail a reply. The address passed to Rnmail will consist of all the lines from relay-version to from, which needless to say will confuse any mailer ever written. Fix: First of all, check to see if there is a "patchlevel" file in your rn source directory. If so, it probably indicates that some of the patches have already been applied. If there is no patchlevel file, then in order to start recording revision levels for the entire rn kit, cd to the rn source directory and give the command: echo "Patch #: 0" >patchlevel If this is done correctly, patch will automatically update the patchlevel file to reflect the maximum applied patch number. (See the first patch below.) From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. Warning: this patch is not reversed. If the patch program says it is, then this patch has already been applied, and you should not apply it again. If patch indicates that patchlevel is the wrong version the patch has already been applied. See the patchlevel file to find out what has been applied. Don't continue with the patch. Index: patchlevel Prereq: 0 1c1 < Patch #: 0 --- > Patch #: 1 Index: art.c Prereq: 4.3 *** art.c.old Fri May 10 13:52:54 1985 --- art.c Fri May 10 13:52:59 1985 *************** *** 1,4 ! /* $Header: art.c,v 4.3 85/05/01 11:34:51 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3 85/05/01 11:34:51 lwall --- 1,4 ----- ! /* $Header: art.c,v 4.3.1.2 85/05/10 13:46:07 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.2 85/05/10 13:46:07 lwall *************** *** 1,6 /* $Header: art.c,v 4.3 85/05/01 11:34:51 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3 85/05/01 11:34:51 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: art.c,v 4.3.1.2 85/05/10 13:46:07 lwall Exp $ * * $Log: art.c,v $ + * Revision 4.3.1.2 85/05/10 13:46:07 lwall + * Fixed header reparse bug on backpage. + * + * Revision 4.3.1.1 85/05/10 11:30:56 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:34:51 lwall * Baseline for release with 4.3bsd. * *************** *** 104,109 artpos = vrdary(artline); if (artpos < 0) artpos = -artpos; /* labs(), anyone? */ fseek(artfp,artpos,0); if (artpos < htype[PAST_HEADER].ht_minpos) in_header = SOME_LINE; --- 110,117 ----- artpos = vrdary(artline); if (artpos < 0) artpos = -artpos; /* labs(), anyone? */ + if (firstpage) + artpos = (ART_POS)0; fseek(artfp,artpos,0); if (artpos < htype[PAST_HEADER].ht_minpos) in_header = SOME_LINE; Index: head.c Prereq: 4.3 *** head.c.old Fri May 10 13:52:36 1985 --- head.c Fri May 10 13:52:39 1985 *************** *** 1,4 ! /* $Header: head.c,v 4.3 85/05/01 11:38:21 lwall Exp $ * * $Log: head.c,v $ * Revision 4.3 85/05/01 11:38:21 lwall --- 1,4 ----- ! /* $Header: head.c,v 4.3.1.2 85/05/10 13:47:25 lwall Exp $ * * $Log: head.c,v $ * Revision 4.3.1.2 85/05/10 13:47:25 lwall *************** *** 1,6 /* $Header: head.c,v 4.3 85/05/01 11:38:21 lwall Exp $ * * $Log: head.c,v $ * Revision 4.3 85/05/01 11:38:21 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: head.c,v 4.3.1.2 85/05/10 13:47:25 lwall Exp $ * * $Log: head.c,v $ + * Revision 4.3.1.2 85/05/10 13:47:25 lwall + * Added debugging stuff. + * + * Revision 4.3.1.1 85/05/10 11:32:30 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:38:21 lwall * Baseline for release with 4.3bsd. * *************** *** 28,33 htypeix[*htype[i].ht_name - 'a'] = i; } int set_line_type(bufptr,colon) char *bufptr; --- 34,56 ----- htypeix[*htype[i].ht_name - 'a'] = i; } + #ifdef DEBUGGING + dumpheader(where) + char *where; + { + register int i; + + printf("header: %d %s", parsed_art, where); + + for (i=0; i<HEAD_LAST; i++) { + printf("%15s %4d %4d %03o\n",htype[i].ht_name, + htype[i].ht_minpos, + htype[i].ht_maxpos, + htype[i].ht_flags) FLUSH; + } + } + #endif + int set_line_type(bufptr,colon) char *bufptr; *************** *** 68,73 { register int i; for (i=0; i<HEAD_LAST; i++) { htype[i].ht_minpos = -1; htype[i].ht_maxpos = 0; --- 91,100 ----- { register int i; + #ifdef DEBUGGING + if (debug & 4) + dumpheader("start_header\n"); + #endif for (i=0; i<HEAD_LAST; i++) { htype[i].ht_minpos = -1; htype[i].ht_maxpos = 0; *************** *** 108,113 first_one = (htype[in_header].ht_minpos < 0); if (first_one) htype[in_header].ht_minpos = artpos; if (htype[in_header].ht_flags & HT_HIDE) return newhide; } --- 135,144 ----- first_one = (htype[in_header].ht_minpos < 0); if (first_one) htype[in_header].ht_minpos = artpos; + #ifdef DEBUGGING + if (debug & 4) + dumpheader(art_buf); + #endif if (htype[in_header].ht_flags & HT_HIDE) return newhide; } SHAR_EOF cat << \SHAR_EOF > patch.2 Patch #: 2 Priority: LOW Subject: KILL file can set art < absfirst, causing "(-1 more)" error From: lwall@sdcrdcf.UUCP (Larry Wall) Description: If a newsgroup with a KILL file is left unread for a long time, the last article processed by the KILL file, as recorded by the THRU line in the KILL file, can become less than the minimum article in the newsgroup due to article expiration. Unfortunately, there was no check to see if this had happened, so it was possible for rn to try to junk articles without valid bits in the bitmap. This causes rn to think it has junked more articles than it really has, causing the count of unread articles to become incorrect. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. Warning: this patch is not reversed. If the patch program says it is, then this patch has already been applied, and you should not apply it again. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 1 1c1 < Patch #: 1 --- > Patch #: 2 Index: kfile.c Prereq: 4.3 *** kfile.c.old Fri May 10 14:22:47 1985 --- kfile.c Fri May 10 14:22:49 1985 *************** *** 1,4 ! /* $Header: kfile.c,v 4.3 85/05/01 11:41:53 lwall Exp $ * * $Log: kfile.c,v $ * Revision 4.3 85/05/01 11:41:53 lwall --- 1,4 ----- ! /* $Header: kfile.c,v 4.3.1.2 85/05/10 14:21:29 lwall Exp $ * * $Log: kfile.c,v $ * Revision 4.3.1.2 85/05/10 14:21:29 lwall *************** *** 1,6 /* $Header: kfile.c,v 4.3 85/05/01 11:41:53 lwall Exp $ * * $Log: kfile.c,v $ * Revision 4.3 85/05/01 11:41:53 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: kfile.c,v 4.3.1.2 85/05/10 14:21:29 lwall Exp $ * * $Log: kfile.c,v $ + * Revision 4.3.1.2 85/05/10 14:21:29 lwall + * Prevented THRU from setting art < absfirst. + * + * Revision 4.3.1.1 85/05/10 11:34:33 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:41:53 lwall * Baseline for release with 4.3bsd. * *************** *** 65,71 while (fgets(buf,LBUFLEN,kfp) != Nullch) { buf[strlen(buf)-1] = '\0'; if (strnEQ(buf,"THRU",4)) { ! firstart = atol(buf+4)+1; continue; } if (*buf == 'X') { /* exit command? */ --- 71,83 ----- while (fgets(buf,LBUFLEN,kfp) != Nullch) { buf[strlen(buf)-1] = '\0'; if (strnEQ(buf,"THRU",4)) { ! ART_NUM tmpart; ! ! tmpart = atol(buf+4)+1; ! if (tmpart < absfirst) ! tmpart = absfirst; ! check_first(tmpart); ! firstart = tmpart; continue; } if (*buf == 'X') { /* exit command? */ SHAR_EOF cat << \SHAR_EOF > patch.3 Patch #: 3 Priority: VERY LOW Subject: search commands shouldn't report things junked that already were From: markb@sdcrdcf.UUCP (Mark Biggar) Description: Search and number-range commands that junk articles or mark them unread will report all articles found as junked or marked unread even if they already were read or unread, respectively. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. Warning: this patch is not reversed. If the patch program says it is, then this patch has already been applied, and you should not apply it again. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 2 1c1 < Patch #: 2 --- > Patch #: 3 Index: ngstuff.c Prereq: 4.3 *** ngstuff.c.old Fri May 10 14:32:57 1985 --- ngstuff.c Fri May 10 14:32:59 1985 *************** *** 1,4 ! /* $Header: ngstuff.c,v 4.3 85/05/01 11:45:03 lwall Exp $ * * $Log: ngstuff.c,v $ * Revision 4.3 85/05/01 11:45:03 lwall --- 1,4 ----- ! /* $Header: ngstuff.c,v 4.3.1.2 85/05/10 14:31:52 lwall Exp $ * * $Log: ngstuff.c,v $ * Revision 4.3.1.2 85/05/10 14:31:52 lwall *************** *** 1,6 /* $Header: ngstuff.c,v 4.3 85/05/01 11:45:03 lwall Exp $ * * $Log: ngstuff.c,v $ * Revision 4.3 85/05/01 11:45:03 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: ngstuff.c,v 4.3.1.2 85/05/10 14:31:52 lwall Exp $ * * $Log: ngstuff.c,v $ + * Revision 4.3.1.2 85/05/10 14:31:52 lwall + * Prevented "Junked" or "Marked unread" when no state change. + * + * Revision 4.3.1.1 85/05/10 11:36:45 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:45:03 lwall * Baseline for release with 4.3bsd. * *************** *** 223,229 if (isspace(ch) || ch == ':') continue; if (ch == 'j') { ! mark_as_read(art); #ifdef VERBOSE IF(verbose) fputs("\tJunked",stdout); --- 229,236 ----- if (isspace(ch) || ch == ':') continue; if (ch == 'j') { ! if (!was_read(art)) { ! mark_as_read(art); #ifdef VERBOSE IF(verbose) fputs("\tJunked",stdout); *************** *** 228,233 IF(verbose) fputs("\tJunked",stdout); #endif } else if (ch == 'm') { unmark_as_read(art); --- 235,241 ----- IF(verbose) fputs("\tJunked",stdout); #endif + } } else if (ch == 'm') { if (was_read(art)) { *************** *** 230,236 #endif } else if (ch == 'm') { ! unmark_as_read(art); #ifdef VERBOSE IF(verbose) fputs("\tMarked unread",stdout); --- 238,245 ----- } } else if (ch == 'm') { ! if (was_read(art)) { ! unmark_as_read(art); #ifdef VERBOSE IF(verbose) fputs("\tMarked unread",stdout); *************** *** 235,240 IF(verbose) fputs("\tMarked unread",stdout); #endif } else if (ch == 'M') { #ifdef DELAYMARK --- 244,250 ----- IF(verbose) fputs("\tMarked unread",stdout); #endif + } } else if (ch == 'M') { #ifdef DELAYMARK SHAR_EOF cat << \SHAR_EOF > patch.4 Patch #: 4 Priority: ENHANCEMENT Subject: there should be a way to suppress quoted material and signatures From: lwall@sdcrdcf.UUCP (Larry Wall) Description: There have been numerous requests for a way to suppress quoted material and oversized signatures, especially at low baud rates. I resisted implementing any of the proposed solutions in the released version because I didn't feel they were general enough. It suddenly occured to me, however, that we already had regular expressions that supported alternatives, and that by defining a couple more environment variables (which can be set via a baud-rate-controlled -E switch) we could do what we wanted without hardwiring the current net conventions into rn. The following are the new "environment" variables: HIDELINE -- contains, if defined, a pattern of lines to hide. Can be used to suppress lines beginning with ">", for instance. PAGESTOP -- contains, if defined, a pattern of lines to treat as form feeds. This can be used to do page breaks between articles in a digest, and to do a page break before the signature, which can then be recognized (from the "--") and 'n'ed. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. Warning: this patch is not reversed. If the patch program says it is, then this patch has already been applied, and you should not apply it again. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 3 1c1 < Patch #: 3 --- > Patch #: 4 Index: art.c Prereq: 4.3.1.2 *** art.c.old Mon May 13 09:32:42 1985 --- art.c Mon May 13 09:32:48 1985 *************** *** 1,4 ! /* $Header: art.c,v 4.3.1.2 85/05/10 13:46:07 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.2 85/05/10 13:46:07 lwall --- 1,4 ----- ! /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.3 85/05/13 09:29:55 lwall *************** *** 1,6 /* $Header: art.c,v 4.3.1.2 85/05/10 13:46:07 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.2 85/05/10 13:46:07 lwall * Fixed header reparse bug on backpage. * --- 1,9 ----- /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $ * * $Log: art.c,v $ + * Revision 4.3.1.3 85/05/13 09:29:55 lwall + * Added CUSTOMLINES option. + * * Revision 4.3.1.2 85/05/10 13:46:07 lwall * Fixed header reparse bug on backpage. * *************** *** 61,66 bool firstpage; /* is this the 1st page of article? */ void art_init() { --- 64,71 ----- bool firstpage; /* is this the 1st page of article? */ + char art_buf[LBUFLEN]; /* place for article lines */ + void art_init() { *************** *** 72,78 { register char *s; ART_POS artsize; /* size in bytes of article */ - char art_buf[LBUFLEN]; /* place for article lines */ bool hide_this_line = FALSE; /* hidden header line? */ ART_LINE linenum; /* line # on page, 1 origin */ #ifdef ULSMARTS --- 77,82 ----- { register char *s; ART_POS artsize; /* size in bytes of article */ bool hide_this_line = FALSE; /* hidden header line? */ ART_LINE linenum; /* line # on page, 1 origin */ #ifdef ULSMARTS *************** *** 199,204 hide_this_line = TRUE; /* and do not print either */ notesfiles = FALSE; } if (in_header && htype[in_header].ht_flags & HT_MAGIC) { if (in_header == NGS_LINE) { hide_this_line = (index(art_buf,',') == Nullch && do_hiding); --- 203,213 ----- hide_this_line = TRUE; /* and do not print either */ notesfiles = FALSE; } + #ifdef CUSTOMLINES + if (hideline && bufptr == art_buf && + execute(&hide_compex,art_buf) ) + hide_this_line = TRUE; + #endif if (in_header && htype[in_header].ht_flags & HT_MAGIC) { if (in_header == NGS_LINE) { hide_this_line = (index(art_buf,',') == Nullch); *************** *** 201,207 } if (in_header && htype[in_header].ht_flags & HT_MAGIC) { if (in_header == NGS_LINE) { ! hide_this_line = (index(art_buf,',') == Nullch && do_hiding); } else if (in_header == EXPIR_LINE) { if (!(htype[EXPIR_LINE].ht_flags & HT_HIDE)) --- 210,216 ----- #endif if (in_header && htype[in_header].ht_flags & HT_MAGIC) { if (in_header == NGS_LINE) { ! hide_this_line = (index(art_buf,',') == Nullch); } else if (in_header == EXPIR_LINE) { if (!(htype[EXPIR_LINE].ht_flags & HT_HIDE)) *************** *** 205,211 } else if (in_header == EXPIR_LINE) { if (!(htype[EXPIR_LINE].ht_flags & HT_HIDE)) ! hide_this_line = (strlen(art_buf) < 10 && do_hiding); } } if (in_header == SUBJ_LINE && --- 214,220 ----- } else if (in_header == EXPIR_LINE) { if (!(htype[EXPIR_LINE].ht_flags & HT_HIDE)) ! hide_this_line = (strlen(art_buf) < 10); } } if (in_header == SUBJ_LINE && *************** *** 243,249 underprint(s); /* print subject underlined */ putchar('\n') FLUSH; /* and finish the line */ } ! else if (hide_this_line) { /* do not print line? */ linenum--; /* compensate for linenum++ */ if (!in_header) hide_this_line = FALSE; --- 252,259 ----- underprint(s); /* print subject underlined */ putchar('\n') FLUSH; /* and finish the line */ } ! else if (hide_this_line && do_hiding) { ! /* do not print line? */ linenum--; /* compensate for linenum++ */ if (!in_header) hide_this_line = FALSE; *************** *** 277,282 #endif maybe_eol(); /* PWP */ #endif CLEAREOL for (outpos = 0; outpos < COLS; ) { /* while line has room */ if (*bufptr >= ' ') { /* normal char? */ --- 287,297 ----- #endif maybe_eol(); /* PWP */ #endif CLEAREOL + #ifdef CUSTOMLINES + if (pagestop && bufptr == art_buf && + execute(&page_compex,art_buf) ) + linenum = 32700; + #endif for (outpos = 0; outpos < COLS; ) { /* while line has room */ if (*bufptr >= ' ') { /* normal char? */ *************** *** 559,565 case Ctl('d'): /* half page */ special = TRUE; slines = LINES / 2 + 1; ! if (marking && *blinebeg != '\f') { up_line(); highlight = --artline; restart = blinebeg; --- 574,585 ----- case Ctl('d'): /* half page */ special = TRUE; slines = LINES / 2 + 1; ! if (marking && *blinebeg != '\f' ! #ifdef CUSTOMLINES ! && (!pagestop || blinebeg != art_buf || ! !execute(&page_compex,blinebeg)) ! #endif ! ) { up_line(); highlight = --artline; restart = blinebeg; *************** *** 803,809 clear(); /* else clear screen */ #endif CLEAREOL ! if (*blinebeg != '\f') { restart = blinebeg; artline--; /* restart this line */ artpos = alinebeg; --- 823,834 ----- clear(); /* else clear screen */ #endif CLEAREOL ! if (*blinebeg != '\f' ! #ifdef CUSTOMLINES ! && (!pagestop || blinebeg != art_buf || ! !execute(&page_compex,blinebeg)) ! #endif ! ) { restart = blinebeg; artline--; /* restart this line */ artpos = alinebeg; *************** *** 814,820 /* and remember top line of screen */ /* (line # within article file) */ } ! else if (marking && *blinebeg != '\f') { /* are we marking repeats? */ up_line(); /* go up one line */ highlight = --artline;/* and get ready to highlight */ --- 839,850 ----- /* and remember top line of screen */ /* (line # within article file) */ } ! else if (marking && *blinebeg != '\f' ! #ifdef CUSTOMLINES ! && (!pagestop || blinebeg != art_buf || ! !execute(&page_compex,blinebeg)) ! #endif ! ) { /* are we marking repeats? */ up_line(); /* go up one line */ highlight = --artline;/* and get ready to highlight */ Index: artstate.h Prereq: 4.3 *** artstate.h.old Mon May 13 09:31:51 1985 --- artstate.h Mon May 13 09:31:52 1985 *************** *** 1,4 ! /* $Header: artstate.h,v 4.3 85/05/01 11:35:59 lwall Exp $ * * $Log: artstate.h,v $ * Revision 4.3 85/05/01 11:35:59 lwall --- 1,4 ----- ! /* $Header: artstate.h,v 4.3.1.2 85/05/13 09:30:30 lwall Exp $ * * $Log: artstate.h,v $ * Revision 4.3.1.2 85/05/13 09:30:30 lwall *************** *** 1,6 /* $Header: artstate.h,v 4.3 85/05/01 11:35:59 lwall Exp $ * * $Log: artstate.h,v $ * Revision 4.3 85/05/01 11:35:59 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: artstate.h,v 4.3.1.2 85/05/13 09:30:30 lwall Exp $ * * $Log: artstate.h,v $ + * Revision 4.3.1.2 85/05/13 09:30:30 lwall + * Added CUSTOMLINES option. + * + * Revision 4.3.1.1 85/05/10 11:31:32 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:35:59 lwall * Baseline for release with 4.3bsd. * *************** *** 19,21 EXT char *prompt; /* pointer to current prompt */ EXT char *firstline INIT(Nullch); /* special first line? */ --- 25,33 ----- EXT char *prompt; /* pointer to current prompt */ EXT char *firstline INIT(Nullch); /* special first line? */ + #ifdef CUSTOMLINES + EXT char *hideline INIT(Nullch); /* custom line hiding? */ + EXT char *pagestop INIT(Nullch); /* custom page terminator? */ + EXT COMPEX hide_compex; + EXT COMPEX page_compex; + #endif Index: common.h Prereq: 4.3 *** common.h.old Mon May 13 09:31:29 1985 --- common.h Mon May 13 09:31:33 1985 *************** *** 1,4 ! /* $Header: common.h,v 4.3 85/05/01 11:37:11 lwall Exp $ * * $Log: common.h,v $ * Revision 4.3 85/05/01 11:37:11 lwall --- 1,4 ----- ! /* $Header: common.h,v 4.3.1.2 85/05/13 09:30:39 lwall Exp $ * * $Log: common.h,v $ * Revision 4.3.1.2 85/05/13 09:30:39 lwall *************** *** 1,6 /* $Header: common.h,v 4.3 85/05/01 11:37:11 lwall Exp $ * * $Log: common.h,v $ * Revision 4.3 85/05/01 11:37:11 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: common.h,v 4.3.1.2 85/05/13 09:30:39 lwall Exp $ * * $Log: common.h,v $ + * Revision 4.3.1.2 85/05/13 09:30:39 lwall + * Added CUSTOMLINES option. + * + * Revision 4.3.1.1 85/05/10 11:32:04 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:37:11 lwall * Baseline for release with 4.3bsd. * *************** *** 215,220 /* In general, earlier ones are easier to get along without */ /* Pdp11's without split I and D may have to undefine them all */ #define DEBUGGING /* include debugging code */ #define PUSHBACK /* macros and keymaps using pushback buffer */ #define SPEEDOVERMEM /* use more memory to run faster */ #define WORDERASE /* enable ^W to erase a word */ --- 221,227 ----- /* In general, earlier ones are easier to get along without */ /* Pdp11's without split I and D may have to undefine them all */ #define DEBUGGING /* include debugging code */ + #define CUSTOMLINES /* include code for HIDELINE and PAGESTOP */ #define PUSHBACK /* macros and keymaps using pushback buffer */ #define SPEEDOVERMEM /* use more memory to run faster */ #define WORDERASE /* enable ^W to erase a word */ Index: ng.c Prereq: 4.3 *** ng.c.old Mon May 13 09:32:07 1985 --- ng.c Mon May 13 09:32:13 1985 *************** *** 1,4 ! /* $Header: ng.c,v 4.3 85/05/01 11:43:43 lwall Exp $ * * $Log: ng.c,v $ * Revision 4.3 85/05/01 11:43:43 lwall --- 1,4 ----- ! /* $Header: ng.c,v 4.3.1.2 85/05/13 09:29:28 lwall Exp $ * * $Log: ng.c,v $ * Revision 4.3.1.2 85/05/13 09:29:28 lwall *************** *** 1,6 /* $Header: ng.c,v 4.3 85/05/01 11:43:43 lwall Exp $ * * $Log: ng.c,v $ * Revision 4.3 85/05/01 11:43:43 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: ng.c,v 4.3.1.2 85/05/13 09:29:28 lwall Exp $ * * $Log: ng.c,v $ + * Revision 4.3.1.2 85/05/13 09:29:28 lwall + * Added CUSTOMLINES option. + * + * Revision 4.3.1.1 85/05/10 11:36:00 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:43:43 lwall * Baseline for release with 4.3bsd. * *************** *** 29,34 #include "backpage.h" #include "rcln.h" #include "last.h" #include "INTERN.h" #include "ng.h" #include "artstate.h" /* somebody has to do it */ --- 35,41 ----- #include "backpage.h" #include "rcln.h" #include "last.h" + #include "search.h" #include "INTERN.h" #include "ng.h" #include "artstate.h" /* somebody has to do it */ *************** *** 51,56 #ifdef KILLFILES open_kfile(KF_GLOBAL); #endif } /* do newsgroup on line ng with name ngname */ --- 58,67 ----- #ifdef KILLFILES open_kfile(KF_GLOBAL); #endif + #ifdef CUSTOMLINES + init_compex(&hide_compex); + init_compex(&page_compex); + #endif } /* do newsgroup on line ng with name ngname */ *************** *** 164,173 writelast(); - /* do they want a special top line? */ - - firstline = getval("FIRSTLINE",Nullch); - /* see if there are any special searches to do */ #ifdef KILLFILES --- 175,180 ----- writelast(); /* see if there are any special searches to do */ #ifdef KILLFILES *************** *** 182,187 #endif #endif /* now read each unread article */ rc_changed = doing_ng = TRUE; /* enter the twilight zone */ --- 189,207 ----- #endif #endif + /* do they want a special top line? */ + + firstline = getval("FIRSTLINE",Nullch); + + /* custom line suppression, custom page ending */ + + #ifdef CUSTOMLINES + if (hideline = getval("HIDELINE",Nullch)) + compile(&hide_compex,hideline,TRUE,TRUE); + if (pagestop = getval("PAGESTOP",Nullch)) + compile(&page_compex,pagestop,TRUE,TRUE); + #endif + /* now read each unread article */ rc_changed = doing_ng = TRUE; /* enter the twilight zone */ Index: rn.1 Prereq: 4.3 *** rn.1.old Mon May 13 09:33:24 1985 --- rn.1 Mon May 13 09:33:34 1985 *************** *** 1,4 ! ''' $Header: rn.1,v 4.3 85/05/01 11:48:26 lwall Exp $ ''' ''' $Log: rn.1,v $ ''' Revision 4.3 85/05/01 11:48:26 lwall --- 1,4 ----- ! ''' $Header: rn.1,v 4.3.1.2 85/05/13 09:27:53 lwall Exp $ ''' ''' $Log: rn.1,v $ ''' Revision 4.3.1.2 85/05/13 09:27:53 lwall *************** *** 1,6 ''' $Header: rn.1,v 4.3 85/05/01 11:48:26 lwall Exp $ ''' ''' $Log: rn.1,v $ ''' Revision 4.3 85/05/01 11:48:26 lwall ''' Baseline for release with 4.3bsd. ''' --- 1,12 ----- ''' $Header: rn.1,v 4.3.1.2 85/05/13 09:27:53 lwall Exp $ ''' ''' $Log: rn.1,v $ + ''' Revision 4.3.1.2 85/05/13 09:27:53 lwall + ''' Added CUSTOMLINES option. + ''' + ''' Revision 4.3.1.1 85/05/10 11:38:22 lwall + ''' Branch for patches. + ''' ''' Revision 4.3 85/05/01 11:48:26 lwall ''' Baseline for release with 4.3bsd. ''' *************** *** 1271,1276 Warning: this may go away. .Sp Default: Article %a %(%U%M!=^00$?(%U more%(%M!=^0$? + %M Marked to return)\e) )in %C:, more or less. .Ip HOME 8 Your home directory. Affects ~ interpretation, and the location of your --- 1277,1299 ----- Warning: this may go away. .Sp Default: Article %a %(%U%M!=^00$?(%U more%(%M!=^0$? + %M Marked to return)\e) )in %C:, more or less. + .Ip HIDELINE 8 + If defined, contains a regular expression which matches article lines to + be hidden, in order, for instance, to suppress quoted material. + A recommended string for this purpose is \*(L"^>...\*(R", which \fIdoesn't\fR + hide lines with only \*(L'>\*(R', to give some indication that quoted + material is being skipped. + If you want to hide more than one pattern, you can use \*(L"\|\*(R" to + separate the alternatives. + You can view the hidden lines by restarting the article with the \*(L'v\*(R' + command. + .Sp + There is some overhead involved in matching each line of the article against + a regular expression. + You might wish to use a baud-rate modifier to enable this feature only at + low baud rates. + .Sp + Default: undefined .Ip HOME 8 Your home directory. Affects ~ interpretation, and the location of your *************** *** 1401,1406 May be interpolated using \*(L"%o\*(R". .Sp Default: whatever your news administrator compiled in. .Ip "PIPESAVER (%)" 8 The shell command to execute in order to accomplish a save to a pipe (\*(L"s\ |\ command\*(R" or \*(L"w\ |\ command\*(R"). --- 1424,1449 ----- May be interpolated using \*(L"%o\*(R". .Sp Default: whatever your news administrator compiled in. + .Ip PAGESTOP 8 + If defined, contains a regular expression which matches article lines to + be treated as form-feeds. + There are at least two things you might want to do with this. + To cause page breaks between articles in a digest, you might define it + as \*(L"^--------\*(R". + To force a page break before a signature, you could define it + as \*(L"^-- $\*(R". + (Then, when you see \*(L"--\*(R" at the bottom of the page, you can skip + the signature if you so desire by typing \*(L'n\*(R' instead of space.) + To do both, you could use \*(L"^--\*(R". + If you want to break on more than one pattern, you can use \*(L"\|\*(R" to + separate the alternatives. + .Sp + There is some overhead involved in matching each line of the article against + a regular expression. + You might wish to use a baud-rate modifier to enable this feature only at + low baud rates. + .Sp + Default: undefined .Ip "PIPESAVER (%)" 8 The shell command to execute in order to accomplish a save to a pipe (\*(L"s\ |\ command\*(R" or \*(L"w\ |\ command\*(R"). SHAR_EOF cat << \SHAR_EOF > patch.5 System: rn version 4.3 Patch #: 5 Priority: LOW Subject: after exiting newsgroup with 'Q', space won't reenter newsgroup From: lwall@sdcrdcf.UUCP (Larry Wall) Description: When you exit a newsgroup with 'Q', which leaves you in the same newsgroup at the newsgroup selection level, the default command remains 'n' or '^N', despite what the prompt says. Typing space then does not have the expected result. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. Warning: this patch is not reversed. If the patch program says it is, then this patch has already been applied, and you should not apply it again. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 4 1c1 < Patch #: 4 --- > Patch #: 5 Index: rn.c Prereq: 4.3 *** rn.c.old Mon May 13 09:36:19 1985 --- rn.c Mon May 13 09:36:25 1985 *************** *** 8,14 * 2.0: 09/01/83 */ ! static char rnid[] = "@(#)$Header: rn.c,v 4.3 85/05/01 11:47:56 lwall Exp $"; /* $Log: rn.c,v $ * Revision 4.3 85/05/01 11:47:56 lwall --- 8,14 ----- * 2.0: 09/01/83 */ ! static char rnid[] = "@(#)$Header: rn.c,v 4.3.1.2 85/05/13 09:34:53 lwall Exp $"; /* $Log: rn.c,v $ * Revision 4.3.1.2 85/05/13 09:34:53 lwall *************** *** 11,16 static char rnid[] = "@(#)$Header: rn.c,v 4.3 85/05/01 11:47:56 lwall Exp $"; /* $Log: rn.c,v $ * Revision 4.3 85/05/01 11:47:56 lwall * Baseline for release with 4.3bsd. * --- 11,22 ----- static char rnid[] = "@(#)$Header: rn.c,v 4.3.1.2 85/05/13 09:34:53 lwall Exp $"; /* $Log: rn.c,v $ + * Revision 4.3.1.2 85/05/13 09:34:53 lwall + * Fixed default after do_newsgroup() returns from Q command. + * + * Revision 4.3.1.1 85/05/10 11:38:08 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:47:56 lwall * Baseline for release with 4.3bsd. * *************** *** 461,466 ng++; break; case NG_ASK: goto reask_newsgroup; case NG_MINUS: ng = recent_ng; /* recall previous newsgroup */ --- 467,473 ----- ng++; break; case NG_ASK: + dfltcmd = "ynq"; goto reask_newsgroup; case NG_MINUS: ng = recent_ng; /* recall previous newsgroup */ SHAR_EOF cat << \SHAR_EOF > patch.6 System: rn version 4.3 Patch #: 6 Priority: HIGH Subject: devtty isn't defined for TERMIO systems From: jimt@bmcg.UUCP (Jim Tollefson) Description: On TERMIO systems the variable devtty isn't defined. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 5 1c1 < Patch #: 5 --- > Patch #: 6 Index: term.h Prereq: 4.3 *** term.h.old Mon May 13 15:53:05 1985 --- term.h Mon May 13 15:53:09 1985 *************** *** 1,4 ! /* $Header: term.h,v 4.3 85/05/01 11:51:36 lwall Exp $ * * $Log: term.h,v $ * Revision 4.3 85/05/01 11:51:36 lwall --- 1,4 ----- ! /* $Header: term.h,v 4.3.1.2 85/05/13 15:52:05 lwall Exp $ * * $Log: term.h,v $ * Revision 4.3.1.2 85/05/13 15:52:05 lwall *************** *** 1,6 /* $Header: term.h,v 4.3 85/05/01 11:51:36 lwall Exp $ * * $Log: term.h,v $ * Revision 4.3 85/05/01 11:51:36 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: term.h,v 4.3.1.2 85/05/13 15:52:05 lwall Exp $ * * $Log: term.h,v $ + * Revision 4.3.1.2 85/05/13 15:52:05 lwall + * Declared devtty on TERMIO system. + * + * Revision 4.3.1.1 85/05/10 11:41:24 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:51:36 lwall * Baseline for release with 4.3bsd. * *************** *** 20,25 #endif lint #else FIONREAD int circfill(); #ifndef lint #define input_pending() (nextin!=nextout || circfill()) #else --- 26,32 ----- #endif lint #else FIONREAD int circfill(); + EXT int devtty INIT(0); #ifndef lint #define input_pending() (nextin!=nextout || circfill()) #else SHAR_EOF cat << \SHAR_EOF > patch.7 System: rn version 4.3 Patch #: 7 Priority: HIGH Subject: various fixes for configure and make stuff From: jimt@bmcg.UUCP (Jim Tollefson) Description: Make on System V has to have a space before a \ that continues a line--apparently it turns two tokens into one if you don't put the space and you get an "unexpected done" when you install. Certain libraries and include files are not found if they aren't in /usr/lib or /usr/include. Also, re-running Configure can have problems if the "contains" variable is defined to 'egrep', since egrep thinks '+' is special. Note: if the last patch sequence below doesn't find config.sh, just interrupt and you're done. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 6 1c1 < Patch #: 6 --- > Patch #: 7 Index: Makefile.SH Prereq: 4.3 *** Makefile.SH.old Mon May 13 17:22:15 1985 --- Makefile.SH Mon May 13 17:22:17 1985 *************** *** 3,9 esac echo "Extracting Makefile (with variable substitutions)" cat >Makefile <<!GROK!THIS! ! # $Header: Makefile.SH,v 4.3 85/05/01 11:33:26 lwall Exp $ # # $Log: Makefile.SH,v $ # Revision 4.3 85/05/01 11:33:26 lwall --- 3,9 ----- esac echo "Extracting Makefile (with variable substitutions)" cat >Makefile <<!GROK!THIS! ! # $Header: Makefile.SH,v 4.3.1.2 85/05/13 17:21:18 lwall Exp $ # # $Log: Makefile.SH,v $ # Revision 4.3.1.2 85/05/13 17:21:18 lwall *************** *** 6,11 # $Header: Makefile.SH,v 4.3 85/05/01 11:33:26 lwall Exp $ # # $Log: Makefile.SH,v $ # Revision 4.3 85/05/01 11:33:26 lwall # Baseline for release with 4.3bsd. # --- 6,17 ----- # $Header: Makefile.SH,v 4.3.1.2 85/05/13 17:21:18 lwall Exp $ # # $Log: Makefile.SH,v $ + # Revision 4.3.1.2 85/05/13 17:21:18 lwall + # System V make needs space before line-continuing backslash. + # + # Revision 4.3.1.1 85/05/10 11:30:15 lwall + # Branch for patches. + # # Revision 4.3 85/05/01 11:33:26 lwall # Baseline for release with 4.3bsd. # *************** *** 87,96 - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi cd `./filexp $(rnlib)`; chmod 755 $(private) - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi ! - if test `pwd` != $(mansrc); then\ ! for page in $(manpages); do\ ! cp $$page $(mansrc)/`basename $$page .1`.$(manext);\ ! done;\ fi clean: --- 93,102 ----- - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi cd `./filexp $(rnlib)`; chmod 755 $(private) - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi ! - if test `pwd` != $(mansrc); then \ ! for page in $(manpages); do \ ! cp $$page $(mansrc)/`basename $$page .1`.$(manext); \ ! done; \ fi clean: Index: Configure Prereq: 4.3 *** Configure.old Mon May 13 15:59:49 1985 --- Configure Mon May 13 16:00:35 1985 *************** *** 3,9 # If these # comments don't work, trim them. Don't worry about the other # shell scripts, Configure will trim # comments from them for you. # ! # $Header: Configure,v 4.3 85/05/01 11:31:23 lwall Exp $ # # $Log: Configure,v $ # Revision 4.3 85/05/01 11:31:23 lwall --- 3,9 ----- # If these # comments don't work, trim them. Don't worry about the other # shell scripts, Configure will trim # comments from them for you. # ! # $Header: Configure,v 4.3.1.2 85/05/13 15:54:35 lwall Exp $ # # $Log: Configure,v $ # Revision 4.3.1.2 85/05/13 15:54:35 lwall *************** *** 6,11 # $Header: Configure,v 4.3 85/05/01 11:31:23 lwall Exp $ # # $Log: Configure,v $ # Revision 4.3 85/05/01 11:31:23 lwall # Baseline for release with 4.3bsd. # --- 6,17 ----- # $Header: Configure,v 4.3.1.2 85/05/13 15:54:35 lwall Exp $ # # $Log: Configure,v $ + # Revision 4.3.1.2 85/05/13 15:54:35 lwall + # Libraries in /usr/local/lib shouldn't use -l switch. + # + # Revision 4.3.1.1 85/05/10 11:29:20 lwall + # Branch for patches. + # # Revision 4.3 85/05/01 11:31:23 lwall # Baseline for release with 4.3bsd. # *************** *** 480,490 echo "Substituting grep for egrep." egrep=$grep ;; - *) - case "$contains" in - grep*) contains=e$contains;; - esac - ;; esac case $test in test) --- 486,491 ----- echo "Substituting grep for egrep." egrep=$grep ;; esac case $test in test) *************** *** 1033,1039 havetlib=define $echo "Terminfo library found." else ! if loc libtermlib.a x /usr/lib /usr/local/lib /lib >/dev/null; then termlib='-ltermlib' havetlib=define $echo "Termlib library found." --- 1034,1042 ----- havetlib=define $echo "Terminfo library found." else ! ans=`loc libtermlib.a x /usr/lib /usr/local/lib /lib` ! case "$ans" in ! /usr/lib*|/lib*) termlib='-ltermlib' havetlib=define $echo "Termlib library found." *************** *** 1037,1044 termlib='-ltermlib' havetlib=define $echo "Termlib library found." ! else ! if loc libtermcap.a x /usr/lib /usr/local/lib /lib >/dev/null; then termlib='-ltermcap' havetlib=define $echo "Termcap library found." --- 1040,1055 ----- termlib='-ltermlib' havetlib=define $echo "Termlib library found." ! ;; ! /*) ! termlib="$ans" ! havetlib=define ! $echo "Termlib library found." ! ;; ! *) ! ans=`loc libtermcap.a x /usr/lib /usr/local/lib /lib` ! case "$ans" in ! /usr/lib*|/lib*) termlib='-ltermcap' havetlib=define $echo "Termcap library found." *************** *** 1042,1048 termlib='-ltermcap' havetlib=define $echo "Termcap library found." ! else case "$termlib" in '') $echo $n "Your system appears to NOT have termlib-style routines. Is this true? [y] $c" --- 1053,1065 ----- termlib='-ltermcap' havetlib=define $echo "Termcap library found." ! ;; ! /*) ! termlib="$ans" ! havetlib=define ! $echo "Termcap library found." ! ;; ! *) case "$termlib" in '') $echo $n "Your system appears to NOT have termlib-style routines. Is this true? [y] $c" *************** *** 1064,1071 *) $echo "You said termlib was $termlib before." ;; esac ! fi ! fi fi : see if there is a whoami file --- 1081,1090 ----- *) $echo "You said termlib was $termlib before." ;; esac ! ;; ! esac ! ;; ! esac fi : see if there is a whoami file *************** *** 1201,1207 jobslib='-ljobs' else if bsd; then ! $echo "No jobs library found. (I suppose this is 4.2...)" else $echo "No jobs library found. (That's okay, we all have our faults.)" fi --- 1220,1226 ----- jobslib='-ljobs' else if bsd; then ! $echo "No jobs library found. (I suppose this is at least 4.2...)" else $echo "No jobs library found. (That's okay, we all have our faults.)" fi *************** *** 1212,1218 : see if there are directory access routines out there if $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then $echo "Ndir library found." ! ndirlib='-lndir' libndir=define usendir=undef ndirc='' --- 1231,1241 ----- : see if there are directory access routines out there if $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then $echo "Ndir library found." ! if $test -r /usr/lib/libndir.a; then ! ndirlib='-lndir' ! else ! ndirlib="/usr/local/lib/libndir.a" ! fi libndir=define usendir=undef ndirc='' Index: makedepend.SH Prereq: 4.3 *** makedepend.SH.old Mon May 13 15:59:22 1985 --- makedepend.SH Mon May 13 15:59:24 1985 *************** *** 4,10 echo "Extracting makedepend (with variable substitutions)" $spitshell >makedepend <<!GROK!THIS! $startsh ! # $Header: makedepend.SH,v 4.3 85/05/01 11:42:26 lwall Exp $ # # $Log: makedepend.SH,v $ # Revision 4.3 85/05/01 11:42:26 lwall --- 4,10 ----- echo "Extracting makedepend (with variable substitutions)" $spitshell >makedepend <<!GROK!THIS! $startsh ! # $Header: makedepend.SH,v 4.3.1.2 85/05/13 15:53:42 lwall Exp $ # # $Log: makedepend.SH,v $ # Revision 4.3.1.2 85/05/13 15:53:42 lwall *************** *** 7,12 # $Header: makedepend.SH,v 4.3 85/05/01 11:42:26 lwall Exp $ # # $Log: makedepend.SH,v $ # Revision 4.3 85/05/01 11:42:26 lwall # Baseline for release with 4.3bsd. # --- 7,18 ----- # $Header: makedepend.SH,v 4.3.1.2 85/05/13 15:53:42 lwall Exp $ # # $Log: makedepend.SH,v $ + # Revision 4.3.1.2 85/05/13 15:53:42 lwall + # Made cpp look in /usr/local/include too. + # + # Revision 4.3.1.1 85/05/10 11:35:10 lwall + # Branch for patches. + # # Revision 4.3 85/05/01 11:42:26 lwall # Baseline for release with 4.3bsd. # *************** *** 25,31 -e 's|/\*.*$||' \\ -e p \\ -e '}' ! $cpp X\$file | $sed \\ -e '/^# *[0-9]/!d' \\ -e 's/^.*"\(.*\)".*\$/'\$filebase'.o: \1/' \\ -e 's|: \./|: |' \\ --- 31,37 ----- -e 's|/\*.*$||' \\ -e p \\ -e '}' ! $cpp -I/usr/local/include X\$file | $sed \\ -e '/^# *[0-9]/!d' \\ -e 's/^.*"\(.*\)".*\$/'\$filebase'.o: \1/' \\ -e 's|: \./|: |' \\ NOTE: if patch says "File to patch:", it just means you haven't run Configure yet, and don't need the following patch. Just type interrupt and you're done. Index: config.sh *** config.sh.old Mon Apr 1 16:18:20 1985 --- config.sh Mon May 13 16:26:07 1985 *************** *** 27,33 inews="/usr/lib/news/inews" grep="/usr/ucb/grep" egrep="/usr/bin/egrep" ! contains="egrep" lib="/usr/lib/news" libexp="/usr/lib/news" nametype="bsd" --- 27,33 ----- inews="/usr/lib/news/inews" grep="/usr/ucb/grep" egrep="/usr/bin/egrep" ! contains="grep" lib="/usr/lib/news" libexp="/usr/lib/news" nametype="bsd" SHAR_EOF cat << \SHAR_EOF > patch.8 System: rn version 4.3 Patch #: 8 Priority: MEDIUM Subject: default doesn't work in normal vs mailbox question From: lwall@sdcrdcf.UUCP (Larry Wall) Description: Through a mental short circuit on the part of the author, the default mechanism was munched on the question you are asked when saving an article regarding whether you want it to be a mailbox or a normal file. Repeat-By: Save a file to a new name. When it asks what kind of file you want to create, type space. It will get mad at you. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 7 1c1 < Patch #: 7 --- > Patch #: 8 Index: respond.c Prereq: 4.3 *** respond.c.old Tue May 14 08:57:20 1985 --- respond.c Tue May 14 08:57:24 1985 *************** *** 1,4 ! /* $Header: respond.c,v 4.3 85/05/01 11:47:04 lwall Exp $ * * $Log: respond.c,v $ * Revision 4.3 85/05/01 11:47:04 lwall --- 1,4 ----- ! /* $Header: respond.c,v 4.3.1.2 85/05/14 08:55:15 lwall Exp $ * * $Log: respond.c,v $ * Revision 4.3.1.2 85/05/14 08:55:15 lwall *************** *** 1,6 /* $Header: respond.c,v 4.3 85/05/01 11:47:04 lwall Exp $ * * $Log: respond.c,v $ * Revision 4.3 85/05/01 11:47:04 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: respond.c,v 4.3.1.2 85/05/14 08:55:15 lwall Exp $ * * $Log: respond.c,v $ + * Revision 4.3.1.2 85/05/14 08:55:15 lwall + * Default for normal/mailbox question was applied to wrong buffer. + * + * Revision 4.3.1.1 85/05/10 11:37:33 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:47:04 lwall * Baseline for release with 4.3bsd. * *************** *** 147,153 reask_save: in_char(cmd_buf); putchar('\n') FLUSH; ! setdef(cmd_buf,dflt); #ifdef VERIFY printcmd(); #endif --- 153,159 ----- reask_save: in_char(cmd_buf); putchar('\n') FLUSH; ! setdef(buf,dflt); #ifdef VERIFY printcmd(); #endif SHAR_EOF cat << \SHAR_EOF > patch.9 System: rn version 4.3 Patch #: 9 Priority: LOW Subject: some random typos and stuff From: ekrell@ucla-cs.UUCP (Eduardo Krell), dsp@ptsfa.UUCP (David St. Pierre) Description: "gecos" was misspelled in intrp.c intrp.h was included twice in respond.c execl() in util.c was 0 terminated instead of Nullch terminated. ndir.c used short where it should use ino_t. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. If patch indicates that patchlevel is the wrong version, you may need to apply one or more previous patches, or the patch may already have been applied. See the patchlevel file to find out what has or has not been applied. In any event, don't continue with the patch. Index: patchlevel Prereq: 8 1c1 < Patch #: 8 --- > Patch #: 9 Index: intrp.c Prereq: 4.3 *** intrp.c.old Wed May 15 14:47:52 1985 --- intrp.c Wed May 15 14:48:07 1985 *************** *** 1,4 ! /* $Header: intrp.c,v 4.3 85/05/01 11:40:54 lwall Exp $ * * $Log: intrp.c,v $ * Revision 4.3 85/05/01 11:40:54 lwall --- 1,4 ----- ! /* $Header: intrp.c,v 4.3.1.2 85/05/15 14:39:45 lwall Exp $ * * $Log: intrp.c,v $ * Revision 4.3.1.2 85/05/15 14:39:45 lwall *************** *** 1,6 /* $Header: intrp.c,v 4.3 85/05/01 11:40:54 lwall Exp $ * * $Log: intrp.c,v $ * Revision 4.3 85/05/01 11:40:54 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: intrp.c,v 4.3.1.2 85/05/15 14:39:45 lwall Exp $ * * $Log: intrp.c,v $ + * Revision 4.3.1.2 85/05/15 14:39:45 lwall + * Spelled gecos right. + * + * Revision 4.3.1.1 85/05/10 11:33:51 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:40:54 lwall * Baseline for release with 4.3bsd. * *************** *** 990,996 #ifdef GETPWENT struct passwd *pwd = getpwuid(uid); ! s = pwd->pw_gcos; #else char tmpbuf[512]; int i; --- 996,1002 ----- #ifdef GETPWENT struct passwd *pwd = getpwuid(uid); ! s = pwd->pw_gecos; #else char tmpbuf[512]; int i; Index: ndir.c Prereq: 4.3 *** ndir.c.old Wed May 15 14:50:24 1985 --- ndir.c Wed May 15 14:50:26 1985 *************** *** 1,4 ! /* $Header: ndir.c,v 4.3 85/05/01 11:42:55 lwall Exp $ * * $Log: ndir.c,v $ * Revision 4.3 85/05/01 11:42:55 lwall --- 1,4 ----- ! /* $Header: ndir.c,v 4.3.1.2 85/05/15 14:46:00 lwall Exp $ * * $Log: ndir.c,v $ * Revision 4.3.1.2 85/05/15 14:46:00 lwall *************** *** 1,6 /* $Header: ndir.c,v 4.3 85/05/01 11:42:55 lwall Exp $ * * $Log: ndir.c,v $ * Revision 4.3 85/05/01 11:42:55 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: ndir.c,v 4.3.1.2 85/05/15 14:46:00 lwall Exp $ * * $Log: ndir.c,v $ + * Revision 4.3.1.2 85/05/15 14:46:00 lwall + * Changed short to ino_t, which may be ushort on some systems. + * + * Revision 4.3.1.1 85/05/10 11:35:34 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:42:55 lwall * Baseline for release with 4.3bsd. * *************** *** 12,17 #include "ndir.h" #ifdef USENDIR /* * support for Berkeley directory reading routine on a V7 file system */ --- 18,24 ----- #include "ndir.h" #ifdef USENDIR + #include <sys/types.h> /* * support for Berkeley directory reading routine on a V7 file system */ *************** *** 44,50 #define ODIRSIZ 14 struct olddirect { ! short od_ino; char od_name[ODIRSIZ]; }; #else an Pyramid in the ATT universe --- 51,57 ----- #define ODIRSIZ 14 struct olddirect { ! ino_t od_ino; char od_name[ODIRSIZ]; }; #else an Pyramid in the ATT universe Index: respond.c Prereq: 4.3.1.2 *** respond.c.old Wed May 15 14:49:17 1985 --- respond.c Wed May 15 14:49:31 1985 *************** *** 1,4 ! /* $Header: respond.c,v 4.3.1.2 85/05/14 08:55:15 lwall Exp $ * * $Log: respond.c,v $ * Revision 4.3.1.2 85/05/14 08:55:15 lwall --- 1,4 ----- ! /* $Header: respond.c,v 4.3.1.3 85/05/15 14:42:32 lwall Exp $ * * $Log: respond.c,v $ * Revision 4.3.1.3 85/05/15 14:42:32 lwall *************** *** 1,6 /* $Header: respond.c,v 4.3.1.2 85/05/14 08:55:15 lwall Exp $ * * $Log: respond.c,v $ * Revision 4.3.1.2 85/05/14 08:55:15 lwall * Default for normal/mailbox question was applied to wrong buffer. * --- 1,9 ----- /* $Header: respond.c,v 4.3.1.3 85/05/15 14:42:32 lwall Exp $ * * $Log: respond.c,v $ + * Revision 4.3.1.3 85/05/15 14:42:32 lwall + * Removed duplicate include of intrp.h. + * * Revision 4.3.1.2 85/05/14 08:55:15 lwall * Default for normal/mailbox question was applied to wrong buffer. * *************** *** 20,26 #include "ng.h" #include "util.h" #include "rn.h" - #include "intrp.h" #include "artio.h" #include "final.h" #include "INTERN.h" --- 23,28 ----- #include "ng.h" #include "util.h" #include "rn.h" #include "artio.h" #include "final.h" #include "INTERN.h" Index: util.c Prereq: 4.3 *** util.c.old Wed May 15 14:49:49 1985 --- util.c Wed May 15 14:49:53 1985 *************** *** 1,4 ! /* $Header: util.c,v 4.3 85/05/01 11:51:44 lwall Exp $ * * $Log: util.c,v $ * Revision 4.3 85/05/01 11:51:44 lwall --- 1,4 ----- ! /* $Header: util.c,v 4.3.1.2 85/05/15 14:44:27 lwall Exp $ * * $Log: util.c,v $ * Revision 4.3.1.2 85/05/15 14:44:27 lwall *************** *** 1,6 /* $Header: util.c,v 4.3 85/05/01 11:51:44 lwall Exp $ * * $Log: util.c,v $ * Revision 4.3 85/05/01 11:51:44 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: util.c,v 4.3.1.2 85/05/15 14:44:27 lwall Exp $ * * $Log: util.c,v $ + * Revision 4.3.1.2 85/05/15 14:44:27 lwall + * Last arg of execl changed from 0 to Nullch [(char*)0]. + * + * Revision 4.3.1.1 85/05/10 11:41:30 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:51:44 lwall * Baseline for release with 4.3bsd. * *************** *** 40,46 shell = PREFSHELL; if ((pid = vfork()) == 0) { if (*s) ! execl(shell, shell, "-c", s, 0); else execl(shell, shell, Nullch, Nullch, 0); _exit(127); --- 46,52 ----- shell = PREFSHELL; if ((pid = vfork()) == 0) { if (*s) ! execl(shell, shell, "-c", s, Nullch); else execl(shell, shell, Nullch, Nullch, Nullch); _exit(127); *************** *** 42,48 if (*s) execl(shell, shell, "-c", s, 0); else ! execl(shell, shell, Nullch, Nullch, 0); _exit(127); } #ifndef lint --- 48,54 ----- if (*s) execl(shell, shell, "-c", s, Nullch); else ! execl(shell, shell, Nullch, Nullch, Nullch); _exit(127); } #ifndef lint SHAR_EOF # End of shell archive exit 0