home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume19 / cnews2 / pch12mar90 < prev    next >
Internet Message Format  |  1990-03-25  |  46KB

  1. From @uunet.uu.net:henry@zoo.toronto.edu Tue Mar 13 14:02:22 1990
  2. Received: from BBN.COM by pineapple.bbn.com id <AA13669@pineapple.bbn.com>; Tue, 13 Mar 90 14:00:50 -0500
  3. Received: from uunet.UU.NET by BBN.COM id aa10871; 13 Mar 90 13:45 EST
  4. Received: from zoo.utoronto.ca by uunet.uu.net (5.61/1.14) with SMTP 
  5.     id AA03015; Tue, 13 Mar 90 13:41:17 -0500
  6. Message-Id: <9003131841.AA03015@uunet.uu.net>
  7. From: henry@zoo.toronto.edu
  8. Date: Tue, 13 Mar 90 13:40:38 EST
  9. To: uunet!source-patches@uunet.uu.net
  10. Subject: C News patch of 12-Mar-1990
  11. Status: R
  12.  
  13. This is another collection of small stuff.  Fix some small bugs in the
  14. great build revision; build now will take the saved-answers filename as
  15. an argument if desired; subst now tells you which files (if any) it
  16. changed; the ldiv() function is no longer used; <stdio.h> is now relied
  17. on for the declaration of sprintf(), eliminating the question of what
  18. type it returns; several error messages improved; newsgroup-matching
  19. algorithm refined, improved, and precisely documented (!!!); lazy
  20. cache refills in relaynews; documentation on a specialized reason why
  21. relaynews might exit with status 1; further additions to the porting-
  22. problems document; relaynews now invokes dbmclose() in preparation for
  23. the dbz cutover; fix bug in relaynews fallback to symlinks if hard links
  24. fail; the usual minor cleanups and fixes.
  25.  
  26. start of patch 12-Mar-1990
  27. (suggested archive name: `pch12Mar90.Z')
  28. this should be run with   patch -p0 <thisfile
  29.  
  30. Please do the following (there is no easy way we can convince
  31. patch to do this automatically):
  32. rm hfake/stdlib.h
  33. rm libfake/ldiv.c
  34. rm relay/hdrcommon.c
  35.  
  36. The following is a complete list of patches to date.
  37.  
  38. Prereq: 23-Jun-1989
  39. Prereq: 7-Jul-1989
  40. Prereq: 23-Jul-1989
  41. Prereq: 22-Aug-1989
  42. Prereq: 24-Aug-1989
  43. Prereq: 14-Sep-1989
  44. Prereq: 13-Nov-1989
  45. Prereq: 10-Jan-1990
  46. Prereq: 16-Jan-1990
  47. Prereq: 17-Jan-1990
  48. Prereq: 18-Jan-1990
  49. *** PATCHDATES.old    Mon Mar 12 13:38:16 1990
  50. --- PATCHDATES    Mon Mar 12 13:38:16 1990
  51. ***************
  52. *** 1,11 ****
  53. --- 1,12 ----
  54.   23-Jun-1989
  55.   7-Jul-1989
  56.   23-Jul-1989
  57.   22-Aug-1989
  58.   24-Aug-1989
  59.   14-Sep-1989
  60.   13-Nov-1989
  61.   10-Jan-1990
  62.   16-Jan-1990
  63.   17-Jan-1990
  64.   18-Jan-1990
  65. + 12-Mar-1990
  66.  
  67. Changed files, if any:
  68.  
  69. *** cnpatch/old/README    Fri Jun 23 14:45:40 1989
  70. --- README    Wed Jan 31 13:23:55 1990
  71. ***************
  72. *** 128,132 ****
  73.   
  74.   See ROADMAP for a run-down on what's where in the distribution.  See
  75. ! doc/install for how to install it.  Conf/build is the interactive setup
  76.   program that does most of the work, or rather, sets up shell files which,
  77.   when run, do most of the work.  Even if your system is odd enough that
  78. --- 128,133 ----
  79.   
  80.   See ROADMAP for a run-down on what's where in the distribution.  See
  81. ! doc/install for how to install it.  You may wish to read notebook/problems,
  82. ! which discusses common difficulties.  Conf/build is the interactive setup
  83.   program that does most of the work, or rather, sets up shell files which,
  84.   when run, do most of the work.  Even if your system is odd enough that
  85.  
  86. *** cnpatch/old/conf/build    Thu Jan 18 13:23:58 1990
  87. --- conf/build    Mon Feb 19 15:09:37 1990
  88. ***************
  89. *** 5,9 ****
  90.   vars='newsuid newsgid binuid bingid binsrc mess unmess newsarts newsctl
  91.       newsbin newsumask newsmaster newsconfig chown chboth chgrp unixkind
  92. !     addrsize dbmopt faststdio storeval faststrchr sete sprintfchar ranlib
  93.       symdef cc copts ldopts postlibs hostname uname uucptype dftype dfdirs
  94.       archive spacelow nfsgroup server manpages manmess rbin doui bin atok
  95. --- 5,9 ----
  96.   vars='newsuid newsgid binuid bingid binsrc mess unmess newsarts newsctl
  97.       newsbin newsumask newsmaster newsconfig chown chboth chgrp unixkind
  98. !     addrsize dbmopt faststdio storeval faststrchr sete ranlib
  99.       symdef cc copts ldopts postlibs hostname uname uucptype dftype dfdirs
  100.       archive spacelow nfsgroup server manpages manmess rbin doui bin atok
  101. ***************
  102. *** 10,13 ****
  103. --- 10,15 ----
  104.       postdefltdist paranoid whoami mailname organization postdefltgroup
  105.       newspath fake fakehdrs'
  106. + # where to remember them, by default
  107. + memory=build.def
  108.   
  109.   # functions and headers we are prepared to fake
  110. ***************
  111. *** 14,18 ****
  112.   mightfake='fsync getopt memcpy memcmp memchr memset mkdir
  113.       putenv strchr strrchr strpbrk strspn strcspn strtok symlink'
  114. ! mightfakehdrs='stdlib.h string.h'
  115.   
  116.   # directories in which to do makes
  117. --- 16,20 ----
  118.   mightfake='fsync getopt memcpy memcmp memchr memset mkdir
  119.       putenv strchr strrchr strpbrk strspn strcspn strtok symlink'
  120. ! mightfakehdrs='string.h'
  121.   
  122.   # directories in which to do makes
  123. ***************
  124. *** 39,43 ****
  125.   chmod +x ask yesno notinlist    # just in case
  126.   
  127. ! if test -r build.def
  128.   then
  129.       echo
  130. --- 41,49 ----
  131.   chmod +x ask yesno notinlist    # just in case
  132.   
  133. ! case $# in
  134. ! 0)    ;;
  135. ! *)    memory="$1"    ;;
  136. ! esac
  137. ! if test -r $memory
  138.   then
  139.       echo
  140. ***************
  141. *** 46,50 ****
  142.       yes)    echo
  143.           echo 'Picking up defaults, from last run...'
  144. !         . build.def
  145.           echo 'done'
  146.           ;;
  147. --- 52,56 ----
  148.       yes)    echo
  149.           echo 'Picking up defaults, from last run...'
  150. !         . $memory
  151.           echo 'done'
  152.           ;;
  153. ***************
  154. *** 212,230 ****
  155.       lb=
  156.       case "$unmess" in
  157. !     yes)    echo "mkdir $realarts $realctl $realbin"
  158. !         if test " $realarts" != " $newsarts"
  159.           then
  160. !             echo "ln -s $realarts $newsarts"
  161. !             ln="$ln $realarts"
  162.           fi
  163. !         if test " $realctl" != " $newsctl"
  164.           then
  165. !             echo "ln -s $realctl $newsctl"
  166. !             ln="$ln $realctl"
  167.           fi
  168. !         if test " $realbin" != " $newsbin"
  169.           then
  170. !             echo "ln -s $realbin $newsbin"
  171. !             lb="$lb $realbin"
  172.           fi
  173.           ;;
  174. --- 218,236 ----
  175.       lb=
  176.       case "$unmess" in
  177. !     yes)    echo "mkdir $newsarts $newsctl $newsbin"
  178. !         if test " $linkarts" != " $newsarts"
  179.           then
  180. !             echo "ln -s $newsarts $linkarts"
  181. !             ln="$ln $linkarts"
  182.           fi
  183. !         if test " $linkctl" != " $newsctl"
  184.           then
  185. !             echo "ln -s $newsctl $linkctl"
  186. !             ln="$ln $linkctl"
  187.           fi
  188. !         if test " $linkbin" != " $newsbin"
  189.           then
  190. !             echo "ln -s $newsbin $linkbin"
  191. !             lb="$lb $linkbin"
  192.           fi
  193.           ;;
  194. ***************
  195. *** 297,305 ****
  196.       esac
  197.   done
  198. - has=`notinlist "$fake" ldiv.o`
  199. - tmp=`yesno 'Does your system have a library function ldiv() as in ANSI C' $has`
  200. - case "$tmp" in
  201. - no)    newfake="$newfake ldiv.o"    ;;
  202. - esac
  203.   has=`notinlist "$fake" dbm.o`
  204.   tmp=`yesno 'Does your system have the "dbm" library' $has`
  205. --- 303,306 ----
  206. ***************
  207. *** 386,403 ****
  208.   
  209.   echo
  210. - echo 'Some old systems think sprintf() returns a value of type "char *".'
  211. - echo 'The modern standard is that it returns "int".  Does your sprintf()'
  212. - sprintfchar=`yesno 'return "char *"' ${sprintfchar-no}`
  213. - case "$sprintfchar" in
  214. - yes)    echo 'You may have to hand-edit our "libc.h" include file if'
  215. -     echo 'your compiler objects to us declaring sprintf() to'
  216. -     echo 'return "int".  (This will usually happen only if your'
  217. -     echo '<stdio.h> header file declares sprintf() -- some do,'
  218. -     echo 'some do not.)  If you do need to edit "libc.h", look'
  219. -     echo 'for the definition of "sprvalue".'
  220. -     ;;
  221. - esac
  222. - echo
  223.   echo 'Very old Unix systems needed the order of object modules in a library'
  224.   echo 'chosen very carefully.  V7 introduced "ranlib" which removes the need'
  225. --- 387,390 ----
  226. ***************
  227. *** 477,481 ****
  228.   echo '    bsd    4.2BSD and later'
  229.   echo '    sysv    many System Vs'
  230. ! echo '    xenix    some (all?) Xenixes, notably SCO; also Microport?'
  231.   echo '    sgi    Silicon Graphics Iris systems'
  232.   echo '    ultrix    DEC Ultrix 3.0 (and later) (and earlier??)'
  233. --- 464,468 ----
  234.   echo '    bsd    4.2BSD and later'
  235.   echo '    sysv    many System Vs'
  236. ! echo '    xenix    some (all?) Xenixes; some System Vs, e.g. Microport, HP?'
  237.   echo '    sgi    Silicon Graphics Iris systems'
  238.   echo '    ultrix    DEC Ultrix 3.0 (and later) (and earlier??)'
  239. ***************
  240. *** 502,506 ****
  241.   echo 'name of a device.  Modern ones can be given any directory name and'
  242.   echo 'the system handles the details of figuring out what device is meant.'
  243. ! dfdirs=`yesno 'Will your "df" accept a directory-name argument' ${dfdirs-yes}`
  244.   case "$dfdirs" in
  245.   no)    echo 'You are going to have to customize "spacefor" for your system.'
  246. --- 489,494 ----
  247.   echo 'name of a device.  Modern ones can be given any directory name and'
  248.   echo 'the system handles the details of figuring out what device is meant.'
  249. ! echo 'A few will take a directory only if it is the "top" of a filesystem.'
  250. ! dfdirs=`yesno 'Will "df" accept any directory name as an argument' ${dfdirs-yes}`
  251.   case "$dfdirs" in
  252.   no)    echo 'You are going to have to customize "spacefor" for your system.'
  253. ***************
  254. *** 535,539 ****
  255.   echo 'Are you running C News on a group of machines hooked together with NFS,'
  256.   nfsgroup=`yesno 'with articles filed on one "server" machine' ${nfsgroup-no}`
  257. - server=
  258.   case "$nfsgroup" in
  259.   yes)    case "$hostname$uname" in
  260. --- 523,526 ----
  261. ***************
  262. *** 978,985 ****
  263.   echo
  264.   echo 'saving defaults...'
  265. ! rm -f build.def
  266. ! >build.def
  267.   warn='# These answers are interdependent; do not edit this file!'
  268. ! if test ! -w build.def
  269.   then
  270.       echo 'It appears that I cannot save the defaults.'
  271. --- 965,972 ----
  272.   echo
  273.   echo 'saving defaults...'
  274. ! rm -f $memory
  275. ! >$memory
  276.   warn='# These answers are interdependent; do not edit this file!'
  277. ! if test ! -w $memory
  278.   then
  279.       echo 'It appears that I cannot save the defaults.'
  280. ***************
  281. *** 991,998 ****
  282.               eval "echo $v=\\\"\$$v\\\""
  283.           done
  284. !     ) >>build.def
  285.       echo 'done'
  286.   fi
  287. ! chmod -w build.def
  288.   
  289.   echo
  290. --- 978,985 ----
  291.               eval "echo $v=\\\"\$$v\\\""
  292.           done
  293. !     ) >>$memory
  294.       echo 'done'
  295.   fi
  296. ! chmod -w $memory
  297.   
  298.   echo
  299.  
  300. *** cnpatch/old/conf/subst    Tue Jan 16 17:58:28 1990
  301. --- conf/subst    Sat Feb 10 19:53:16 1990
  302. ***************
  303. *** 36,40 ****
  304.           ;;
  305.       esac
  306. !     echo "$f:"
  307.   
  308.       # test existences
  309. --- 36,40 ----
  310.           ;;
  311.       esac
  312. !     echo "$f: " | tr -d '\012'
  313.   
  314.       # test existences
  315. ***************
  316. *** 77,80 ****
  317. --- 77,81 ----
  318.       then
  319.           rm -f $new $old
  320. +         echo "unchanged"
  321.       else
  322.           trap "mv $old $f; exit" 1 2 15
  323. ***************
  324. *** 83,86 ****
  325. --- 84,88 ----
  326.           trap "rm -f $old; exit" 1 2 15
  327.           rm $old
  328. +         echo "updated"
  329.       fi
  330.   done
  331.  
  332. *** cnpatch/old/expire/README    Wed Jan 10 19:10:22 1990
  333. --- expire/README    Sat Jan 27 21:57:01 1990
  334. ***************
  335. *** 1,10 ****
  336.   C News expire
  337.   
  338. ! Unlike the old alpha C News expire, this one will accept B News history
  339.   files... although that slows it down, and this hasn't been tested well.
  340.   Beware that the date in the middle field of the history line must be
  341. ! readable to getdate(3), and rumor hath it that late B 2.11 dates are not.
  342. ! Talk about stupid...  We don't care enough to do anything about this.
  343.   Rebuilding your history file in C News format is preferable anyway.
  344.   
  345.   It WON'T accept the old experimental C News four-field history files;
  346. --- 1,10 ----
  347.   C News expire
  348.   
  349. ! Unlike the old alpha C News expire, this one will accept old B News history
  350.   files... although that slows it down, and this hasn't been tested well.
  351.   Beware that the date in the middle field of the history line must be
  352. ! readable to getdate(3), and rumor hath it that mid-B2.11 dates are not.
  353.   Rebuilding your history file in C News format is preferable anyway.
  354. + Current releases of B News use C News format, in fact.
  355.   
  356.   It WON'T accept the old experimental C News four-field history files;
  357.  
  358. *** cnpatch/old/expire/dircheck    Fri Jun 23 14:45:45 1989
  359. --- expire/dircheck    Tue Mar  6 13:42:58 1990
  360. ***************
  361. *** 6,10 ****
  362.   esac
  363.   
  364. ! for f in `sed 's/.*    //;s/\./\//g'`
  365.   do
  366.       if test " $invert" = " "
  367. --- 6,10 ----
  368.   esac
  369.   
  370. ! for f in `sed 's/.*    //;s:\.:/:g'`
  371.   do
  372.       if test " $invert" = " "
  373.  
  374. *** cnpatch/old/expire/doexpire    Thu Aug 24 16:39:49 1989
  375. --- expire/doexpire    Sat Feb 17 19:27:24 1990
  376. ***************
  377. *** 40,45 ****
  378.   if test " $ropt" = " -r"
  379.   then
  380. !     echo "$0: short of space for temporaries, resorting to \`expire -r'" |
  381. !                             mail "$NEWSMASTER"
  382.   fi
  383.   
  384. --- 40,51 ----
  385.   if test " $ropt" = " -r"
  386.   then
  387. !     (
  388. !         echo "$0:"
  389. !         echo "    SEVERE SPACE SHORTAGE in $NEWSCTL !"
  390. !         echo "    Unable to rebuild history files due to insufficient"
  391. !         echo "    space for temporaries -- resorting to \`expire -r'."
  392. !         echo "    Growth of the history files will make things worse;"
  393. !         echo "    if shortage persists, human action is urgently needed."
  394. !     ) | mail "$NEWSMASTER"
  395.   fi
  396.   
  397.  
  398. *** cnpatch/old/expire/expire.c    Wed Jan 10 19:10:24 1990
  399. --- expire/expire.c    Fri Feb 23 15:15:32 1990
  400. ***************
  401. *** 1168,1171 ****
  402. --- 1168,1173 ----
  403.   char *s2;
  404.   {
  405. +     int saveerr = errno;
  406.       if (spacetight) {
  407.           cd(ctlfile((char *)NULL));
  408. ***************
  409. *** 1174,1177 ****
  410. --- 1176,1180 ----
  411.           (void) unlink("history.n.pag");
  412.       }
  413. +     errno = saveerr;
  414.       errunlock(s1, s2);
  415.       /* NOTREACHED */
  416.  
  417. *** cnpatch/old/h/libc.h    Mon Nov 13 17:39:44 1989
  418. --- h/libc.h    Thu Feb  8 15:01:17 1990
  419. ***************
  420. *** 1,3 ****
  421.   #ifndef LIBC_H
  422.   #define LIBC_H
  423. --- 1,2 ----
  424. ***************
  425. *** 55,66 ****
  426.   #endif                    /* A_STABLE_WORLD */
  427.   extern FILE *popen();            /* stdio.h */
  428. ! #ifdef __STDC__
  429. ! extern int printf(char *fmt, ...);    /* stdio.h */
  430. ! extern int fprintf(FILE *fp, char *fmt, ...);        /* stdio.h */
  431. ! extern sprvalue sprintf(char *buf, char *fmt, ...);    /* stdio.h */
  432. ! #else                    /* __STDC__ */
  433. ! extern int printf(), fprintf();        /* stdio.h */
  434. ! extern sprvalue sprintf();        /* stdio.h */
  435. ! #endif                    /* __STDC__ */
  436.   
  437.   /* these unfortunately cannot be relied upon to be in the right header */
  438. --- 54,58 ----
  439.   #endif                    /* A_STABLE_WORLD */
  440.   extern FILE *popen();            /* stdio.h */
  441. ! /* stdio.h is supposed to declare *printf */
  442.   
  443.   /* these unfortunately cannot be relied upon to be in the right header */
  444.  
  445. *** cnpatch/old/h/news.h    Mon Nov 13 17:39:44 1989
  446. --- h/news.h    Mon Mar  5 13:41:55 1990
  447. ***************
  448. *** 71,75 ****
  449.   /* STREQN is an optimised strncmp(a,b,n)==0; assumes n > 0 */
  450.   #define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)
  451. ! #define STRLEN(s) (sizeof (s) - 1)    /* s must be a char array */
  452.   #ifdef FASTSTRCHR
  453.   #define STRCHR(src, chr, dest) (dest) = strchr(src, chr)
  454. --- 71,75 ----
  455.   /* STREQN is an optimised strncmp(a,b,n)==0; assumes n > 0 */
  456.   #define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)
  457. ! #define STRLEN(s) ((unsigned)sizeof(s) - 1)    /* s must be a char array */
  458.   #ifdef FASTSTRCHR
  459.   #define STRCHR(src, chr, dest) (dest) = strchr(src, chr)
  460. ***************
  461. *** 87,90 ****
  462. --- 87,91 ----
  463.   #define nnafree(mempp) (*(mempp) != 0? (free((char *)*(mempp)), (*(mempp) = 0)): 0)
  464.   #ifdef lint
  465. + static
  466.   nnfree(mempp)        /* If *mempp is non-null, free it and zero it. */
  467.   register char **mempp;            /* pointer to malloc'ed ptr. */
  468.  
  469. *** cnpatch/old/hfake/Makefile    Wed Jan 10 19:10:30 1990
  470. --- hfake/Makefile    Fri Mar  9 14:12:39 1990
  471. ***************
  472. *** 2,11 ****
  473.   
  474.   # beware -- build knows about NEEDED
  475. ! NEEDED =  ../include/stdlib.h ../include/string.h
  476.   
  477.   all:    $(NEEDED)
  478.   
  479. - $(I)/stdlib.h:    stdlib.h
  480. -     cp stdlib.h $@
  481.   $(I)/string.h:    string.h
  482.       cp string.h $@
  483. --- 2,9 ----
  484.   
  485.   # beware -- build knows about NEEDED
  486. ! NEEDED =  ../include/string.h
  487.   
  488.   all:    $(NEEDED)
  489.   
  490.   $(I)/string.h:    string.h
  491.       cp string.h $@
  492.  
  493. *** cnpatch/old/input/newsrun    Wed Jan 10 19:10:33 1990
  494. --- input/newsrun    Thu Mar  8 12:20:53 1990
  495. ***************
  496. *** 139,143 ****
  497.                   mv $f $bad    # Not $text, save the ORIGINAL!
  498.               fi
  499. !             echo "$server relaynews \`$bad' failed, status $st" |
  500.                               mail "$NEWSMASTER"
  501.           fi
  502. --- 139,143 ----
  503.                   mv $f $bad    # Not $text, save the ORIGINAL!
  504.               fi
  505. !             echo "$server relaynews \`$bad' failed, status $st (see errlog)" |
  506.                               mail "$NEWSMASTER"
  507.           fi
  508.  
  509. *** cnpatch/old/libcnews/ltoza.c    Tue Jun 20 18:59:10 1989
  510. --- libcnews/ltoza.c    Sat Feb 10 18:50:46 1990
  511. ***************
  512. *** 6,10 ****
  513.    * with printf on V7, due to a bug in V7's printf.
  514.    */
  515. - #include <stdlib.h>
  516.   
  517.   #define RADIX 10
  518. --- 6,9 ----
  519. ***************
  520. *** 32,40 ****
  521.       op += wwid - 1;            /* find right end */
  522.       while (wwid-- > 0) {        /* generate "wwid" digits */
  523. !         register ldiv_t result;
  524. !         result = ldiv(wval, (long)RADIX);    /* shades of V6! */
  525. !         wval = result.quot;
  526. !         *op-- = result.rem + '0';
  527.       }
  528.       return wval == 0;
  529. --- 31,36 ----
  530.       op += wwid - 1;            /* find right end */
  531.       while (wwid-- > 0) {        /* generate "wwid" digits */
  532. !         *op-- = wval % RADIX + '0';
  533. !         wval /= RADIX;
  534.       }
  535.       return wval == 0;
  536.  
  537. *** cnpatch/old/libcnews/ngmatch.c    Thu Aug 24 16:39:54 1989
  538. --- libcnews/ngmatch.c    Wed Mar  7 13:45:05 1990
  539. ***************
  540. *** 9,24 ****
  541.    *    word: { alphanum }+ | "all"
  542.    *
  543. !  * Only one group need match for success.  (Redundant?)
  544.    *
  545.    * For each group, note the depth of each match against the patterns,
  546. !  * negated or not.  Ignore mismatches.  The deepest match wins at the end;
  547. !  * if it's a tie, negated matches are rejections.
  548.    *
  549. -  * A match of any group against the patterns is a success.
  550. -  * Failure to match any pattern with a group is a mismatch of that group.
  551. -  * Failure to match any group against any pattern is a total failure.
  552. -  *
  553.    * "all" in a pattern is a wildcard that matches exactly one word;
  554. !  * it does not cross "." (NGDELIM) delimiters.
  555.    */
  556.   
  557. --- 9,26 ----
  558.    *    word: { alphanum }+ | "all"
  559.    *
  560. !  * Only one group need match for success.
  561. !  * Failure to match any pattern with a group is a mismatch of that group only.
  562. !  * Failure to match any group against any pattern is a total failure.
  563.    *
  564.    * For each group, note the depth of each match against the patterns,
  565. !  * negated or not.  Ignore mismatches.  The deepest match wins at the
  566. !  * end:  a deeper negated match is a failure, a deeper plain match is a
  567. !  * success; a tie is a failure, but see the description of wildcards.
  568.    *
  569.    * "all" in a pattern is a wildcard that matches exactly one word;
  570. !  * it does not cross "." (NGDELIM) delimiters.  A non-wildcard match is
  571. !  * considered to have matched slightly deeper than a wildcard match in the
  572. !  * same position.  This ensures that !alt.sex.all,alt.sex.bondage matches
  573. !  * alt.sex.bondage.
  574.    */
  575.   
  576. ***************
  577. *** 106,114 ****
  578.               ;            /* ignore it */
  579.           else if (negation) {
  580. !             /* record ordinal # of deepest negated matched word */
  581.               if (depth > faildeepest)
  582.                   faildeepest = depth;
  583.           } else {
  584. !             /* record ordinal # of deepest plain matched word */
  585.               if (depth > hitdeepest)
  586.                   hitdeepest = depth;
  587. --- 108,116 ----
  588.               ;            /* ignore it */
  589.           else if (negation) {
  590. !             /* record depth of deepest negated matched word */
  591.               if (depth > faildeepest)
  592.                   faildeepest = depth;
  593.           } else {
  594. !             /* record depth of deepest plain matched word */
  595.               if (depth > hitdeepest)
  596.                   hitdeepest = depth;
  597. ***************
  598. *** 124,130 ****
  599.    * Match a pattern against a group by looking at each word of pattern in turn.
  600.    *
  601. !  * On a match, return the ordinal number of the rightmost word that matches.
  602. !  * If group runs out first, the match fails; else it succeeds.
  603. !  * On a failure, return zero.
  604.    */
  605.   STATIC int
  606. --- 126,132 ----
  607.    * Match a pattern against a group by looking at each word of pattern in turn.
  608.    *
  609. !  * On a match, return the depth (roughly, ordinal number * k) of the rightmost
  610. !  * word that matches.  If group runs out first, the match fails; if pattern
  611. !  * runs out first, it succeeds.  On a failure, return zero.
  612.    */
  613.   STATIC int
  614. ***************
  615. *** 138,143 ****
  616.   
  617.       for (patwd = patp, grwd = grp; patwd != NULL && grwd != NULL;
  618. !         patwd = patdot, grwd = grdot, depth++) {
  619. !         register boolean match;
  620.   
  621.               /* null-terminate words */
  622. --- 140,146 ----
  623.   
  624.       for (patwd = patp, grwd = grp; patwd != NULL && grwd != NULL;
  625. !         patwd = patdot, grwd = grdot) {
  626. !         register boolean match = NO;
  627. !         register int incr = 20;
  628.   
  629.               /* null-terminate words */
  630. ***************
  631. *** 151,160 ****
  632.           /*
  633.            * Match one word of pattern with one word of group.
  634. !          * A pattern word of "all" matches any group word.
  635.            */
  636.   #ifdef FAST_STRCMP
  637. !         match = STREQ(patwd, grwd) || STREQ(patwd, ALL);
  638.   #else
  639. -         match = NO;
  640.           for (rpatwd = patwd; *rpatwd == *grwd++; )
  641.               if (*rpatwd++ == '\0') {
  642. --- 154,167 ----
  643.           /*
  644.            * Match one word of pattern with one word of group.
  645. !          * A pattern word of "all" matches any group word,
  646. !          * but isn't worth as much.
  647.            */
  648.   #ifdef FAST_STRCMP
  649. !         match = STREQ(patwd, grwd);
  650. !         if (!match && STREQ(patwd, ALL)) {
  651. !             match = YES;
  652. !             --incr;
  653. !         }
  654.   #else
  655.           for (rpatwd = patwd; *rpatwd == *grwd++; )
  656.               if (*rpatwd++ == '\0') {
  657. ***************
  658. *** 165,170 ****
  659.               /* ugly special case match for "all" */
  660.               rpatwd = patwd;
  661. !             match = *rpatwd++ == 'a' && *rpatwd++ == 'l' &&
  662. !                     *rpatwd++ == 'l' && *rpatwd   == '\0';
  663.           }
  664.   #endif                /* FAST_STRCMP */
  665. --- 172,180 ----
  666.               /* ugly special case match for "all" */
  667.               rpatwd = patwd;
  668. !             if (*rpatwd++ == 'a' && *rpatwd++ == 'l' &&
  669. !                 *rpatwd++ == 'l' && *rpatwd   == '\0') {
  670. !                 match = YES;
  671. !                 --incr;
  672. !             }
  673.           }
  674.   #endif                /* FAST_STRCMP */
  675. ***************
  676. *** 178,181 ****
  677. --- 188,192 ----
  678.               break;
  679.           }
  680. +         depth += incr;
  681.       }
  682.       /* if group name ran out before pattern, then match fails */
  683.  
  684. *** cnpatch/old/libcnews/strsave.c    Tue Jun 20 18:59:17 1989
  685. --- libcnews/strsave.c    Mon Mar  5 13:41:56 1990
  686. ***************
  687. *** 17,21 ****
  688.   register char *s;
  689.   {
  690. !     register char *news =nemalloc((unsigned)strlen(s)+1); /* include NUL */
  691.   
  692.       (void) strcpy(news, s);
  693. --- 17,21 ----
  694.   register char *s;
  695.   {
  696. !     register char *news = nemalloc((unsigned)strlen(s) + SIZENUL);
  697.   
  698.       (void) strcpy(news, s);
  699.  
  700. *** cnpatch/old/libcnews/time.c    Tue Jun 20 18:59:07 1989
  701. --- libcnews/time.c    Mon Mar  5 13:42:00 1990
  702. ***************
  703. *** 19,23 ****
  704.   {
  705.       struct timeb ftnow;
  706. !     char ms[4];                /* room for "123" and a NUL */
  707.   
  708.       ftime(&ftnow);
  709. --- 19,23 ----
  710.   {
  711.       struct timeb ftnow;
  712. !     char ms[STRLEN("123") + SIZENUL];
  713.   
  714.       ftime(&ftnow);
  715.  
  716. *** cnpatch/old/libfake/Makefile    Wed Jan 10 19:10:37 1990
  717. --- libfake/Makefile    Fri Mar  9 14:13:14 1990
  718. ***************
  719. *** 5,9 ****
  720.   SHELL = /bin/sh
  721.   
  722. ! ALL = dbm.o fsync.o getopt.o ldiv.o memchr.o memcmp.o memcpy.o \
  723.   memset.o mkdir.o putenv.o strchr.o strcspn.o strpbrk.o strrchr.o \
  724.   strspn.o strtok.o symlink.o dbmclose.o
  725. --- 5,9 ----
  726.   SHELL = /bin/sh
  727.   
  728. ! ALL = dbm.o fsync.o getopt.o memchr.o memcmp.o memcpy.o \
  729.   memset.o mkdir.o putenv.o strchr.o strcspn.o strpbrk.o strrchr.o \
  730.   strspn.o strtok.o symlink.o dbmclose.o
  731. ***************
  732. *** 10,14 ****
  733.   
  734.   # beware -- build knows about NEEDED
  735. ! NEEDED =  ldiv.o
  736.   
  737.   u:    $(NEEDED)
  738. --- 10,14 ----
  739.   
  740.   # beware -- build knows about NEEDED
  741. ! NEEDED = 
  742.   
  743.   u:    $(NEEDED)
  744. ***************
  745. *** 18,23 ****
  746.   
  747.   try:    $(ALL)
  748. - # ldiv.o:    $(INCLUDE)/stdlib.h    # trouble if stdlib.h isn't ours
  749.   
  750.   clean:
  751. --- 18,21 ----
  752.  
  753. *** cnpatch/old/libfake/README    Tue Jun 20 18:59:22 1989
  754. --- libfake/README    Sat Feb 10 19:40:25 1990
  755. ***************
  756. *** 8,14 ****
  757.   Fsync and symlink are C-News-specific fakes.
  758.   
  759. - Ldiv.c is inefficient but provides the full ANSI C functionality.  (Do not
  760. - confuse it with the prehistoric ldiv function found in some very old Unixes.)
  761.   The mem* and str* and *index functions come from Henry Spencer's public-domain
  762.   string-functions implementation.  Said implementation is somewhat in need of
  763. --- 8,11 ----
  764.  
  765. *** cnpatch/old/libstdio/LEGAL.STDIO    Tue Jun 20 18:59:38 1989
  766. --- libstdio/LEGAL.STDIO    Mon Mar  5 13:42:00 1990
  767. ***************
  768. *** 1,3 ****
  769. ! Page 165 of The C Programming Language describes some of the workings
  770. ! of the UNIX stdio implementation. In particular, it describes the
  771. ! function of _ptr and _cnt.
  772. --- 1,7 ----
  773. ! Page 165 of The C Programming Language, 1st ed. describes some of the
  774. ! workings of the UNIX stdio implementation.  In particular, it describes
  775. ! the function of _ptr and _cnt.
  776. ! Section 8 of The C Programming Language, 2nd ed. provides more detail.
  777. ! In particular, page 176 publishes a stdio.h, likely derived from some
  778. ! UNIX version.
  779.  
  780. *** cnpatch/old/man/expire.8    Tue Jan 16 17:58:29 1990
  781. --- man/expire.8    Thu Mar  8 18:30:54 1990
  782. ***************
  783. *** 7,11 ****
  784.   .\" =()<.ds m @<NEWSMASTER>@>()=
  785.   .ds m usenet
  786. ! .TH EXPIRE 8 "12 Jan 1990" "C News"
  787.   .SH NAME
  788.   expire, doexpire \- expire old news
  789. --- 7,12 ----
  790.   .\" =()<.ds m @<NEWSMASTER>@>()=
  791.   .ds m usenet
  792. ! .TH EXPIRE 8 "12 Jan 1990"
  793. ! .BY "C News"
  794.   .SH NAME
  795.   expire, doexpire \- expire old news
  796.  
  797. *** cnpatch/old/man/inews.1    Thu Sep 14 16:03:41 1989
  798. --- man/inews.1    Thu Mar  8 18:31:05 1990
  799. ***************
  800. *** 7,11 ****
  801.   .\" =()<.ds m @<NEWSMASTER>@>()=
  802.   .ds m usenet
  803. ! .TH INEWS 1 "29 Aug 1989" "C News"
  804.   .SH NAME
  805.   inews \- `user-friendly' news-posting front-end for relaynews
  806. --- 7,12 ----
  807.   .\" =()<.ds m @<NEWSMASTER>@>()=
  808.   .ds m usenet
  809. ! .TH INEWS 1 "29 Aug 1989"
  810. ! .BY "C News"
  811.   .SH NAME
  812.   inews \- `user-friendly' news-posting front-end for relaynews
  813.  
  814. *** cnpatch/old/man/news.5    Tue Jun 20 18:59:58 1989
  815. --- man/news.5    Sun Mar 11 01:54:56 1990
  816. ***************
  817. *** 25,29 ****
  818.   .LP
  819.   ..
  820. ! .TH NEWS 5 "8 June 1989" "C News"
  821.   .SH NAME
  822.   news \- USENET network news articles, batches, related files
  823. --- 25,30 ----
  824.   .LP
  825.   ..
  826. ! .TH NEWS 5 "9 March 1990"
  827. ! .BY "C News"
  828.   .SH NAME
  829.   news \- USENET network news articles, batches, related files
  830. ***************
  831. *** 110,114 ****
  832.   Expires: Saturday, 1 Jan 83 00:00:00 EST
  833.   Organization: Bell Labs, Murray Hill
  834.   The body of the article comes here, after a blank line.
  835.   .Ee
  836. --- 111,115 ----
  837.   Expires: Saturday, 1 Jan 83 00:00:00 EST
  838.   Organization: Bell Labs, Murray Hill
  839. ! .sp 0.3
  840.   The body of the article comes here, after a blank line.
  841.   .Ee
  842. ***************
  843. *** 193,204 ****
  844.   headers to avoid sending an article back
  845.   to a site that has seen it.
  846. - The special name
  847. - .B ME
  848. - stands for the name of the machine news is running on,
  849. - as determined by some operating-system dependent means
  850. - such as
  851. - .IR hostname (2)
  852. - or
  853. - .IR uname (2).
  854.   The
  855.   .IR exclusion s
  856. --- 194,197 ----
  857. ***************
  858. *** 210,237 ****
  859.   .IR exclusions .
  860.   .PP
  861. ! The
  862.   .I subscriptions
  863. ! is the list of newsgroups to be transmitted to the
  864. ! .IR system
  865. ! (or received if
  866. ! .I system
  867. ! is the current site);
  868. ! they are matched against the
  869.   .B Newsgroups:
  870.   header of each article
  871. ! and any matching articles are transmitted:
  872.   .B all
  873. ! matches any single word,
  874. ! stopping at periods and commas;
  875. ! .B comp
  876. ! also implies
  877. ! .BR comp.all ,
  878. ! recursively;
  879. ! .B !talk
  880. ! .I mismatches
  881. ! all the
  882. ! .B talk
  883. ! groups;
  884. ! order is unimportant;
  885.   .B comp,comp.sys.sun,!comp.sys
  886.   matches all the
  887. --- 203,291 ----
  888.   .IR exclusions .
  889.   .PP
  890. ! The special
  891. ! .I system name
  892. ! .B ME
  893. ! stands for the name of the machine news is running on,
  894. ! as determined from
  895. ! .IR \*c/whoami .
  896. ! (The
  897. ! .B ME
  898. ! line,
  899. ! or a line whose
  900. ! .I system name
  901. ! is explicitly that of the machine news is running on,
  902. ! has a rather different meaning from that of the other
  903. ! .I sys
  904. ! file lines:
  905. ! its
  906.   .I subscriptions
  907. ! subfield
  908. ! identifies
  909. ! the newsgroups that this site subscribes to (i.e. is willing to receive),
  910. ! and its other fields and subfields are ignored.)
  911. ! .PP
  912. ! .I subscriptions
  913. ! is a comma-separated list of
  914. ! .I "newsgroup patterns"
  915. ! specifying the newsgroups
  916. ! to be transmitted to the
  917. ! .IR system ;
  918. ! each newsgroup from the
  919.   .B Newsgroups:
  920.   header of each article
  921. ! is matched against the pattern list,
  922. ! and if any newsgroup matches the pattern list,
  923. ! the article is transmitted.
  924. ! The rules for matching a newsgroup against a single pattern are:
  925. ! .IP \(bu "\w'\(bu  'u"
  926. ! .IR word s
  927. ! in a newsgroup or a pattern
  928. ! are delimited by periods;
  929. ! .IP \(bu
  930. ! words of a pattern and a newsgroup
  931. ! match only if they are identical,
  932. ! except that
  933. ! the word
  934.   .B all
  935. ! in a pattern
  936. ! matches any newsgroup word;
  937. ! .IP \(bu
  938. ! a newsgroup is matched against a pattern word by word, and all words
  939. ! must match for the newsgroup to match that pattern;
  940. ! .IP \(bu
  941. ! if the pattern has fewer words than the newsgroup, the pattern is implicitly
  942. ! extended to the same number of words by appending
  943. ! .B \&.all
  944. ! as many times as necessary;
  945. ! .IP \(bu
  946. ! if the newsgroup has fewer words than the pattern, the newsgroup does not
  947. ! match the pattern;
  948. ! .IP \(bu
  949. ! if
  950. ! .I pattern
  951. ! matches a newsgroup,
  952. ! .BI ! pattern
  953. ! .IR mis matches
  954. ! that newsgroup.
  955. ! .LP
  956. ! A newsgroup matches a pattern list if, and only if, it matches at least
  957. ! one of the patterns and:
  958. ! .IP \(bu "\w'\(bu  'u"
  959. ! the newsgroup
  960. ! does not mismatch any of the patterns, or
  961. ! .IP \(bu
  962. ! the longest matched pattern is longer than the longest mismatched
  963. ! pattern
  964. ! (length is measured in number of words,
  965. ! with each explicit occurrence of
  966. ! .B all
  967. ! counted as slightly less than one word,
  968. ! and does not include
  969. ! the implicit extension of patterns with
  970. ! .BR \&.all ).
  971. ! .LP
  972. ! Note that order in the lists is not significant,
  973. ! and that ties are broken in favor of not matching.
  974. ! An example:
  975.   .B comp,comp.sys.sun,!comp.sys
  976.   matches all the
  977. ***************
  978. *** 244,263 ****
  979.   .I "but including"
  980.   .BR comp.sys.sun .
  981.   The
  982. ! .I distributions
  983. ! are matched similarly with the
  984.   .B Distribution:
  985. ! header,
  986. ! but only when sending articles;
  987. ! .I distributions
  988. ! do not affect receipt of articles.
  989.   If no
  990.   .I distributions
  991.   are supplied,
  992.   the
  993.   .I subscriptions
  994. - will be matched against
  995. - .B Distribution:
  996.   instead.
  997.   .PP
  998.   The
  999. --- 298,320 ----
  1000.   .I "but including"
  1001.   .BR comp.sys.sun .
  1002. + .PP
  1003.   The
  1004. ! distributions in the
  1005.   .B Distribution:
  1006. ! header
  1007. ! are similarly matched against the
  1008. ! .IR distributions .
  1009.   If no
  1010.   .I distributions
  1011.   are supplied,
  1012. + .B Distribution:
  1013. + will be matched against
  1014.   the
  1015.   .I subscriptions
  1016.   instead.
  1017. + (The
  1018. + .B Distribution:
  1019. + header is ignored when receiving news;
  1020. + it is only significant when sending.)
  1021.   .PP
  1022.   The
  1023. ***************
  1024. *** 300,306 ****
  1025.   to be transmitted as the standard input.
  1026.   The default is
  1027. ! .RI "`uux \- \-z \-r " sysname !rnews'
  1028.   for a command;
  1029. ! the PATH searched includes \*b/relay,
  1030.   so that the commands described in \fInewsmail\fR(8)
  1031.   are available as alternatives to \fIuux\fR.
  1032. --- 357,366 ----
  1033.   to be transmitted as the standard input.
  1034.   The default is
  1035. ! `\c
  1036. ! .BI "uux \- \-z \-r " sysname !rnews\c
  1037. ! \&'
  1038.   for a command;
  1039. ! the PATH searched includes
  1040. ! .BR \*b/relay ,
  1041.   so that the commands described in \fInewsmail\fR(8)
  1042.   are available as alternatives to \fIuux\fR.
  1043. ***************
  1044. *** 308,315 ****
  1045.   this field to be taken as a filename,
  1046.   the default is
  1047. ! .RI \*a/out.going/ sysname /togo;
  1048.   if a filename is given but it does not start with `/', it is assumed
  1049.   to be relative to the
  1050. ! \*a/out.going
  1051.   directory.
  1052.   .LP
  1053. --- 368,376 ----
  1054.   this field to be taken as a filename,
  1055.   the default is
  1056. ! .BI \*a/out.going/ sysname /togo\c
  1057. ! ;
  1058.   if a filename is given but it does not start with `/', it is assumed
  1059.   to be relative to the
  1060. ! .B \*a/out.going
  1061.   directory.
  1062.   .LP
  1063. ***************
  1064. *** 318,334 ****
  1065.   # line indicating what we are willing to receive; note local groups on end
  1066.   ME:comp,news,sci,rec,misc,soc,talk,to,can,ont,tor,ut
  1067.   # sample insignificant feed not using batching
  1068.   huey:news.config,to.huey/all::uux - -r -gd huey!rnews
  1069.   # sample major batched feed, including (unnecessary) explicit file name
  1070.   dewey:comp,news,sci,rec,misc,soc,talk,to.dewey,can,ont,tor,ut/all:f:dewey/togo
  1071.   # sample long-haul feed; note no local groups
  1072.   donald:comp,news,sci,rec,misc,soc,talk,to.donald/all:f:
  1073.   # sample local-postings-only feed direct to major site (gets them out fast)
  1074.   scrooge:comp,news,sci,rec,misc,soc,talk,to.scrooge/all:Lf:
  1075.   # sample ihave/sendme link
  1076.   # Send ihave telling louie what we have -- batcher turns the batch into a
  1077. --- 379,395 ----
  1078.   # line indicating what we are willing to receive; note local groups on end
  1079.   ME:comp,news,sci,rec,misc,soc,talk,to,can,ont,tor,ut
  1080. ! .sp 0.3
  1081.   # sample insignificant feed not using batching
  1082.   huey:news.config,to.huey/all::uux - -r -gd huey!rnews
  1083. ! .sp 0.3
  1084.   # sample major batched feed, including (unnecessary) explicit file name
  1085.   dewey:comp,news,sci,rec,misc,soc,talk,to.dewey,can,ont,tor,ut/all:f:dewey/togo
  1086. ! .sp 0.3
  1087.   # sample long-haul feed; note no local groups
  1088.   donald:comp,news,sci,rec,misc,soc,talk,to.donald/all:f:
  1089. ! .sp 0.3
  1090.   # sample local-postings-only feed direct to major site (gets them out fast)
  1091.   scrooge:comp,news,sci,rec,misc,soc,talk,to.scrooge/all:Lf:
  1092. ! .sp 0.3
  1093.   # sample ihave/sendme link
  1094.   # Send ihave telling louie what we have -- batcher turns the batch into a
  1095.  
  1096. *** cnpatch/old/man/newsaux.8    Tue Jan 16 17:58:30 1990
  1097. --- man/newsaux.8    Thu Mar  8 18:31:33 1990
  1098. ***************
  1099. *** 7,11 ****
  1100.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1101.   .ds m usenet
  1102. ! .TH NEWSAUX 8 "13 Jan 1990" "C News"
  1103.   .SH NAME
  1104.   spacefor \- check available space for news
  1105. --- 7,12 ----
  1106.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1107.   .ds m usenet
  1108. ! .TH NEWSAUX 8 "13 Jan 1990"
  1109. ! .BY "C News"
  1110.   .SH NAME
  1111.   spacefor \- check available space for news
  1112.  
  1113. *** cnpatch/old/man/newsbatch.8    Tue Jan 16 17:58:31 1990
  1114. --- man/newsbatch.8    Thu Mar  8 18:31:45 1990
  1115. ***************
  1116. *** 7,11 ****
  1117.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1118.   .ds m usenet
  1119. ! .TH NEWSBATCH 8 "13 Jan 1990" "C News"
  1120.   .SH NAME
  1121.   sendbatches, batchsplit \- news batching to other sites
  1122. --- 7,12 ----
  1123.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1124.   .ds m usenet
  1125. ! .TH NEWSBATCH 8 "13 Jan 1990"
  1126. ! .BY "C News"
  1127.   .SH NAME
  1128.   sendbatches, batchsplit \- news batching to other sites
  1129.  
  1130. *** cnpatch/old/man/newsmail.8    Fri Jun 23 14:45:48 1989
  1131. --- man/newsmail.8    Thu Mar  8 18:31:55 1990
  1132. ***************
  1133. *** 7,11 ****
  1134.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1135.   .ds m usenet
  1136. ! .TH NEWSMAIL 8 "22 June 1989" "C News"
  1137.   .SH NAME
  1138.   mailnews, sendnews \- send unbatched news as mail
  1139. --- 7,12 ----
  1140.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1141.   .ds m usenet
  1142. ! .TH NEWSMAIL 8 "22 June 1989"
  1143. ! .BY "C News"
  1144.   .SH NAME
  1145.   mailnews, sendnews \- send unbatched news as mail
  1146.  
  1147. *** cnpatch/old/man/newsmaint.8    Tue Jan 16 17:58:24 1990
  1148. --- man/newsmaint.8    Thu Mar  8 18:32:05 1990
  1149. ***************
  1150. *** 7,11 ****
  1151.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1152.   .ds m usenet
  1153. ! .TH NEWSMAINT 8 "16 Jan 1990" "C News"
  1154.   .SH NAME
  1155.   newshist \- extract history line for news article(s)
  1156. --- 7,12 ----
  1157.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1158.   .ds m usenet
  1159. ! .TH NEWSMAINT 8 "16 Jan 1990"
  1160. ! .BY "C News"
  1161.   .SH NAME
  1162.   newshist \- extract history line for news article(s)
  1163.  
  1164. *** cnpatch/old/man/postnews.1    Tue Jun 20 18:59:54 1989
  1165. --- man/postnews.1    Thu Mar  8 18:32:15 1990
  1166. ***************
  1167. *** 1,5 ****
  1168.   .\" =()<.ds c @<NEWSCTL>@>()=
  1169.   .ds c /usr/lib/news
  1170. ! .TH POSTNEWS 1 "9 June 1989" "C News"
  1171.   .SH NAME
  1172.   postnews \- simple interactive news-posting interface
  1173. --- 1,6 ----
  1174.   .\" =()<.ds c @<NEWSCTL>@>()=
  1175.   .ds c /usr/lib/news
  1176. ! .TH POSTNEWS 1 "9 June 1989"
  1177. ! .BY "C News"
  1178.   .SH NAME
  1179.   postnews \- simple interactive news-posting interface
  1180.  
  1181. *** cnpatch/old/man/relaynews.8    Wed Jan 10 19:10:46 1990
  1182. --- man/relaynews.8    Mon Mar 12 13:35:23 1990
  1183. ***************
  1184. *** 7,11 ****
  1185.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1186.   .ds m usenet
  1187. ! .TH RELAYNEWS 8 "2 January 1990" "C News"
  1188.   .SH NAME
  1189.   relaynews \- store and forward netnews articles
  1190. --- 7,12 ----
  1191.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1192.   .ds m usenet
  1193. ! .TH RELAYNEWS 8 "2 January 1990"
  1194. ! .BY "C News"
  1195.   .SH NAME
  1196.   relaynews \- store and forward netnews articles
  1197. ***************
  1198. *** 231,234 ****
  1199. --- 232,252 ----
  1200.   .B news/include/news.h
  1201.   for the bit definitions.
  1202. + .br
  1203. + If
  1204. + .I relaynews
  1205. + cannot establish safe
  1206. + standard file descriptors
  1207. + and
  1208. + standardise its environment
  1209. + (notably PATH,
  1210. + SHELL
  1211. + and IFS),
  1212. + probably due to failure of
  1213. + .IR malloc (3),
  1214. + it will exit with status of 1
  1215. + and without writing any complaints on standard error
  1216. + (\c
  1217. + .BR errlog ),
  1218. + as a security precaution.
  1219.   .SH HISTORY
  1220.   Written by Geoff Collyer
  1221.  
  1222. *** cnpatch/old/man/rnews.8    Mon Nov 13 17:39:47 1989
  1223. --- man/rnews.8    Thu Mar  8 18:32:37 1990
  1224. ***************
  1225. *** 7,11 ****
  1226.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1227.   .ds m usenet
  1228. ! .TH RNEWS 8 "3 Nov 1989" "C News"
  1229.   .SH NAME
  1230.   rnews, cunbatch \- accept and spool news input
  1231. --- 7,12 ----
  1232.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1233.   .ds m usenet
  1234. ! .TH RNEWS 8 "3 Nov 1989"
  1235. ! .BY "C News"
  1236.   .SH NAME
  1237.   rnews, cunbatch \- accept and spool news input
  1238.  
  1239. *** cnpatch/old/misc/Makefile    Wed Jan 10 19:10:47 1990
  1240. --- misc/Makefile    Sat Feb 24 20:00:30 1990
  1241. ***************
  1242. *** 12,16 ****
  1243.   
  1244.   MAINTBIN=newshist
  1245. ! MAINT = $(MAINTBIN) newsdaily newswatch newsboot locknews addgroup delgroup adddirs
  1246.   UTILBIN = gngp newslock ctime getdate canonhdr
  1247.   UTILS = $(UTILBIN) sizeof newshostname
  1248. --- 12,16 ----
  1249.   
  1250.   MAINTBIN=newshist
  1251. ! MAINT = $(MAINTBIN) newsdaily newswatch newsboot locknews addgroup delgroup adddirs addfeed
  1252.   UTILBIN = gngp newslock ctime getdate canonhdr
  1253.   UTILS = $(UTILBIN) sizeof newshostname
  1254.  
  1255. *** cnpatch/old/misc/canonhdr.c    Thu Sep 14 16:03:25 1989
  1256. --- misc/canonhdr.c    Mon Mar  5 13:42:01 1990
  1257. ***************
  1258. *** 82,87 ****
  1259.                   if (isascii(*cp) && isupper(*cp))
  1260.                       *cp = tolower(*cp);
  1261. !         if (STREQN(hdr, canonmsgid, sizeof canonmsgid - 1))
  1262. !             (void) strncpy(hdr, magicmsgid, sizeof magicmsgid - 1);
  1263.           (void) fputs(hdr, stdout);
  1264.           /* must not free hdr; gethdr will do so automatically */
  1265. --- 82,87 ----
  1266.                   if (isascii(*cp) && isupper(*cp))
  1267.                       *cp = tolower(*cp);
  1268. !         if (STREQN(hdr, canonmsgid, STRLEN(canonmsgid)))
  1269. !             (void) strncpy(hdr, magicmsgid, STRLEN(magicmsgid));
  1270.           (void) fputs(hdr, stdout);
  1271.           /* must not free hdr; gethdr will do so automatically */
  1272.  
  1273. *** cnpatch/old/notebook/problems    Tue Jan 16 17:58:35 1990
  1274. --- notebook/problems    Fri Mar  9 14:11:03 1990
  1275. ***************
  1276. *** 1,3 ****
  1277. ! .DA "13 Jan 1990"
  1278.   .TL
  1279.   Known Porting Problems With C News
  1280. --- 1,3 ----
  1281. ! .DA "8 March 1990"
  1282.   .TL
  1283.   Known Porting Problems With C News
  1284. ***************
  1285. *** 113,117 ****
  1286.   to be problems with this macro.
  1287.   Some compilers,
  1288. ! notably the one in Microport System V Release 2.3,
  1289.   reject it.
  1290.   We have heard a report that System V Release 2 on the VAX silently
  1291. --- 113,117 ----
  1292.   to be problems with this macro.
  1293.   Some compilers,
  1294. ! notably the one in Microport System V for the 286,
  1295.   reject it.
  1296.   We have heard a report that System V Release 2 on the VAX silently
  1297. ***************
  1298. *** 197,200 ****
  1299. --- 197,202 ----
  1300.   process a single article, not a batch.
  1301.   This happens primarily when an article is posted locally, with \fIinews\fR.)
  1302. + It is still barely possible that the plausibility check will fail on some
  1303. + bizarre system.
  1304.   .SH
  1305.   df Output Format
  1306. ***************
  1307. *** 235,239 ****
  1308.   The only fix is to compile \fIdbz\fR without \fB\-O\fR.
  1309.   .SH
  1310. ! HP Spectrum Optimizer vs. nnfree
  1311.   .PP
  1312.   We have a reliable report that
  1313. --- 237,241 ----
  1314.   The only fix is to compile \fIdbz\fR without \fB\-O\fR.
  1315.   .SH
  1316. ! nnafree and nnfree
  1317.   .PP
  1318.   We have a reliable report that
  1319. ***************
  1320. *** 242,246 ****
  1321.   ``cc: Internal error 3279: Please contact your local HP representative''
  1322.   message)
  1323. ! on the \fInnfree\fR macro in \fIh/news.h\fR.
  1324.   The following revised version of
  1325.   the macro reportedly avoids
  1326. --- 244,250 ----
  1327.   ``cc: Internal error 3279: Please contact your local HP representative''
  1328.   message)
  1329. ! on the \fInnafree\fR macro
  1330. ! (and \fInnfree\fR, a historical synonym)
  1331. ! in \fIh/news.h\fR.
  1332.   The following revised version of
  1333.   the macro reportedly avoids
  1334. ***************
  1335. *** 250,253 ****
  1336. --- 254,267 ----
  1337.      *(mempp) = 0; }} while (0)
  1338.   .DE
  1339. + .PP
  1340. + It is also reliably reported that the Microport compiler objects to
  1341. + these macros in large model.
  1342. + Whether the above fix would suffice is not known.
  1343. + Manual expansion [barf!] is known to work, although it would be less
  1344. + painful to define a function containing the right code and change the
  1345. + macro to call the function.
  1346. + Code for a suitable function can, in fact, be found
  1347. + in \fIh/news.h\fR,
  1348. + inside `#ifdef\ lint'.
  1349.   .SH
  1350.   ANSI C
  1351. ***************
  1352. *** 306,307 ****
  1353. --- 320,376 ----
  1354.   in two places, and the Makefile attempts a link before doing a copy),
  1355.   and substantially more in the regression tests.
  1356. + .SH
  1357. + 16-bit Machines
  1358. + .PP
  1359. + C News has been tested on 16-bit machines\(emindeed, a good bit of the
  1360. + early development work was done on one\(emand does run on them.
  1361. + Nothing relies on ints being 32 bits.
  1362. + Nothing relies on pointers and ints being the same size, as far as we know.
  1363. + Nothing relies on large address spaces,
  1364. + although one or two modules come in separate small-space and large-space
  1365. + versions, and the small-space versions are slower.
  1366. + .PP
  1367. + However, there are some fundamental limits
  1368. + to consider.
  1369. + Both \fIrelaynews\fR and \fIexpire\fR\(emthe usual trouble spots for
  1370. + space shortages\(emwant to keep lots of stuff in core.
  1371. + There isn't any easy way around this one.
  1372. + .SH
  1373. + Number of File Descriptors
  1374. + .PP
  1375. + There is a constant, NOPENBFS, in \fIrelay/trbatch.c\fR, that defines
  1376. + how many batch files are kept open simultaneously.
  1377. + If you are feeding much news to more systems than this,
  1378. + \fIrelaynews\fR performance will suffer.
  1379. + .PP
  1380. + The major limit on NOPENBFS is available file descriptors
  1381. + (although on a 16-bit machine there might also be a shortage of memory
  1382. + for \fIstdio\fR buffers).
  1383. + Other parts of \fIrelaynews\fR want perhaps 10 file descriptors for
  1384. + other purposes, so with the usual total supply of 20, a NOPENBFS value
  1385. + of 10 is the right default.
  1386. + If you feed many people,
  1387. + and your kernel provides a process with more than 20 file
  1388. + descriptors,
  1389. + you probably want to boost
  1390. + NOPENBFS (this can be done with -DNOPENBFS=xxx in the makefile).
  1391. + Remember to leave about 10 descriptors worth of headroom.
  1392. + .SH
  1393. + Shell Processing Order
  1394. + .PP
  1395. + Normally, shell
  1396. + variable expansion should take place before scanning for syntax
  1397. + elements such as ``0<&1''.
  1398. + At least one reimplementation of the shell
  1399. + (specifically, Bash 1.04) does things in the
  1400. + wrong order.
  1401. + This is known to affect, at least, \fIrelay/sh/anne.jones\fR,
  1402. + which can be fixed by changing (circa line 44)
  1403. + .DS
  1404. + "")    USER="`who am i <&$fd |
  1405. + .DE
  1406. + to
  1407. + .DS
  1408. + "")    USER="`eval \e"who am i <&$fd\e" |
  1409. + .DE
  1410. + or so we are told.
  1411.  
  1412. *** cnpatch/old/relay/active.c    Thu Aug 24 16:39:58 1989
  1413. --- relay/active.c    Mon Mar  5 18:44:49 1990
  1414. ***************
  1415. *** 142,145 ****
  1416. --- 142,146 ----
  1417.   
  1418.       if (actfp != NULL) {
  1419. +         nnfree(&lnc.lnc_ng);
  1420.           lnc.lnc_ng = lnc.lnc_line = NULL;
  1421.           status |= actfsync(actfp);
  1422.  
  1423. *** cnpatch/old/relay/caches.c    Tue Jun 20 19:01:00 1989
  1424. --- relay/caches.c    Mon Mar  5 18:44:53 1990
  1425. ***************
  1426. *** 8,22 ****
  1427.   #include "active.h"
  1428.   #include "caches.h"
  1429.   #include "transmit.h"
  1430.   
  1431.   statust
  1432. - loadcaches()                /* reload in-core caches from disk */
  1433. - {
  1434. -     return actload();
  1435. - }
  1436. - statust
  1437.   synccaches()                /* force in-core caches to disk */
  1438.   {
  1439. !     return actsync() | trclose();
  1440.   }
  1441. --- 8,17 ----
  1442.   #include "active.h"
  1443.   #include "caches.h"
  1444. + #include "history.h"
  1445.   #include "transmit.h"
  1446.   
  1447.   statust
  1448.   synccaches()                /* force in-core caches to disk */
  1449.   {
  1450. !     return actsync() | trclose() | closehist();
  1451.   }
  1452.  
  1453. *** cnpatch/old/relay/control.c    Tue Jan 16 17:58:39 1990
  1454. --- relay/control.c    Mon Mar  5 18:44:55 1990
  1455. ***************
  1456. *** 107,111 ****
  1457.       if (deadpid == -1 || pid == -1 || wstatus != 0)
  1458.           art->a_status |= ST_DROPPED;    /* admin got err.msg. by mail */
  1459. !     art->a_status |= loadcaches();
  1460.   }
  1461.   
  1462. --- 107,111 ----
  1463.       if (deadpid == -1 || pid == -1 || wstatus != 0)
  1464.           art->a_status |= ST_DROPPED;    /* admin got err.msg. by mail */
  1465. !     /* let lazy evaluation load the caches */
  1466.   }
  1467.   
  1468.  
  1469. *** cnpatch/old/relay/fileart.c    Tue Jan 16 17:58:40 1990
  1470. --- relay/fileart.c    Mon Mar  5 18:51:18 1990
  1471. ***************
  1472. *** 341,345 ****
  1473.                * Moral: don't run Eunice on your PDP-11.
  1474.                */
  1475. !             worked = symlink(art->a_tmpf, artname) == 0;
  1476.       }
  1477.       if (debug)
  1478. --- 341,345 ----
  1479.                * Moral: don't run Eunice on your PDP-11.
  1480.                */
  1481. !             worked = symlink(fullartfile(art->a_tmpf), artname) == 0;
  1482.       }
  1483.       if (debug)
  1484.  
  1485. *** cnpatch/old/relay/hdrdefs.c    Wed Jan 10 19:10:55 1990
  1486. --- relay/hdrdefs.c    Thu Feb  8 15:01:45 1990
  1487. ***************
  1488. *** 10,20 ****
  1489.   #include <stdio.h>
  1490.   #include <sys/types.h>
  1491. - #ifdef REALSTDC
  1492. - #include <stdlib.h>
  1493. - #endif                /* REALSTDC */
  1494.   #include "libc.h"
  1495.   #include "news.h"
  1496.   #include "headers.h"
  1497. ! #include "hdrint.h"        /* may define "const" */
  1498.   
  1499.   #ifndef offsetof
  1500. --- 10,20 ----
  1501.   #include <stdio.h>
  1502.   #include <sys/types.h>
  1503.   #include "libc.h"
  1504.   #include "news.h"
  1505.   #include "headers.h"
  1506. ! #include "hdrint.h"        /* may define "const" or REALSTDC */
  1507. ! #ifdef REALSTDC
  1508. ! #include <stdlib.h>        /* may define offsetof */
  1509. ! #endif                /* REALSTDC */
  1510.   
  1511.   #ifndef offsetof
  1512.  
  1513. *** cnpatch/old/relay/history.c    Tue Jan 16 17:58:40 1990
  1514. --- relay/history.c    Mon Mar  5 18:44:56 1990
  1515. ***************
  1516. *** 323,324 ****
  1517. --- 323,344 ----
  1518.       (void) strcat(art->a_files, artnumstr);
  1519.   }
  1520. + statust
  1521. + closehist()
  1522. + {
  1523. +     register statust status = ST_OKAY;
  1524. +     if (fp != NULL) {
  1525. +         /* dbmclose is only needed by dbz, to flush statistics to disk */
  1526. +         if (dbmclose() < 0) {
  1527. +             warning("error closing dbm history file", "");
  1528. +             status |= ST_DROPPED;
  1529. +         }
  1530. +         if (nfclose(fp) == EOF) {
  1531. +             warning("error closing history file", "");
  1532. +             status |= ST_DROPPED;
  1533. +         }
  1534. +         fp = NULL;        /* mark file closed */
  1535. +     }
  1536. +     return status;
  1537. + }
  1538.  
  1539. *** cnpatch/old/relay/history.h    Tue Jun 20 19:01:21 1989
  1540. --- relay/history.h    Mon Mar  5 18:44:59 1990
  1541. ***************
  1542. *** 2,6 ****
  1543.   extern char *findfiles(), *gethistory();
  1544.   extern boolean alreadyseen();
  1545. ! extern statust fakehist();
  1546.   extern void history(), histupdfiles();
  1547.   
  1548. --- 2,6 ----
  1549.   extern char *findfiles(), *gethistory();
  1550.   extern boolean alreadyseen();
  1551. ! extern statust fakehist(), closehist();
  1552.   extern void history(), histupdfiles();
  1553.   
  1554.  
  1555. *** cnpatch/old/relay/trbatch.c    Tue Jun 20 19:01:42 1989
  1556. --- relay/trbatch.c    Mon Mar  5 18:51:15 1990
  1557. ***************
  1558. *** 39,43 ****
  1559.    * ensure that (name, ord) are mapped to a batchfile.
  1560.    *
  1561. !  * if an attempt to open the batchfile's stream fails, close a random
  1562.    * batchfile stream and retry the open.
  1563.    */
  1564. --- 39,43 ----
  1565.    * ensure that (name, ord) are mapped to a batchfile.
  1566.    *
  1567. !  * if an attempt to open the batchfile's stream fails, close an arbitrary
  1568.    * batchfile stream and retry the open.
  1569.    */
  1570. ***************
  1571. *** 162,166 ****
  1572.   
  1573.   STATIC statust
  1574. ! bfrclose()                /* close a random batchfile */
  1575.   {
  1576.       register struct batchfile *bf;
  1577. --- 162,166 ----
  1578.   
  1579.   STATIC statust
  1580. ! bfrclose()                /* close an arbitrary batchfile */
  1581.   {
  1582.       register struct batchfile *bf;
  1583.  
  1584.  
  1585. end of patch 12-Mar-1990
  1586.  
  1587.