home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume19 / cnews2 / pch13nov89 < prev    next >
Internet Message Format  |  1990-02-05  |  49KB

  1. From attcan!utzoo!henry@uunet.uu.net Thu Nov 16 00:55:29 1989
  2. Received: from BBN.COM by pineapple.bbn.com id <AA08434@pineapple.bbn.com>; Thu, 16 Nov 89 00:54:56 -0500
  3. Received: from uunet.uu.net by BBN.COM id aa05122; 16 Nov 89 0:56 EST
  4. Received: from attcan.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
  5.     id AA18279; Thu, 16 Nov 89 00:55:59 -0500
  6. Date: Thu, 16 Nov 89 00:55:59 -0500
  7. From: attcan!utzoo!henry@uunet.uu.net
  8. Message-Id: <8911160555.AA18279@uunet.uu.net>
  9. To: source-patches@uunet.uu.net
  10. Subject: 13-Nov-1989 patch for C News
  11. Content-Type: text  
  12. Content-Length: 48664  
  13. Status: R
  14.  
  15. There are two big items in this.  First, relaynew's sys-file handling has
  16. been revised to eliminate a slow memory leak.  Second, Geoff has done a
  17. substantial portability-and-robustness overhaul on the Aussie readnews.
  18.  
  19. Also...  The batcher now logs both start time and end time for a batching
  20. run, so you can see how long it took.  Newsrunning with no argument now
  21. prints the current state, so a save/restore is possible.  The RFC-errata
  22. document more fully discusses the two areas where C News's compliance is
  23. (according to some) debatable.  (The comment on rfc822ize() has also been
  24. expanded.)  Adddirs now disregards newsgroups marked with "x" or "=", and
  25. actually [blush!] makes the directories it's supposed to make.  Newsdaily
  26. now notes space shortages and reports on unmoderated articles in groups
  27. that your active file thinks are moderated.  Tolerance of syntactically-
  28. illegal message-ids has been reduced.  Relaynews now does a sanity check
  29. on MAXLONG, the definition of which trips up some compilers.  There is
  30. also the usual scattering of minor cleanups.
  31.  
  32. Finally, the patch-preparation process has been revised to avoid the
  33. 14-Sep-1989 problems, and in particular the patch (not just the files
  34. that went into preparing it) has been tested.
  35.  
  36. start of patch 13-Nov-1989
  37. (suggested archive name: `pch13Nov89.Z')
  38. this should be run with   patch -p0 <thisfile
  39.  
  40. The following is a complete list of patches to date.
  41.  
  42. Prereq: 23-Jun-1989
  43. Prereq: 7-Jul-1989
  44. Prereq: 23-Jul-1989
  45. Prereq: 22-Aug-1989
  46. Prereq: 24-Aug-1989
  47. Prereq: 14-Sep-1989
  48. *** PATCHDATES.old    Mon Nov 13 16:23:36 1989
  49. --- PATCHDATES    Mon Nov 13 16:23:36 1989
  50. ***************
  51. *** 1,6 ****
  52. --- 1,7 ----
  53.   23-Jun-1989
  54.   7-Jul-1989
  55.   23-Jul-1989
  56.   22-Aug-1989
  57.   24-Aug-1989
  58.   14-Sep-1989
  59. + 13-Nov-1989
  60.  
  61. Changed files, if any:
  62.  
  63. *** cnpatch/old/batch/Makefile    Thu Sep 14 16:03:25 1989
  64. --- batch/Makefile    Tue Oct 31 17:49:05 1989
  65. ***************
  66. *** 161,167 ****
  67.       test ! -s out.going/bar/togo ;
  68.       cmp test.left out.going/bar/togo.2
  69. !     sed '/^$$/q' batchlog | sed '1d;$$d' >test.log
  70.       test ! -s test.log ;
  71. !     sed '1,/^$$/d' batchlog | sed '1d;$$d' >test.log
  72.       echo 'bar    backlog 1 (batches flowing)' >test.good
  73.       cmp test.good test.log
  74. --- 161,167 ----
  75.       test ! -s out.going/bar/togo ;
  76.       cmp test.left out.going/bar/togo.2
  77. !     sed '/^$$/q' batchlog | sed '1d;$$d' | sed '$$d' >test.log
  78.       test ! -s test.log ;
  79. !     sed '1,/^$$/d' batchlog | sed '1d;$$d' | sed '$$d' >test.log
  80.       echo 'bar    backlog 1 (batches flowing)' >test.good
  81.       cmp test.good test.log
  82.  
  83. *** cnpatch/old/batch/sendbatches    Tue Aug 22 14:47:39 1989
  84. --- batch/sendbatches    Wed Sep 20 22:05:31 1989
  85. ***************
  86. *** 177,179 ****
  87. --- 177,180 ----
  88.   done
  89.   
  90. + date >>$log
  91.   echo >>$log
  92.  
  93. *** cnpatch/old/conf/build    Thu Sep 14 16:03:26 1989
  94. --- conf/build    Mon Nov 13 14:59:43 1989
  95. ***************
  96. *** 825,828 ****
  97. --- 825,829 ----
  98.       echo '#! /bin/sh'
  99.       echo '# -i suppresses install, -t suppresses stdio test, -s suppresses subst'
  100. +     echo '# options are seen in first argument only, i.e. use -si not -s -i'
  101.       echo "umask $newsumask"
  102.       echo "set -x"
  103.  
  104. *** cnpatch/old/expire/expire.c    Thu Sep 14 16:03:30 1989
  105. --- expire/expire.c    Thu Sep 14 23:39:41 1989
  106. ***************
  107. *** 435,439 ****
  108.       datum rhs;
  109.       register int ret;
  110. -     register char *id;
  111.   
  112.       cd(ctlfile((char *)NULL));
  113. --- 435,438 ----
  114.  
  115. *** cnpatch/old/h/libc.h    Thu Sep 14 16:03:35 1989
  116. --- h/libc.h    Sun Sep 17 16:42:07 1989
  117. ***************
  118. *** 56,60 ****
  119.   extern FILE *popen();            /* stdio.h */
  120.   #ifdef __STDC__
  121. ! extern int printf(char *fmt, ...)    /* stdio.h */
  122.   extern int fprintf(FILE *fp, char *fmt, ...);        /* stdio.h */
  123.   extern sprvalue sprintf(char *buf, char *fmt, ...);    /* stdio.h */
  124. --- 56,60 ----
  125.   extern FILE *popen();            /* stdio.h */
  126.   #ifdef __STDC__
  127. ! extern int printf(char *fmt, ...);    /* stdio.h */
  128.   extern int fprintf(FILE *fp, char *fmt, ...);        /* stdio.h */
  129.   extern sprvalue sprintf(char *buf, char *fmt, ...);    /* stdio.h */
  130.  
  131. *** cnpatch/old/h/news.h    Thu Aug 24 16:39:52 1989
  132. --- h/news.h    Mon Oct 30 13:22:31 1989
  133. ***************
  134. *** 102,105 ****
  135. --- 102,107 ----
  136.   #define NO 0
  137.   
  138. + #define SIZENUL (sizeof(char))        /* size in bytes of an ASCII NUL byte */
  139.   #define NOTALLHDRS NO            /* hdrdump flags for "all headers seen?" */
  140.   #define ALLHDRS YES
  141.  
  142. *** cnpatch/old/input/newsrunning    Tue Jun 20 18:58:15 1989
  143. --- input/newsrunning    Fri Nov  3 15:09:26 1989
  144. ***************
  145. *** 23,28 ****
  146.       ;;
  147.   
  148.       *)
  149. !     echo "Usage: $0 on/off" >&2
  150.       exit 2
  151.       ;;
  152. --- 23,37 ----
  153.       ;;
  154.   
  155. +     '')
  156. +     if test -r $stop
  157. +     then
  158. +         echo off
  159. +     else
  160. +         echo on
  161. +     fi
  162. +     ;;
  163.       *)
  164. !     echo "Usage: $0 [on/off]" >&2
  165.       exit 2
  166.       ;;
  167.  
  168. *** cnpatch/old/libbig/sys.fast.c    Tue Jun 20 18:58:24 1989
  169. --- libbig/sys.fast.c    Thu Oct  5 05:14:57 1989
  170. ***************
  171. *** 11,26 ****
  172.   extern struct system *currsys, *firstsys;
  173.   
  174. - /* exports */
  175. - boolean justone = NO;
  176.   /* private */
  177.   static struct system *thissys = NULL;
  178.   
  179. - /* ARGSUSED */
  180.   void
  181. ! rewsys(fp)
  182. ! FILE *fp;
  183.   {
  184. !     currsys = firstsys;
  185.   }
  186.   
  187. --- 11,22 ----
  188.   extern struct system *currsys, *firstsys;
  189.   
  190.   /* private */
  191.   static struct system *thissys = NULL;
  192.   
  193.   void
  194. ! remmysys(sys)                /* remember this system */
  195. ! struct system *sys;
  196.   {
  197. !     thissys = sys;
  198.   }
  199.   
  200. ***************
  201. *** 32,44 ****
  202.   
  203.   void
  204. ! remmysys(sys)                /* remember this system */
  205. ! struct system *sys;
  206.   {
  207. !     thissys = sys;
  208.   }
  209.   
  210.   void
  211. ! freecurrsys()
  212.   {
  213. !     /* never free sys entries */
  214.   }
  215. --- 28,55 ----
  216.   
  217.   void
  218. ! setupsys(fp)
  219. ! FILE *fp;
  220.   {
  221. !     rewind(fp);
  222.   }
  223.   
  224. + boolean
  225. + donesys()
  226. + {
  227. +     return NO;
  228. + }
  229. + /* ARGSUSED */
  230.   void
  231. ! rewsys(fp)
  232. ! FILE *fp;
  233.   {
  234. !     currsys = firstsys;
  235. ! }
  236. ! void
  237. ! advcurrsys()    /* advance currsys to the next in-core sys entry, if any. */
  238. ! {
  239. !     if (currsys != NULL)
  240. !         currsys = currsys->sy_next;
  241.   }
  242.  
  243. *** cnpatch/old/libcnews/case.c    Thu Sep 14 16:03:37 1989
  244. --- libcnews/case.c    Mon Oct 30 16:59:03 1989
  245. ***************
  246. *** 88,91 ****
  247. --- 88,100 ----
  248.   /*
  249.    - rfc822ize - do the bizarre case conversion needed for rfc822 message-ids
  250. +  *
  251. +  * Actually, this is not quite complete.  Absolute, total, full RFC822
  252. +  * compliance requires a horrible parsing job, because of the arcane
  253. +  * quoting conventions -- abc"def"ghi is not equivalent to abc"DEF"ghi,
  254. +  * for example.  There are three or four things that might occur in the
  255. +  * domain part of a message-id that are case-sensitive.  They don't seem
  256. +  * to ever occur in real news, thank Cthulhu.  (What?  You were expecting
  257. +  * a merciful and forgiving deity to be invoked in connection with RFC822?
  258. +  * Forget it; none of them would come near it.)
  259.    */
  260.   char *                /* returns the argument */
  261.  
  262. *** cnpatch/old/libsmall/sys.slow.c    Tue Jun 20 18:59:34 1989
  263. --- libsmall/sys.slow.c    Thu Oct  5 05:14:23 1989
  264. ***************
  265. *** 8,17 ****
  266.   #include "system.h"
  267.   
  268. - /* exports */
  269. - boolean justone = YES;
  270.   /* imports */
  271.   extern struct system *currsys, *firstsys;
  272.   
  273.   struct system *
  274.   mysysincache()
  275. --- 8,24 ----
  276.   #include "system.h"
  277.   
  278.   /* imports */
  279.   extern struct system *currsys, *firstsys;
  280.   
  281. + /* forwards */
  282. + FORWARD void freecurrsys();
  283. + void
  284. + remmysys(sys)
  285. + struct system *sys;
  286. + {
  287. +     /* no cache */
  288. + }
  289.   struct system *
  290.   mysysincache()
  291. ***************
  292. *** 20,30 ****
  293.   }
  294.   
  295.   void
  296. ! remmysys(sys)
  297. ! struct system *sys;
  298.   {
  299. !     /* no cache */
  300.   }
  301.   
  302.   void
  303.   rewsys(fp)
  304. --- 27,48 ----
  305.   }
  306.   
  307. + /* ARGSUSED */
  308.   void
  309. ! setupsys(fp)                /* reuse currsys */
  310. ! FILE *fp;
  311.   {
  312. !     freecurrsys();
  313.   }
  314.   
  315. + boolean
  316. + donesys()
  317. + {
  318. +     if (firstsys != NULL) {        /* parsed an entry? */
  319. +         firstsys = NULL;    /* not cached, but currsys still valid */
  320. +         return YES;
  321. +     } else
  322. +         return NO;        /* was a comment */
  323. + }
  324.   void
  325.   rewsys(fp)
  326. ***************
  327. *** 35,49 ****
  328.   }
  329.   
  330.   /*
  331.    * Free current sys entry & associated memory.  Zero currsys too.
  332.    */
  333. ! void
  334.   freecurrsys()
  335.   {
  336. !     if (currsys == NULL)
  337. !         return;
  338. !     nnfree(&currsys->sy_name);
  339. !     nnfree(&currsys->sy_ngs);
  340. !     nnfree(&currsys->sy_cmd);
  341. !     nnafree(&currsys);
  342.   }
  343. --- 53,78 ----
  344.   }
  345.   
  346. + void
  347. + advcurrsys()
  348. + {
  349. +     /*
  350. +      * the sys file is not in core, so we must not change currsys
  351. +      * to ensure that it gets freed later by freecurrsys().
  352. +      */
  353. + }
  354.   /*
  355.    * Free current sys entry & associated memory.  Zero currsys too.
  356.    */
  357. ! STATIC void
  358.   freecurrsys()
  359.   {
  360. !     if (currsys != NULL) {
  361. !         nnfree(&currsys->sy_name);
  362. !         nnfree(&currsys->sy_excl);
  363. !         nnfree(&currsys->sy_ngs);
  364. !         nnfree(&currsys->sy_distr);
  365. !         nnfree(&currsys->sy_cmd);
  366. !         nnafree(&currsys);
  367. !     }
  368.   }
  369.  
  370. *** cnpatch/old/libstdio/fgets.c    Thu Sep 14 16:03:39 1989
  371. --- libstdio/fgets.c    Tue Oct  3 00:58:19 1989
  372. ***************
  373. *** 75,84 ****
  374.            */
  375.           {
  376. !             register int copy;
  377.   
  378. -             if (nlp == NULL)
  379. -                 copy = origbytesleft;
  380. -             else
  381. -                 copy = nlp - (char *)fp->_ptr;
  382.               lim -= copy;
  383.               fp->_cnt -= copy;
  384. --- 75,81 ----
  385.            */
  386.           {
  387. !             register int copy = (nlp == NULL?
  388. !                 origbytesleft: nlp - (char *)fp->_ptr);
  389.   
  390.               lim -= copy;
  391.               fp->_cnt -= copy;
  392.  
  393. *** cnpatch/old/man/newsaux.8    Thu Sep 14 16:03:42 1989
  394. --- man/newsaux.8    Fri Sep 15 13:19:38 1989
  395. ***************
  396. *** 7,11 ****
  397.   .\" =()<.ds m @<NEWSMASTER>@>()=
  398.   .ds m usenet
  399. ! .TH NEWSAUX 8 "13 Sept 1989" "C News"
  400.   .SH NAME
  401.   spacefor \- check available space for news
  402. --- 7,11 ----
  403.   .\" =()<.ds m @<NEWSMASTER>@>()=
  404.   .ds m usenet
  405. ! .TH NEWSAUX 8 "15 Sept 1989" "C News"
  406.   .SH NAME
  407.   spacefor \- check available space for news
  408. ***************
  409. *** 150,154 ****
  410.   for easier processing.
  411.   Canonicalization forces all alphabetics to lower case except the first
  412. ! letter of the keyword, which is forced to upper case.
  413.   (One exception:
  414.   ``Message-ID'' is the canonical form of [e.g.] ``message-id''.)
  415. --- 150,155 ----
  416.   for easier processing.
  417.   Canonicalization forces all alphabetics to lower case except the first
  418. ! letter of each (hyphen-separated) word in the keyword,
  419. ! which is forced to upper case.
  420.   (One exception:
  421.   ``Message-ID'' is the canonical form of [e.g.] ``message-id''.)
  422.  
  423. *** cnpatch/old/man/rnews.8    Sun Jul 23 00:48:11 1989
  424. --- man/rnews.8    Fri Nov  3 15:15:21 1989
  425. ***************
  426. *** 7,11 ****
  427.   .\" =()<.ds m @<NEWSMASTER>@>()=
  428.   .ds m usenet
  429. ! .TH RNEWS 8 "14 July 1989" "C News"
  430.   .SH NAME
  431.   rnews, cunbatch \- accept and spool news input
  432. --- 7,11 ----
  433.   .\" =()<.ds m @<NEWSMASTER>@>()=
  434.   .ds m usenet
  435. ! .TH RNEWS 8 "3 Nov 1989" "C News"
  436.   .SH NAME
  437.   rnews, cunbatch \- accept and spool news input
  438. ***************
  439. *** 29,33 ****
  440.   .br
  441.   .B \*b/input/newsrunning
  442. ! {\fBon\fR|\fBoff\fR}
  443.   .SH DESCRIPTION
  444.   .I Rnews
  445. --- 29,33 ----
  446.   .br
  447.   .B \*b/input/newsrunning
  448. ! [\fBon\fR|\fBoff\fR]
  449.   .SH DESCRIPTION
  450.   .I Rnews
  451. ***************
  452. *** 55,60 ****
  453.   should be run periodically (e.g. by \fIcron\fR(8)) to process spooled news.
  454.   .I Newsrunning
  455. ! can be used to enable and disable \fInewsrun\fR's processing if it is desired
  456.   to avoid major news processing during certain hours.
  457.   .PP
  458.   .I Newsrun
  459. --- 55,66 ----
  460.   should be run periodically (e.g. by \fIcron\fR(8)) to process spooled news.
  461.   .I Newsrunning
  462. ! can be used to turn \fInewsrun\fR's processing off and on if it is desired
  463.   to avoid major news processing during certain hours.
  464. + `\fBnewsrunning off\fR' instructs any currently-running \fInewsrun\fR to
  465. + stop as soon as possible, and prevents later ones from running.
  466. + `\fBnewsrunning on\fR' removes the inhibition (but does not actually
  467. + start a new \fInewsrun\fR).
  468. + Without an argument, \fInewsrunning\fR reports the current status:
  469. + ``off'' or ``on''.
  470.   .PP
  471.   .I Newsrun
  472.  
  473. *** cnpatch/old/misc/adddirs    Tue Aug 22 14:47:37 1989
  474. --- misc/adddirs    Mon Sep 18 18:21:58 1989
  475. ***************
  476. *** 8,12 ****
  477.   umask $NEWSUMASK
  478.   
  479. ! for dir in `sed 's/[     ].*//' $NEWSCTL/active | tr . /`
  480.   do
  481.       if test ! -d $NEWSARTS/$dir
  482. --- 8,12 ----
  483.   umask $NEWSUMASK
  484.   
  485. ! for dir in `awk '$4 !~ /^[x=]/ { print $1 }' $NEWSCTL/active | tr . /`
  486.   do
  487.       if test ! -d $NEWSARTS/$dir
  488. ***************
  489. *** 13,17 ****
  490.       then
  491.           echo "making $dir (and parents if needed...)"
  492. !         : mkpdir $NEWSARTS/$dir
  493.       fi
  494.   done
  495. --- 13,17 ----
  496.       then
  497.           echo "making $dir (and parents if needed...)"
  498. !         mkpdir $NEWSARTS/$dir
  499.       fi
  500.   done
  501.  
  502. *** cnpatch/old/misc/delgroup    Tue Jun 20 19:00:10 1989
  503. --- misc/delgroup    Wed Nov  8 14:23:38 1989
  504. ***************
  505. *** 46,48 ****
  506.   mv active active.old && mv active.tmp active
  507.   
  508. ! echo "You may wish to rm -rf $NEWSARTS/`echo "$1" | sed 's;\.;/;g'` at some point."
  509. --- 46,48 ----
  510.   mv active active.old && mv active.tmp active
  511.   
  512. ! echo "You may wish to rmdir $NEWSARTS/`echo "$1" | sed 's;\.;/;g'` at some point."
  513.  
  514. *** cnpatch/old/misc/getdate.c    Tue Jun 20 19:00:06 1989
  515. --- misc/getdate.c    Tue Oct 31 15:58:40 1989
  516. ***************
  517. *** 74,78 ****
  518.       it = getdate(tm, &ftnow);
  519.       if (it < 0)
  520. !         error("`%s' not valid date", tm);
  521.       else
  522.           (void) printf("%ld\n", it);
  523. --- 74,78 ----
  524.       it = getdate(tm, &ftnow);
  525.       if (it < 0)
  526. !         (void) fprintf(stderr, "%s: `%s' not a valid date\n", progname, tm);
  527.       else
  528.           (void) printf("%ld\n", it);
  529.  
  530. *** cnpatch/old/misc/newsdaily    Tue Aug 22 14:47:48 1989
  531. --- misc/newsdaily    Sat Nov  4 15:11:16 1989
  532. ***************
  533. *** 29,33 ****
  534.   
  535.   # keep one generation of log -- it's big
  536. ! rm log.o
  537.   mv log log.o && >log
  538.   
  539. --- 29,33 ----
  540.   
  541.   # keep one generation of log -- it's big
  542. ! rm -f log.o
  543.   mv log log.o && >log
  544.   
  545. ***************
  546. *** 84,89 ****
  547.       ) >>$gripes
  548.   fi
  549.   
  550. ! # look for unknown newsgroups on input (misses cross-posted articles)
  551.   cd $NEWSCTL
  552.   egrep '`' log.o | egrep junked | sed 's/.*`\(.*\)'"'"'.*/\1/' | sort |
  553. --- 84,98 ----
  554.       ) >>$gripes
  555.   fi
  556. + cd $NEWSCTL
  557. + no=`egrep 'disk too full' batchlog.o | wc -l`
  558. + if test " $no" -gt 0
  559. + then
  560. +     (
  561. +         echo "space shortage(s) limited batching $no times"
  562. +         echo
  563. +     ) >>$gripes
  564. + fi
  565.   
  566. ! # look for problem newsgroups on input (can miss cross-posted articles)
  567.   cd $NEWSCTL
  568.   egrep '`' log.o | egrep junked | sed 's/.*`\(.*\)'"'"'.*/\1/' | sort |
  569. ***************
  570. *** 93,96 ****
  571. --- 102,115 ----
  572.       (
  573.           echo 'leading five unknown newsgroups by number of articles:'
  574. +         cat $tmp
  575. +         echo
  576. +     ) >>$gripes
  577. + fi
  578. + egrep '`' log.o | egrep unapproved | sed 's/.*`\(.*\)'"'"'.*/\1/' | sort |
  579. +     uniq -c | sort -nr | sed 5q >$tmp
  580. + if test -s $tmp
  581. + then
  582. +     (
  583. +         echo 'top five supposedly-moderated groups with unmoderated postings:'
  584.           cat $tmp
  585.           echo
  586.  
  587. *** cnpatch/old/notebook/rfcerrata    Tue Jun 20 18:56:30 1989
  588. --- notebook/rfcerrata    Mon Nov 13 16:09:15 1989
  589. ***************
  590. *** 68,78 ****
  591.   .PP
  592.   RFC 1036
  593. ! claims that
  594.   .I cancel
  595. ! control messages should stop propagating when their target messages
  596. ! are not present;
  597. ! it would improve the efficacy of
  598. ! .I cancel s
  599. ! to propagate them anyway.
  600.   .SH
  601.   ihave/sendme not documented
  602. --- 68,88 ----
  603.   .PP
  604.   RFC 1036
  605. ! says that
  606.   .I cancel
  607. ! control messages should stop propagating if the receiving system
  608. ! is ``unable to cancel the message as requested''.
  609. ! It is not clear what this means, given that modern news systems hang
  610. ! onto cancellations for not-yet-seen articles in hopes of being able
  611. ! to cancel them in the future.
  612. ! B 2.11 interprets absence of the target article as ``unable to cancel''.
  613. ! It would improve the efficacy and reliability of
  614. ! .IR cancel s
  615. ! to propagate them anyway, given that feed anomalies are widespread.
  616. ! There have been verified instances in which cancellations did not achieve
  617. ! anywhere near the propagation of the original article.
  618. ! In the interests of robustness,
  619. ! C News interprets absence of the target article as deferred cancellation
  620. ! rather than failure to cancel, and propagates the
  621. ! .IR cancel .
  622.   .SH
  623.   ihave/sendme not documented
  624. ***************
  625. *** 94,95 ****
  626. --- 104,119 ----
  627.   or a
  628.   .I remotesys .
  629. + .SH
  630. + case-sensitivity in message-ids
  631. + .PP
  632. + RFC 1036 says nothing about whether message-ids are case-sensitive or not,
  633. + thereby punting the issue to RFC 822.
  634. + The RFC 822 rules are horrendously complex and no news system has ever
  635. + implemented them correctly.
  636. + (B 2.10 considers them fully case-sensitive, which is wrong.
  637. + B 2.11 considers them fully case-insensitive, which is also wrong.
  638. + C News gets the normal case right, but correct handling of certain
  639. + obscure RFC 822 constructs would
  640. + require a complex parsing algorithm; fortunately, the cases where this
  641. + matters appear to be extremely rare.)
  642. + Simplification appears necessary.
  643.  
  644. *** cnpatch/old/relay/hdrparse.c    Thu Sep 14 16:03:48 1989
  645. --- relay/hdrparse.c    Mon Sep 18 18:19:59 1989
  646. ***************
  647. *** 60,63 ****
  648. --- 60,66 ----
  649.    * then the strsave calls need to check for failure.
  650.    *
  651. +  * An article lacking a Message-ID: but possessing an (obsolete)
  652. +  * Article-I.D.: gets the transformed Article-I.D. as its Message-ID:.
  653. +  *
  654.    * We support control message *backwards* compatibility: if no Control:
  655.    * header exists and the newsgroup matches all.all.ctl, use the Subject:
  656. ***************
  657. *** 72,92 ****
  658.       if (hdrs->h_distr == NULL)
  659.           hdrs->h_distr = strsave(DEFDIST);
  660. !     if (hdrs->h_msgid == NULL && hdrs->h_artid != NULL)    /* obs. art.id. */
  661. !         hdrs->h_msgid = strsave(hdrs->h_artid);
  662. !     if (hdrs->h_msgid == NULL)
  663.           hdrs->h_msgid = strsave(DEFMSGID);
  664. -     if (hdrs->h_msgid[0] == '\0') {
  665. -         free(hdrs->h_msgid);
  666. -         hdrs->h_msgid = strsave(DEFMSGID);
  667.       }
  668. !     if (hdrs->h_expiry == NULL)
  669.           hdrs->h_expiry = strsave(DEFEXP);
  670. -     if (hdrs->h_expiry[0] == '\0') {
  671. -         free(hdrs->h_expiry);
  672. -         hdrs->h_expiry = strsave(DEFEXP);
  673.       }
  674.       if (hdrs->h_subj == NULL)
  675.           hdrs->h_subj = strsave("");
  676.       if (hdrs->h_ctlcmd == NULL && oldctl(hdrs))
  677.           hdrs->h_ctlcmd = strsave(hdrs->h_subj);
  678. --- 75,93 ----
  679.       if (hdrs->h_distr == NULL)
  680.           hdrs->h_distr = strsave(DEFDIST);
  681. !     if (hdrs->h_msgid == NULL && hdrs->h_artid != NULL)
  682. !         hdrs->h_msgid = str3save("<", hdrs->h_artid, ">");
  683. !     if (hdrs->h_msgid == NULL || hdrs->h_msgid[0] == '\0') {
  684. !         nnfree(&hdrs->h_msgid);
  685.           hdrs->h_msgid = strsave(DEFMSGID);
  686.       }
  687. !     if (hdrs->h_expiry == NULL || hdrs->h_expiry[0] == '\0') {
  688. !         nnfree(&hdrs->h_expiry);
  689.           hdrs->h_expiry = strsave(DEFEXP);
  690.       }
  691.       if (hdrs->h_subj == NULL)
  692.           hdrs->h_subj = strsave("");
  693.       if (hdrs->h_ctlcmd == NULL && oldctl(hdrs))
  694.           hdrs->h_ctlcmd = strsave(hdrs->h_subj);
  695.  
  696. *** cnpatch/old/relay/makefile    Thu Sep 14 16:03:49 1989
  697. --- relay/makefile    Fri Sep 15 13:55:22 1989
  698. ***************
  699. *** 49,53 ****
  700.   
  701.   all: makefile relaynews
  702. !     chmod +x sh/* aux/* ctl/*
  703.   
  704.   mkfile: makefile
  705. --- 49,53 ----
  706.   
  707.   all: makefile relaynews
  708. !     chmod +x sh/[a-z]* aux/[a-z]* ctl/[a-z]*
  709.   
  710.   mkfile: makefile
  711. ***************
  712. *** 72,78 ****
  713.       cp relaynews $(NEWSBIN)/relay
  714.       : needs to be news-owned, setuid -- build looks after that
  715. !     cp sh/* $(NEWSBIN)/inject
  716. !     cp ctl/* $(NEWSBIN)/ctl
  717. !     cp aux/* $(NEWSBIN)/relay
  718.       rm -f $(BIN)/inews
  719.       ln $(NEWSBIN)/inject/inews $(BIN)/inews 2>/dev/null || cp sh/inews $(BIN)
  720. --- 72,78 ----
  721.       cp relaynews $(NEWSBIN)/relay
  722.       : needs to be news-owned, setuid -- build looks after that
  723. !     cp sh/[a-z]* $(NEWSBIN)/inject
  724. !     cp ctl/[a-z]* $(NEWSBIN)/ctl
  725. !     cp aux/[a-z]* $(NEWSBIN)/relay
  726.       rm -f $(BIN)/inews
  727.       ln $(NEWSBIN)/inject/inews $(BIN)/inews 2>/dev/null || cp sh/inews $(BIN)
  728.  
  729. *** cnpatch/old/relay/procart.c    Thu Sep 14 16:03:49 1989
  730. --- relay/procart.c    Mon Sep 18 18:20:00 1989
  731. ***************
  732. *** 294,312 ****
  733.   register struct article *art;
  734.   {
  735. !     if (art->h.h_path == NULL) {
  736.           prefuse(art);
  737.           (void) printf("no Path: header\n");
  738. !     } else if (art->h.h_msgid == NULL || art->h.h_msgid[0] == '\0') {
  739.           prefuse(art);
  740.           (void) printf("missing Message-ID\n");
  741. !     } else if (strchr(art->h.h_msgid, ' ') != NULL ||
  742. !        strchr(art->h.h_msgid, '\t') != NULL) {
  743.           prefuse(art);
  744.           (void) printf("whitespace in Message-ID\n");
  745. !     } else if (alreadyseen(art->h.h_msgid)) {
  746.           prefuse(art);
  747.           (void) printf("duplicate\n");
  748. !     } else if (art->h.h_path != NULL && hopcount(art->h.h_path) > 0 &&
  749. !         !ngmatch(oursys()->sy_ngs, art->h.h_ngs)) {
  750.           extern boolean histreject;
  751.   
  752. --- 294,318 ----
  753.   register struct article *art;
  754.   {
  755. !     register char *msgid = art->h.h_msgid;
  756. !     register char *path =  art->h.h_path;
  757. !     register char *ngs =   art->h.h_ngs;
  758. !     if (path == NULL) {
  759.           prefuse(art);
  760.           (void) printf("no Path: header\n");
  761. !     } else if (msgid == NULL || msgid[0] == '\0') {
  762.           prefuse(art);
  763.           (void) printf("missing Message-ID\n");
  764. !     } else if (strchr(msgid, ' ') != NULL || strchr(msgid, '\t') != NULL) {
  765.           prefuse(art);
  766.           (void) printf("whitespace in Message-ID\n");
  767. !     } else if (msgid[0] != '<' || msgid[strlen(msgid)-1] != '>') {
  768.           prefuse(art);
  769. +         (void) printf("<> brackets missing in Message-ID\n");
  770. +     } else if (alreadyseen(msgid)) {
  771. +         prefuse(art);
  772.           (void) printf("duplicate\n");
  773. !     } else if (path != NULL && hopcount(path) > 0 &&
  774. !         !ngmatch(oursys()->sy_ngs, ngs)) {
  775.           extern boolean histreject;
  776.   
  777. ***************
  778. *** 319,327 ****
  779.               history(art, NOLOG);
  780.           prefuse(art);
  781. !         (void) printf("no subscribed groups in `%s'\n", art->h.h_ngs);
  782. !     } else if (art->h.h_approved == NULL && moderated(art->h.h_ngs)) {
  783.           prefuse(art);
  784.           (void) printf("unapproved article in moderated group(s) `%s'\n",
  785. !             art->h.h_ngs);
  786.       } else
  787.           return;            /* art was accepted */
  788. --- 325,333 ----
  789.               history(art, NOLOG);
  790.           prefuse(art);
  791. !         (void) printf("no subscribed groups in `%s'\n", ngs);
  792. !     } else if (art->h.h_approved == NULL && moderated(ngs)) {
  793.           prefuse(art);
  794.           (void) printf("unapproved article in moderated group(s) `%s'\n",
  795. !             ngs);
  796.       } else
  797.           return;            /* art was accepted */
  798.  
  799. *** cnpatch/old/relay/relaynews.c    Thu Sep 14 16:03:51 1989
  800. --- relay/relaynews.c    Wed Nov  1 14:26:33 1989
  801. ***************
  802. *** 410,415 ****
  803.       if (c == '#')
  804.           return unbatch(in, inname);
  805. !     else
  806. !         return cpinsart(in, inname, MAXLONG, NO);
  807.   }
  808.   
  809. --- 410,424 ----
  810.       if (c == '#')
  811.           return unbatch(in, inname);
  812. !     else {
  813. !         register long infinite = MAXLONG;
  814. !         if (infinite <= 0) {        /* paranoia */
  815. !             errno = 0;
  816. !             errunlock(
  817. !             "MAXLONG is non-positive; rebuild the news software",
  818. !                 "");
  819. !         }
  820. !         return cpinsart(in, inname, infinite, NO);
  821. !     }
  822.   }
  823.   
  824.  
  825. *** cnpatch/old/relay/sys.c    Thu Aug 24 16:40:07 1989
  826. --- relay/sys.c    Thu Oct  5 05:14:06 1989
  827. ***************
  828. *** 32,38 ****
  829.   
  830.   /* imports */
  831. ! extern boolean justone;
  832.   extern struct system *mysysincache();
  833. ! extern void rewsys(), remmysys(), freecurrsys();
  834.   
  835.   struct system *
  836. --- 32,38 ----
  837.   
  838.   /* imports */
  839. ! extern boolean donesys();
  840.   extern struct system *mysysincache();
  841. ! extern void rewsys(), remmysys(), advcurrsys(), setupsys();
  842.   
  843.   struct system *
  844. ***************
  845. *** 66,75 ****
  846.   /*
  847.    * Return the next sys entry, which may span multiple lines.
  848. !  * Returned pointer points at a static struct whose members
  849. !  * point at static storage.
  850.    *
  851. !  * It would be clearer to rewrite the justone/nextsys/readsys dance
  852. !  * to get rid of justone, but I haven't the energy.  Sorry.  Beware that
  853. !  * justone is set in either ../libbig/sys.fast.c or ../libsmall/sys.slow.c.
  854.    */
  855.   struct system *
  856. --- 66,75 ----
  857.   /*
  858.    * Return the next sys entry, which may span multiple lines.
  859. !  * Returned pointer points at a struct whose lifetime (and that of its
  860. !  * members) is not promised to last beyond the next call to nextsys();
  861. !  * copy it and its pointed-to strings if you need them for longer.
  862.    *
  863. !  * Note that readsys() reads one entry on small systems, but the entire
  864. !  * sys file on big systems, so the common code in this file is subtle.
  865.    */
  866.   struct system *
  867. ***************
  868. *** 84,89 ****
  869.           readsys();
  870.       retsys = currsys;
  871. !     if (currsys != NULL)
  872. !         currsys = currsys->sy_next;
  873.       return retsys;
  874.   }
  875. --- 84,88 ----
  876.           readsys();
  877.       retsys = currsys;
  878. !     advcurrsys();
  879.       return retsys;
  880.   }
  881. ***************
  882. *** 90,94 ****
  883.   
  884.   /*
  885. !  * If justone, read one entry; else read whole sys file (done once only).
  886.    * Ignores '#' comments and blank lines; uses cfgetms to read possibly-
  887.    * continued lines of arbitrary length.
  888. --- 89,93 ----
  889.   
  890.   /*
  891. !  * On small systems, read one entry; else read whole sys file (done once only).
  892.    * Ignores '#' comments and blank lines; uses cfgetms to read possibly-
  893.    * continued lines of arbitrary length.
  894. ***************
  895. *** 99,106 ****
  896.       register char *sysline;
  897.   
  898. !     if (justone)
  899. !         freecurrsys();
  900. !     else
  901. !         rewind(fp);
  902.       while ((sysline = cfgetms(fp)) != NULL) {
  903.           if (sysline[0] != '#' && sysline[0] != '\n')
  904. --- 98,102 ----
  905.       register char *sysline;
  906.   
  907. !     setupsys(fp);        /* reuse currsys or rewind sys file */
  908.       while ((sysline = cfgetms(fp)) != NULL) {
  909.           if (sysline[0] != '#' && sysline[0] != '\n')
  910. ***************
  911. *** 107,114 ****
  912.               parsesysln(sysline);
  913.           free(sysline);
  914. !         if (justone && firstsys != NULL) {    /* parsed an entry */
  915. !             firstsys = NULL;
  916.               return;
  917. -         }
  918.       }
  919.       (void) nfclose(fp);
  920. --- 103,108 ----
  921.               parsesysln(sysline);
  922.           free(sysline);
  923. !         if (donesys())        /* early exit if on disk (small) */
  924.               return;
  925.       }
  926.       (void) nfclose(fp);
  927. ***************
  928. *** 121,125 ****
  929.   /*
  930.    * Parse (and modify) sysline into *currsys, which is malloced here
  931. !  * and freed iff "justone", in readsys(), see freecursys().
  932.    *
  933.    * Side-effect: sysline has a trailing newline removed.
  934. --- 115,119 ----
  935.   /*
  936.    * Parse (and modify) sysline into *currsys, which is malloced here
  937. !  * and freed iff on a small system, in readsys(), see freecursys().
  938.    *
  939.    * Side-effect: sysline has a trailing newline removed.
  940. ***************
  941. *** 153,160 ****
  942.   
  943.       /* stash *sysp away on the tail of the current list of systems */
  944. !     if (firstsys == NULL)
  945. !         firstsys = sysp;
  946. !     else
  947. !         currsys->sy_next = sysp;
  948.       currsys = sysp;
  949.   }
  950. --- 147,151 ----
  951.   
  952.       /* stash *sysp away on the tail of the current list of systems */
  953. !     *(firstsys == NULL? &firstsys: &currsys->sy_next) = sysp;
  954.       currsys = sysp;
  955.   }
  956. ***************
  957. *** 211,215 ****
  958.   /*
  959.    * Parse "next" to colon into malloced storage, return its ptr via "into".
  960. !  * *into is freed iff "justone", in readsys(), see freecursys().
  961.    */
  962.   STATIC void
  963. --- 202,206 ----
  964.   /*
  965.    * Parse "next" to colon into malloced storage, return its ptr via "into".
  966. !  * *into is freed iff on a small system, in readsys(), see freecursys().
  967.    */
  968.   STATIC void
  969.  
  970. *** cnpatch/old/rna/active.c    Tue Jun 20 19:01:47 1989
  971. --- rna/active.c    Mon Oct 23 21:51:15 1989
  972. ***************
  973. *** 3,8 ****
  974.    *
  975.    * format of file:
  976. !  *    <groupname> ' ' <5 digit #> ' ' <5 digit #> ' ' flag '\n'
  977. !  *              (seq)          (low)
  978.    */
  979.   
  980. --- 3,8 ----
  981.    *
  982.    * format of file:
  983. !  *    <groupname> ' ' <#> ' ' <#> ' ' flag '\n'
  984. !  *            (seq)    (low)
  985.    */
  986.   
  987. ***************
  988. *** 23,29 ****
  989.   {
  990.       register FILE    *f;
  991. !     register int i;
  992.       char gbuf[BUFSIZ / 2], dbuf[BUFSIZ / 4], dbuf2[BUFSIZ / 4];
  993. !     extern char *itoa();
  994.   
  995.       f = fopenl(actname);
  996. --- 23,29 ----
  997.   {
  998.       register FILE    *f;
  999. !     register long l;
  1000.       char gbuf[BUFSIZ / 2], dbuf[BUFSIZ / 4], dbuf2[BUFSIZ / 4];
  1001. !     extern char *itoa(), *ltoa();
  1002.   
  1003.       f = fopenl(actname);
  1004. ***************
  1005. *** 31,45 ****
  1006.       while (getline(f, gbuf, dbuf, dbuf2))
  1007.           if (CMP(gbuf, group) == 0) {
  1008. !             i = atoi(dbuf);
  1009. !             i++;
  1010. !             fseek(f, -12L, 1);
  1011. !             (void) fprintf(f, "%05d", i);
  1012. !             fclose(f);
  1013.   #if !AUSAM
  1014.               unlock(actname);
  1015.   #endif
  1016. !             return itoa(i);
  1017.           }
  1018. !     (void) fprintf(f, "%s 00001 00001 y\n", group);
  1019.       fclose(f);
  1020.   #if !AUSAM
  1021. --- 31,44 ----
  1022.       while (getline(f, gbuf, dbuf, dbuf2))
  1023.           if (CMP(gbuf, group) == 0) {
  1024. !             l = atol(dbuf) + 1;
  1025. !             (void) fseek(f, -(long)(2*(10+1)), 1);    /* TODO: fix this */
  1026. !             (void) fprintf(f, "%010d", l);        /* TODO: fix this */
  1027. !             (void) fclose(f);
  1028.   #if !AUSAM
  1029.               unlock(actname);
  1030.   #endif
  1031. !             return ltoa(l);
  1032.           }
  1033. !     (void) fprintf(f, "%s 0000000000 0000000001 y\n", group);
  1034.       fclose(f);
  1035.   #if !AUSAM
  1036. ***************
  1037. *** 49,53 ****
  1038.   }
  1039.   
  1040.   static
  1041.   getline(f, g, d, d2)
  1042. --- 48,51 ----
  1043. ***************
  1044. *** 97,101 ****
  1045.       char gbuf[BUFSIZ / 2], dbuf[BUFSIZ / 4], dbuf2[BUFSIZ / 4];
  1046.   
  1047. !     alist = last = NIL(active);
  1048.       f = fopenf(actname, "r");
  1049.       lineno = 0;
  1050. --- 95,99 ----
  1051.       char gbuf[BUFSIZ / 2], dbuf[BUFSIZ / 4], dbuf2[BUFSIZ / 4];
  1052.   
  1053. !     alist = last = NULL;
  1054.       f = fopenf(actname, "r");
  1055.       lineno = 0;
  1056. ***************
  1057. *** 103,109 ****
  1058.           ap = NEW(active);
  1059.           ap->a_name = newstr(gbuf);
  1060. !         ap->a_seq = atoi(dbuf);
  1061. !         ap->a_low = atoi(dbuf2);
  1062. !         ap->a_next = NIL(active);
  1063.           if (!alist)
  1064.               alist = ap;
  1065. --- 101,107 ----
  1066.           ap = NEW(active);
  1067.           ap->a_name = newstr(gbuf);
  1068. !         ap->a_seq = atol(dbuf);
  1069. !         ap->a_low = atol(dbuf2);
  1070. !         ap->a_next = NULL;
  1071.           if (!alist)
  1072.               alist = ap;
  1073. ***************
  1074. *** 148,153 ****
  1075.       while (getline(f, gbuf, dbuf, dbuf2))
  1076.           if (CMP(gbuf, group) == 0) {
  1077. !             fseek(f, -6L, 1);
  1078. !             (void) fprintf(f, "%05d", low);
  1079.               break;
  1080.           }
  1081. --- 146,151 ----
  1082.       while (getline(f, gbuf, dbuf, dbuf2))
  1083.           if (CMP(gbuf, group) == 0) {
  1084. !             fseek(f, -(long)(10+1), 1);    /* TODO: fix this */
  1085. !             (void) fprintf(f, "%010d", low); /* TODO: fix this */
  1086.               break;
  1087.           }
  1088. ***************
  1089. *** 158,163 ****
  1090.   }
  1091.   
  1092.   /*
  1093.    * initgrp - initialise an entry for this group
  1094. --- 156,159 ----
  1095. ***************
  1096. *** 178,182 ****
  1097.               return;
  1098.           }
  1099. !     (void) fprintf(f, "%s 00000 00001\n", group);
  1100.   
  1101.   }
  1102. --- 174,178 ----
  1103.               return;
  1104.           }
  1105. !     (void) fprintf(f, "%s 0000000000 0000000001\n", group);
  1106.   
  1107.   }
  1108.  
  1109. *** cnpatch/old/rna/defs.h    Tue Jun 20 19:01:48 1989
  1110. --- rna/defs.h    Mon Oct 23 21:33:25 1989
  1111. ***************
  1112. *** 42,46 ****
  1113.                          allows "-s subject -i include_file"
  1114.                          arguments */
  1115. ! #define NETID "utzoo"
  1116.   #ifndef NETID
  1117.   #define NETID "utstat"            /* else define it here */
  1118. --- 42,46 ----
  1119.                          allows "-s subject -i include_file"
  1120.                          arguments */
  1121. ! #define NETID "utstat"
  1122.   #ifndef NETID
  1123.   #define NETID "utstat"            /* else define it here */
  1124. ***************
  1125. *** 72,76 ****
  1126.   
  1127.   #define MYDOMAIN "uucp"            /* Local domain */
  1128. ! #define MYORG    "U of Toronto Zoology" /* My organization */
  1129.   #define NEWSROOT "news"            /* news editor */
  1130.   
  1131. --- 72,76 ----
  1132.   
  1133.   #define MYDOMAIN "uucp"            /* Local domain */
  1134. ! #define MYORG    "U of Toronto Statistics" /* My organization */
  1135.   #define NEWSROOT "news"            /* news editor */
  1136.   
  1137. ***************
  1138. *** 142,147 ****
  1139.   struct active {
  1140.       char    *a_name;
  1141. !     short    a_seq;
  1142. !     short    a_low;
  1143.       active    *a_next;
  1144.   };
  1145. --- 142,147 ----
  1146.   struct active {
  1147.       char    *a_name;
  1148. !     long    a_seq;
  1149. !     long    a_low;
  1150.       active    *a_next;
  1151.   };
  1152. ***************
  1153. *** 154,158 ****
  1154.       char    *n_name;
  1155.       bool    n_subscribe;
  1156. !     short    n_last;
  1157.       newsrc    *n_next;
  1158.   };
  1159. --- 154,158 ----
  1160.       char    *n_name;
  1161.       bool    n_subscribe;
  1162. !     long    n_last;
  1163.       newsrc    *n_next;
  1164.   };
  1165. ***************
  1166. *** 159,163 ****
  1167.   
  1168.   char    *strrchr(), *strchr(), *strcat(), *strcpy(), *strpbrk();
  1169. ! char    *itoa(), *convg(), *ngsquash(), *ttoa(), *mgets(), *rconvg();
  1170.   char    *newstr(), *newstr2(), *newstr3(), *newstr4(), *newstr5(), *catstr();
  1171.   char    *catstr2(), *bsearch(), *mtempnam(), *newstr6();
  1172. --- 159,163 ----
  1173.   
  1174.   char    *strrchr(), *strchr(), *strcat(), *strcpy(), *strpbrk();
  1175. ! char    *itoa(), *ltoa(), *convg(), *ngsquash(), *ttoa(), *mgets(), *rconvg();
  1176.   char    *newstr(), *newstr2(), *newstr3(), *newstr4(), *newstr5(), *catstr();
  1177.   char    *catstr2(), *bsearch(), *mtempnam(), *newstr6();
  1178.  
  1179. *** cnpatch/old/rna/funcs.c    Tue Jun 20 19:01:50 1989
  1180. --- rna/funcs.c    Mon Oct 23 21:14:21 1989
  1181. ***************
  1182. *** 212,216 ****
  1183.   }
  1184.   
  1185.   /*
  1186.    * get unique sequence number from SEQ
  1187. --- 212,215 ----
  1188. ***************
  1189. *** 220,235 ****
  1190.   {
  1191.       register long number;
  1192. !     register FILE    *f;
  1193.       static char buf[12];
  1194.   
  1195.       f = fopenl(SEQ);
  1196. !     if (fread(buf, 1, sizeof(buf), f) > 0)
  1197.           number = atol(buf);
  1198.       else
  1199.           number = 1;
  1200.       rewind(f);
  1201.       (void) fprintf(f, "%ld\n", number + 1);
  1202. !     fclose(f);
  1203.   #if !AUSAM
  1204.       unlock(SEQ);
  1205. --- 219,233 ----
  1206.   {
  1207.       register long number;
  1208. !     register FILE *f;
  1209.       static char buf[12];
  1210.   
  1211.       f = fopenl(SEQ);
  1212. !     if (fread(buf, 1, sizeof buf, f) > 0)
  1213.           number = atol(buf);
  1214.       else
  1215.           number = 1;
  1216.       rewind(f);
  1217.       (void) fprintf(f, "%ld\n", number + 1);
  1218. !     (void) fclose(f);
  1219.   #if !AUSAM
  1220.       unlock(SEQ);
  1221. ***************
  1222. *** 240,244 ****
  1223.   }
  1224.   
  1225.   /*
  1226.    * open a locked file (or create) for reading and writing
  1227. --- 238,241 ----
  1228. ***************
  1229. *** 248,260 ****
  1230.   char *fname;
  1231.   {
  1232. !     register FILE    *f;
  1233.   #ifdef AUSAM
  1234.       struct stat sbuf;
  1235.   #endif
  1236.   
  1237. !     extern uid_t    newsuid;
  1238. !     if ((f = fopen(fname, "r+")) == NIL(FILE) && (f = fopen(fname, "w+")) ==
  1239. !         NIL(FILE))
  1240.           error("Can't open %s", fname);
  1241.   
  1242. --- 245,256 ----
  1243.   char *fname;
  1244.   {
  1245. !     register FILE *f;
  1246.   #ifdef AUSAM
  1247.       struct stat sbuf;
  1248.   #endif
  1249. +     extern uid_t newsuid;
  1250.   
  1251. !     if ((f = fopen(fname, "r+")) == NULL &&
  1252. !         (f = fopen(fname, "w+")) == NULL)
  1253.           error("Can't open %s", fname);
  1254.   
  1255. ***************
  1256. *** 262,268 ****
  1257.       if (fstat(fileno(f), &sbuf) != 0)
  1258.           error("Can't stat %s", fname);
  1259. !     if ((sbuf.st_mode & S_IFMT) != S_IFALK && (chmod(fname, (int) (sbuf.st_mode
  1260. !         &~S_IFMT) | S_IFALK) != 0 || chown(fname, (int) newsuid, (int) newsuid) !=
  1261. !         0 || fclose(f) == EOF || (f = fopen(fname, "r+")) == NIL(FILE)))
  1262.           error("Can't create %s", fname);
  1263.   #else
  1264. --- 258,266 ----
  1265.       if (fstat(fileno(f), &sbuf) != 0)
  1266.           error("Can't stat %s", fname);
  1267. !     if ((sbuf.st_mode & S_IFMT) != S_IFALK &&
  1268. !         (chmod(fname, (int)(sbuf.st_mode&~S_IFMT) | S_IFALK) != 0 ||
  1269. !         chown(fname, (int)newsuid, (int)newsuid) != 0 ||
  1270. !         fclose(f) == EOF ||
  1271. !         (f = fopen(fname, "r+")) == NULL))
  1272.           error("Can't create %s", fname);
  1273.   #else
  1274. ***************
  1275. *** 320,324 ****
  1276.       register FILE    *f;
  1277.   
  1278. !     if ((f = fopen(name, mode)) == NIL(FILE))
  1279.           error("Can't %s %s", *mode == 'r' ? "open" : "create", name);
  1280.       return f;
  1281. --- 318,322 ----
  1282.       register FILE    *f;
  1283.   
  1284. !     if ((f = fopen(name, mode)) == NULL)
  1285.           error("Can't %s %s", *mode == 'r' ? "open" : "create", name);
  1286.       return f;
  1287. ***************
  1288. *** 369,373 ****
  1289.   
  1290.       fflush(stdout);
  1291. !     if (fgets(buf, sizeof(buf), stdin) == NIL(char)) {
  1292.           (void) printf("\n");
  1293.           return NIL(char);
  1294. --- 367,371 ----
  1295.   
  1296.       fflush(stdout);
  1297. !     if (fgets(buf, sizeof(buf), stdin) == NULL) {
  1298.           (void) printf("\n");
  1299.           return NIL(char);
  1300. ***************
  1301. *** 376,383 ****
  1302.           while (isspace(*s) && s > buf)
  1303.               *s-- = '\0';
  1304. !     else
  1305. !      {
  1306.           (void) printf("Input line too long.\n");
  1307. !         return NIL(char);
  1308.       }
  1309.       s = buf;
  1310. --- 374,380 ----
  1311.           while (isspace(*s) && s > buf)
  1312.               *s-- = '\0';
  1313. !     else {
  1314.           (void) printf("Input line too long.\n");
  1315. !         return NULL;
  1316.       }
  1317.       s = buf;
  1318. ***************
  1319. *** 531,535 ****
  1320.   char *path;
  1321.   {
  1322. !     FILE         * f;
  1323.       register char *ex1, *ex2, *com, *new;
  1324.       char buf[BUFSIZ];
  1325. --- 528,532 ----
  1326.   char *path;
  1327.   {
  1328. !     FILE *f;
  1329.       register char *ex1, *ex2, *com, *new;
  1330.       char buf[BUFSIZ];
  1331. ***************
  1332. *** 540,545 ****
  1333.           if ((f = popen(com, "r")) == NIL(FILE))
  1334.               (void) printf("Couldn't run \"%s\"\n", com);
  1335. !         else
  1336. !          {
  1337.               fread(buf, sizeof(buf), 1, f);
  1338.               if (pclose(f) != 0) {
  1339. --- 537,541 ----
  1340.           if ((f = popen(com, "r")) == NIL(FILE))
  1341.               (void) printf("Couldn't run \"%s\"\n", com);
  1342. !         else {
  1343.               fread(buf, sizeof(buf), 1, f);
  1344.               if (pclose(f) != 0) {
  1345. ***************
  1346. *** 558,562 ****
  1347.       }
  1348.       return path;
  1349.   }
  1350.   
  1351. --- 554,557 ----
  1352. ***************
  1353. *** 571,577 ****
  1354.   register char *sp;
  1355.   {
  1356. !     register char *sep;
  1357.   
  1358. -     sep = NIL(char);
  1359.       while (*sp) {
  1360.           if (sep)
  1361. --- 566,571 ----
  1362.   register char *sp;
  1363.   {
  1364. !     register char *sep = NULL;
  1365.   
  1366.       while (*sp) {
  1367.           if (sep)
  1368. ***************
  1369. *** 586,589 ****
  1370.       }
  1371.   }
  1372. --- 580,581 ----
  1373.  
  1374. *** cnpatch/old/rna/header.c    Tue Jun 20 19:01:51 1989
  1375. --- rna/header.c    Mon Oct 23 20:50:27 1989
  1376. ***************
  1377. *** 111,115 ****
  1378.       field        af;
  1379.       char buf[BUFLEN*2];
  1380.       char *hfgets();
  1381.   
  1382. --- 111,114 ----
  1383. ***************
  1384. *** 118,131 ****
  1385.           if (buf[0] == '\n')
  1386.               return;
  1387. !         if (isupper(buf[0]) && (colon = strchr(buf, ':')) && (space =
  1388. !             strchr(buf, ' ')) && (colon + 1 == space)) {
  1389.               *colon = '\0';
  1390.               af.f_name = buf;
  1391. !             fp = (field * ) bsearch((char *) & af, (char *) fields,
  1392. !                                  sizeof(fields) / sizeof(fields[0]), sizeof(fields[0]),
  1393. !                  fieldcmp);
  1394.               *colon = ':';
  1395.           } else
  1396. !             fp = NIL(field);
  1397.           if (!fp)
  1398.               if (hp->h_others)
  1399. --- 117,130 ----
  1400.           if (buf[0] == '\n')
  1401.               return;
  1402. !         if (isupper(buf[0]) && (colon = strchr(buf, ':')) &&
  1403. !             (space = strchr(buf, ' ')) && (colon + 1 == space)) {
  1404.               *colon = '\0';
  1405.               af.f_name = buf;
  1406. !             fp = (field * )bsearch((char *)&af, (char *)fields,
  1407. !                 sizeof fields/sizeof fields[0], sizeof fields[0],
  1408. !                 fieldcmp);
  1409.               *colon = ':';
  1410.           } else
  1411. !             fp = NULL;
  1412.           if (!fp)
  1413.               if (hp->h_others)
  1414. ***************
  1415. *** 133,138 ****
  1416.               else
  1417.                   hp->h_others = newstr(buf);
  1418. !         else
  1419. !          {
  1420.               if (colon = strchr(space + 1, '\n'))
  1421.                   *colon = '\0';
  1422. --- 132,136 ----
  1423.               else
  1424.                   hp->h_others = newstr(buf);
  1425. !         else {
  1426.               if (colon = strchr(space + 1, '\n'))
  1427.                   *colon = '\0';
  1428. ***************
  1429. *** 394,399 ****
  1430.       register char *cp, *tp;
  1431.   
  1432. !     if ((cp = fgets(buf, len, fp)) == NIL(char))
  1433. !         return NIL(char);
  1434.   
  1435.       if (*cp == '\n')
  1436. --- 392,397 ----
  1437.       register char *cp, *tp;
  1438.   
  1439. !     if ((cp = fgets(buf, len, fp)) == NULL)
  1440. !         return NULL;
  1441.   
  1442.       if (*cp == '\n')
  1443. ***************
  1444. *** 445,449 ****
  1445.            tp->tm_sec, tzone);
  1446.       return buf;
  1447.   }
  1448.   
  1449. --- 443,446 ----
  1450. ***************
  1451. *** 474,477 ****
  1452.       return maketime(4, argv, STIMES);
  1453.   }
  1454. --- 471,472 ----
  1455.  
  1456. *** cnpatch/old/rna/history.c    Tue Jun 20 19:01:52 1989
  1457. --- rna/history.c    Mon Oct 23 21:35:49 1989
  1458. ***************
  1459. *** 168,175 ****
  1460.   
  1461.       f = fopenl(histname);
  1462. !     fseek(f, 0L, 2);
  1463. !     (void) fprintf(f, "%s %s%ld %s\n", histid, etime ? "E" : "", etime ? etime :
  1464. !         now, histline);
  1465. !     fclose(f);
  1466.   #if !AUSAM
  1467.       unlock(histname);
  1468. --- 168,175 ----
  1469.   
  1470.       f = fopenl(histname);
  1471. !     (void) fseek(f, 0L, 2);
  1472. !     (void) fprintf(f, "%s %s%ld %s\n", histid, (etime? "E": ""),
  1473. !         (etime? (long)etime: now), histline);
  1474. !     (void) fclose(f);
  1475.   #if !AUSAM
  1476.       unlock(histname);
  1477.  
  1478. *** cnpatch/old/rna/lib/itoa.c    Tue Jun 20 19:01:53 1989
  1479. --- rna/lib/itoa.c    Mon Oct 23 21:55:01 1989
  1480. ***************
  1481. *** 8,9 ****
  1482. --- 8,19 ----
  1483.       return buf;
  1484.   }
  1485. + char *
  1486. + ltoa(l)
  1487. + long l;
  1488. + {
  1489. +     static char buf[30];
  1490. +     sprintf(buf, "%ld", l);
  1491. +     return buf;
  1492. + }
  1493.  
  1494. *** cnpatch/old/rna/makefile    Thu Aug 24 16:40:08 1989
  1495. --- rna/makefile    Mon Oct 23 20:55:25 1989
  1496. ***************
  1497. *** 24,29 ****
  1498.   FILES = help
  1499.   LCOMMANDS = postnews.lint uurec.lint readnews.lint uusend.lint expire.lint
  1500. ! # PFILES = header.c postnews.c funcs.c active.c history.c maketime.c mtempnam.c
  1501. ! PFILES = header.c funcs.c active.c history.c maketime.c mtempnam.c
  1502.   RFILES = header.c readnews.c funcs.c active.c newsrc.c history.c maketime.c
  1503.   ROFILES= header.o readnews.o funcs.o active.o newsrc.o history.o maketime.o
  1504. --- 24,29 ----
  1505.   FILES = help
  1506.   LCOMMANDS = postnews.lint uurec.lint readnews.lint uusend.lint expire.lint
  1507. ! # PFILES = header.c postnews.c funcs.c active.c history.c maketime.c
  1508. ! PFILES = header.c funcs.c active.c history.c maketime.c
  1509.   RFILES = header.c readnews.c funcs.c active.c newsrc.c history.c maketime.c
  1510.   ROFILES= header.o readnews.o funcs.o active.o newsrc.o history.o maketime.o
  1511.  
  1512. *** cnpatch/old/rna/maketime.c    Tue Jun 20 19:01:57 1989
  1513. --- rna/maketime.c    Mon Oct 23 21:20:36 1989
  1514. ***************
  1515. *** 396,400 ****
  1516.   }
  1517.   
  1518.   static long 
  1519.   construct()
  1520. --- 396,399 ----
  1521. ***************
  1522. *** 411,418 ****
  1523.       if (setdayofweek)
  1524.           days += dayofweek;
  1525. !     return days * SECINDAY + hour * SECINHOUR + minute * SECINMIN + second;
  1526.   }
  1527.   
  1528.   static
  1529.   adjust()
  1530. --- 410,416 ----
  1531.       if (setdayofweek)
  1532.           days += dayofweek;
  1533. !     return (long)days*SECINDAY + (long)hour*SECINHOUR + minute*SECINMIN + second;
  1534.   }
  1535.   
  1536.   static
  1537.   adjust()
  1538. ***************
  1539. *** 442,447 ****
  1540.        * month == tim->tm_mon && day == tim->tm_mday
  1541.        */
  1542. !     if ((long)(hour*SECINHOUR + minute*SECINMIN + second) <
  1543. !         (long)(tim->tm_hour*SECINHOUR + tim->tm_min*SECINMIN + tim->tm_sec)) {
  1544.           dim = daysinmonth[month] + (month == 1? leapyear(month): 0);
  1545.           if (setday || ++day / dim) {
  1546. --- 440,445 ----
  1547.        * month == tim->tm_mon && day == tim->tm_mday
  1548.        */
  1549. !     if ((long)hour*SECINHOUR + minute*SECINMIN + second <
  1550. !         (long)tim->tm_hour*SECINHOUR + tim->tm_min*SECINMIN + tim->tm_sec) {
  1551.           dim = daysinmonth[month] + (month == 1? leapyear(month): 0);
  1552.           if (setday || ++day / dim) {
  1553. ***************
  1554. *** 453,456 ****
  1555.       }
  1556.   }
  1557. --- 451,452 ----
  1558.  
  1559. *** cnpatch/old/rna/newsrc.c    Tue Jun 20 19:01:59 1989
  1560. --- rna/newsrc.c    Mon Oct 23 21:02:59 1989
  1561. ***************
  1562. *** 168,175 ****
  1563.               if (!ngmatch(ap->a_name, group))
  1564.                   continue;
  1565. !             if ((np = findnewsrc(ap->a_name)) == NIL(newsrc)) {
  1566.                   np = NEW(newsrc);
  1567.                   np->n_name = newstr(ap->a_name);
  1568. !                 np->n_next = NIL(newsrc);
  1569.                   np->n_last = 0;
  1570.                   np->n_subscribe = true;
  1571. --- 168,175 ----
  1572.               if (!ngmatch(ap->a_name, group))
  1573.                   continue;
  1574. !             if ((np = findnewsrc(ap->a_name)) == NULL) {
  1575.                   np = NEW(newsrc);
  1576.                   np->n_name = newstr(ap->a_name);
  1577. !                 np->n_next = NULL;
  1578.                   np->n_last = 0;
  1579.                   np->n_subscribe = true;
  1580. ***************
  1581. *** 212,216 ****
  1582.   
  1583.   /*
  1584. !  * find if a newrc entry exists,
  1585.    * taking advantange of the fact that requests should be
  1586.    * in the same order
  1587. --- 212,216 ----
  1588.   
  1589.   /*
  1590. !  * find if a newsrc entry exists,
  1591.    * taking advantange of the fact that requests should be
  1592.    * in the same order
  1593. ***************
  1594. *** 228,232 ****
  1595.   
  1596.       if (!rc)
  1597. !         return NIL(newsrc);
  1598.   
  1599.       found = false;
  1600. --- 228,232 ----
  1601.   
  1602.       if (!rc)
  1603. !         return NULL;
  1604.   
  1605.       found = false;
  1606. ***************
  1607. *** 295,298 ****
  1608. --- 295,299 ----
  1609.   static
  1610.   writengline(f, np)        /* write .newsrc n.g. line in normal form on f */
  1611. + FILE *f;
  1612.   register newsrc *np;
  1613.   {
  1614.  
  1615. *** cnpatch/old/rna/readnews.c    Tue Jun 20 19:02:10 1989
  1616. --- rna/readnews.c    Mon Oct 23 21:57:42 1989
  1617. ***************
  1618. *** 458,462 ****
  1619.       np->n_last++;
  1620.       fname = convg(newstr5(newsdir, "/", ap->a_name, ARTSEP,
  1621. !         itoa(np->n_last)));
  1622.       ino = 0;
  1623.       f = fopen(fname, "r");
  1624. --- 458,462 ----
  1625.       np->n_last++;
  1626.       fname = convg(newstr5(newsdir, "/", ap->a_name, ARTSEP,
  1627. !         ltoa(np->n_last)));
  1628.       ino = 0;
  1629.       f = fopen(fname, "r");
  1630. ***************
  1631. *** 493,500 ****
  1632.   {
  1633.       static bool done;
  1634. -     register int num;
  1635.   
  1636.       np->n_last++;
  1637.       if (Cflag) {
  1638.           if (!done)
  1639.               (void) printf("You have news:\n");
  1640. --- 493,501 ----
  1641.   {
  1642.       static bool done;
  1643.   
  1644.       np->n_last++;
  1645.       if (Cflag) {
  1646. +         register long num;
  1647.           if (!done)
  1648.               (void) printf("You have news:\n");
  1649. ***************
  1650. *** 501,505 ****
  1651.           done = true;
  1652.           num = ap->a_seq - np->n_last + 1;
  1653. !         (void) printf("\t%s at most %d article%s\n",
  1654.               ap->a_name, num, (num > 1? "s": ""));
  1655.           return nextgroup;
  1656. --- 502,506 ----
  1657.           done = true;
  1658.           num = ap->a_seq - np->n_last + 1;
  1659. !         (void) printf("\t%s at most %ld article%s\n",
  1660.               ap->a_name, num, (num > 1? "s": ""));
  1661.           return nextgroup;
  1662. ***************
  1663. *** 511,515 ****
  1664.   }
  1665.   
  1666.   /*
  1667.    * normal command handler (or pflag)
  1668. --- 512,515 ----
  1669. ***************
  1670. *** 548,563 ****
  1671.   bool pushed;
  1672.   {
  1673. -     static char errmess[] = "Incorrect command; Type `?' for help.\n";
  1674. -     static char form[]    = "%s: %s\n";
  1675. -     static char savedsys[BUFSIZ / 2];
  1676. -     static active    *lastap, *rlastap;
  1677. -     static newsrc    lastn;
  1678. -     static char number[20];
  1679. -     static active    *wantap;
  1680.       register char *com, *arg;
  1681. !     register int c, i, size;
  1682. !     register FILE     *f;
  1683.       char *fname;
  1684.       header        h;
  1685. --- 548,555 ----
  1686.   bool pushed;
  1687.   {
  1688.       register char *com, *arg;
  1689. !     register int c, size;
  1690. !     register long i;
  1691. !     register FILE *f;
  1692.       char *fname;
  1693.       header        h;
  1694. ***************
  1695. *** 566,570 ****
  1696.       bool printed, pheader, verbose, hadinterrupt;
  1697.       applycom    nextact;
  1698.       extern char t_from[], t_subject[], t_date[];
  1699.       extern char t_newsgroups[], t_path[], t_sender[];
  1700. --- 558,568 ----
  1701.       bool printed, pheader, verbose, hadinterrupt;
  1702.       applycom    nextact;
  1703. !     static char errmess[] = "Incorrect command; Type `?' for help.\n";
  1704. !     static char form[]    = "%s: %s\n";
  1705. !     static char savedsys[BUFSIZ / 2];
  1706. !     static active    *lastap, *rlastap;
  1707. !     static newsrc    lastn;
  1708. !     static char number[20];
  1709. !     static active    *wantap;
  1710.       extern char t_from[], t_subject[], t_date[];
  1711.       extern char t_newsgroups[], t_path[], t_sender[];
  1712. ***************
  1713. *** 573,577 ****
  1714.       extern active    *activep();
  1715.   
  1716.       if (last) {
  1717.           /*
  1718. --- 571,574 ----
  1719. ***************
  1720. *** 591,598 ****
  1721.               return nextgroup;
  1722.           else
  1723. !             wantap = NIL(active);
  1724.   
  1725.       fname = convg(newstr5(newsdir, "/", ap->a_name, ARTSEP,
  1726. !         itoa(np->n_last + 1)));
  1727.       f = fopen(fname, "r");
  1728.       ino = 0;
  1729. --- 588,595 ----
  1730.               return nextgroup;
  1731.           else
  1732. !             wantap = NULL;
  1733.   
  1734.       fname = convg(newstr5(newsdir, "/", ap->a_name, ARTSEP,
  1735. !         ltoa(np->n_last + 1)));
  1736.       f = fopen(fname, "r");
  1737.       ino = 0;
  1738. ***************
  1739. *** 599,603 ****
  1740.       if (!f || !last && !pushed && seen(f, &ino)) {
  1741.           if (pushed)
  1742. !             (void) printf("Article %d (%s) no longer exists.\n",
  1743.                   np->n_last + 1, ap->a_name);
  1744.           else
  1745. --- 596,600 ----
  1746.       if (!f || !last && !pushed && seen(f, &ino)) {
  1747.           if (pushed)
  1748. !             (void) printf("Article %ld (%s) no longer exists.\n",
  1749.                   np->n_last + 1, ap->a_name);
  1750.           else
  1751. ***************
  1752. *** 639,643 ****
  1753.           lastap = ap;
  1754.           if (!pheader) {
  1755. !             (void) printf("Article %d of %d (%s)",
  1756.                   np->n_last + 1, ap->a_seq, ap->a_name);
  1757.               if (h.h_lines != 0)
  1758. --- 636,640 ----
  1759.           lastap = ap;
  1760.           if (!pheader) {
  1761. !             (void) printf("Article %ld of %ld (%s)",
  1762.                   np->n_last + 1, ap->a_seq, ap->a_name);
  1763.               if (h.h_lines != 0)
  1764. ***************
  1765. *** 671,676 ****
  1766.                */
  1767.               com = "";
  1768. !         else
  1769. !          {
  1770.               (void) printf("? ");
  1771.               if (fflush(stdout) == EOF) {
  1772. --- 668,672 ----
  1773.                */
  1774.               com = "";
  1775. !         else {
  1776.               (void) printf("? ");
  1777.               if (fflush(stdout) == EOF) {
  1778. ***************
  1779. *** 775,780 ****
  1780.   #endif
  1781.                    {
  1782. !                     (void) printf("Group \"%s\" can't be unsubscribed.\n",
  1783. !                                               np->n_name);
  1784.                       continue;
  1785.                   }
  1786. --- 771,777 ----
  1787.   #endif
  1788.                    {
  1789. !                     (void) printf(
  1790. !                     "Group \"%s\" can't be unsubscribed.\n",
  1791. !                         np->n_name);
  1792.                       continue;
  1793.                   }
  1794. ***************
  1795. *** 797,801 ****
  1796.               if (!ngmatch(arg, nflag)) {
  1797.                   (void) printf("%s: is not subscribed to!\n", arg);
  1798. !                 wantap = NIL(active);
  1799.                   continue;
  1800.               }
  1801. --- 794,798 ----
  1802.               if (!ngmatch(arg, nflag)) {
  1803.                   (void) printf("%s: is not subscribed to!\n", arg);
  1804. !                 wantap = NULL;
  1805.                   continue;
  1806.               }
  1807. ***************
  1808. *** 833,837 ****
  1809.               while (number[0]) {
  1810.                   ntmp = lastn;
  1811. !                 ntmp.n_last = atoi(number) - 1;
  1812.                   number[0] = '\0';
  1813.                   nextact = commands(rlastap, &ntmp, false, true);
  1814. --- 830,834 ----
  1815.               while (number[0]) {
  1816.                   ntmp = lastn;
  1817. !                 ntmp.n_last = atol(number) - 1;
  1818.                   number[0] = '\0';
  1819.                   nextact = commands(rlastap, &ntmp, false, true);
  1820. ***************
  1821. *** 844,847 ****
  1822. --- 841,845 ----
  1823.           default:
  1824.               if (isdigit(c)) {
  1825. + /*                i = atol(arg);        */
  1826.                   i = c - '0';
  1827.                   while (isdigit(*arg))
  1828. ***************
  1829. *** 854,863 ****
  1830.               number[0] = '\0';
  1831.               if (i < ap->a_low || i > ap->a_seq) {
  1832. !                 (void) printf("Articles in \"%s\" group range %d to %d.\n",
  1833. !                                          np->n_name, ap->a_low, ap->a_seq);
  1834.                   continue;
  1835.               }
  1836.               if (pushed) {
  1837. !                 sprintf(number, "%d", i);
  1838.                   nextact = next;
  1839.                   break;
  1840. --- 852,862 ----
  1841.               number[0] = '\0';
  1842.               if (i < ap->a_low || i > ap->a_seq) {
  1843. !                 (void) printf(
  1844. !                     "Articles in \"%s\" group range %ld to %ld.\n",
  1845. !                     np->n_name, ap->a_low, ap->a_seq);
  1846.                   continue;
  1847.               }
  1848.               if (pushed) {
  1849. !                 sprintf(number, "%ld", i);
  1850.                   nextact = next;
  1851.                   break;
  1852. ***************
  1853. *** 865,870 ****
  1854.               ntmp = *np;
  1855.               ntmp.n_last = i - 1;
  1856. !             if ((nextact = commands(ap, &ntmp, false, true)) !=
  1857. !                 next)
  1858.                   break;
  1859.               if (!number[0]) {
  1860. --- 864,868 ----
  1861.               ntmp = *np;
  1862.               ntmp.n_last = i - 1;
  1863. !             if ((nextact = commands(ap, &ntmp, false, true)) != next)
  1864.                   break;
  1865.               if (!number[0]) {
  1866. ***************
  1867. *** 889,893 ****
  1868.   }
  1869.   
  1870.   /*
  1871.    * see if this is a followup we are ignoring
  1872. --- 887,890 ----
  1873. ***************
  1874. *** 1259,1263 ****
  1875.               id++;
  1876.       }
  1877. !     qsort((char *) uflag, (unsigned) usize, sizeof(char *), strpcmp);
  1878.   }
  1879.   
  1880. --- 1256,1260 ----
  1881.               id++;
  1882.       }
  1883. !     qsort((char *)uflag, (unsigned)usize, sizeof(char *), strpcmp);
  1884.   }
  1885.   
  1886. ***************
  1887. *** 1266,1269 ****
  1888. --- 1263,1267 ----
  1889.    * print an article, if it's long enough call page()
  1890.    */
  1891. + /* ARGSUSED */
  1892.   print(hp, f)
  1893.   header *hp;
  1894. ***************
  1895. *** 1276,1282 ****
  1896.       if (!pflag
  1897.   #ifdef LINESHDRPRESENT
  1898. !      && hp->h_lines && atoi(hp->h_lines) >= PAGESIZE - 4
  1899.   #endif
  1900. !      )
  1901.           page(f);
  1902.       else
  1903. --- 1274,1280 ----
  1904.       if (!pflag
  1905.   #ifdef LINESHDRPRESENT
  1906. !         && hp->h_lines && atoi(hp->h_lines) >= PAGESIZE - 4
  1907.   #endif
  1908. !         )
  1909.           page(f);
  1910.       else
  1911. ***************
  1912. *** 1283,1287 ****
  1913.           while ((c = getc(f)) != EOF)
  1914.               (void) putchar(c);
  1915. !     fseek(f, pos, 0);
  1916.   }
  1917.   
  1918. --- 1281,1285 ----
  1919.           while ((c = getc(f)) != EOF)
  1920.               (void) putchar(c);
  1921. !     (void) fseek(f, pos, 0);
  1922.   }
  1923.   
  1924.  
  1925.  
  1926. end of patch 13-Nov-1989
  1927.  
  1928.  
  1929.