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

  1. From @uunet.uu.net:henry@zoo.toronto.edu Tue Mar 13 14:12:33 1990
  2. Received: from BBN.COM by pineapple.bbn.com id <AA13785@pineapple.bbn.com>; Tue, 13 Mar 90 14:11:48 -0500
  3. Received: from uunet.UU.NET by BBN.COM id aa12092; 13 Mar 90 13:57 EST
  4. Received: from zoo.utoronto.ca by uunet.uu.net (5.61/1.14) with SMTP 
  5.     id AA07018; Tue, 13 Mar 90 13:55:37 -0500
  6. Message-Id: <9003131855.AA07018@uunet.uu.net>
  7. From: henry@zoo.toronto.edu
  8. Date: Tue, 13 Mar 90 13:56:05 EST
  9. To: uunet!source-patches@uunet.uu.net
  10. Subject: C News patch of 16-Jan-1990 (uunet apparently is missing this one)
  11. Status: R
  12.  
  13. This is the first of two coordinated patches; the second is set to appear
  14. tomorrow.  The big change, set up in the first and implemented in the
  15. second, is that build has been revamped to use your previous answers as
  16. the defaults for the next run.  (Thanks to the magic :-( of context diffs,
  17. and the large number of lines affected, the changes to build itself are
  18. essentially the entire second patch.)
  19.  
  20. Other work is mostly further cleanout of the to-do list.  Porting problems
  21. with MAXLONG have been largely -- we hope -- eliminated by generating the
  22. value in a more sophisticated way at run time.  A new batch transmitter,
  23. viauuxl, for multicast transmission (requires uux -l).  Batchsplit modified
  24. to reduce the time spent with the news system locked.  Subst has been
  25. fixed so it does not replace the target file if the new version is identical
  26. to the old, and the main Makefile has been touched up to avoid doing a
  27. subst run unnecessarily.  Versions of queuelen for old and prehistoric
  28. versions of uucp.  An "addfeed" command for one common sysadmin chore.
  29. Further expansion of notebook/problems to cover more porting troubles.
  30. And the newsaux(8) manual page has been split, with the maintenance stuff
  31. moving to newsmaint(8).
  32.  
  33. start of patch 16-Jan-1990
  34. (suggested archive name: `pch16Jan90.Z')
  35. this should be run with   patch -p0 <thisfile
  36.  
  37. Please do the following (there is no easy way we can convince
  38. patch to do this automatically):
  39. rm relay/cpu.h
  40.  
  41. The following is a complete list of patches to date.
  42.  
  43. Prereq: 23-Jun-1989
  44. Prereq: 7-Jul-1989
  45. Prereq: 23-Jul-1989
  46. Prereq: 22-Aug-1989
  47. Prereq: 24-Aug-1989
  48. Prereq: 14-Sep-1989
  49. Prereq: 13-Nov-1989
  50. Prereq: 10-Jan-1990
  51. *** PATCHDATES.old    Tue Jan 16 16:54:51 1990
  52. --- PATCHDATES    Tue Jan 16 16:54:51 1990
  53. ***************
  54. *** 1,8 ****
  55. --- 1,9 ----
  56.   23-Jun-1989
  57.   7-Jul-1989
  58.   23-Jul-1989
  59.   22-Aug-1989
  60.   24-Aug-1989
  61.   14-Sep-1989
  62.   13-Nov-1989
  63.   10-Jan-1990
  64. + 16-Jan-1990
  65.  
  66. Changed files, if any:
  67.  
  68. *** cnpatch/old/batch/Makefile    Wed Jan 10 19:10:14 1990
  69. --- batch/Makefile    Sun Jan 14 02:52:40 1990
  70. ***************
  71. *** 17,24 ****
  72.   PGMS=batcher batchih batchsm batchsplit comp compcun nocomp viainews viauux \
  73.       sendbatches compc7 c7encode viamail viapmail bencode compb viauuxz \
  74. !     viaemail viarsh
  75. ! DTR=Makefile batcher.c batchih batchsplit c7encode.c comp compc7 compcun \
  76. !     newsbatch.8 nocomp sendbatches viainews viauux viamail \
  77. !     bencode.c coder.h crctab.c compb viapmail viarsh
  78.   ALL = $(PGMS) batchparms
  79.   
  80. --- 17,21 ----
  81.   PGMS=batcher batchih batchsm batchsplit comp compcun nocomp viainews viauux \
  82.       sendbatches compc7 c7encode viamail viapmail bencode compb viauuxz \
  83. !     viaemail viarsh viauuxl
  84.   ALL = $(PGMS) batchparms
  85.   
  86. ***************
  87. *** 114,118 ****
  88.       echo g 1 >test.good ; cmp test.good togo.7
  89.       echo h 3 >test.good ; echo i 20 >>test.good ; cmp test.good togo.next
  90. !     echo j 999 >test.good ; cmp test.good togo
  91.       rm togo.*
  92.       echo `pwd`/test.1 >togo
  93. --- 111,116 ----
  94.       echo g 1 >test.good ; cmp test.good togo.7
  95.       echo h 3 >test.good ; echo i 20 >>test.good ; cmp test.good togo.next
  96. !     echo j 999 >test.good ; cmp test.good togo.more
  97. !     test ! -s togo ;
  98.       rm togo.*
  99.       echo `pwd`/test.1 >togo
  100. ***************
  101. *** 170,176 ****
  102.       cmp test.good test.log
  103.       rm -rf test.* togo out.going bin batchparms batchlog batchlog.*
  104. - dtr:    $(DTR)
  105. -     makedtr $(DTR) >$@
  106.   
  107.   clean:
  108. --- 168,171 ----
  109.  
  110. *** cnpatch/old/batch/batchsplit    Fri Jul  7 15:40:02 1989
  111. --- batch/batchsplit    Sun Jan 14 02:50:04 1990
  112. ***************
  113. *** 2,20 ****
  114.   # Prepare some batches of size $1 in files named togo.[0-9] .  We prepare a
  115.   # total of 7 to stay within awk's limits on file descriptors (we need a
  116. ! # couple of other descriptors).  Source is file togo.next if it exists, or
  117. ! # togo if not.  If there is no togo.next and there is more in togo than will
  118. ! # fit in the numbered batches, put the next few lots in togo.next.  This
  119. ! # avoids the need to paw through the whole togo file every time when a large
  120. ! # backlog has built up.
  121.   #
  122.   # Buglet:  does not count the "#! rnews nnnnn" headers in sizes.
  123.   #
  124. ! # If the togo file does not contain file sizes, we make an arbitrary guess
  125.   # at an average size.
  126.   
  127. ! case $#
  128. ! in
  129. !     0)
  130. !     echo 'Usage: batchsplit size' >&2
  131.       exit 2
  132.       ;;
  133. --- 2,22 ----
  134.   # Prepare some batches of size $1 in files named togo.[0-9] .  We prepare a
  135.   # total of 7 to stay within awk's limits on file descriptors (we need a
  136. ! # couple of other descriptors).  We ultimately work from togo, but if it's
  137. ! # the only thing we've got to work on, we immediately shuffle it aside into
  138. ! # togo.more so that we can unlock the news system.  If we've got an existing
  139. ! # non-empty togo.more, we use that.  As a further optimization, if there
  140. ! # is more than will fit in the numbered batches, we put the next few
  141. ! # lots in togo.next, and use that thereafter until it's empty.  This
  142. ! # avoids the need to paw through the whole huge list every time when
  143. ! # a large backlog has built up.  We also punt to sed to trim the big
  144. ! # list when we do process it, avoiding the need to run it all through awk.
  145.   #
  146.   # Buglet:  does not count the "#! rnews nnnnn" headers in sizes.
  147.   #
  148. ! # If the togo files do not contain file sizes, we make an arbitrary guess
  149.   # at an average size.
  150.   
  151. ! case $# in
  152. ! 0)    echo 'Usage: batchsplit size' >&2
  153.       exit 2
  154.       ;;
  155. ***************
  156. *** 42,53 ****
  157.   done
  158.   
  159. ! rm -f togo.overflow togo.count
  160.   if test -s togo.next
  161.   then
  162.       input=togo.next
  163.   else
  164. !     input=togo
  165.   fi
  166.   
  167.   awk 'BEGIN { total = 0 ; ninbatch = 0 ; bno = 1 ; limit = '$1'
  168.           batch = "togo." bno ; nbatches = 7 }
  169. --- 44,65 ----
  170.   done
  171.   
  172. ! # pick an input file, shuffling togo aside if needed, and unlock
  173.   if test -s togo.next
  174.   then
  175.       input=togo.next
  176. + elif test -s togo.more
  177. + then
  178. +     input=togo.more
  179.   else
  180. !     rm -f togo.more
  181. !     mv togo togo.more
  182. !     >togo
  183. !     input=togo.more
  184.   fi
  185. + trap 0 1 2 15
  186. + rm -f $ltemp $lock
  187.   
  188. + # main processing
  189. + rm -f togo.overflow togo.count
  190.   awk 'BEGIN { total = 0 ; ninbatch = 0 ; bno = 1 ; limit = '$1'
  191.           batch = "togo." bno ; nbatches = 7 }
  192. ***************
  193. *** 63,67 ****
  194.                   batch = "togo." bno
  195.                   ninbatch = 0
  196. !             } else if (bno == nbatches+1 && FILENAME == "togo") {
  197.                   batch = "togo.next"
  198.                   limit = 4 * nbatches * limit
  199. --- 75,79 ----
  200.                   batch = "togo." bno
  201.                   ninbatch = 0
  202. !             } else if (bno == nbatches+1 && FILENAME == "togo.more") {
  203.                   batch = "togo.next"
  204.                   limit = 4 * nbatches * limit
  205. ***************
  206. *** 77,80 ****
  207. --- 89,93 ----
  208.       }' $input
  209.   
  210. + # handle the overflow case efficiently
  211.   if test -s togo.count
  212.   then
  213. ***************
  214. *** 81,90 ****
  215.       sed "1,`cat togo.count`d" $input >togo.overflow
  216.       rm togo.count
  217. - fi
  218. - if test -r togo.overflow
  219. - then
  220.       mv togo.overflow $input
  221.   else
  222. !     >$input
  223.   fi
  224. --- 94,99 ----
  225.       sed "1,`cat togo.count`d" $input >togo.overflow
  226.       rm togo.count
  227.       mv togo.overflow $input
  228.   else
  229. !     rm $input
  230.   fi
  231.  
  232. *** cnpatch/old/batch/sendbatches    Mon Nov 13 17:39:43 1989
  233. --- batch/sendbatches    Sun Jan 14 02:57:10 1990
  234. ***************
  235. *** 133,137 ****
  236.           then
  237.               # No -- need some more batches.
  238. !             if test ! -s togo && test ! -s togo.next
  239.               then
  240.                   break        # Nothing left to do.
  241. --- 133,138 ----
  242.           then
  243.               # No -- need some more batches.
  244. !             if test ! -s togo && test ! -s togo.more &&
  245. !                             test ! -s togo.more
  246.               then
  247.                   break        # Nothing left to do.
  248.  
  249. *** cnpatch/old/conf/Makefile    Wed Jan 10 19:10:16 1990
  250. --- conf/Makefile    Sun Jan 14 01:43:15 1990
  251. ***************
  252. *** 46,49 ****
  253. --- 46,50 ----
  254.       rm -f junk
  255.       ./subst -f substitutions `sed 's;^;../;' subst.hs subst.gc`
  256. +     touch $@
  257.   
  258.   spacefor.bsd:    spacefor.proto Makefile
  259. ***************
  260. *** 75,78 ****
  261. --- 76,85 ----
  262.       : okay
  263.   
  264. + queuelen.old:
  265. +     : okay
  266. + queuelen.pre:    queuelen.old
  267. +     sed '/grade=d/s//grade=./' queuelen.old >$@
  268.   queuelen.null:
  269.       echo '#! /bin/sh' >$@
  270. ***************
  271. *** 88,92 ****
  272.   clean:
  273.       rm -f spacefor.sysv spacefor.v7 spacefor.null queuelen.null
  274. !     rm -f spacefor.sgi spacefor.xenix
  275.       rm -f config mailname organization server whoami hostname errlog
  276.       rm -f substitutions history history.pag history.dir active localgroups
  277. --- 95,99 ----
  278.   clean:
  279.       rm -f spacefor.sysv spacefor.v7 spacefor.null queuelen.null
  280. !     rm -f spacefor.sgi spacefor.xenix queuelen.pre
  281.       rm -f config mailname organization server whoami hostname errlog
  282.       rm -f substitutions history history.pag history.dir active localgroups
  283. ***************
  284. *** 103,106 ****
  285. --- 110,114 ----
  286.   spotless:    gclean
  287.       rm -f $(SHS)
  288. +     rm -f substs
  289.   
  290.   lclean:
  291.  
  292. *** cnpatch/old/conf/spacefor.proto    Wed Jan 10 19:10:18 1990
  293. --- conf/spacefor.proto    Mon Jan 15 02:21:51 1990
  294. ***************
  295. *** 47,51 ****
  296.   # block count comes from, and the one for nr determines which line.  For
  297.   # System V, the Makefile edits in a sed which tries to strip silliness
  298. ! # off in a reasonably System-V-variant-indepedent way.  Expr would be
  299.   # faster than awk, but on a 16-bit machine, expr does 16-bit arithmetic,
  300.   # which isn't enough.
  301. --- 47,51 ----
  302.   # block count comes from, and the one for nr determines which line.  For
  303.   # System V, the Makefile edits in a sed which tries to strip silliness
  304. ! # off in a reasonably System-V-variant-independent way.  Expr would be
  305.   # faster than awk, but on a 16-bit machine, expr does 16-bit arithmetic,
  306.   # which isn't enough.
  307.  
  308. *** cnpatch/old/conf/subst    Tue Jun 20 18:55:56 1989
  309. --- conf/subst    Sat Jan 13 21:06:55 1990
  310. ***************
  311. *** 73,83 ****
  312.       }" $f >$new
  313.   
  314. !     # substitute new for old
  315. !     trap "mv $old $f; exit" 1 2 15
  316. !     mv $f $old
  317. !     mv $new $f
  318. !     # dispense with the old version
  319. !     trap "rm -f $old; exit" 1 2 15
  320. !     rm $old
  321.   done
  322. --- 73,86 ----
  323.       }" $f >$new
  324.   
  325. !     # substitute new for old, if necessary
  326. !     if cmp -s $new $f
  327. !     then
  328. !         rm -f $new $old
  329. !     else
  330. !         trap "mv $old $f; exit" 1 2 15
  331. !         mv $f $old
  332. !         mv $new $f
  333. !         trap "rm -f $old; exit" 1 2 15
  334. !         rm $old
  335. !     fi
  336.   done
  337.  
  338. *** cnpatch/old/conf/subst.hs    Thu Sep 14 16:03:28 1989
  339. --- conf/subst.hs    Sun Jan 14 00:22:53 1990
  340. ***************
  341. *** 27,30 ****
  342. --- 27,31 ----
  343.   man/news.5
  344.   man/newsaux.8
  345. + man/newsmaint.8
  346.   man/newsbatch.8
  347.   man/newsmail.8
  348. ***************
  349. *** 38,41 ****
  350. --- 39,43 ----
  351.   man/postnews.1
  352.   misc/addgroup
  353. + misc/addfeed
  354.   misc/delgroup
  355.   misc/locknews
  356.  
  357. *** cnpatch/old/expire/Makefile    Wed Jan 10 19:10:22 1990
  358. --- expire/Makefile    Sun Jan 14 03:47:37 1990
  359. ***************
  360. *** 21,25 ****
  361.   SHELL = /bin/sh
  362.   
  363. ! all:    $(THEM) explist.proto
  364.       chmod +x $(THEM)
  365.   
  366. --- 21,25 ----
  367.   SHELL = /bin/sh
  368.   
  369. ! all:    $(THEM)
  370.       chmod +x $(THEM)
  371.   
  372. ***************
  373. *** 34,39 ****
  374.       for f in $(THEM) ; do cmp $(NEWSBIN)/expire/$$f $$f || true ; done
  375.   
  376. ! newsinstall:    explist.proto
  377. !     -if test ! -r $(NEWSCTL)/explist ; then cp explist.proto $(NEWSCTL)/explist ; fi
  378.   
  379.   expire: expire.o $(LIBS)
  380. --- 34,39 ----
  381.       for f in $(THEM) ; do cmp $(NEWSBIN)/expire/$$f $$f || true ; done
  382.   
  383. ! newsinstall:    explist
  384. !     -if test ! -r $(NEWSCTL)/explist ; then cp explist $(NEWSCTL)/explist ; fi
  385.   
  386.   expire: expire.o $(LIBS)
  387. ***************
  388. *** 55,59 ****
  389.       lint -ha $(LINTFLAGS) expire.c 2>&1 | egrep -v $(JUNKLINT) | tee $@
  390.   
  391. ! explist.proto:
  392.       echo "# hold onto history lines 14 days, nobody gets >90 days" >$@
  393.       echo "/expired/            x    14    -" >>$@
  394. --- 55,59 ----
  395.       lint -ha $(LINTFLAGS) expire.c 2>&1 | egrep -v $(JUNKLINT) | tee $@
  396.   
  397. ! explist.yes:
  398.       echo "# hold onto history lines 14 days, nobody gets >90 days" >$@
  399.       echo "/expired/            x    14    -" >>$@
  400. ***************
  401. *** 76,79 ****
  402. --- 76,87 ----
  403.       echo "all                x    7    @" >>$@
  404.   
  405. + explist.no:    explist.yes
  406. +     echo '# modified version, no archiving' >$@
  407. +     echo '#' >>$@
  408. +     sed 's/@/-/' explist.yes >>$@
  409. + explist:    explist.no
  410. +     cp explist.no $@
  411.   # setup for regression test
  412.   setup:
  413. ***************
  414. *** 267,271 ****
  415.   
  416.   clean:    tidy
  417. !     rm -f *.o expire histslash mkdbm histinfo explist.proto
  418.       rm -f dtr updatemin
  419.   
  420. --- 275,279 ----
  421.   
  422.   clean:    tidy
  423. !     rm -f *.o expire histslash mkdbm histinfo explist explist.*
  424.       rm -f dtr updatemin
  425.   
  426.  
  427. *** cnpatch/old/man/expire.8    Wed Jan 10 19:10:44 1990
  428. --- man/expire.8    Fri Jan 12 14:59:50 1990
  429. ***************
  430. *** 7,11 ****
  431.   .\" =()<.ds m @<NEWSMASTER>@>()=
  432.   .ds m usenet
  433. ! .TH EXPIRE 8 "3 Jan 1990" "C News"
  434.   .SH NAME
  435.   expire, doexpire \- expire old news
  436. --- 7,11 ----
  437.   .\" =()<.ds m @<NEWSMASTER>@>()=
  438.   .ds m usenet
  439. ! .TH EXPIRE 8 "12 Jan 1990" "C News"
  440.   .SH NAME
  441.   expire, doexpire \- expire old news
  442. ***************
  443. *** 273,276 ****
  444. --- 273,283 ----
  445.   \fIUpact\fR is a distasteful kludge,
  446.   but then, so is the third field of the \fIactive\fR file.
  447. + .PP
  448. + \fIUpact\fR forces the third field of the \fIactive\fR file to be at least
  449. + five digits, for backward compatibility, but otherwise just makes it as
  450. + large as necessary.
  451. + The group-creation operations always create it ten digits long.
  452. + The discrepancy is harmless, since unlike the second field, the third
  453. + field is never updated in place.
  454.   .PP
  455.   One cannot put more than one newsgroup into a single archiving directory
  456.  
  457. *** cnpatch/old/man/newsaux.8    Wed Jan 10 19:10:45 1990
  458. --- man/newsaux.8    Sun Jan 14 00:18:23 1990
  459. ***************
  460. *** 7,11 ****
  461.   .\" =()<.ds m @<NEWSMASTER>@>()=
  462.   .ds m usenet
  463. ! .TH NEWSAUX 8 "30 Dec 1989" "C News"
  464.   .SH NAME
  465.   spacefor \- check available space for news
  466. --- 7,11 ----
  467.   .\" =()<.ds m @<NEWSMASTER>@>()=
  468.   .ds m usenet
  469. ! .TH NEWSAUX 8 "13 Jan 1990" "C News"
  470.   .SH NAME
  471.   spacefor \- check available space for news
  472. ***************
  473. *** 23,41 ****
  474.   canonhdr \- extract header and canonicalize case in header keywords
  475.   .br
  476. - newshist \- extract history line for news article(s)
  477. - .br
  478.   newslock \- do locking for news
  479. - .br
  480. - newsdaily \- maintain news log files and report problems
  481. - .br
  482. - newswatch \- keep an eye on news system for difficulties
  483. - .br
  484. - newsboot \- clean up news debris on reboot
  485. - .br
  486. - locknews \- lock news system for manual tinkering
  487. - .br
  488. - addgroup, delgroup \- add and delete newsgroups, locally only
  489. - .br
  490. - adddirs \- make any missing directories for active newsgroups
  491.   .SH SYNOPSIS
  492.   .B \*b/spacefor
  493. --- 23,27 ----
  494. ***************
  495. *** 67,93 ****
  496.   [ file ] ...
  497.   .br
  498. - .B \*b/maint/newshist
  499. - msgid ...
  500. - .br
  501.   .B \*b/newslock
  502.   locktemp lockname
  503. - .br
  504. - .B \*b/maint/newsdaily
  505. - [ guru ... ]
  506. - .br
  507. - .B \*b/maint/newswatch
  508. - [ guru ... ]
  509. - .br
  510. - .B \*b/maint/newsboot
  511. - .br
  512. - .B \*b/maint/locknews
  513. - .br
  514. - .B \*b/maint/addgroup
  515. - group {\fBy\fR|\fBn\fR|\fBm\fR|\fBx\fR|\fB=\fIrealgroup\fR}
  516. - .br
  517. - .B \*b/maint/delgroup
  518. - group
  519. - .br
  520. - .B \*b/maint/adddirs
  521.   .SH DESCRIPTION
  522.   These programs are minor utilities used by various parts of C News.
  523. --- 53,58 ----
  524. ***************
  525. *** 155,161 ****
  526.   ``Message-ID'' is the canonical form of [e.g.] ``message-id''.)
  527.   .PP
  528. - .I Newshist
  529. - prints the history line for each article identified by a \fImsgid\fR.
  530. - .PP
  531.   .I Newslock
  532.   makes a link named \fIlockname\fR to the file \fIlocktemp\fR,
  533. --- 120,123 ----
  534. ***************
  535. *** 168,218 ****
  536.   (Some brain-damaged versions of \fIln\fR helpfully remove \fIlockname\fR
  537.   in that case, making them useless for locking.)
  538. - .PP
  539. - .I Newsdaily
  540. - performs minor maintenance chores
  541. - that typically should be done once a day for the news system:
  542. - saving copies of log files and truncating them,
  543. - reporting logged errors, checking for anomalies suggesting something
  544. - is wrong, and cleaning out leftover files.
  545. - \fINewsdaily\fR saves one generation of old \fIlog\fR files and three
  546. - generations of old \fIerrlog\fR and \fIbatchlog\fR files.
  547. - It reports problems to the named \fIguru\fRs
  548. - (default:  `\*m').
  549. - .PP
  550. - .I Newswatch
  551. - looks for indications of news problems on a shorter time scale than those
  552. - reported by \fInewsdaily\fR, notably strangely-persistent lock files that
  553. - may indicate a news-system failure.
  554. - It typically should be run a few times a day.
  555. - .PP
  556. - .I Newsboot
  557. - should be run from \fI/etc/rc\fR or the system's equivalent on reboot.
  558. - It cleans up files that the news system might have left lying about
  559. - if the system crashed while news was being processed,
  560. - notably old lock files.
  561. - .PP
  562. - .I Locknews
  563. - locks the news system, starts up a shell for the user, and waits around to
  564. - unlock the news system when that shell terminates.
  565. - This simplifies manual maintenance.
  566. - .PP
  567. - .I Addgroup
  568. - and
  569. - .I delgroup
  570. - respectively add a newsgroup (with a specified flags field for the
  571. - \fIactive\fR file, normally `y' [see \fInews\fR(5)]) and delete a
  572. - newsgroup manually, with proper locking.
  573. - The effect is purely local; no control message (to propagate the
  574. - change to other machines) is sent.
  575. - .PP
  576. - .I Adddirs
  577. - sweeps through the \fIactive\fR file checking that directories exist for
  578. - all newsgroups.
  579. - (\fIRelaynews\fR
  580. - will create directories as needed, but some
  581. - user-interface software gets upset if a newsgroup exists but its directory
  582. - does not.)
  583. - This is mostly useful when adding groups in bulk, based on another site's
  584. - \fIactive\fR file.
  585.   .SH FILES
  586.   .ta 6c
  587. --- 130,133 ----
  588. ***************
  589. *** 220,247 ****
  590.   /usr/spool/uucp/*    uucp queues
  591.   \*c/whoami    news host name
  592. - \*c/history    history file
  593. - \*c/history.pag    \fIdbm\fR database for history file
  594. - \*c/history.dir    \fIdbm\fR database for history file
  595.   \*c/L.*    lock temporaries
  596.   \*c/LOCK*    lock files
  597. - \*c/log    current news log
  598. - \*c/log.o    previous news log
  599. - \*c/errlog    current news-error log
  600. - \*c/errlog.o*    old news-error logs
  601. - \*c/batchlog    current news-batcher log
  602. - \*c/batchlog.o*    old news-batcher logs
  603. - \*a/in.coming    input-spooling area
  604. - \*a/out.going    output-batching area
  605. - \*c/watchtime    last time \fInewswatch\fR was run
  606. - \*c/active    list of current newsgroups
  607. - \*c/active.old    backup copy created by \fIaddgroup\fR and \fIdelgroup\fR
  608.   .SH SEE ALSO
  609.   df(1), uucp(1), ls(1), ctime(3), getdate(3), hostname(1),
  610. ! grep(1), news(5), expire(8), newsbatch(8), rnews(8)
  611. ! .SH DIAGNOSTICS
  612. ! .I Locknews
  613. ! complains and exits if it is unable to lock the news system; this is
  614. ! typically a matter of either inadequate permissions or news activity
  615. ! already in progress.
  616.   .SH HISTORY
  617.   Written at U of Toronto by Henry Spencer and Geoff Collyer.
  618. --- 135,143 ----
  619.   /usr/spool/uucp/*    uucp queues
  620.   \*c/whoami    news host name
  621.   \*c/L.*    lock temporaries
  622.   \*c/LOCK*    lock files
  623.   .SH SEE ALSO
  624.   df(1), uucp(1), ls(1), ctime(3), getdate(3), hostname(1),
  625. ! grep(1), news(5), expire(8), newsbatch(8), rnews(8), newsmaint(8)
  626.   .SH HISTORY
  627.   Written at U of Toronto by Henry Spencer and Geoff Collyer.
  628. ***************
  629. *** 258,268 ****
  630.   .PP
  631.   The need for \fIsizeof\fR and \fInewslock\fR is a botch.
  632. - .PP
  633. - \fILocknews\fR is a bit crude.
  634. - .PP
  635. - \fIDelgroup\fR does not remove files or directories from \*a, although it
  636. - prints a reminder to do so.
  637. - .PP
  638. - Various nuisances can result if the maintenance utilities are run as
  639. - \fIroot\fR rather than as the owner of the news database.
  640. - It's difficult to defend against this.
  641. --- 154,155 ----
  642.  
  643. *** cnpatch/old/man/newsbatch.8    Thu Sep 14 16:03:42 1989
  644. --- man/newsbatch.8    Sun Jan 14 02:09:07 1990
  645. ***************
  646. *** 7,11 ****
  647.   .\" =()<.ds m @<NEWSMASTER>@>()=
  648.   .ds m usenet
  649. ! .TH NEWSBATCH 8 "26 Aug 1989" "C News"
  650.   .SH NAME
  651.   sendbatches, batchsplit \- news batching to other sites
  652. --- 7,11 ----
  653.   .\" =()<.ds m @<NEWSMASTER>@>()=
  654.   .ds m usenet
  655. ! .TH NEWSBATCH 8 "13 Jan 1990" "C News"
  656.   .SH NAME
  657.   sendbatches, batchsplit \- news batching to other sites
  658. ***************
  659. *** 17,21 ****
  660.   c7encode, bencode \- compressed-news-batch encoding
  661.   .br
  662. ! viauux, viauuxz, viainews, viarsh \- news-batch transmission
  663.   .br
  664.   viamail, viaemail, viapmail \- news-batch transmission via mail
  665. --- 17,21 ----
  666.   c7encode, bencode \- compressed-news-batch encoding
  667.   .br
  668. ! viauux, viauuxz, viauuxl, viainews, viarsh \- news-batch transmission
  669.   .br
  670.   viamail, viaemail, viapmail \- news-batch transmission via mail
  671. ***************
  672. *** 68,71 ****
  673. --- 68,74 ----
  674.   .B \&.../viauuxz
  675.   site
  676. + .br    
  677. + .B \&.../viauuxl
  678. + group
  679.   .br
  680.   .B \&.../viainews
  681. ***************
  682. *** 216,219 ****
  683. --- 219,226 ----
  684.   like \fIviauux\fR except with \fB\-z\fR option given to \fIuux\fR
  685.   (for old UUCPs where don't-report-result-on-zero-status is not default)
  686. + .IP viauuxl
  687. + multicast transmission using the \fB\-l\fR option of \fIuux\fR (not found
  688. + on all systems) to send the same batch to all systems listed in the
  689. + file `\*c/sites.\fIgroup\fR'
  690.   .IP viainews
  691.   feed the batch back to \fIinews\fR, ignoring the \fIsite\fR argument
  692. ***************
  693. *** 261,264 ****
  694. --- 268,272 ----
  695.   \*a/out.going/*    batch directories
  696.   \*c/batchparms    parameter file
  697. + \*c/sites.*    \fIviauuxl\fR multicast lists
  698.   
  699.   also see text
  700. ***************
  701. *** 288,289 ****
  702. --- 296,301 ----
  703.   \fIViapmail\fR is obsolescent;
  704.   \fIviaemail\fR with a batch encoded with \fIbencode\fR is vastly superior.
  705. + .PP
  706. + Queue-length limiting does not work for \fIviauuxl\fR because \fIqueuelen\fR
  707. + (see \fInewsaux\fR(8)) does not know about multicast groups.
  708. + Also, \fIviauuxl\fR has not been tested well.
  709.  
  710. *** cnpatch/old/misc/README    Tue Jun 20 19:00:07 1989
  711. --- misc/README    Sun Jan 14 00:49:59 1990
  712. ***************
  713. *** 1,5 ****
  714.   These are miscellaneous C News utilities which are used by more than one
  715.   subsystem or aren't large enough to deserve their own directory.  newsaux(8)
  716. ! describes most of them.
  717.   
  718.   Ctime and getdate are, in our opinion, useful enough to deserve installing
  719. --- 1,5 ----
  720.   These are miscellaneous C News utilities which are used by more than one
  721.   subsystem or aren't large enough to deserve their own directory.  newsaux(8)
  722. ! and newsmaint(8) describe most of them.
  723.   
  724.   Ctime and getdate are, in our opinion, useful enough to deserve installing
  725.  
  726. *** cnpatch/old/notebook/config    Thu Sep 14 16:03:44 1989
  727. --- notebook/config    Sat Jan 13 21:11:30 1990
  728. ***************
  729. *** 151,155 ****
  730.   # foobar \- does foo, bar, and bletch
  731.   
  732. ! # =()<. ${NEWSCONFIG\-@<NEWSCONFIG>@}>()=
  733.   \&. ${NEWSCONFIG\-/usr/lib/news/bin/config}
  734.   
  735. --- 151,155 ----
  736.   # foobar \- does foo, bar, and bletch
  737.   
  738. ! # =()<\&. ${NEWSCONFIG\-@<NEWSCONFIG>@}>()=
  739.   \&. ${NEWSCONFIG\-/usr/lib/news/bin/config}
  740.   
  741.  
  742. *** cnpatch/old/notebook/log    Wed Jan 10 19:10:50 1990
  743. --- notebook/log    Mon Jan 15 02:22:08 1990
  744. ***************
  745. *** 87,91 ****
  746.   .PP
  747.   Beware that control-message handlers inherit
  748. ! .I relaynew 's
  749.   standard output, so if any of them natters on standard output
  750.   (we believe none of ours does), the nattering will appear in
  751. --- 87,91 ----
  752.   .PP
  753.   Beware that control-message handlers inherit
  754. ! .I relaynews 's
  755.   standard output, so if any of them natters on standard output
  756.   (we believe none of ours does), the nattering will appear in
  757.  
  758. *** cnpatch/old/notebook/problems    Wed Jan 10 19:10:10 1990
  759. --- notebook/problems    Sun Jan 14 04:04:07 1990
  760. ***************
  761. *** 1,3 ****
  762. ! .DA "31 Dec 1989"
  763.   .TL
  764.   Known Porting Problems With C News
  765. --- 1,3 ----
  766. ! .DA "13 Jan 1990"
  767.   .TL
  768.   Known Porting Problems With C News
  769. ***************
  770. *** 142,145 ****
  771.   telling \fIbuild\fR that you don't want to use the fast-stdio stuff is
  772.   always safe.
  773.   .PP
  774. ! xxx more to come...
  775. --- 142,307 ----
  776.   telling \fIbuild\fR that you don't want to use the fast-stdio stuff is
  777.   always safe.
  778. + .SH
  779. + Readnews vs. System V
  780.   .PP
  781. ! The terminal handling in the Australian \fIreadnews\fR that we include
  782. ! is known not to work under a ``pure'' System V.
  783. ! There are stubs for System V code but it's never been implemented.
  784. ! Most current System V implementations from serious suppliers have enough
  785. ! BSD compatibility that this is not an issue.
  786. ! .SH
  787. ! Readnews Simplicity
  788. ! .PP
  789. ! Generally, the Australian \fIreadnews\fR
  790. ! is a bit on the simple and buggy side.
  791. ! There are various things wrong with it that we're not very interested
  792. ! in fixing\(emwe consider it useful primarily for naive users who just
  793. ! want to read system announcements, and recommend that sophisticated
  794. ! users use something else.
  795. ! One known interoperability issue is that it is fussier about the format
  796. ! of \fI.newsrc\fR files than fancier readers.
  797. ! .PP
  798. ! Problems will arise if the news directories are in non-standard places,
  799. ! because \fIreadnews\fR is not well integrated into our configuration
  800. ! machinery; we want to fix this someday.
  801. ! .SH
  802. ! void
  803. ! .PP
  804. ! Old compilers that don't understand the \fIvoid\fR type will choke on
  805. ! much of our code.
  806. ! There is a commented-out ``#define\ void\ int'' in \fInews.h\fR that
  807. ! cures most cases of this if you uncomment it.
  808. ! (We have a report that you might need to add ``\-Dvoid=int'' to the
  809. ! Makefile in \fIlibv7\fR if you're using that library.)
  810. ! C News does not rely on the ANSI C ``void\ *'' type as far as we know.
  811. ! .SH
  812. ! Read/write Modes in fopen
  813. ! .PP
  814. ! Unix V7 documented only ``r'', ``w'', and ``a'' as suitable mode arguments
  815. ! to \fIfopen\fR.
  816. ! It actually implemented the read/write modes, ``r+'', ``w+'', and ``a+'',
  817. ! as well, and C News relies on them.
  818. ! Unix reimplementations based on old documentation may have trouble here;
  819. ! we know that at least the older versions of Minix really don't implement
  820. ! these modes.
  821. ! .SH
  822. ! MAXLONG
  823. ! .PP
  824. ! The \fIrelay/cpu.h\fR file formerly defined a constant \fIMAXLONG\fR
  825. ! which is the biggest positive value of a \fIlong\fR.
  826. ! The definition was clever but failed on some odd systems (Unisys?).
  827. ! Current versions of C News
  828. ! generate the value dynamically in a less fallible way,
  829. ! and check the value for plausibility.
  830. ! (This is encountered when \fIrelaynews\fR is asked to
  831. ! process a single article, not a batch.
  832. ! This happens primarily when an article is posted locally, with \fIinews\fR.)
  833. ! .SH
  834. ! df Output Format
  835. ! .PP
  836. ! The \fIspacefor\fR utility needs to understand the output format of \fIdf\fR.
  837. ! There are numerous variations on \fIdf\fR.
  838. ! \fIBuild\fR and the relevant makefiles know about the more common ones,
  839. ! but customization may be necessary.
  840. ! \fISpacefor\fR is commented well enough that it should be possible to
  841. ! figure out the necessary changes; usually the initializations of \fInr\fR
  842. ! and \fInf\fR are all that need changing.
  843. ! If there are colons (:) in your \fIdf\fR's output format, you should
  844. ! probably start from the ``sysv'' \fIspacefor\fR, which attempts to
  845. ! preprocess the output to get rid of System V garbage;
  846. ! otherwise the ``bsd'' one is a reasonable starting point.
  847. ! .PP
  848. ! One constant nuisance is \fIdf\fRs that are too stupid to take a directory
  849. ! name as an argument.
  850. ! The long-term solution to this is to edit a suitable variant of \fIspacefor\fR
  851. ! to know about the proper arguments.
  852. ! A short-term solution is to use the ``null'' variant, sacrificing space
  853. ! checking for the sake of getting something working.
  854. ! .SH
  855. ! Floating Point
  856. ! .PP
  857. ! The only place in C News where floating point is used, as far as we know,
  858. ! is in the calculation of expiry dates in \fIexpire\fR.
  859. ! This is not a performance bottleneck, so slow floating-point arithmetic
  860. ! is not a problem.
  861. ! Complete absence of floating point would require minor modifications to
  862. ! \fIexpire\fR.
  863. ! .SH
  864. ! 386 Optimizer vs. dbz
  865. ! .PP
  866. ! We have a reliable report that the System V 386 optimizer (invoked when
  867. ! \fIcc\fR is given the \fB\-O\fR option) miscompiles the \fIdbz\fR package
  868. ! badly enough to cripple it, without producing any error messages.
  869. ! The only fix is to compile \fIdbz\fR without \fB\-O\fR.
  870. ! .SH
  871. ! HP Spectrum Optimizer vs. nnfree
  872. ! .PP
  873. ! We have a reliable report that
  874. ! the HP Spectrum C compiler has an optimiser bug that makes it throw up
  875. ! (with a 
  876. ! ``cc: Internal error 3279: Please contact your local HP representative''
  877. ! message)
  878. ! on the \fInnfree\fR macro in \fIh/news.h\fR.
  879. ! The following revised version of
  880. ! the macro reportedly avoids
  881. ! the problem.
  882. ! .DS
  883. ! #define nnafree(mempp) do { if (*(mempp) != 0) { free((char *)*(mempp)); \e
  884. !    *(mempp) = 0; }} while (0)
  885. ! .DE
  886. ! .SH
  887. ! ANSI C
  888. ! .PP
  889. ! Although we made an effort to be ANSI-C compatible,
  890. ! lack of access to a real ANSI C compiler limits our ability to do this.
  891. ! A secondary problem is that it's really very difficult to get code that
  892. ! is 100% acceptable to both ANSI C compilers and older compilers.
  893. ! Some issues inevitably got resolved in favor of current compilers,
  894. ! and may cause complaints from ANSI C compilers.
  895. ! .SH
  896. ! GNU C
  897. ! .PP
  898. ! If compiling with the GNU compiler, you will need the
  899. ! \fB\-traditional\fR flag.
  900. ! Beware, also, that if you are using your system's \fIdbm\fR library,
  901. ! it contains functions that return structure values, and the GNU conventions
  902. ! for handling such values are incompatible with the ones in many AT&T-derived
  903. ! compilers.
  904. ! The
  905. ! \fB\-fpcc-struct-return\fR option cures this.
  906. ! .SH
  907. ! Eccentric Awks
  908. ! .PP
  909. ! A number of problems can arise if your \fIawk\fR has bugs, since the shell
  910. ! files rely on \fIawk\fR fairly extensively.
  911. ! For example, \fIawk\fR is a prime suspect if \fIspacefor\fR doesn't work.
  912. ! We've fixed the worst trouble spots, but would appreciate detailed information
  913. ! on any more.
  914. ! .SH
  915. ! Systems Without Hard Links
  916. ! .PP
  917. ! Some vaguely Unixoid systems have trouble implementing real (``hard'') links.
  918. ! Examples are VMS in general and Eunice in particular.
  919. ! There are some hooks for dealing with this, but it's not trivial.
  920. ! .PP
  921. ! \fIRelaynews\fR will try to make symbolic links if real ones fail.
  922. ! There is one exception:
  923. ! if \fIrelaynews\fR cannot buffer up enough of the article in memory to
  924. ! find the `Newsgroups:' line, it will drop the article into a temporary
  925. ! file and will rely on being able to move that to the first of the
  926. ! `real' locations by manipulating links.
  927. ! This should essentially never happen except on 16-bit machines,
  928. ! and should be rare even on them.
  929. ! .PP
  930. ! \fIExpire\fR has a \fB\-l\fR option which
  931. ! tells it to consider the first filename of an article its `leader',
  932. ! not expiring the article under that name until it has expired under
  933. ! all others.
  934. ! This has not been tested much recently.
  935. ! .PP
  936. ! The locking system (both C routines and the \fInewslock\fR program)
  937. ! will need revision in some system-dependent way to avoid use of links.
  938. ! .PP
  939. ! There is one minor use of links in installation (\fIinews\fR is found
  940. ! in two places, and the Makefile attempts a link before doing a copy),
  941. ! and substantially more in the regression tests.
  942.  
  943. *** cnpatch/old/relay/control.c    Wed Jan 10 19:10:52 1990
  944. --- relay/control.c    Sat Jan 13 19:42:17 1990
  945. ***************
  946. *** 201,205 ****
  947.       cmd = malloc((unsigned) STRLEN("PATH=") + strlen(ctlfile("bin")) +
  948.           STRLEN(":") + strlen(SUBDIR) + STRLEN(";") + strlen(ctlcmd) +
  949. !         STRLEN(" <") + strlen(inname) + 1);
  950.       if (cmd == NULL) {
  951.           warning("can't allocate memory in runctlmsg", "");
  952. --- 201,205 ----
  953.       cmd = malloc((unsigned) STRLEN("PATH=") + strlen(ctlfile("bin")) +
  954.           STRLEN(":") + strlen(SUBDIR) + STRLEN(";") + strlen(ctlcmd) +
  955. !         STRLEN(" <") + strlen(inname) + SIZENUL);
  956.       if (cmd == NULL) {
  957.           warning("can't allocate memory in runctlmsg", "");
  958. ***************
  959. *** 237,241 ****
  960.       
  961.       mailcmd = malloc((unsigned)STRLEN("PATH=") + strlen(newspath()) +
  962. !         STRLEN(" mail ") + strlen(newsmaster()) + 1);
  963.       if (mailcmd == NULL) {
  964.           warning("can't allocate memory in bombctlmsg", "");
  965. --- 237,241 ----
  966.       
  967.       mailcmd = malloc((unsigned)STRLEN("PATH=") + strlen(newspath()) +
  968. !         STRLEN(" mail ") + strlen(newsmaster()) + SIZENUL);
  969.       if (mailcmd == NULL) {
  970.           warning("can't allocate memory in bombctlmsg", "");
  971.  
  972. *** cnpatch/old/relay/fileart.c    Wed Jan 10 19:10:53 1990
  973. --- relay/fileart.c    Sat Jan 13 19:42:33 1990
  974. ***************
  975. *** 252,256 ****
  976.       (void) sprintf(artnumstr, "%ld", artnum);
  977.       artname = nemalloc((unsigned) (strlen(slashng) +
  978. !         STRLEN(SFNDELIM) + strlen(artnumstr) + 1));
  979.       (void) strcpy(artname, slashng);
  980.       (void) strcat(artname, SFNDELIM);
  981. --- 252,256 ----
  982.       (void) sprintf(artnumstr, "%ld", artnum);
  983.       artname = nemalloc((unsigned) (strlen(slashng) +
  984. !         STRLEN(SFNDELIM) + strlen(artnumstr) + SIZENUL));
  985.       (void) strcpy(artname, slashng);
  986.       (void) strcat(artname, SFNDELIM);
  987.  
  988. *** cnpatch/old/relay/history.c    Thu Sep 14 16:03:48 1989
  989. --- relay/history.c    Sat Jan 13 19:43:20 1990
  990. ***************
  991. *** 4,8 ****
  992.    * B 2.10+ news pulls a dirty (and undocumented) trick and converts
  993.    * message-id's to lower case before using them as keys in the dbm file.
  994. !  * We don't; you'll want to fix your news readers accordingly.
  995.    *
  996.    * B 2.10.3+ rnews puts out a leading space before received
  997. --- 4,15 ----
  998.    * B 2.10+ news pulls a dirty (and undocumented) trick and converts
  999.    * message-id's to lower case before using them as keys in the dbm file.
  1000. !  * C news instead invokes rfc822ize on the key, which does the rational
  1001. !  * part of what RFC 822 requires: it converts the `domain' part on the
  1002. !  * right of the `@' to lower case.  We have not attempted to fully meet
  1003. !  * 822's bizarre requirements, since they pretty much require a lex
  1004. !  * scanner or a slightly-simplified version of the scanner found in the
  1005. !  * shell, neither of which will be simple, which means either would
  1006. !  * likely contain subtle bugs.  You'll want to fix your news readers
  1007. !  * accordingly.
  1008.    *
  1009.    * B 2.10.3+ rnews puts out a leading space before received
  1010. ***************
  1011. *** 105,109 ****
  1012.       sanitise(clnmsgid);
  1013.       msgidkey.dptr = clnmsgid;
  1014. !     msgidkey.dsize = strlen(clnmsgid) + 1;    /* include NUL */
  1015.       keypos = fetch(msgidkey);        /* offset into ascii file */
  1016.       free(clnmsgid);
  1017. --- 112,116 ----
  1018.       sanitise(clnmsgid);
  1019.       msgidkey.dptr = clnmsgid;
  1020. !     msgidkey.dsize = strlen(clnmsgid) + SIZENUL;
  1021.       keypos = fetch(msgidkey);        /* offset into ascii file */
  1022.       free(clnmsgid);
  1023. ***************
  1024. *** 132,136 ****
  1025.           static char *histent = NULL;
  1026.   
  1027. !         memcpy((char *)&pos, posdatum.dptr, sizeof pos); /* align */
  1028.           nnfree(&histent);
  1029.           if (fseek(fp, pos, SEEK_SET) != -1 &&
  1030. --- 139,143 ----
  1031.           static char *histent = NULL;
  1032.   
  1033. !         (void) memcpy((char *)&pos, posdatum.dptr, sizeof pos); /* align */
  1034.           nnfree(&histent);
  1035.           if (fseek(fp, pos, SEEK_SET) != -1 &&
  1036. ***************
  1037. *** 235,239 ****
  1038.   
  1039.       msgidkey.dptr = rfc822ize(strsave(msgid));
  1040. !     msgidkey.dsize = strlen(msgid) + 1;    /* include NUL */
  1041.       posdatum.dptr = (char *)&pos;
  1042.       posdatum.dsize = sizeof pos;
  1043. --- 242,246 ----
  1044.   
  1045.       msgidkey.dptr = rfc822ize(strsave(msgid));
  1046. !     msgidkey.dsize = strlen(msgid) + SIZENUL;
  1047.       posdatum.dptr = (char *)&pos;
  1048.       posdatum.dsize = sizeof pos;
  1049. ***************
  1050. *** 298,302 ****
  1051.   register char *artnumstr;
  1052.   {
  1053. !     unsigned addlen = strlen(group)+STRLEN(SFNDELIM)+strlen(artnumstr)+1;
  1054.   
  1055.       art->a_filed = YES;            /* make a note */
  1056. --- 305,310 ----
  1057.   register char *artnumstr;
  1058.   {
  1059. !     unsigned addlen = strlen(group) + STRLEN(SFNDELIM) +
  1060. !         strlen(artnumstr) + SIZENUL;
  1061.   
  1062.       art->a_filed = YES;            /* make a note */
  1063.  
  1064. *** cnpatch/old/relay/ihave.c    Thu Aug 24 16:40:01 1989
  1065. --- relay/ihave.c    Sat Jan 13 19:43:28 1990
  1066. ***************
  1067. *** 177,181 ****
  1068.       statust status = ST_OKAY;
  1069.   
  1070. !     ng = nemalloc((unsigned)(STRLEN("to.") + strlen(remotesys) + 1));
  1071.       (void) strcpy(ng, "to.");
  1072.       (void) strcat(ng, remotesys);
  1073. --- 177,181 ----
  1074.       statust status = ST_OKAY;
  1075.   
  1076. !     ng = nemalloc((unsigned)(STRLEN("to.") + strlen(remotesys) + SIZENUL));
  1077.       (void) strcpy(ng, "to.");
  1078.       (void) strcat(ng, remotesys);
  1079.  
  1080. *** cnpatch/old/relay/makefile    Wed Jan 10 19:10:57 1990
  1081. --- relay/makefile    Sat Jan 13 19:41:52 1990
  1082. ***************
  1083. *** 25,29 ****
  1084.   LLIBS=-llocal
  1085.   # I wish I could make lint shut the fk up about some things.  Grrr!
  1086. ! LINTFILT=egrep -v '(possible pointer|long assign|can.t take|never used|nnfree|getdate|:$$)'
  1087.   PROPTS=
  1088.   P=stpr
  1089. --- 25,29 ----
  1090.   LLIBS=-llocal
  1091.   # I wish I could make lint shut the fk up about some things.  Grrr!
  1092. ! LINTFILT=egrep -v '(possible pointer|long assign|nnfree|getdate|:$$)'
  1093.   PROPTS=
  1094.   P=stpr
  1095. ***************
  1096. *** 45,49 ****
  1097.       sh/realrnews sh/serverrnews makefile
  1098.   CFILES= ../include/*.h \
  1099. !     active.h article.h caches.h mkdirs.h control.h cpu.h fileart.h \
  1100.       hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  1101.   
  1102. --- 45,49 ----
  1103.       sh/realrnews sh/serverrnews makefile
  1104.   CFILES= ../include/*.h \
  1105. !     active.h article.h caches.h mkdirs.h control.h fileart.h \
  1106.       hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  1107.   
  1108. ***************
  1109. *** 146,150 ****
  1110.   procart.o: headers.h article.h history.h system.h
  1111.   relaynews.o: ../include/libc.h ../include/news.h ../include/config.h
  1112. ! relaynews.o: ../include/fgetmfs.h active.h caches.h cpu.h headers.h
  1113.   relaynews.o: history.h
  1114.   string.o: ../include/libc.h ../include/news.h
  1115. --- 146,150 ----
  1116.   procart.o: headers.h article.h history.h system.h
  1117.   relaynews.o: ../include/libc.h ../include/news.h ../include/config.h
  1118. ! relaynews.o: ../include/fgetmfs.h active.h caches.h headers.h
  1119.   relaynews.o: history.h
  1120.   string.o: ../include/libc.h ../include/news.h
  1121.  
  1122. *** cnpatch/old/relay/procart.c    Wed Jan 10 19:10:58 1990
  1123. --- relay/procart.c    Sat Jan 13 19:46:26 1990
  1124. ***************
  1125. *** 136,144 ****
  1126.   {
  1127.       register char *hdr = NULL;
  1128. !     long limit = (art->a_blvmax? art->a_unread+1: art->a_unread); /* 1 for NUL */
  1129.       int is_hdr = NO;
  1130.   
  1131. !     /* 1 is again for NUL */
  1132. !     while (limit > 1 && (hdr = gethdr(in, &limit, &is_hdr)) != NULL && is_hdr) {
  1133.               hdrdigest(art, hdr, strlen(hdr));
  1134.           hdr = NULL;            /* freed inside gethdr */
  1135. --- 136,144 ----
  1136.   {
  1137.       register char *hdr = NULL;
  1138. !     long limit = art->a_unread + SIZENUL;
  1139.       int is_hdr = NO;
  1140.   
  1141. !     while (limit > SIZENUL && (hdr = gethdr(in, &limit, &is_hdr)) != NULL &&
  1142. !         is_hdr) {
  1143.               hdrdigest(art, hdr, strlen(hdr));
  1144.           hdr = NULL;            /* freed inside gethdr */
  1145. ***************
  1146. *** 145,152 ****
  1147.       }
  1148.       /* If we read a body line, gethdr has adjusted limit appropriately. */
  1149. !     art->a_unread = limit - 1;        /* limit updated by gethdr */
  1150. !     if (is_hdr)                /* no body: header fills limit */
  1151. !         hdr = NULL;
  1152. !     return hdr;
  1153.   }
  1154.   
  1155. --- 145,151 ----
  1156.       }
  1157.       /* If we read a body line, gethdr has adjusted limit appropriately. */
  1158. !     art->a_unread = limit - SIZENUL;
  1159. !     /* if is_hdr, there is no body: header fills limit */
  1160. !     return (is_hdr? NULL: hdr);
  1161.   }
  1162.   
  1163.  
  1164. *** cnpatch/old/relay/relaynews.c    Mon Nov 13 17:39:53 1989
  1165. --- relay/relaynews.c    Sat Jan 13 19:47:39 1990
  1166. ***************
  1167. *** 44,48 ****
  1168.   #include "active.h"
  1169.   #include "caches.h"
  1170. - #include "cpu.h"
  1171.   #include "fileart.h"
  1172.   #include "headers.h"
  1173. --- 44,47 ----
  1174. ***************
  1175. *** 78,81 ****
  1176. --- 77,81 ----
  1177.   extern boolean batchln();
  1178.   FORWARD boolean debugon();
  1179. + FORWARD long maxlong();
  1180.   
  1181.   /*
  1182. ***************
  1183. *** 148,152 ****
  1184.       (void) umask(2);        /* undo silly umasks, ignore newsumask() */
  1185.       (void) alarm(0);        /* cancel any pending alarm */
  1186. !     newpath = malloc(STRLEN("PATH=") + strlen(newspath()) + 1);
  1187.       if (newpath == NULL)
  1188.           exit(1);        /* no chatter until stdfdopen */
  1189. --- 148,152 ----
  1190.       (void) umask(2);        /* undo silly umasks, ignore newsumask() */
  1191.       (void) alarm(0);        /* cancel any pending alarm */
  1192. !     newpath = malloc((unsigned)(STRLEN("PATH=")+strlen(newspath())+SIZENUL));
  1193.       if (newpath == NULL)
  1194.           exit(1);        /* no chatter until stdfdopen */
  1195. ***************
  1196. *** 154,157 ****
  1197. --- 154,158 ----
  1198.       (void) strcat(newpath, newspath());
  1199.       if (putenv(newpath) ||
  1200. +         putenv("SHELL=/bin/sh") ||
  1201.           putenv("IFS= \t\n"))
  1202.           exit(1);        /* no chatter until stdfdopen */
  1203. ***************
  1204. *** 246,250 ****
  1205.           (void) fprintf(stderr, "usage: %s [-inrs][-d fhlmt][-x site]\n",
  1206.               progname);
  1207. !         exit(2);
  1208.       }
  1209.   }
  1210. --- 247,251 ----
  1211.           (void) fprintf(stderr, "usage: %s [-inrs][-d fhlmt][-x site]\n",
  1212.               progname);
  1213. !         exit(1);
  1214.       }
  1215.   }
  1216. ***************
  1217. *** 375,379 ****
  1218.   
  1219.       fullname = nemalloc((unsigned)strlen(origdir) + STRLEN(SFNDELIM) +
  1220. !         strlen(name) + 1);
  1221.       fullname[0] = '\0';
  1222.   
  1223. --- 376,380 ----
  1224.   
  1225.       fullname = nemalloc((unsigned)strlen(origdir) + STRLEN(SFNDELIM) +
  1226. !         strlen(name) + SIZENUL);
  1227.       fullname[0] = '\0';
  1228.   
  1229. ***************
  1230. *** 410,424 ****
  1231.       if (c == '#')
  1232.           return unbatch(in, inname);
  1233. !     else {
  1234. !         register long infinite = MAXLONG;
  1235.   
  1236. !         if (infinite <= 0) {        /* paranoia */
  1237. !             errno = 0;
  1238. !             errunlock(
  1239. !             "MAXLONG is non-positive; rebuild the news software",
  1240. !                 "");
  1241. !         }
  1242. !         return cpinsart(in, inname, infinite, NO);
  1243.       }
  1244.   }
  1245.   
  1246. --- 411,443 ----
  1247.       if (c == '#')
  1248.           return unbatch(in, inname);
  1249. !     else
  1250. !         /* -SIZENUL is to avoid overflow later during +SIZENUL */
  1251. !         return cpinsart(in, inname, maxlong() - SIZENUL, NO);
  1252. ! }
  1253.   
  1254. ! /*
  1255. !  * compute the largest number that can be stored in a long.  in theory, 
  1256. !  * #define MAXLONG ((long)(~(unsigned long)0 >> 1))
  1257. !  * will do the job, but old compilers don't have "unsigned long", don't
  1258. !  * like casts in initialisers, or otherwise miscompute.
  1259. !  */
  1260. ! STATIC long
  1261. ! maxlong()
  1262. ! {
  1263. !     register int bits = 0;
  1264. !     register unsigned word = 1;        /* "unsigned" avoids overflow */
  1265. !     static long savemaxlong = 0;
  1266. !     if (savemaxlong > 0)
  1267. !         return savemaxlong;
  1268. !     for (bits = 0, word = 1; word != 0; word <<= 1)
  1269. !         bits++;
  1270. !     /* bits/sizeof word = bits per char; all bits on but the sign bit */
  1271. !     savemaxlong = ~(1L << (bits/sizeof word * sizeof savemaxlong - 1));
  1272. !     if (savemaxlong <= 0) {            /* sanity check */
  1273. !         errno = 0;
  1274. !         errunlock("maxlong is non-positive; your compiler is broken", "");
  1275.       }
  1276. +     return savemaxlong;
  1277.   }
  1278.   
  1279.  
  1280. *** cnpatch/old/relay/sh/ctlrun    Thu Sep 14 16:03:53 1989
  1281. --- relay/sh/ctlrun    Sat Jan 13 19:45:01 1990
  1282. ***************
  1283. *** 8,12 ****
  1284.   
  1285.   cd $NEWSCTL
  1286. ! newslock sys LOCK || exit 1    # lock
  1287.   
  1288.   cd $NEWSARTS/control
  1289. --- 8,12 ----
  1290.   
  1291.   cd $NEWSCTL
  1292. ! newslock sys LOCK || exit 1
  1293.   
  1294.   cd $NEWSARTS/control
  1295. ***************
  1296. *** 21,23 ****
  1297.   done
  1298.   
  1299. ! rm -f /tmp/ctl$$ LOCK
  1300. --- 21,23 ----
  1301.   done
  1302.   
  1303. ! rm -f /tmp/ctl$$ $NEWSCTL/LOCK
  1304.  
  1305. *** cnpatch/old/relay/sh/inews    Thu Sep 14 16:03:53 1989
  1306. --- relay/sh/inews    Sat Jan 13 19:45:28 1990
  1307. ***************
  1308. *** 19,23 ****
  1309.   hdrspresent=no
  1310.   autopost=no
  1311. ! waitcmd=''
  1312.   relayopts=-i            # redirect stdout to log
  1313.   
  1314. --- 19,23 ----
  1315.   hdrspresent=no
  1316.   autopost=no
  1317. ! waitcmd='status=0'
  1318.   relayopts=-i            # redirect stdout to log
  1319.   
  1320. ***************
  1321. *** 61,65 ****
  1322.       -A)    autopost=yes ;;        # wait for free space
  1323.       -V)    relayopts= ;;        # verbose: don't redirect stdout (or stderr)
  1324. !     -W)    waitcmd=wait ;;        # wait for completion
  1325.       # useful standard options
  1326.       -h)    hdrspresent=yes ;;
  1327. --- 61,65 ----
  1328.       -A)    autopost=yes ;;        # wait for free space
  1329.       -V)    relayopts= ;;        # verbose: don't redirect stdout (or stderr)
  1330. !     -W)    waitcmd='wait; status=$?' ;;    # wait for completion
  1331.       # useful standard options
  1332.       -h)    hdrspresent=yes ;;
  1333. ***************
  1334. *** 353,357 ****
  1335.   exit $status                # trap 0 may cleanup, make dead.article
  1336.   ) &
  1337. ! $waitcmd                # wait if -W given
  1338.   trap 0                    # let the background run on unmolested
  1339. ! exit
  1340. --- 353,357 ----
  1341.   exit $status                # trap 0 may cleanup, make dead.article
  1342.   ) &
  1343. ! eval $waitcmd                # wait & get status if -W given
  1344.   trap 0                    # let the background run on unmolested
  1345. ! exit $status
  1346.  
  1347. *** cnpatch/old/relay/sys.c    Mon Nov 13 17:39:54 1989
  1348. --- relay/sys.c    Sat Jan 13 19:43:57 1990
  1349. ***************
  1350. *** 171,175 ****
  1351.       if (sysp->sy_flags&FLG_BATCH && sysp->sy_cmd[0] == '\0') {
  1352.           register char *deffile = nemalloc((unsigned) STRLEN(BTCHPFX) +
  1353. !             strlen(sysp->sy_name) + STRLEN(BTCHSFX) + 1);
  1354.   
  1355.           (void) strcpy(deffile, BTCHPFX);
  1356. --- 171,175 ----
  1357.       if (sysp->sy_flags&FLG_BATCH && sysp->sy_cmd[0] == '\0') {
  1358.           register char *deffile = nemalloc((unsigned) STRLEN(BTCHPFX) +
  1359. !             strlen(sysp->sy_name) + STRLEN(BTCHSFX) + SIZENUL);
  1360.   
  1361.           (void) strcpy(deffile, BTCHPFX);
  1362. ***************
  1363. *** 182,186 ****
  1364.       if (sysp->sy_flags&FLG_BATCH && sysp->sy_cmd[0] != FNDELIM) {
  1365.           register char *absfile = nemalloc((unsigned) STRLEN(BTCHDIR) +
  1366. !             strlen(sysp->sy_cmd) + 1);
  1367.   
  1368.           (void) strcpy(absfile, BTCHDIR);
  1369. --- 182,186 ----
  1370.       if (sysp->sy_flags&FLG_BATCH && sysp->sy_cmd[0] != FNDELIM) {
  1371.           register char *absfile = nemalloc((unsigned) STRLEN(BTCHDIR) +
  1372. !             strlen(sysp->sy_cmd) + SIZENUL);
  1373.   
  1374.           (void) strcpy(absfile, BTCHDIR);
  1375. ***************
  1376. *** 193,197 ****
  1377.           free(sysp->sy_cmd);    /* malloced by parse */
  1378.           sysp->sy_cmd = nemalloc((unsigned) STRLEN(CMDPFX) +
  1379. !             strlen(sysp->sy_name) + STRLEN(CMDSFX) + 1);
  1380.           (void) strcpy(sysp->sy_cmd, CMDPFX);
  1381.           (void) strcat(sysp->sy_cmd, sysp->sy_name);
  1382. --- 193,197 ----
  1383.           free(sysp->sy_cmd);    /* malloced by parse */
  1384.           sysp->sy_cmd = nemalloc((unsigned) STRLEN(CMDPFX) +
  1385. !             strlen(sysp->sy_name) + STRLEN(CMDSFX) + SIZENUL);
  1386.           (void) strcpy(sysp->sy_cmd, CMDPFX);
  1387.           (void) strcat(sysp->sy_cmd, sysp->sy_name);
  1388.  
  1389. Files that are new:
  1390.  
  1391. new batch/viauuxl (patch can't create, so diff against null):
  1392. Index: batch/viauuxl
  1393. *** cnpatch/old/batch/viauuxl    Tue Jan 16 16:58:43 1990
  1394. --- batch/viauuxl    Sun Jan 14 02:01:40 1990
  1395. ***************
  1396. *** 0 ****
  1397. --- 1,25 ----
  1398. + #! /bin/sh
  1399. + # Multicast transmission using uux -l.
  1400. + # This has not been well tested, we don't have -l.
  1401. + # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  1402. + . ${NEWSCONFIG-/usr/lib/news/bin/config}
  1403. + PATH=$NEWSCTL/bin:$NEWSBIN/batch:$NEWSBIN:$NEWSPATH ; export PATH
  1404. + umask $NEWSUMASK
  1405. + if test ! -r $NEWSCTL/sites.$1
  1406. + then
  1407. +     echo "$0: cannot read \`sites.$1'" >&2
  1408. +     exit 1
  1409. + fi
  1410. + sites="`cat $NEWSCTL/sites.$1`"
  1411. + cd $NEWSARTS/out.going/$1
  1412. + trap 'rm -f temp ; exit 0' 0 1 2 15
  1413. + cat >temp
  1414. + for site in $sites
  1415. + do
  1416. +     uux -r -gd -l $site!rnews '<' !temp
  1417. + done
  1418.  
  1419. new conf/ask (patch can't create, so diff against null):
  1420. Index: conf/ask
  1421. *** cnpatch/old/conf/ask    Tue Jan 16 16:58:44 1990
  1422. --- conf/ask    Sat Jan 13 22:29:21 1990
  1423. ***************
  1424. *** 0 ****
  1425. --- 1,9 ----
  1426. + #! /bin/sh
  1427. + echo "$1 [$2]? " | tr -d '\012' >/dev/tty    # echo -n, sort of portably
  1428. + default="$2"
  1429. + read answer
  1430. + case "$answer" in
  1431. + '')    answer="$default"    ;;
  1432. + -)    answer=            ;;
  1433. + esac
  1434. + echo "$answer"
  1435.  
  1436. new conf/notinlist (patch can't create, so diff against null):
  1437. Index: conf/notinlist
  1438. *** cnpatch/old/conf/notinlist    Tue Jan 16 16:58:44 1990
  1439. --- conf/notinlist    Fri Dec 29 21:00:28 1989
  1440. ***************
  1441. *** 0 ****
  1442. --- 1,10 ----
  1443. + #! /bin/sh
  1444. + for f in $1
  1445. + do
  1446. +     if test " $f" = " $2"
  1447. +     then
  1448. +         echo no
  1449. +         exit
  1450. +     fi
  1451. + done
  1452. + echo yes
  1453.  
  1454. new conf/queuelen.old (patch can't create, so diff against null):
  1455. Index: conf/queuelen.old
  1456. *** cnpatch/old/conf/queuelen.old    Tue Jan 16 16:58:45 1990
  1457. --- conf/queuelen.old    Sun Jan 14 01:39:13 1990
  1458. ***************
  1459. *** 0 ****
  1460. --- 1,18 ----
  1461. + #! /bin/sh
  1462. + # Find size of current queue of news outbound to $1.  Ancient-uucp version.
  1463. + # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  1464. + . ${NEWSCONFIG-/usr/lib/news/bin/config}
  1465. + PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  1466. + umask $NEWSUMASK
  1467. + cd /usr/spool/uucp
  1468. + grade=d
  1469. + case "$1" in
  1470. + ?|??|???|????|?????|??????|???????)    site="$1" ;;
  1471. + *)    site=`expr "$1" : '^\(.......\).*'`
  1472. + esac
  1473. + ls | egrep "^C\.$site$grade....\$" | wc | awk '{print $1}'
  1474.  
  1475. new conf/yesno (patch can't create, so diff against null):
  1476. Index: conf/yesno
  1477. *** cnpatch/old/conf/yesno    Tue Jan 16 16:58:45 1990
  1478. --- conf/yesno    Sat Jan 13 22:19:47 1990
  1479. ***************
  1480. *** 0 ****
  1481. --- 1,19 ----
  1482. + #! /bin/sh
  1483. + default="$2"
  1484. + while :
  1485. + do
  1486. +     echo "$1 [$default]? " | tr -d '\012' >/dev/tty    # portable echo -n
  1487. +     read answer
  1488. +     case "$answer" in
  1489. +     '')    answer="$default"    ;;
  1490. +     esac
  1491. +     case "$answer" in
  1492. +     n*|N*)    answer=no    ;;
  1493. +     y*|Y*)    answer=yes    ;;
  1494. +     esac
  1495. +     case "$answer" in
  1496. +     yes|no)    break        ;;    # NOTE BREAK OUT
  1497. +     *)    echo '???' >/dev/tty    ;;
  1498. +     esac
  1499. + done
  1500. + echo "$answer"
  1501.  
  1502. new man/newsmaint.8 (patch can't create, so diff against null):
  1503. Index: man/newsmaint.8
  1504. *** cnpatch/old/man/newsmaint.8    Tue Jan 16 16:58:46 1990
  1505. --- man/newsmaint.8    Tue Jan 16 15:06:28 1990
  1506. ***************
  1507. *** 0 ****
  1508. --- 1,168 ----
  1509. + .\" =()<.ds a @<NEWSARTS>@>()=
  1510. + .ds a /usr/spool/news
  1511. + .\" =()<.ds b @<NEWSBIN>@>()=
  1512. + .ds b /usr/lib/newsbin
  1513. + .\" =()<.ds c @<NEWSCTL>@>()=
  1514. + .ds c /usr/lib/news
  1515. + .\" =()<.ds m @<NEWSMASTER>@>()=
  1516. + .ds m usenet
  1517. + .TH NEWSMAINT 8 "16 Jan 1990" "C News"
  1518. + .SH NAME
  1519. + newshist \- extract history line for news article(s)
  1520. + .br
  1521. + newsdaily \- maintain news log files and report problems
  1522. + .br
  1523. + newswatch \- keep an eye on news system for difficulties
  1524. + .br
  1525. + newsboot \- clean up news debris on reboot
  1526. + .br
  1527. + locknews \- lock news system for manual tinkering
  1528. + .br
  1529. + addgroup, delgroup \- add and delete newsgroups, locally only
  1530. + .br
  1531. + adddirs \- make any missing directories for active newsgroups
  1532. + .br
  1533. + addfeed \- add a news feed
  1534. + .SH SYNOPSIS
  1535. + .B \*b/maint/newshist
  1536. + msgid ...
  1537. + .br
  1538. + .B \*b/maint/newsdaily
  1539. + [ guru ... ]
  1540. + .br
  1541. + .B \*b/maint/newswatch
  1542. + [ guru ... ]
  1543. + .br
  1544. + .B \*b/maint/newsboot
  1545. + .br
  1546. + .B \*b/maint/locknews
  1547. + .br
  1548. + .B \*b/maint/addgroup
  1549. + group {\fBy\fR|\fBn\fR|\fBm\fR|\fBx\fR|\fB=\fIrealgroup\fR}
  1550. + .br
  1551. + .B \*b/maint/delgroup
  1552. + group
  1553. + .br
  1554. + .B \*b/maint/adddirs
  1555. + .br
  1556. + .B \*b/maint/addfeed
  1557. + [
  1558. + .B \-L
  1559. + ]
  1560. + site groups
  1561. + .SH DESCRIPTION
  1562. + These programs are utilities useful in maintaining a C News
  1563. + system and diagnosing problems in it.
  1564. + .PP
  1565. + .I Newshist
  1566. + prints the history line for each article identified by a \fImsgid\fR.
  1567. + .PP
  1568. + .I Newsdaily
  1569. + performs minor maintenance chores
  1570. + that typically should be done once a day for the news system:
  1571. + saving copies of log files and truncating them,
  1572. + reporting logged errors, checking for anomalies suggesting something
  1573. + is wrong, and cleaning out leftover files.
  1574. + \fINewsdaily\fR saves one generation of old \fIlog\fR files and three
  1575. + generations of old \fIerrlog\fR and \fIbatchlog\fR files.
  1576. + It reports problems to the named \fIguru\fRs
  1577. + (default:  `\*m').
  1578. + .PP
  1579. + .I Newswatch
  1580. + looks for indications of news problems on a shorter time scale than those
  1581. + reported by \fInewsdaily\fR, notably strangely-persistent lock files that
  1582. + may indicate a news-system failure.
  1583. + It typically should be run a few times a day.
  1584. + .PP
  1585. + .I Newsboot
  1586. + should be run from \fI/etc/rc\fR or the system's equivalent on reboot.
  1587. + It cleans up files that the news system might have left lying about
  1588. + if the system crashed while news was being processed,
  1589. + notably old lock files.
  1590. + .PP
  1591. + .I Locknews
  1592. + locks the news system, starts up a shell for the user, and waits around to
  1593. + unlock the news system when that shell terminates.
  1594. + This simplifies manual maintenance.
  1595. + .PP
  1596. + .I Addgroup
  1597. + and
  1598. + .I delgroup
  1599. + respectively add a newsgroup (with a specified flags field for the
  1600. + \fIactive\fR file, normally `y' [see \fInews\fR(5)]) and delete a
  1601. + newsgroup manually, with proper locking.
  1602. + The effect is purely local; no control message (to propagate the
  1603. + change to other machines) is sent.
  1604. + .PP
  1605. + .I Adddirs
  1606. + sweeps through the \fIactive\fR file checking that directories exist for
  1607. + all newsgroups.
  1608. + (\fIRelaynews\fR
  1609. + will create directories as needed, but some
  1610. + user-interface software gets upset if a newsgroup exists but its directory
  1611. + does not.)
  1612. + This is mostly useful when adding groups in bulk, based on another site's
  1613. + \fIactive\fR file.
  1614. + .PP
  1615. + .I Addfeed
  1616. + adds a line to the \fIsys\fR file specifying that the \fIsite\fR should
  1617. + be fed the \fIgroups\fR,
  1618. + and creates a suitable outbound-batching directory.
  1619. + If the
  1620. + .B \-L
  1621. + option is given, the \fBL\fR flag is included to restrict the feed to
  1622. + locally-generated articles only.
  1623. + If \fIgroups\fR does not include a distribution list (separated from the
  1624. + newsgroups by a `/'), the default distribution list `/all' is appended.
  1625. + If \fIgroups\fR is of the form \fB=\fIname\fR,
  1626. + this specifies the same groups as those fed to site `\fIname\fR',
  1627. + with the exception that `to.\fIname\fR' is rewritten to `to.\fIsite\fR'.
  1628. + .SH FILES
  1629. + .ta 6c
  1630. + .nf
  1631. + \*c/history    history file
  1632. + \*c/history.pag    \fIdbm\fR database for history file
  1633. + \*c/history.dir    \fIdbm\fR database for history file
  1634. + \*c/log    current news log
  1635. + \*c/log.o    previous news log
  1636. + \*c/errlog    current news-error log
  1637. + \*c/errlog.o*    old news-error logs
  1638. + \*c/batchlog    current news-batcher log
  1639. + \*c/batchlog.o*    old news-batcher logs
  1640. + \*a/in.coming    input-spooling area
  1641. + \*a/out.going    output-batching area
  1642. + \*c/watchtime    last time \fInewswatch\fR was run
  1643. + \*c/active    list of current newsgroups
  1644. + \*c/active.old    backup copy created by \fIaddgroup\fR and \fIdelgroup\fR
  1645. + .SH SEE ALSO
  1646. + df(1), uucp(1), ls(1), ctime(3), getdate(3), hostname(1),
  1647. + grep(1), news(5), expire(8), newsbatch(8), rnews(8), newsaux(8)
  1648. + .SH DIAGNOSTICS
  1649. + .I Locknews
  1650. + complains and exits if it is unable to lock the news system; this is
  1651. + typically a matter of either inadequate permissions or news activity
  1652. + already in progress.
  1653. + .PP
  1654. + .I Addfeed
  1655. + looks for a \fB/default/\fR line
  1656. + or a line for \fIsite\fR in
  1657. + the \fIbatchparms\fR file, and if
  1658. + none is found, warns the user to create one.
  1659. + .SH HISTORY
  1660. + Written at U of Toronto by Henry Spencer and Geoff Collyer.
  1661. + .SH BUGS
  1662. + \fILocknews\fR is a bit crude.
  1663. + .PP
  1664. + \fIDelgroup\fR does not remove files or directories from \*a, although it
  1665. + prints a reminder to do so.
  1666. + .PP
  1667. + The \fB=\fIname\fR form of \fIaddfeed\fR
  1668. + cannot cope with continued \fIsys\fR lines.
  1669. + .PP
  1670. + \fIAddfeed\fR assumes that attention to the \fIbatchparms\fR file suffices
  1671. + to get batching going for a new feed, which is naive if you are running
  1672. + \fIsendbatches\fR selectively, i.e. with arguments.
  1673. + .PP
  1674. + Various nuisances can result if the maintenance utilities are run as
  1675. + \fIroot\fR rather than as the owner of the news database.
  1676. + It's difficult to defend against this.
  1677.  
  1678. new misc/addfeed (patch can't create, so diff against null):
  1679. Index: misc/addfeed
  1680. *** cnpatch/old/misc/addfeed    Tue Jan 16 16:58:46 1990
  1681. --- misc/addfeed    Sun Jan 14 01:03:08 1990
  1682. ***************
  1683. *** 0 ****
  1684. --- 1,66 ----
  1685. + #! /bin/sh
  1686. + # addgroup - add a newsgroup, locally only
  1687. + # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  1688. + . ${NEWSCONFIG-/usr/lib/news/bin/config}
  1689. + PATH=$NEWSCTL/bin:$NEWSBIN/maint:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  1690. + umask $NEWSUMASK
  1691. + usage="Usage: $0 [-L] sitename groups"
  1692. + local=
  1693. + case "$1" in
  1694. + -L)    local=L ; shift ;;
  1695. + esac
  1696. + case $# in
  1697. + 2)    ;;
  1698. + *)    echo "$usage" >&2 ; exit 2    ;;
  1699. + esac
  1700. + case "$1$2" in
  1701. + *:*)    echo "$usage" >&2 ; exit 2    ;;
  1702. + esac
  1703. + if egrep -s "^$1:" $NEWSCTL/sys >/dev/null
  1704. + then
  1705. +     echo "$0: sys-file entry for \`$1' already exists" >&2
  1706. +     exit 1
  1707. + fi
  1708. + case "$2" in
  1709. + =*)    b="`echo $2 | sed 's/^=//'`"        # base system
  1710. +     groups="`awk -F: \"\\\$1 == \\\"$b\\\" {print \\\$2}\" $NEWSCTL/sys |
  1711. +                         sed \"s;to\\.$b;to.$1;\"`"
  1712. +     ;;
  1713. + *)    groups="$2"    ;;
  1714. + esac
  1715. + case "$groups" in
  1716. + */*)    ;;
  1717. + *)    groups="$groups/all"    ;;
  1718. + esac
  1719. + lock="$NEWSCTL/LOCK"
  1720. + ltemp="$NEWSCTL/L.$$"
  1721. + echo $$ >$ltemp
  1722. + trap "rm -f $ltemp ; exit 0" 0 1 2 15
  1723. + while true
  1724. + do
  1725. +     if newslock $ltemp $lock
  1726. +     then
  1727. +         trap "rm -f $ltemp $lock ; exit 0" 0 1 2 15
  1728. +         break
  1729. +     fi
  1730. +     echo 'news system locked, waiting...'
  1731. +     sleep 5
  1732. + done
  1733. + echo "$1:$groups:${local}f:" >>$NEWSCTL/sys
  1734. + mkdir "$NEWSARTS/out.going/$1"
  1735. + if egrep -s "^($1|/default/)[     ]" $NEWSCTL/batchparms
  1736. + then
  1737. +     : okay
  1738. + else
  1739. +     echo "$0: remember to add a line to \`batchparms' for \`$1'"
  1740. + fi
  1741.  
  1742.  
  1743. end of patch 16-Jan-1990
  1744.  
  1745.