weening@Gang-of-Four.Stanford.EDU (Joe Weening) (10/31/89)
Here is patch #40 to rn version 4.3, which many people don't seem to have. (It was sent out in early 1987, but many FTP sites still have rn patched to level 39.) It is a very simple patch. Note that the patch for one of the files, ngdata.c, conflicts with the patch for that file in the "rrnpatches" of NNTP, so if you use rrn, you will have to fix this by hand. Also, the file "rrn.39.tar.Z" on many hosts is based on an out-of-date version of the NNTP sources, so you should not use it if you want to build an up-to-date rrn. System: rn version 4.3 Patch #: 40 Priority: HIGH Subject: moderated groups work differently now From: lwall@sdcrdcf (Larry Wall) Description: As part of the newsgroup renaming scheme, moderated groups will no longer be of the form mod.*. In order that users know when they are in a moderated group, rn should say whether a given group is moderated. Additionally, the code in Pnews to handle moderated groups is now obsolete, since inews handles it. Fix: To fix Pnews to be compatible with 2.11 inews, just remove your /usr/lib/news/moderators file, or equivalent, if you have one. If you haven't installed 2.11 yet, leave your moderators file there until you install 2.11, which will be soon. (!!!!) To fix rn, install the following patches and recompile. 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. If you are missing previous patches they can be obtained from me: Larry Wall {allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall If you send a mail message of the following form it will greatly speed processing: Subject: Command @SH mailpatch PATH rn 4.3 LIST ^ notice the c where PATH is a return path FROM ME TO YOU in bang notation, and LIST is a list of one or more patches you need, separated by spaces, commas and/or hyphens. Saying n- will give you everything from n on up. Index: patchlevel Prereq: 39 1c1 < Patch #: 39 --- > Patch #: 40 Index: art.c *** /tmp/,RCSt1026463 Mon Jan 26 16:50:34 1987 --- art.c Mon Jan 26 16:37:40 1987 *************** *** 25,30 #include "common.h" #include "rn.h" #include "ngstuff.h" #include "head.h" #include "cheat.h" #include "help.h" --- 25,31 ----- #include "common.h" #include "rn.h" #include "ngstuff.h" + #include "ngdata.h" #include "head.h" #include "cheat.h" #include "help.h" *************** *** 161,166 #endif if (htype[NGS_LINE].ht_flags & HT_HIDE) printf(" in %s", ngname); fputs(":\n",stdout) FLUSH; } start_header(art); --- 162,168 ----- #endif if (htype[NGS_LINE].ht_flags & HT_HIDE) printf(" in %s", ngname); + fputs(moderated,stdout); fputs(":\n",stdout) FLUSH; } start_header(art); Index: ngdata.c *** /tmp/,RCSt1026442 Mon Jan 26 16:49:41 1987 --- ngdata.c Mon Jan 26 16:43:23 1987 *************** *** 17,22 #include "intrp.h" #include "final.h" #include "rcln.h" #include "INTERN.h" #include "ngdata.h" --- 17,23 ----- #include "intrp.h" #include "final.h" #include "rcln.h" + #include "util.h" #include "INTERN.h" #include "ngdata.h" *************** *** 89,94 #else abs1st = tmp; #endif } #endif return atol(tmpbuf+len+1); --- 90,102 ----- #else abs1st = tmp; #endif + if (!in_ng) { + for (s++; isdigit(*s); s++) ; + while (isspace(*s)) s++; + moderated = (!*s || *s == 'y' + ? nullstr + : getval("MODSTRING"," (moderated)") ); + } } #endif return atol(tmpbuf+len+1); Index: ngdata.h *** /tmp/,RCSt1026500 Mon Jan 26 16:51:29 1987 --- ngdata.h Mon Jan 26 16:25:11 1987 *************** *** 21,26 # endif #endif void ngdata_init(); ART_NUM getngsize(); --- 21,27 ----- # endif #endif + EXT char *moderated; void ngdata_init(); ART_NUM getngsize(); ### End of Patch 40 ### -- Joe Weening Computer Science Dept. weening@Gang-of-Four.Stanford.EDU Stanford University