home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume19 / cnews2 / pch25may90 < prev    next >
Internet Message Format  |  1990-06-07  |  60KB

  1. From @uunet.uu.net:henry@zoo.toronto.edu Sat May 26 10:24:24 1990
  2. Received: from BBN.COM by pineapple.bbn.com id <AA11849@pineapple.bbn.com>; Sat, 26 May 90 10:24:05 -0400
  3. Received: from uunet.UU.NET by BBN.COM id aa10359; 26 May 90 10:23 EDT
  4. Received: from zoo.utoronto.ca by uunet.uu.net (5.61/1.14) with SMTP 
  5.     id AA11159; Fri, 25 May 90 15:33:38 -0400
  6. Message-Id: <9005251933.AA11159@uunet.uu.net>
  7. From: henry@zoo.toronto.edu
  8. Date: Fri, 25 May 90 15:33:22 EDT
  9. To: uunet!source-patches@uunet.uu.net
  10. Subject: C News patch of 25-May-1990
  11. Status: R
  12.  
  13. There are a few fixes for real bugs here.  Relaynews now complains when
  14. dbminit() fails, instead of relying on dbminit() to do it -- dbm did [barf]
  15. but dbz does not.  Message-IDs in control-message commands are now checked
  16. as stringently as the message-ID of the articles themselves -- null IDs in
  17. commands used to mess up history.  Relaynews now balks if the history
  18. files are unwritable -- it used to try to carry on, causing great confusion.
  19. Inews (one of its helpers, actually) used to get slightly confused when
  20. an entire article body consisted of lines with leading white space -- it
  21. took them all as headers! -- and this is now fixed.  A rare bug in handling
  22. of multiple sys lines for the same site has been fixed.  And the problem
  23. with "doit.news" needing write permissions in the source directories to
  24. build "explist.no" has been fixed.
  25.  
  26. Also...  "Viauuxcun" to send batches to sites that still want to see
  27. "cunbatch" rather than "rnews".  Ihave/sendme batching no longer assumes
  28. that inews is in NEWSPATH.  The batcher does much less locking, reducing
  29. conflicts with relaynews.  Dbz's Makefile has been fixed to avoid some
  30. unportable assumptions.  Expire now takes a -h option, telling it to expire
  31. articles that are to be removed but hang onto ones that would be archived.
  32. Doexpire uses -h if archiving space is short.  Doexpire notices if it was
  33. invoked with -r, and doesn't bother with rebuild-space checks in that case.
  34. Build's question-asking stuff now implements shell escapes.  Build now
  35. standardizes its PATH to avoid funny local software.  Build is fussier
  36. about quoting in its saved-answers file, to avoid trouble with sites that
  37. have shell metacharacters (!) in their organization names.  Subst tempfile
  38. names changed to avoid problems on systems with 14-character filenames.
  39. NEWSCTL/active.times is documented, and active.to.times (which builds it)
  40. is supplied.  And proper use of white space in the sys file is documented.
  41. Plus usual minor cleanup work.
  42.  
  43. start of patch 25-May-1990
  44. (suggested archive name: `pch25May90.Z')
  45. this should be run with   patch -p0 <thisfile
  46.  
  47. Please do the following (there is no easy way we can convince
  48. patch to do this automatically):
  49. rm contrib/dbz
  50. rm expire/superkludge
  51.  
  52. The following is a complete list of patches to date.
  53.  
  54. Prereq: 23-Jun-1989
  55. Prereq: 7-Jul-1989
  56. Prereq: 23-Jul-1989
  57. Prereq: 22-Aug-1989
  58. Prereq: 24-Aug-1989
  59. Prereq: 14-Sep-1989
  60. Prereq: 13-Nov-1989
  61. Prereq: 10-Jan-1990
  62. Prereq: 16-Jan-1990
  63. Prereq: 17-Jan-1990
  64. Prereq: 18-Jan-1990
  65. Prereq: 12-Mar-1990
  66. Prereq: 14-Apr-1990
  67. Prereq: 15-Apr-1990
  68. Prereq: 16-Apr-1990
  69. *** PATCHDATES.old    Fri May 25 00:13:20 1990
  70. --- PATCHDATES    Fri May 25 00:13:20 1990
  71. ***************
  72. *** 1,15 ****
  73. --- 1,16 ----
  74.   23-Jun-1989
  75.   7-Jul-1989
  76.   23-Jul-1989
  77.   22-Aug-1989
  78.   24-Aug-1989
  79.   14-Sep-1989
  80.   13-Nov-1989
  81.   10-Jan-1990
  82.   16-Jan-1990
  83.   17-Jan-1990
  84.   18-Jan-1990
  85.   12-Mar-1990
  86.   14-Apr-1990
  87.   15-Apr-1990
  88.   16-Apr-1990
  89. + 25-May-1990
  90.  
  91. Changed files, if any:
  92.  
  93. *** cnpatch/old/README    Sat Apr 14 21:13:14 1990
  94. --- README    Mon Apr 23 15:47:14 1990
  95. ***************
  96. *** 1,3 ****
  97. ! This is C News, superseding assorted preliminary releases.  9 June 1989
  98.   
  99.   C News is a reimplementation of the transport and storage subsystems of the
  100. --- 1,3 ----
  101. ! This is C News, superseding assorted preliminary releases.  23 April 1990
  102.   
  103.   C News is a reimplementation of the transport and storage subsystems of the
  104. ***************
  105. *** 29,36 ****
  106.   C News's files are fully compatible with those of B News for any program
  107.   that does not read log files and does not inspect the middle field of the
  108. ! history file closely.  (The one major program that does is "nntp"; we include
  109. ! diffs for NNTP 1.5 which handle our middle-field format, interface it to
  110. ! our input subsystem, and generally make it quite a bit faster than the
  111. ! original.)  C News complies fully with RFC 1036 (nee RFC 850), the official
  112.   definition of news interchange format.
  113.   
  114. --- 29,35 ----
  115.   C News's files are fully compatible with those of B News for any program
  116.   that does not read log files and does not inspect the middle field of the
  117. ! history file closely.  (The one major program that does is "nntp"; current
  118. ! versions (1.5.8 and later) include our C News support, including a significant
  119. ! speedup.)  C News complies fully with RFC 1036 (nee RFC 850), the official
  120.   definition of news interchange format.
  121.   
  122. ***************
  123. *** 121,126 ****
  124.   these overrides.
  125.   
  126. ! Be warned that the nntp stuff in nntpdiffs, and the simple news reader in
  127. ! rna, have not been gone over very well to make sure that they use the
  128.   standard configuration mechanisms.  Hardwired pathnames may be present there,
  129.   and in general the stuff there is not well fitted into our automatic-install
  130. --- 120,125 ----
  131.   these overrides.
  132.   
  133. ! Be warned that the simple news reader in
  134. ! rna has not been gone over very well to make sure that it uses the
  135.   standard configuration mechanisms.  Hardwired pathnames may be present there,
  136.   and in general the stuff there is not well fitted into our automatic-install
  137.  
  138. *** cnpatch/old/ROADMAP    Wed Jan 10 19:10:13 1990
  139. --- ROADMAP    Mon Apr 23 15:47:11 1990
  140. ***************
  141. *** 5,8 ****
  142. --- 5,10 ----
  143.   contrib    Software from other contributors, possibly useful but not really
  144.       an official part of C News.
  145. + dbz    a faster replacement for dbm for news programs which generates smaller
  146. +     database files than dbm.
  147.   doc    User documentation, including "install" which discusses how to
  148.       install C News.  Although the documentation is supplied as troff
  149. ***************
  150. *** 38,43 ****
  151.   man    Manual pages.
  152.   misc    Miscellaneous internal utilities and maintenance programs.
  153. - nntpdiffs    Amendments to NNTP version 1.5, for Internet users, to work
  154. -     with C News history-file format and to be a good deal faster.
  155.   notebook    The C News Implementor's Notebook -- pieces of documentation
  156.       aimed more at gurus than novices.
  157. --- 40,43 ----
  158.  
  159. *** cnpatch/old/batch/Makefile    Tue Jan 16 17:58:26 1990
  160. --- batch/Makefile    Sat May 12 23:13:50 1990
  161. ***************
  162. *** 17,21 ****
  163.   PGMS=batcher batchih batchsm batchsplit comp compcun nocomp viainews viauux \
  164.       sendbatches compc7 c7encode viamail viapmail bencode compb viauuxz \
  165. !     viaemail viarsh viauuxl
  166.   ALL = $(PGMS) batchparms
  167.   
  168. --- 17,21 ----
  169.   PGMS=batcher batchih batchsm batchsplit comp compcun nocomp viainews viauux \
  170.       sendbatches compc7 c7encode viamail viapmail bencode compb viauuxz \
  171. !     viaemail viarsh viauuxl viauuxcun
  172.   ALL = $(PGMS) batchparms
  173.   
  174. ***************
  175. *** 67,70 ****
  176. --- 67,73 ----
  177.       sed '$$s/-r/-r -z/' viauux >$@
  178.   
  179. + viauuxcun:    viauux
  180. +     sed '$$s/rnews/cunbatch/' viauux >$@
  181.   viaemail:    viamail
  182.       sed '$$s/rnews/enews/' viamail >$@
  183. ***************
  184. *** 171,174 ****
  185.   clean:
  186.       rm -rf out.going bin
  187. !     rm -f *.o test.* togo togo.* batchparms batcher batchsm 
  188.       rm -f batchlog batchlog.* c7encode bencode viauuxz viaemail
  189. --- 174,177 ----
  190.   clean:
  191.       rm -rf out.going bin
  192. !     rm -f *.o test.* togo togo.* batchparms batcher batchsm viauuxcun
  193.       rm -f batchlog batchlog.* c7encode bencode viauuxz viaemail
  194.  
  195. *** cnpatch/old/batch/batchih    Sun Jul 23 00:48:08 1989
  196. --- batch/batchih    Sat May 12 22:51:25 1990
  197. ***************
  198. *** 5,9 ****
  199.   . ${NEWSCONFIG-/usr/lib/news/bin/config}
  200.   
  201. ! PATH=$NEWSCTL/bin:$NEWSBIN/batch:$NEWSBIN:$NEWSPATH ; export PATH
  202.   umask $NEWSUMASK
  203.   
  204. --- 5,9 ----
  205.   . ${NEWSCONFIG-/usr/lib/news/bin/config}
  206.   
  207. ! PATH=$NEWSCTL/bin:$NEWSBIN/batch:$NEWSBIN/inject:$NEWSBIN:$NEWSPATH ; export PATH
  208.   umask $NEWSUMASK
  209.   
  210.  
  211. *** cnpatch/old/batch/batchsplit    Tue Jan 16 17:58:26 1990
  212. --- batch/batchsplit    Fri Apr 27 16:52:26 1990
  213. ***************
  214. *** 29,48 ****
  215.   umask $NEWSUMASK
  216.   
  217. ! # Locking.
  218. ! lock="$NEWSCTL/LOCK"
  219. ! ltemp="$NEWSCTL/L.$$"
  220. ! echo $$ >$ltemp
  221. ! trap "rm -f $ltemp ; exit 0" 0 1 2 15
  222. ! while true
  223. ! do
  224. !     if newslock $ltemp $lock
  225. !     then
  226. !         trap "rm -f $ltemp $lock ; exit 0" 0 1 2 15
  227. !         break
  228. !     fi
  229. !     sleep 30
  230. ! done
  231. ! # pick an input file, shuffling togo aside if needed, and unlock
  232.   if test -s togo.next
  233.   then
  234. --- 29,33 ----
  235.   umask $NEWSUMASK
  236.   
  237. ! # pick an input file, shuffling togo aside (with locking) if needed
  238.   if test -s togo.next
  239.   then
  240. ***************
  241. *** 52,55 ****
  242. --- 37,56 ----
  243.       input=togo.more
  244.   else
  245. +     # Locking.
  246. +     lock="$NEWSCTL/LOCK"
  247. +     ltemp="$NEWSCTL/L.$$"
  248. +     echo $$ >$ltemp
  249. +     trap "rm -f $ltemp ; exit 0" 0 1 2 15
  250. +     while true
  251. +     do
  252. +         if newslock $ltemp $lock
  253. +         then
  254. +             trap "rm -f $ltemp $lock ; exit 0" 0 1 2 15
  255. +             break
  256. +         fi
  257. +         sleep 30
  258. +     done
  259. +     # Do it.
  260.       rm -f togo.more
  261.       mv togo togo.more
  262. ***************
  263. *** 56,62 ****
  264.       >togo
  265.       input=togo.more
  266.   fi
  267. - trap 0 1 2 15
  268. - rm -f $ltemp $lock
  269.   
  270.   # main processing
  271. --- 57,65 ----
  272.       >togo
  273.       input=togo.more
  274. +     # Unlock.
  275. +     trap 0 1 2 15
  276. +     rm -f $ltemp $lock
  277.   fi
  278.   
  279.   # main processing
  280.  
  281. *** cnpatch/old/conf/ask    Tue Jan 16 17:58:23 1990
  282. --- conf/ask    Fri Apr 27 17:59:13 1990
  283. ***************
  284. *** 1,6 ****
  285.   #! /bin/sh
  286. - echo "$1 [$2]? " | tr -d '\012' >/dev/tty    # echo -n, sort of portably
  287.   default="$2"
  288. ! read answer
  289.   case "$answer" in
  290.   '')    answer="$default"    ;;
  291. --- 1,18 ----
  292.   #! /bin/sh
  293.   default="$2"
  294. ! while :
  295. ! do
  296. !     echo "$1 [$2]? " | tr -d '\012' >/dev/tty    # echo -n, semiportably
  297. !     read answer
  298. !     case "$answer" in
  299. !     !*)    cmd="`expr \"$answer\" : '!\(.*\)'`"
  300. !         trap : 2
  301. !         ${SHELL-/bin/sh} -c "$cmd"
  302. !         trap 2
  303. !         echo '!'
  304. !         ;;
  305. !     *)    break    ;;    # NOTE BREAK OUT
  306. !     esac
  307. ! done
  308.   case "$answer" in
  309.   '')    answer="$default"    ;;
  310.  
  311. *** cnpatch/old/conf/build    Sat Apr 14 21:13:15 1990
  312. --- conf/build    Sat May 12 23:06:37 1990
  313. ***************
  314. *** 1,4 ****
  315.   #! /bin/sh
  316. ! PATH=:$PATH
  317.   
  318.   # configuration variables to remember for next time
  319. --- 1,4 ----
  320.   #! /bin/sh
  321. ! PATH=:/bin:/usr/bin
  322.   
  323.   # configuration variables to remember for next time
  324. ***************
  325. *** 837,841 ****
  326.       echo "cp sys.proto sys"
  327.       echo "cd ../expire"
  328. !     echo "make explist.$archive && cp explist.$archive explist"
  329.       echo "cd ../conf"
  330.       case "$archive" in
  331. --- 837,841 ----
  332.       echo "cp sys.proto sys"
  333.       echo "cd ../expire"
  334. !     echo "make explists && cp explist.$archive explist"
  335.       echo "cd ../conf"
  336.       case "$archive" in
  337. ***************
  338. *** 977,981 ****
  339.           do
  340.               echo "$warn"
  341. !             eval "echo $v=\\\"\$$v\\\""
  342.           done
  343.       ) >>$memory
  344. --- 977,981 ----
  345.           do
  346.               echo "$warn"
  347. !             eval "echo $v=\\\"\"\$$v\"\\\""
  348.           done
  349.       ) >>$memory
  350.  
  351. *** cnpatch/old/conf/setnewsids.c    Fri Jun 23 14:45:43 1989
  352. --- conf/setnewsids.c    Sat Apr 21 21:50:04 1990
  353. ***************
  354. *** 1,5 ****
  355.   /*
  356. !  * setnewsids - sets ids to news/news, execs relay/relaynews.  Should be setuid-root.
  357. !  *    also add NEWSPERMS to the environment.
  358.    */
  359.   
  360. --- 1,5 ----
  361.   /*
  362. !  * setnewsids - sets ids to news/news, execs relay/relaynews.  Should be
  363. !  *    setuid-root.  also add NEWSPERMS to the environment.
  364.    */
  365.   
  366. ***************
  367. *** 41,45 ****
  368.   
  369.       /* setuid daemon prelude; various precautions */
  370. !     (void) umask(2);    /* undo silly umasks, ignore newsumask() */
  371.       (void) alarm(0);    /* cancel any pending alarm */
  372.       /*
  373. --- 41,45 ----
  374.   
  375.       /* setuid daemon prelude; various precautions */
  376. !     (void) umask(newsumask());
  377.       (void) alarm(0);    /* cancel any pending alarm */
  378.       /*
  379.  
  380. *** cnpatch/old/conf/subst    Tue Mar 13 13:41:17 1990
  381. --- conf/subst    Sat May 12 23:09:30 1990
  382. ***************
  383. *** 27,37 ****
  384.           file="`expr \"$f\" : '.*/\\([^/]*\\)'`"
  385.           dir="`expr \"$f\" : '\\(.*\\)/[^/]*'`"
  386. !         new="$dir/n.$file"
  387. !         old="$dir/o.$file"
  388.           ;;
  389.   
  390.           *)
  391. !         new="n.$f"
  392. !         old="o.$f"
  393.           ;;
  394.       esac
  395. --- 27,37 ----
  396.           file="`expr \"$f\" : '.*/\\([^/]*\\)'`"
  397.           dir="`expr \"$f\" : '\\(.*\\)/[^/]*'`"
  398. !         new="$dir/substtmp.new"
  399. !         old="$dir/substtmp.old"
  400.           ;;
  401.   
  402.           *)
  403. !         new="substtmp.new"
  404. !         old="substtmp.old"
  405.           ;;
  406.       esac
  407.  
  408. *** cnpatch/old/conf/subst.gc    Tue Aug 22 14:47:44 1989
  409. --- conf/subst.gc    Tue May  8 17:56:47 1990
  410. ***************
  411. *** 17,18 ****
  412. --- 17,20 ----
  413.   rna/makefile
  414.   rna/postnews
  415. + man/active.times.5
  416. + misc/act.to.times
  417.  
  418. *** cnpatch/old/conf/subst.hs    Tue Jan 16 17:58:28 1990
  419. --- conf/subst.hs    Sat May 19 20:27:37 1990
  420. ***************
  421. *** 13,17 ****
  422.   expire/doexpire
  423.   expire/mkhistory
  424. - expire/superkludge
  425.   expire/upact
  426.   input/Makefile
  427. --- 13,16 ----
  428. ***************
  429. *** 46,47 ****
  430. --- 45,47 ----
  431.   expire/recovact
  432.   misc/adddirs
  433. + batch/viauuxl
  434.  
  435. *** cnpatch/old/conf/yesno    Tue Jan 16 17:58:24 1990
  436. --- conf/yesno    Fri Apr 27 17:59:44 1990
  437. ***************
  438. *** 13,16 ****
  439. --- 13,22 ----
  440.       esac
  441.       case "$answer" in
  442. +     !*)    cmd="`expr \"$answer\" : '!\(.*\)'`"
  443. +         trap : 2
  444. +         ${SHELL-/bin/sh} -c "$cmd"
  445. +         trap 2
  446. +         echo '!'
  447. +         ;;
  448.       yes|no)    break        ;;    # NOTE BREAK OUT
  449.       *)    echo '???' >/dev/tty    ;;
  450.  
  451. *** cnpatch/old/dbz/Makefile    Sat Apr 14 21:13:09 1990
  452. --- dbz/Makefile    Tue May  1 13:50:07 1990
  453. ***************
  454. *** 8,11 ****
  455. --- 8,13 ----
  456.   LINTFLAGS = -h $(FLAGS) $(DEBUG) $(RFC)
  457.   LDFLAGS =
  458. + # workaround for System V make bug
  459. + SHELL = /bin/sh
  460.   
  461.   # database sizes for performance tests, regression, and regression prime-find
  462. ***************
  463. *** 63,73 ****
  464.   
  465.   hist10:    fake
  466. !     fake -t -e 75 10000 >$@
  467.   
  468.   hist3.3:    fake
  469. !     fake -t -e 75 3300 >$@
  470.   
  471.   hist13:    fake
  472. !     fake -t -e 75 13000 >$@
  473.   
  474.   r:    rdbz $(RHIST) $(R2HIST) byteflip getmap revbytes altbytes
  475. --- 65,75 ----
  476.   
  477.   hist10:    fake
  478. !     ./fake -t -e 75 10000 >$@
  479.   
  480.   hist3.3:    fake
  481. !     ./fake -t -e 75 3300 >$@
  482.   
  483.   hist13:    fake
  484. !     ./fake -t -e 75 13000 >$@
  485.   
  486.   r:    rdbz $(RHIST) $(R2HIST) byteflip getmap revbytes altbytes
  487. ***************
  488. *** 83,87 ****
  489.       mkdir xx
  490.       chmod -w xx
  491. !     rdbz -E 1000 -0 -M -i -S -u -U -C xx dbase
  492.       rmdir xx
  493.       sed '/>    0/d' $(RHIST) >dbase.used
  494. --- 85,89 ----
  495.       mkdir xx
  496.       chmod -w xx
  497. !     ./rdbz -E 1000 -0 -M -i -S -u -U -C xx dbase
  498.       rmdir xx
  499.       sed '/>    0/d' $(RHIST) >dbase.used
  500. ***************
  501. *** 88,92 ****
  502.       test "`cat dbase.used | wc -l`" -eq "`sed -n '2s/ .*//p' dbase.dir`" ;
  503.       cp $(RHIST) dbase2
  504. !     rdbz -E 1000 -0 -p $(RPSIZE) -t '    ' dbase2
  505.       cmp $(RHIST) dbase
  506.       cmp dbase dbase2
  507. --- 90,94 ----
  508.       test "`cat dbase.used | wc -l`" -eq "`sed -n '2s/ .*//p' dbase.dir`" ;
  509.       cp $(RHIST) dbase2
  510. !     ./rdbz -E 1000 -0 -p $(RPSIZE) -t '    ' dbase2
  511.       cmp $(RHIST) dbase
  512.       cmp dbase dbase2
  513. ***************
  514. *** 93,103 ****
  515.       cmp dbase.dir dbase2.dir
  516.       cmp dbase.pag dbase2.pag
  517. !     rdbz -E 1000 -0 -c dbase
  518. !     rdbz -E 1000 -0 -c -i -q -M -U dbase
  519.       : build a database and then add to it
  520.       sed 1000q $(RHIST) >dbase2
  521.       sed 1,1000d $(RHIST) >dbase2.add
  522. !     rdbz -E 1000 -0 dbase2
  523. !     rdbz -E 1000 -0 -a dbase2 dbase2.add
  524.       cmp dbase dbase2
  525.       cmp dbase.dir dbase2.dir
  526. --- 95,105 ----
  527.       cmp dbase.dir dbase2.dir
  528.       cmp dbase.pag dbase2.pag
  529. !     ./rdbz -E 1000 -0 -c dbase
  530. !     ./rdbz -E 1000 -0 -c -i -q -M -U dbase
  531.       : build a database and then add to it
  532.       sed 1000q $(RHIST) >dbase2
  533.       sed 1,1000d $(RHIST) >dbase2.add
  534. !     ./rdbz -E 1000 -0 dbase2
  535. !     ./rdbz -E 1000 -0 -a dbase2 dbase2.add
  536.       cmp dbase dbase2
  537.       cmp dbase.dir dbase2.dir
  538. ***************
  539. *** 104,125 ****
  540.       cmp dbase.pag dbase2.pag
  541.       : build based on existing one, test extraction and readonly files
  542. !     rdbz -E 1000 -0 -f dbase dbase2
  543.       test "`cat dbase.used | wc -l`" -eq "`awk 'NR==2{print $$1}' dbase2.dir`" ;
  544.       test "`cat dbase.used | wc -l`" -eq "`awk 'NR==2{print $$2}' dbase2.dir`" ;
  545.       chmod -w dbase2.dir dbase2.pag
  546. !     rdbz -E 1000 -x dbase2 dbase >dbase.temp
  547.       cmp dbase.used dbase.temp
  548.       : try some small case perversions
  549.       sed 's/\(@[^     ]*\)A/\1a/' dbase >dbase.ick
  550. !     rdbz -E 1000 -x dbase2 dbase.ick >dbase.temp
  551.       cmp dbase.used dbase.temp
  552.       sed -n 's/A\([^     ]*@\)/a\1/p' dbase >dbase.ick
  553. !     rdbz -x dbase2 dbase.ick >dbase.temp
  554.       test ! -s dbase.temp ;
  555.       rm -f dbase2.dir dbase2.pag
  556.       : try it without tags, case-insensitive, with case perversions
  557. !     rdbz -E 1000 -0 -p '0 b 1' dbase2
  558.       tr '[A-M][n-z]' '[a-m][N-Z]' <dbase2 >dbase.ick
  559. !     rdbz -E 1000 -x dbase2 dbase.ick >dbase.temp
  560.       cmp dbase.used dbase.temp
  561.       rm -f dbase.temp dbase.ick
  562. --- 106,127 ----
  563.       cmp dbase.pag dbase2.pag
  564.       : build based on existing one, test extraction and readonly files
  565. !     ./rdbz -E 1000 -0 -f dbase dbase2
  566.       test "`cat dbase.used | wc -l`" -eq "`awk 'NR==2{print $$1}' dbase2.dir`" ;
  567.       test "`cat dbase.used | wc -l`" -eq "`awk 'NR==2{print $$2}' dbase2.dir`" ;
  568.       chmod -w dbase2.dir dbase2.pag
  569. !     ./rdbz -E 1000 -x dbase2 dbase >dbase.temp
  570.       cmp dbase.used dbase.temp
  571.       : try some small case perversions
  572.       sed 's/\(@[^     ]*\)A/\1a/' dbase >dbase.ick
  573. !     ./rdbz -E 1000 -x dbase2 dbase.ick >dbase.temp
  574.       cmp dbase.used dbase.temp
  575.       sed -n 's/A\([^     ]*@\)/a\1/p' dbase >dbase.ick
  576. !     ./rdbz -x dbase2 dbase.ick >dbase.temp
  577.       test ! -s dbase.temp ;
  578.       rm -f dbase2.dir dbase2.pag
  579.       : try it without tags, case-insensitive, with case perversions
  580. !     ./rdbz -E 1000 -0 -p '0 b 1' dbase2
  581.       tr '[A-M][n-z]' '[a-m][N-Z]' <dbase2 >dbase.ick
  582. !     ./rdbz -E 1000 -x dbase2 dbase.ick >dbase.temp
  583.       cmp dbase.used dbase.temp
  584.       rm -f dbase.temp dbase.ick
  585. ***************
  586. *** 127,146 ****
  587.       awk -f revbytes dbase.dir >dbase2.dir
  588.       chmod +x getmap
  589. !     byteflip `getmap dbase.dir` `getmap dbase2.dir` <dbase.pag >dbase2.pag
  590.       cp dbase dbase2
  591. !     rdbz -E 1000 -0 -c dbase2
  592.       awk -f altbytes dbase.dir >dbase2.dir
  593.       dd conv=swab <dbase.pag >dbase2.pag
  594. !     rdbz -E 1000 -0 -c dbase2
  595.       cp dbase2 dbase3
  596. !     rdbz -E 1000 -0 -f dbase2 dbase3
  597. !     rdbz -E 1000 -0 -c dbase3
  598. !     test " `getmap dbase2.dir`" = " `getmap dbase3.dir`" ;
  599.       : test massive overflow, throw in case sensitivity and tag mask
  600.       cp $(R2HIST) dbase
  601. !     rdbz -E 1000 -0 -p '0 0 7ff00000' dbase
  602. !     rdbz -E 1000 -0 -cq dbase
  603.       sed 100q dbase | egrep '[aA].*    ' | tr aA Aa >dbase.ick
  604. !     rdbz -x dbase dbase.ick >dbase.temp
  605.       test ! -s dbase.temp ;
  606.       : success!
  607. --- 129,148 ----
  608.       awk -f revbytes dbase.dir >dbase2.dir
  609.       chmod +x getmap
  610. !     ./byteflip `./getmap dbase.dir` `./getmap dbase2.dir` <dbase.pag >dbase2.pag
  611.       cp dbase dbase2
  612. !     ./rdbz -E 1000 -0 -c dbase2
  613.       awk -f altbytes dbase.dir >dbase2.dir
  614.       dd conv=swab <dbase.pag >dbase2.pag
  615. !     ./rdbz -E 1000 -0 -c dbase2
  616.       cp dbase2 dbase3
  617. !     ./rdbz -E 1000 -0 -f dbase2 dbase3
  618. !     ./rdbz -E 1000 -0 -c dbase3
  619. !     test " `./getmap dbase2.dir`" = " `./getmap dbase3.dir`" ;
  620.       : test massive overflow, throw in case sensitivity and tag mask
  621.       cp $(R2HIST) dbase
  622. !     ./rdbz -E 1000 -0 -p '0 0 7ff00000' dbase
  623. !     ./rdbz -E 1000 -0 -cq dbase
  624.       sed 100q dbase | egrep '[aA].*    ' | tr aA Aa >dbase.ick
  625. !     ./rdbz -x dbase dbase.ick >dbase.temp
  626.       test ! -s dbase.temp ;
  627.       : success!
  628.  
  629. *** cnpatch/old/expire/Makefile    Sat Apr 14 21:13:15 1990
  630. --- expire/Makefile    Sat May 12 23:06:09 1990
  631. ***************
  632. *** 9,13 ****
  633.       upact doexpire mkadir recovact
  634.   DTR = README Makefile dircheck doexpire expire.c histdups histinfo.c \
  635. !     histslash.c mkdbm.c mkhistory pgood superkludge tgood upact \
  636.       mkadir updatemin.c recovact
  637.   UPACT=upact
  638. --- 9,13 ----
  639.       upact doexpire mkadir recovact
  640.   DTR = README Makefile dircheck doexpire expire.c histdups histinfo.c \
  641. !     histslash.c mkdbm.c mkhistory pgood tgood upact \
  642.       mkadir updatemin.c recovact
  643.   UPACT=upact
  644. ***************
  645. *** 28,31 ****
  646. --- 28,33 ----
  647.       cp $(THEM) $(NEWSBIN)/expire
  648.   
  649. + explists:    explist.no explist.yes
  650.   cmp:    $(THEM)
  651.       for f in $(THEM) ; do cmp $(NEWSBIN)/expire/$$f $$f ; done
  652. ***************
  653. *** 198,202 ****
  654.   
  655.   # the regression test proper
  656. ! r:    $(THEM) $(UPACT) dircheck setup tgood pgood superkludge
  657.       chmod +x dircheck $(THEM)
  658.       $(RUN) -c explist
  659. --- 200,204 ----
  660.   
  661.   # the regression test proper
  662. ! r:    $(THEM) $(UPACT) dircheck setup tgood pgood
  663.       chmod +x dircheck $(THEM)
  664.       $(RUN) -c explist
  665. ***************
  666. *** 240,249 ****
  667.       test -r history.pag ;
  668.       test -r history.dir ;
  669. -     : "and that's mkhistory done, finally try superkludge"
  670. -     test -r arts/foo/1 ;
  671. -     test -r arts/foo/10 ;
  672. -     $(D) ./superkludge foo
  673. -     test ! -r arts/foo/1 ;
  674. -     test -r arts/foo/10 ;
  675.       : "success!"
  676.   
  677. --- 242,245 ----
  678. ***************
  679. *** 269,274 ****
  680.   
  681.   tidy:
  682. !     rm -f junk history history.pag history.dir history.o active
  683. !     rm -f history.n* mon.out history.proto history.after test.out doit
  684.       rm -f active.old active.new explist lint active.after test.stderr
  685.       rm -rf arts arch arch2 arch3 nbin
  686. --- 265,270 ----
  687.   
  688.   tidy:
  689. !     rm -f junk history history.pag history.dir history.o active active.tmp
  690. !     rm -f history.n* *mon.out history.proto history.after test.out doit
  691.       rm -f active.old active.new explist lint active.after test.stderr
  692.       rm -rf arts arch arch2 arch3 nbin
  693.  
  694. *** cnpatch/old/expire/README    Tue Mar 13 13:41:17 1990
  695. --- expire/README    Wed Apr 18 14:27:58 1990
  696. ***************
  697. *** 18,22 ****
  698.   "make r" will compile everything and run a complex set of regression tests,
  699.   checking the results automatically.  If nothing screams, there is a high
  700. ! probability that expire, upact, mkhistory, and superkludge are working.
  701.   
  702.   dircheck checks the results of expire regression testing.
  703. --- 18,22 ----
  704.   "make r" will compile everything and run a complex set of regression tests,
  705.   checking the results automatically.  If nothing screams, there is a high
  706. ! probability that expire, upact, and mkhistory are working.
  707.   
  708.   dircheck checks the results of expire regression testing.
  709. ***************
  710. *** 30,33 ****
  711.   pgood and tgood are regression-test output-should-look-like-this files.
  712.   mkadir is what expire invokes to create archiving subdirectories.
  713. - superkludge is an old implementation of the Supersedes header, now
  714. -     superseded :-) by the full implementation in relaynews.
  715. --- 30,31 ----
  716.  
  717. *** cnpatch/old/expire/doexpire    Tue Mar 13 13:41:18 1990
  718. --- expire/doexpire    Sun May 13 01:28:34 1990
  719. ***************
  720. *** 20,54 ****
  721.   fi
  722.   
  723.   if test " `spacefor 1 archive`" -le 0
  724.   then
  725. !     echo "$0: not enough space for archiving" | mail "$NEWSMASTER"
  726. !     exit 1
  727.   fi
  728.   
  729.   cd $NEWSCTL
  730. ! ropt=-r
  731. ! for counter in x x x x        # four tries
  732.   do
  733. !     size="`sizeof history history.pag history.dir`"
  734. !     if test " `spacefor $size control`" -gt 0
  735.       then
  736.           ropt=
  737. -         break
  738.       fi
  739. -     sleep 600        # and hope it will improve
  740.   done
  741. ! if test " $ropt" = " -r"
  742. ! then
  743. !     (
  744. !         echo "$0:"
  745. !         echo "    SEVERE SPACE SHORTAGE in $NEWSCTL !"
  746. !         echo "    Unable to rebuild history files due to insufficient"
  747. !         echo "    space for temporaries -- resorting to \`expire -r'."
  748. !         echo "    Growth of the history files will make things worse;"
  749. !         echo "    if shortage persists, human action is urgently needed."
  750. !     ) | mail "$NEWSMASTER"
  751. ! fi
  752.   
  753. ! expire $ropt $* $NEWSCTL/explist 2>/tmp/doex$$
  754.   if test -s /tmp/doex$$
  755.   then
  756. --- 20,73 ----
  757.   fi
  758.   
  759. + hopt=
  760.   if test " `spacefor 1 archive`" -le 0
  761.   then
  762. !     (
  763. !         echo "$0:"
  764. !         echo "    Space shortage in archiving area!"
  765. !         echo "    Unable to archive old articles -- holding them in"
  766. !         echo "    current directories using \`expire -h'.  If shortage"
  767. !         echo "    persists, human action is urgently needed."
  768. !     ) | mail "$NEWSMASTER"
  769. !     hopt=-h
  770.   fi
  771.   
  772.   cd $NEWSCTL
  773. ! forcer=no
  774. ! for o
  775.   do
  776. !     if test " $o" = " -r"
  777.       then
  778. +         forcer=yes
  779.           ropt=
  780.       fi
  781.   done
  782. ! case "$forcer" in
  783. ! no)    ropt=-r
  784. !     for counter in x x x x        # four tries
  785. !     do
  786. !         size="`sizeof history history.pag history.dir`"
  787. !         if test " `spacefor $size control`" -gt 0
  788. !         then
  789. !             ropt=
  790. !             break
  791. !         fi
  792. !         sleep 600        # and hope it will improve
  793. !     done
  794. !     if test " $ropt" = " -r"
  795. !     then
  796. !         (
  797. !             echo "$0:"
  798. !             echo "    SEVERE SPACE SHORTAGE in $NEWSCTL !"
  799. !             echo "    Unable to rebuild history files due to insufficient"
  800. !             echo "    space for temporaries -- resorting to \`expire -r'."
  801. !             echo "    Growth of the history files will make things worse;"
  802. !             echo "    if shortage persists, human action is urgently needed."
  803. !         ) | mail "$NEWSMASTER"
  804. !     fi
  805. !     ;;
  806. ! esac
  807.   
  808. ! expire $ropt $hopt $* $NEWSCTL/explist 2>/tmp/doex$$
  809.   if test -s /tmp/doex$$
  810.   then
  811.  
  812. *** cnpatch/old/expire/expire.c    Sat Apr 14 21:13:16 1990
  813. --- expire/expire.c    Mon Apr 30 15:15:02 1990
  814. ***************
  815. *** 71,74 ****
  816. --- 71,75 ----
  817.   int verbose = 0;        /* report statistics */
  818.   int rebuild = 1;        /* rebuild history files */
  819. + int holdarch = 0;        /* hold rather than archiving */
  820.   int getdgrump = 0;        /* report un-getdate()able expiry dates */
  821.   
  822. ***************
  823. *** 162,166 ****
  824.       ftime(&ftnow);
  825.   
  826. !     while ((c = getopt(argc, argv, "pa:sF:cn:tlvrVgd")) != EOF)
  827.           switch (c) {
  828.           case 'p':    /* print info line for archived articles */
  829. --- 163,167 ----
  830.       ftime(&ftnow);
  831.   
  832. !     while ((c = getopt(argc, argv, "pa:sF:cn:tlvrhgd")) != EOF)
  833.           switch (c) {
  834.           case 'p':    /* print info line for archived articles */
  835. ***************
  836. *** 194,197 ****
  837. --- 195,201 ----
  838.               rebuild = 0;
  839.               break;
  840. +         case 'h':    /* hold all files meant to be archived */
  841. +             holdarch = 1;
  842. +             break;
  843.           case 'g':    /* report getdate() failures on expiry dates */
  844.               getdgrump = 1;
  845. ***************
  846. *** 757,764 ****
  847.   
  848.       /* and decide */
  849. !     if (shouldgo(recdate, expdate, ct))
  850. !         return(ct->dir);
  851. !     else
  852.           return(dont);
  853.   }
  854.   
  855. --- 761,768 ----
  856.   
  857.       /* and decide */
  858. !     if (!shouldgo(recdate, expdate, ct) || (holdarch && ct->dir != NULL))
  859.           return(dont);
  860. +     else
  861. +         return(ct->dir);
  862.   }
  863.   
  864.  
  865. *** cnpatch/old/h/news.h    Tue Mar 13 13:41:19 1990
  866. --- h/news.h    Thu May 10 16:44:47 1990
  867. ***************
  868. *** 55,58 ****
  869. --- 55,59 ----
  870.   #define ST_DISKFULL    (1<<5)    /* disk full - give up */
  871.   #define ST_JUNKED    (1<<6)    /* article was accepted, but junked */
  872. + #define ST_NEEDATTN    (1<<7)    /* news system needs human attention - give up */
  873.   
  874.   /* newsgroup specific definitions */
  875.  
  876. *** cnpatch/old/man/expire.8    Tue Mar 13 13:41:22 1990
  877. --- man/expire.8    Sun May 13 01:33:41 1990
  878. ***************
  879. *** 7,11 ****
  880.   .\" =()<.ds m @<NEWSMASTER>@>()=
  881.   .ds m usenet
  882. ! .TH EXPIRE 8 "12 Jan 1990"
  883.   .BY "C News"
  884.   .SH NAME
  885. --- 7,11 ----
  886.   .\" =()<.ds m @<NEWSMASTER>@>()=
  887.   .ds m usenet
  888. ! .TH EXPIRE 8 "12 May 1990"
  889.   .BY "C News"
  890.   .SH NAME
  891. ***************
  892. *** 46,49 ****
  893. --- 46,51 ----
  894.   ] [
  895.   .B \-g
  896. + ] [
  897. + .B \-h
  898.   ]
  899.   [ controlfile ]
  900. ***************
  901. *** 199,202 ****
  902. --- 201,210 ----
  903.   temporary storage.)
  904.   .TP
  905. + .BR \-h
  906. + do not expire any article which would be archived if it were expired.
  907. + Mostly for emergencies, so that \fIexpire\fR can be run
  908. + (to delete articles in non-archived groups)
  909. + even if space is short in archiving areas.
  910. + .TP
  911.   .BR \-v
  912.   verbose:
  913. ***************
  914. *** 225,229 ****
  915.   .I Doexpire
  916.   checks whether another \fIdoexpire\fR is running,
  917. ! checks that there is enough disk space for expiry and archiving,
  918.   invokes \fIexpire\fR with any \fIexpireoptions\fR given and with
  919.   \fI\*c/explist\fR as the control file,
  920. --- 233,237 ----
  921.   .I Doexpire
  922.   checks whether another \fIdoexpire\fR is running,
  923. ! checks that there is enough disk space,
  924.   invokes \fIexpire\fR with any \fIexpireoptions\fR given and with
  925.   \fI\*c/explist\fR as the control file,
  926. ***************
  927. *** 230,236 ****
  928.   and reports any difficulties by sending mail to \fI\*m\fR.
  929.   This is usually better than just running \fIexpire\fR directly.
  930. ! If space is adequate for archiving but persistently inadequate for the
  931.   temporaries needed for history rebuilding, \fIdoexpire\fR reports this
  932. ! and invokes \fIexpire\fR with the \fB\-r\fR option.
  933.   .PP
  934.   .I Mkhistory
  935. --- 238,247 ----
  936.   and reports any difficulties by sending mail to \fI\*m\fR.
  937.   This is usually better than just running \fIexpire\fR directly.
  938. ! If space is not adequate for archiving, \fIdoexpire\fR reports this
  939. ! and invokes \fIexpire\fR with the \fB\-h\fR option.
  940. ! If \fB\-r\fR is not among the \fIexpireoptions\fR,
  941. ! and disk space is persistently inadequate for the
  942.   temporaries needed for history rebuilding, \fIdoexpire\fR reports this
  943. ! and invokes \fIexpire\fR with the \fB\-r\fR option anyway.
  944.   .PP
  945.   .I Mkhistory
  946. ***************
  947. *** 285,288 ****
  948. --- 296,302 ----
  949.   with the `=' feature, since the article numbers will collide with each
  950.   other and expire doesn't do anything about this.
  951. + Note that archiving a newsgroup which has subgroups into
  952. + an `=' directory puts all the subgroups in the same directory as the parent!
  953. + (Specifying the group as `foo.bar,!foo.bar.all' will avoid this.)
  954.   .PP
  955.   .I Mkhistory
  956.  
  957. *** cnpatch/old/man/news.5    Tue Mar 13 13:41:23 1990
  958. --- man/news.5    Tue May 22 13:20:27 1990
  959. ***************
  960. *** 169,173 ****
  961.   putting a
  962.   .B \e
  963. ! at the end of the line.
  964.   .PP
  965.   Of the \fIsys\fR fields,
  966. --- 169,185 ----
  967.   putting a
  968.   .B \e
  969. ! at the end of the current physical line.
  970. ! Spaces are permitted in
  971. ! .I sys
  972. ! only in
  973. ! comments,
  974. ! .I "transmission command"
  975. ! when it really is a command and not a filename,
  976. ! and,
  977. ! for B news compatibility,
  978. ! at the start of a continuation line
  979. ! (after a
  980. ! .B \e
  981. ! and a newline).
  982.   .PP
  983.   Of the \fIsys\fR fields,
  984.  
  985. *** cnpatch/old/man/newsbatch.8    Sat Apr 14 21:13:17 1990
  986. --- man/newsbatch.8    Sat May 12 23:17:00 1990
  987. ***************
  988. *** 7,11 ****
  989.   .\" =()<.ds m @<NEWSMASTER>@>()=
  990.   .ds m usenet
  991. ! .TH NEWSBATCH 8 "14 April 1990"
  992.   .BY "C News"
  993.   .SH NAME
  994. --- 7,11 ----
  995.   .\" =()<.ds m @<NEWSMASTER>@>()=
  996.   .ds m usenet
  997. ! .TH NEWSBATCH 8 "12 May 1990"
  998.   .BY "C News"
  999.   .SH NAME
  1000. ***************
  1001. *** 18,24 ****
  1002.   c7encode, bencode \- compressed-news-batch encoding
  1003.   .br
  1004. ! viauux, viauuxz, viauuxl, viainews, viarsh \- news-batch transmission
  1005.   .br
  1006.   viamail, viaemail, viapmail \- news-batch transmission via mail
  1007.   .SH SYNOPSIS
  1008.   .B \*b/batch/sendbatches
  1009. --- 18,26 ----
  1010.   c7encode, bencode \- compressed-news-batch encoding
  1011.   .br
  1012. ! viauux, viauuxz, viauuxcun, viauuxl \- news-batch transmission via uucp
  1013.   .br
  1014.   viamail, viaemail, viapmail \- news-batch transmission via mail
  1015. + .br
  1016. + viainews, viarsh \- news-batch transmission by misc. means
  1017.   .SH SYNOPSIS
  1018.   .B \*b/batch/sendbatches
  1019. ***************
  1020. *** 70,89 ****
  1021.   site
  1022.   .br    
  1023.   .B \&.../viauuxl
  1024.   group
  1025.   .br
  1026. ! .B \&.../viainews
  1027.   site
  1028.   .br
  1029. ! .B \&.../viarsh
  1030.   site
  1031.   .br
  1032. ! .B \&.../viamail
  1033.   site
  1034.   .br
  1035. ! .B \&.../viaemail
  1036.   site
  1037.   .br
  1038. ! .B \&.../viapmail
  1039.   site
  1040.   .SH DESCRIPTION
  1041. --- 72,94 ----
  1042.   site
  1043.   .br    
  1044. + .B \&.../viauuxcun
  1045. + site
  1046. + .br    
  1047.   .B \&.../viauuxl
  1048.   group
  1049.   .br
  1050. ! .B \&.../viamail
  1051.   site
  1052.   .br
  1053. ! .B \&.../viaemail
  1054.   site
  1055.   .br
  1056. ! .B \&.../viapmail
  1057.   site
  1058.   .br
  1059. ! .B \&.../viainews
  1060.   site
  1061.   .br
  1062. ! .B \&.../viarsh
  1063.   site
  1064.   .SH DESCRIPTION
  1065. ***************
  1066. *** 215,219 ****
  1067.   Batch transmitters in the standard distribution are:
  1068.   .RS
  1069. ! .IP viauux 9
  1070.   normal transmission via UUCP
  1071.   .IP viauuxz
  1072. --- 220,224 ----
  1073.   Batch transmitters in the standard distribution are:
  1074.   .RS
  1075. ! .IP viauux 10
  1076.   normal transmission via UUCP
  1077.   .IP viauuxz
  1078. ***************
  1079. *** 220,223 ****
  1080. --- 225,231 ----
  1081.   like \fIviauux\fR except with \fB\-z\fR option given to \fIuux\fR
  1082.   (for old UUCPs where don't-report-result-on-zero-status is not default)
  1083. + .IP viauuxcun
  1084. + like \fIviauux\fR except it invokes \fIcunbatch\fR rather than \fIrnews\fR
  1085. + at the other end (for some very old news sites)
  1086.   .IP viauuxl
  1087.   multicast transmission using the \fB\-l\fR option of \fIuux\fR (not found
  1088. ***************
  1089. *** 224,227 ****
  1090. --- 232,242 ----
  1091.   on all systems) to send the same batch to all systems listed in the
  1092.   file `\*c/sites.\fIgroup\fR'
  1093. + .IP viamail
  1094. + mail the batch to \fIsite\fB!rnews\fR
  1095. + .IP viaemail
  1096. + mail the batch to \fIsite\fB!enews\fR
  1097. + .IP viapmail
  1098. + mail the batch to \fIsite\fB!rnews\fR, attempting to
  1099. + protect an unencoded batch against the vagaries of mailers
  1100.   .IP viainews
  1101.   feed the batch back to \fIinews\fR, ignoring the \fIsite\fR argument
  1102. ***************
  1103. *** 232,242 ****
  1104.   (the directory containing \fIrnews\fR
  1105.   must be in the default PATH on \fIsite\fR)
  1106. - .IP viamail
  1107. - mail the batch to \fIsite\fB!rnews\fR
  1108. - .IP viaemail
  1109. - mail the batch to \fIsite\fB!enews\fR
  1110. - .IP viapmail
  1111. - mail the batch to \fIsite\fB!rnews\fR, attempting to
  1112. - protect an unencoded batch against the vagaries of mailers
  1113.   .RE
  1114.   .PP
  1115. --- 247,250 ----
  1116.  
  1117. *** cnpatch/old/man/newsmaint.8    Tue Mar 13 13:41:24 1990
  1118. --- man/newsmaint.8    Tue May  8 18:00:00 1990
  1119. ***************
  1120. *** 7,11 ****
  1121.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1122.   .ds m usenet
  1123. ! .TH NEWSMAINT 8 "16 Jan 1990"
  1124.   .BY "C News"
  1125.   .SH NAME
  1126. --- 7,11 ----
  1127.   .\" =()<.ds m @<NEWSMASTER>@>()=
  1128.   .ds m usenet
  1129. ! .TH NEWSMAINT 8 "8 May 1990"
  1130.   .BY "C News"
  1131.   .SH NAME
  1132. ***************
  1133. *** 25,28 ****
  1134. --- 25,30 ----
  1135.   .br
  1136.   addfeed \- add a news feed
  1137. + .br
  1138. + act.to.times \- create active.times file for news readers
  1139.   .SH SYNOPSIS
  1140.   .B \*b/maint/newshist
  1141. ***************
  1142. *** 52,55 ****
  1143. --- 54,60 ----
  1144.   ]
  1145.   site groups
  1146. + .br
  1147. + .B \*b/maint/act.to.times
  1148. + activefile
  1149.   .SH DESCRIPTION
  1150.   These programs are utilities useful in maintaining a C News
  1151. ***************
  1152. *** 119,122 ****
  1153. --- 124,137 ----
  1154.   this specifies the same groups as those fed to site `\fIname\fR',
  1155.   with the exception that `to.\fIname\fR' is rewritten to `to.\fIsite\fR'.
  1156. + .PP
  1157. + .I Act.to.times
  1158. + emits (on standard output) a new
  1159. + .I active.times
  1160. + file (see
  1161. + .IR active.times (5))
  1162. + based on the contents of
  1163. + .IR activefile ,
  1164. + which should normally be
  1165. + .IR \*c/active .
  1166.   .SH FILES
  1167.   .ta 6c
  1168.  
  1169. *** cnpatch/old/misc/Makefile    Sat Apr 14 21:13:18 1990
  1170. --- misc/Makefile    Tue May  8 17:56:09 1990
  1171. ***************
  1172. *** 12,16 ****
  1173.   
  1174.   MAINTBIN=newshist
  1175. ! MAINT = $(MAINTBIN) newsdaily newswatch newsboot locknews addgroup delgroup adddirs addfeed
  1176.   UTILBIN = gngp newslock ctime getdate canonhdr
  1177.   UTILS = $(UTILBIN) sizeof newshostname
  1178. --- 12,16 ----
  1179.   
  1180.   MAINTBIN=newshist
  1181. ! MAINT = $(MAINTBIN) newsdaily newswatch newsboot locknews addgroup delgroup adddirs addfeed act.to.times
  1182.   UTILBIN = gngp newslock ctime getdate canonhdr
  1183.   UTILS = $(UTILBIN) sizeof newshostname
  1184.  
  1185. *** cnpatch/old/misc/newshist.c    Wed Jan 10 19:10:48 1990
  1186. --- misc/newshist.c    Thu May 24 23:53:49 1990
  1187. ***************
  1188. *** 5,15 ****
  1189.   #include <stdio.h>
  1190.   #include "news.h"
  1191.   #include "history.h"
  1192.   
  1193.   char *progname;
  1194.   int debug;
  1195. - static char *histfile;        /* unused */
  1196.   int remote;            /* to satisfy rnews code */
  1197.   
  1198.   /*
  1199.    * main - parse arguments and handle options
  1200. --- 5,20 ----
  1201.   #include <stdio.h>
  1202.   #include "news.h"
  1203. + #include "headers.h"
  1204. + #include "article.h"
  1205.   #include "history.h"
  1206.   
  1207. + /* exports */
  1208.   char *progname;
  1209.   int debug;
  1210.   int remote;            /* to satisfy rnews code */
  1211. + boolean okrefusal = YES;    /* .. */
  1212.   
  1213. + static char *histfile;        /* unused */
  1214.   /*
  1215.    * main - parse arguments and handle options
  1216. ***************
  1217. *** 77,79 ****
  1218. --- 82,90 ----
  1219.   unprivileged()
  1220.   {
  1221. + }
  1222. + prefuse(art)
  1223. + struct article *art;
  1224. + {
  1225. +     /* temporary hack until the cleanup release */
  1226.   }
  1227.  
  1228. *** cnpatch/old/notebook/problems    Tue Mar 13 13:41:26 1990
  1229. --- notebook/problems    Sun May 13 01:23:18 1990
  1230. ***************
  1231. *** 1,3 ****
  1232. ! .DA "8 March 1990"
  1233.   .TL
  1234.   Known Porting Problems With C News
  1235. --- 1,3 ----
  1236. ! .DA "12 May 1990"
  1237.   .TL
  1238.   Known Porting Problems With C News
  1239. ***************
  1240. *** 220,223 ****
  1241. --- 220,228 ----
  1242.   A short-term solution is to use the ``null'' variant, sacrificing space
  1243.   checking for the sake of getting something working.
  1244. + .PP
  1245. + We're told that HP-UX 7.0 users are best advised to
  1246. + choose the ``bsd'' variant of spacefor, and edit it to
  1247. + call \fIbdf\fR instead of \fIdf\fR.
  1248. + Similar approaches may be useful on other hybrid SysV/BSD systems.
  1249.   .SH
  1250.   Floating Point
  1251. ***************
  1252. *** 236,239 ****
  1253. --- 241,246 ----
  1254.   badly enough to cripple it, without producing any error messages.
  1255.   The only fix is to compile \fIdbz\fR without \fB\-O\fR.
  1256. + .PP
  1257. + SCO Xenix/386 2.3 has the same problem.
  1258.   .SH
  1259.   nnafree and nnfree
  1260. ***************
  1261. *** 375,376 ****
  1262. --- 382,440 ----
  1263.   .DE
  1264.   or so we are told.
  1265. + .SH
  1266. + Binary-Mode Fopen
  1267. + .PP
  1268. + In several places, the new
  1269. + \fIdbz\fR
  1270. + uses ANSI C ``binary mode'' fopen codes, e.g.
  1271. + `fopen(...,\ "r+b")'.
  1272. + The text/binary distinction involved is meaningless
  1273. + under Unix, and most Unix implementations just ignore trailing nonsense in
  1274. + the second argument of
  1275. + \fIfopen\fR,
  1276. + so it all works out nicely.
  1277. + .PP
  1278. + Unfortunately... at least one version of DEC's Ultrix objects to the `b's,
  1279. + we are told.
  1280. + Sigh.
  1281. + DEC will have to fix this to make their systems ANSI
  1282. + compatible, but heaven only knows how long that will take.
  1283. + .PP
  1284. + Meanwhile, the fix is to delete the `b's in the second arguments of the
  1285. + \fIfopen\fRs
  1286. + in three places in
  1287. + \fIdbminit()\fR
  1288. + in
  1289. + \fIdbz/dbz.c\fR,
  1290. + if your system has
  1291. + this particular bit of brain damage.
  1292. + .SH
  1293. + size_t
  1294. + .PP
  1295. + Some systems, notably from Microport, do not define the
  1296. + \fIsize_t\fR type in the \fI<sys/types.h>\fR header.
  1297. + Worse, the \fIsize_t\fR in that header doesn't necessarily bear any
  1298. + relationship to the ANSI C \fIsize_t\fR.
  1299. + This causes trouble in the \fIdbz\fR library in particular.
  1300. + The proper type for \fIsize_t\fR is whatever the C \fIsizeof\fR
  1301. + operator returns, nominally an unsigned type which is large enough to
  1302. + contain the size of any memory object.
  1303. + We think nothing relies too heavily on it being unsigned.
  1304. + Note that \fIsize_t\fR must also be suitable for use in the two middle
  1305. + arguments of \fIfread\fR and \fIfwrite\fR, the last argument of
  1306. + \fImemcpy\fR, \fImemchr\fR, and \fImemcmp\fR,
  1307. + and the argument of \fImalloc\fR.
  1308. + .SH
  1309. + Background Processes vs. csh
  1310. + .PP
  1311. + \fIInews\fR runs much of its processing in the background.
  1312. + We are told that this can hit problems, in some circumstances,
  1313. + with \fIcsh\fR's manipulations of signals, terminal modes, etc etc.
  1314. + We prefer a standard shell, and have made no attempt to understand the
  1315. + C shell's weirdnesses.
  1316. + We're aware that well-written programs can fail
  1317. + under the C shell due to bizarre problems with weird signals, etc., but
  1318. + we class this as the fault of the C shell and its co-conspirators and
  1319. + decline to contort our programs to compensate for its failings.
  1320. + We do
  1321. + sympathize with people victimized by it, but can be of no practical help.
  1322.  
  1323. *** cnpatch/old/relay/history.c    Tue Mar 13 13:41:28 1990
  1324. --- relay/history.c    Thu May 24 23:53:56 1990
  1325. ***************
  1326. *** 62,68 ****
  1327. --- 62,72 ----
  1328.   extern datum fetch();
  1329.   
  1330. + /* other imports */
  1331. + extern boolean okrefusal;    /* flag from command line */
  1332.   /* forward decls */
  1333.   FORWARD datum getposhist();
  1334.   FORWARD void mkhistent(), sanitise(), subsanitise();
  1335. + void decline();
  1336.   
  1337.   STATIC void
  1338. ***************
  1339. *** 89,96 ****
  1340.           /* else fp==NULL and fopenwclex just complained */
  1341.   
  1342.           if (fp != NULL && dbminit(filename) < 0) {
  1343. !             /* no luck. dbminit will have just honked */
  1344.               (void) nfclose(fp);    /* close ascii file */
  1345. !             fp = NULL;        /* and mark it */
  1346.           }
  1347.       }
  1348. --- 93,107 ----
  1349.           /* else fp==NULL and fopenwclex just complained */
  1350.   
  1351. +         errno = 0;
  1352.           if (fp != NULL && dbminit(filename) < 0) {
  1353. !             /*
  1354. !              * no luck.  dbm's dbminit will have just honked (on
  1355. !              * stdout, alas) but dbz's won't have, so bitch.
  1356. !              */
  1357. !             warning(
  1358. !         "database files for `%s' incomprehensible or unavailable",
  1359. !                 filename);
  1360.               (void) nfclose(fp);    /* close ascii file */
  1361. !             fp = NULL;        /* and mark it closed */
  1362.           }
  1363.       }
  1364. ***************
  1365. *** 143,147 ****
  1366.           if (fseek(fp, pos, SEEK_SET) != -1 &&
  1367.               (histent = fgetms(fp)) != NULL)
  1368. !             return histent;
  1369.       }
  1370.       return NULL;
  1371. --- 154,158 ----
  1372.           if (fseek(fp, pos, SEEK_SET) != -1 &&
  1373.               (histent = fgetms(fp)) != NULL)
  1374. !             return histent;        /* could note move from EOF */
  1375.       }
  1376.       return NULL;
  1377. ***************
  1378. *** 185,188 ****
  1379. --- 196,201 ----
  1380.       time_t now;
  1381.   
  1382. +     if (!msgidok(art))        /* complains in log if unhappy */
  1383. +         return;            /* refuse to corrupt history */
  1384.       msgid = strsave(nullify(art->h.h_msgid));
  1385.       sanitise(msgid);    /* RFC 1036 forbids whitespace in msg-ids */
  1386. ***************
  1387. *** 199,208 ****
  1388.           now = time(&now);
  1389.       if (!openhist())
  1390. !         art->a_status |= ST_DROPPED;    /* fall through and return */
  1391.       else if (!writable) {
  1392.           (void) fprintf(stderr, "%s: no write permission on `%s'\n",
  1393.               progname, filename);
  1394. !         art->a_status |= ST_DROPPED;
  1395.       } else if (fseek(fp, 0L, SEEK_END) == -1) {
  1396.           warning("can't seek to end of `%s'", filename);
  1397.           art->a_status |= ST_DROPPED;
  1398. --- 212,222 ----
  1399.           now = time(&now);
  1400.       if (!openhist())
  1401. !         art->a_status |= ST_DROPPED|ST_NEEDATTN;    /* serious */
  1402.       else if (!writable) {
  1403.           (void) fprintf(stderr, "%s: no write permission on `%s'\n",
  1404.               progname, filename);
  1405. !         art->a_status |= ST_DROPPED|ST_NEEDATTN;    /* serious */
  1406.       } else if (fseek(fp, 0L, SEEK_END) == -1) {
  1407. +         /* could avoid fseek if still at EOF */
  1408.           warning("can't seek to end of `%s'", filename);
  1409.           art->a_status |= ST_DROPPED;
  1410. ***************
  1411. *** 213,216 ****
  1412. --- 227,258 ----
  1413.   }
  1414.   
  1415. + void
  1416. + decline(art)                    /* mark art as undesirable */
  1417. + struct article *art;
  1418. + {
  1419. +     art->a_status |= ST_REFUSED|(okrefusal? 0: ST_DROPPED);
  1420. + }
  1421. + int
  1422. + msgidok(art)                    /* if bad, complain in log */
  1423. + register struct article *art;
  1424. + {
  1425. +     register char *msgid = art->h.h_msgid;
  1426. +     if (msgid == NULL || msgid[0] == '\0') {
  1427. +         prefuse(art);
  1428. +         (void) printf("missing Message-ID\n");
  1429. +     } else if (strchr(msgid, ' ') != NULL || strchr(msgid, '\t') != NULL) {
  1430. +         prefuse(art);
  1431. +         (void) printf("whitespace in Message-ID\n");
  1432. +     } else if (msgid[0] != '<' || msgid[strlen(msgid)-1] != '>') {
  1433. +         prefuse(art);
  1434. +         (void) printf("Message-ID not bracketed by <>\n");
  1435. +     } else
  1436. +         return YES;
  1437. +     decline(art);
  1438. +     return NO;
  1439. + }
  1440.   /*
  1441.    * Internal interface to generate a history file entry,
  1442. ***************
  1443. *** 229,233 ****
  1444.       datum msgidkey, posdatum;
  1445.                                           
  1446. !     pos = ftell(fp);            /* get seek ptr for dbm */
  1447.       if (fprintf(fp, "%s%c%ld%c%s", msgid, FIELDSEP, now, SUBFIELDSEP, expiry)
  1448.           == EOF)
  1449. --- 271,275 ----
  1450.       datum msgidkey, posdatum;
  1451.                                           
  1452. !     pos = ftell(fp);  /* get seek ptr for dbm; could keep track instead */
  1453.       if (fprintf(fp, "%s%c%ld%c%s", msgid, FIELDSEP, now, SUBFIELDSEP, expiry)
  1454.           == EOF)
  1455.  
  1456. *** cnpatch/old/relay/makefile    Tue Jan 16 17:58:41 1990
  1457. --- relay/makefile    Mon May 14 14:13:32 1990
  1458. ***************
  1459. *** 19,27 ****
  1460.   COPTS= -O # -pg -g
  1461.   CFLAGS=$(DEFINES) $(COPTS)
  1462. ! DBM = -ldbm
  1463.   LIBS= $(DBM)
  1464.   LINT=lint
  1465.   LINTFLAGS=-haz $(DEFINES)
  1466. ! LLIBS=-llocal
  1467.   # I wish I could make lint shut the fk up about some things.  Grrr!
  1468.   LINTFILT=egrep -v '(possible pointer|long assign|nnfree|getdate|:$$)'
  1469. --- 19,27 ----
  1470.   COPTS= -O # -pg -g
  1471.   CFLAGS=$(DEFINES) $(COPTS)
  1472. ! DBM = # -ldbm
  1473.   LIBS= $(DBM)
  1474.   LINT=lint
  1475.   LINTFLAGS=-haz $(DEFINES)
  1476. ! LLIBS=-llocal -lmalloc
  1477.   # I wish I could make lint shut the fk up about some things.  Grrr!
  1478.   LINTFILT=egrep -v '(possible pointer|long assign|nnfree|getdate|:$$)'
  1479. ***************
  1480. *** 98,106 ****
  1481.       -egrep TODO ../lib*/*.[ch] | tr -s " \11" " " >>$@
  1482.   
  1483. - v7 v8 v9 usg bsd42:
  1484. -     test -d libos && exit 1
  1485. -     mv lib$@ libos # or ln -s lib$@ libos
  1486. -     make
  1487.   print: printc printnonc
  1488.       touch $@
  1489. --- 98,101 ----
  1490. ***************
  1491. *** 111,117 ****
  1492.       pr $(PROPTS) $? | $P
  1493.       touch $@
  1494. - distr: $(FILES)
  1495. -     (echo relaynews update of `date`; echo ""; bundle $?) | /bin/mail cnews-updates
  1496. -     touch $@
  1497.   clean:
  1498.       rm -f core a.out relaynews *.o    
  1499. --- 106,109 ----
  1500. ***************
  1501. *** 120,124 ****
  1502.   r:    relaynews
  1503.       chmod +x regress/regress
  1504. !     cd regress; ./regress
  1505.       
  1506.   # header dependencies follow
  1507. --- 112,116 ----
  1508.   r:    relaynews
  1509.       chmod +x regress/regress
  1510. !     (cd regress; ./regress)
  1511.       
  1512.   # header dependencies follow
  1513.  
  1514. *** cnpatch/old/relay/msgs.c    Tue Jun 20 19:01:26 1989
  1515. --- relay/msgs.c    Thu May 10 16:45:00 1990
  1516. ***************
  1517. *** 11,15 ****
  1518.   
  1519.   void
  1520. ! fulldisk(art, file)        /* complain once & set ST_DISKFULL */
  1521.   register struct article *art;
  1522.   char *file;
  1523. --- 11,15 ----
  1524.   
  1525.   void
  1526. ! fulldisk(art, file)            /* complain once & set status bits */
  1527.   register struct article *art;
  1528.   char *file;
  1529. ***************
  1530. *** 20,27 ****
  1531.   
  1532.   statust
  1533. ! prfulldisk(file)        /* complain once & return bad status */
  1534.   char *file;
  1535.   {
  1536.       warning("error writing `%s', probably the disk filled", file);
  1537. !     return ST_DISKFULL|ST_DROPPED;
  1538.   }
  1539. --- 20,27 ----
  1540.   
  1541.   statust
  1542. ! prfulldisk(file)            /* complain & return bad status */
  1543.   char *file;
  1544.   {
  1545.       warning("error writing `%s', probably the disk filled", file);
  1546. !     return ST_DISKFULL|ST_NEEDATTN|ST_DROPPED;
  1547.   }
  1548.  
  1549. *** cnpatch/old/relay/procart.c    Sat Apr 14 21:13:19 1990
  1550. --- relay/procart.c    Thu May 24 23:53:53 1990
  1551. ***************
  1552. *** 32,37 ****
  1553.   
  1554.   extern char *exclude;        /* for erik */
  1555. - extern boolean okrefusal;    /* flag from command line */
  1556.   
  1557.   /* forwards */
  1558.   extern void tossorfile(), surveydamage(), reject(), prefuse(), uninsart();
  1559. --- 32,39 ----
  1560.   
  1561.   extern char *exclude;        /* for erik */
  1562.   
  1563. + /* imports */
  1564. + extern void decline();
  1565.   /* forwards */
  1566.   extern void tossorfile(), surveydamage(), reject(), prefuse(), uninsart();
  1567. ***************
  1568. *** 64,68 ****
  1569.       /*
  1570.        * copyart() may reject() the article, and may fill the disk.
  1571. !      * it calls fileart and logs rejected articles.
  1572.        */
  1573.       copyart(artp, in, inname);
  1574. --- 66,70 ----
  1575.       /*
  1576.        * copyart() may reject() the article, and may fill the disk.
  1577. !      * it calls fileart and logs rejected articles.  it may call uninsart.
  1578.        */
  1579.       copyart(artp, in, inname);
  1580. ***************
  1581. *** 211,215 ****
  1582.           art->a_charswritten += bodylen;
  1583.       }
  1584. !     for (; art->a_unread > 0 && !(art->a_status&ST_DISKFULL) && !feof(in) &&
  1585.           (readcnt=fread(block, 1, (int)min(art->a_unread, COPYSIZE), in)) > 0;
  1586.           art->a_unread -= readcnt, art->a_charswritten += readcnt)
  1587. --- 213,217 ----
  1588.           art->a_charswritten += bodylen;
  1589.       }
  1590. !     for (; art->a_unread > 0 && !(art->a_status&ST_NEEDATTN) && !feof(in) &&
  1591.           (readcnt=fread(block, 1, (int)min(art->a_unread, COPYSIZE), in)) > 0;
  1592.           art->a_unread -= readcnt, art->a_charswritten += readcnt)
  1593. ***************
  1594. *** 222,228 ****
  1595.   
  1596.   /*
  1597. !  * If not yet uninstalled, and the disk filled, uninstall this article
  1598. !  * to remove any zero-length links and decrement the active article number.
  1599. !  * The ST_DISKFULL status will prevent a history entry from being generated.
  1600.    */
  1601.   void
  1602. --- 224,231 ----
  1603.   
  1604.   /*
  1605. !  * If not yet uninstalled, and the disk filled (or the news system was found
  1606. !  * to be otherwise unwell), uninstall this article
  1607. !  * to remove any (zero-length) links and decrement the active article number.
  1608. !  * The ST_NEEDATTN status will prevent a history entry being generated later.
  1609.    */
  1610.   void
  1611. ***************
  1612. *** 237,241 ****
  1613.           art->a_status |= ST_SHORT;    /* NB.: don't uninstall this art. */
  1614.       }
  1615. !     if (*installedp && art->a_status&ST_DISKFULL) {
  1616.           uninsart(art);
  1617.           *installedp = NO;
  1618. --- 240,244 ----
  1619.           art->a_status |= ST_SHORT;    /* NB.: don't uninstall this art. */
  1620.       }
  1621. !     if (*installedp && art->a_status&ST_NEEDATTN) {
  1622.           uninsart(art);
  1623.           *installedp = NO;
  1624. ***************
  1625. *** 253,257 ****
  1626.   
  1627.   /*
  1628. !  * Install the article on art->a_tmpf or art->a_files:
  1629.    * The article should have been accepted and filed in copyart().
  1630.    * Add history entries for the article.  Log arrival.
  1631. --- 256,261 ----
  1632.   
  1633.   /*
  1634. !  * If nothing has gone wrong yet,
  1635. !  * install the article on art->a_tmpf or art->a_files:
  1636.    * The article should have been accepted and filed in copyart().
  1637.    * Add history entries for the article.  Log arrival.
  1638. ***************
  1639. *** 264,278 ****
  1640.   register struct article *art;
  1641.   {
  1642. !     if (!(art->a_status&(ST_DROPPED|ST_REFUSED|ST_DISKFULL))) {
  1643.           if (!art->a_filed)            /* paranoia */
  1644.               (void) fprintf(stderr, "%s: %s not filed by copyart!\n",
  1645.                   progname, art->h.h_msgid);
  1646. !         history(art, STARTLOG);
  1647. !         transmit(art, exclude);        /* writes systems on stdout */
  1648. !         (void) putchar('\n');        /* ends the log line */
  1649. !         ctlmsg(art);
  1650. ! #ifdef notdef                    /* it's only a log file! */
  1651. !         (void) fflush(stdout);        /* crash-proofness */
  1652.   #endif
  1653.       }
  1654.       art->a_status &= ~ST_REFUSED;    /* refusal is quite casual & common */
  1655. --- 268,286 ----
  1656.   register struct article *art;
  1657.   {
  1658. !     if (!(art->a_status&(ST_DROPPED|ST_REFUSED|ST_NEEDATTN))) {
  1659.           if (!art->a_filed)            /* paranoia */
  1660.               (void) fprintf(stderr, "%s: %s not filed by copyart!\n",
  1661.                   progname, art->h.h_msgid);
  1662. !         history(art, STARTLOG);        /* history may be unwritable */
  1663. !         if (art->a_status&(ST_DROPPED|ST_REFUSED|ST_NEEDATTN))
  1664. !             uninsart(art);        /* it was; can't keep the article */
  1665. !         else {
  1666. !             transmit(art, exclude);    /* writes systems on stdout */
  1667. !             (void) putchar('\n');    /* ends the log line */
  1668. !             ctlmsg(art);        /* NCMP */
  1669. ! #ifdef FLUSHLOG
  1670. !             (void) fflush(stdout);    /* crash-proofness */
  1671.   #endif
  1672. +         }
  1673.       }
  1674.       art->a_status &= ~ST_REFUSED;    /* refusal is quite casual & common */
  1675. ***************
  1676. *** 297,311 ****
  1677.           prefuse(art);
  1678.           (void) printf("no Path: header\n");
  1679. !     } else if (msgid == NULL || msgid[0] == '\0') {
  1680.           prefuse(art);
  1681. -         (void) printf("missing Message-ID\n");
  1682. -     } else if (strchr(msgid, ' ') != NULL || strchr(msgid, '\t') != NULL) {
  1683. -         prefuse(art);
  1684. -         (void) printf("whitespace in Message-ID\n");
  1685. -     } else if (msgid[0] != '<' || msgid[strlen(msgid)-1] != '>') {
  1686. -         prefuse(art);
  1687. -         (void) printf("Message-ID not bracketed by <>\n");
  1688. -     } else if (alreadyseen(msgid)) {
  1689. -         prefuse(art);
  1690.           (void) printf("duplicate\n");
  1691.       } else if (path != NULL && hopcount(path) > 0 &&
  1692. --- 305,312 ----
  1693.           prefuse(art);
  1694.           (void) printf("no Path: header\n");
  1695. !     } else if (!msgidok(art))
  1696. !         /* already complained */ ;
  1697. !     else if (alreadyseen(msgid)) {
  1698.           prefuse(art);
  1699.           (void) printf("duplicate\n");
  1700.       } else if (path != NULL && hopcount(path) > 0 &&
  1701. ***************
  1702. *** 328,334 ****
  1703.       } else
  1704.           return;            /* art was accepted */
  1705. !     art->a_status |= ST_REFUSED;
  1706. !     if (!okrefusal)
  1707. !         art->a_status |= ST_DROPPED;
  1708.   }
  1709.   
  1710. --- 329,333 ----
  1711.       } else
  1712.           return;            /* art was accepted */
  1713. !     decline(art);
  1714.   }
  1715.   
  1716. ***************
  1717. *** 349,354 ****
  1718.    * a_tmpf (temporary name if a_unlink set), and return assigned article #'s.
  1719.    * If a_unlink isn't set, a_tmpf is a copy of the first link in art->a_files.
  1720. !  * Must be called before history() is called, else there will be a
  1721. !  * history entry for the article, but no spool files.
  1722.    */
  1723.   void
  1724. --- 348,354 ----
  1725.    * a_tmpf (temporary name if a_unlink set), and return assigned article #'s.
  1726.    * If a_unlink isn't set, a_tmpf is a copy of the first link in art->a_files.
  1727. !  * Must be called before history() is called (or after it has failed),
  1728. !  * else there will be a history entry for the article, but no spool files.
  1729. !  * insart() need not be called first.
  1730.    */
  1731.   void
  1732.  
  1733. *** cnpatch/old/relay/relaynews.c    Sat Apr 14 21:13:20 1990
  1734. --- relay/relaynews.c    Thu May 10 16:45:02 1990
  1735. ***************
  1736. *** 26,34 ****
  1737.    * too wasteful; use the batched form instead (see the ihave sys flag
  1738.    * ("I") instead).
  1739. -  *
  1740. -  * Portability vs SystemV.  relaynews uses dbm(3) and makes no apologies
  1741. -  * for so doing.  Imitation UNIX (registered trademark of AT&T in the
  1742. -  * United States) brand operating systems that lack dbm are going to
  1743. -  * have to use my incredibly slow dbm simulation, or another.
  1744.    */
  1745.   
  1746. --- 26,29 ----
  1747. ***************
  1748. *** 147,151 ****
  1749.       register char *newpath;
  1750.   
  1751. !     (void) umask(2);        /* undo silly umasks, ignore newsumask() */
  1752.       (void) alarm(0);        /* cancel any pending alarm */
  1753.       newpath = malloc((unsigned)(STRLEN("PATH=")+strlen(newspath())+SIZENUL));
  1754. --- 142,146 ----
  1755.       register char *newpath;
  1756.   
  1757. !     (void) umask(newsumask());
  1758.       (void) alarm(0);        /* cancel any pending alarm */
  1759.       newpath = malloc((unsigned)(STRLEN("PATH=")+strlen(newspath())+SIZENUL));
  1760. ***************
  1761. *** 462,466 ****
  1762.       long charcnt;
  1763.   
  1764. !     while (!(status&ST_DISKFULL) && (c = getc(in)) != EOF) {
  1765.           (void) ungetc(c, in);
  1766.           while ((line = fgetms(in)) != NULL &&
  1767. --- 457,461 ----
  1768.       long charcnt;
  1769.   
  1770. !     while (!(status&ST_NEEDATTN) && (c = getc(in)) != EOF) {
  1771.           (void) ungetc(c, in);
  1772.           while ((line = fgetms(in)) != NULL &&
  1773.  
  1774. *** cnpatch/old/relay/sh/inews    Sat Apr 14 21:13:20 1990
  1775. --- relay/sh/inews    Mon Apr 23 15:51:08 1990
  1776. ***************
  1777. *** 88,94 ****
  1778.   
  1779.       -C)
  1780. !         echo "$0: you either want to use addgroup (see newsaux(8)) to make" >&2
  1781. !         echo "$0: $2 locally or this to make it network-wide:" >&2
  1782. !         cat <<eg
  1783.   inews -h <<'!'
  1784.   Control: newgroup $2
  1785. --- 88,94 ----
  1786.   
  1787.       -C)
  1788. !         cat <<eg >&2
  1789. ! $0: you either want to use addgroup (see newsaux(8)) to make
  1790. ! $0: $2 locally, or this to make it network-wide:
  1791.   inews -h <<'!'
  1792.   Control: newgroup $2
  1793. ***************
  1794. *** 199,202 ****
  1795. --- 199,204 ----
  1796.    fi) >$censart
  1797.   
  1798. + ### the article is fully assembled now in $censart ###
  1799.   # to post or to mail? that is the question; whether 'tis nobler in the mind
  1800.   # to suffer the slings and arrows of outrageous mailers - Bill Shakespeare
  1801. ***************
  1802. *** 252,255 ****
  1803. --- 254,258 ----
  1804.                           >$modroute
  1805.                   moderator="`cat $modroute `"
  1806. +                 # TODO: next line confuses nn; change to stdout?
  1807.                   echo "$0: mailing your article to $moderator" >&2
  1808.                   mail "$moderator" <$censart
  1809. ***************
  1810. *** 282,285 ****
  1811. --- 285,290 ----
  1812.       exit $exitstatus    # trap 0 may cleanup, make dead.article
  1813.   fi
  1814. + ### if the article was mailed, that happened above; posting will happen below ###
  1815.   
  1816.   # deal with inadequate free space
  1817.  
  1818. *** cnpatch/old/relay/sh/tear    Tue Jun 20 19:01:37 1989
  1819. --- relay/sh/tear    Sun May 13 01:15:45 1990
  1820. ***************
  1821. *** 21,25 ****
  1822.   *)    args="$@" ;;
  1823.   esac
  1824. ! exec awk 'inbody == 0 && $0 ~ /^([ \t]|[^ \t]*:)/ { print >hdr; next }
  1825.                       { inbody = 1; print >body }
  1826.   ' hdr="$hdr" body="$body" $args
  1827. --- 21,25 ----
  1828.   *)    args="$@" ;;
  1829.   esac
  1830. ! exec awk 'inbody == 0 && ($0 ~ /^[^ \t]*:/ || ($0 ~ /^[ \t]/ && NR > 1)) { print >hdr; next }
  1831.                       { inbody = 1; print >body }
  1832.   ' hdr="$hdr" body="$body" $args
  1833.  
  1834. *** cnpatch/old/relay/sys.c    Tue Jan 16 17:58:42 1990
  1835. --- relay/sys.c    Thu May 10 16:43:51 1990
  1836. ***************
  1837. *** 25,29 ****
  1838.   /* forward decls */
  1839.   FORWARD char *parsecolon(), *reparse();
  1840. ! FORWARD void readsys(), parsesysln(), parse(), parseflags();
  1841.   
  1842.   /* exports */
  1843. --- 25,29 ----
  1844.   /* forward decls */
  1845.   FORWARD char *parsecolon(), *reparse();
  1846. ! FORWARD void readsys(), parsesysln(), parse(), parseflags(), newartfile();
  1847.   
  1848.   /* exports */
  1849. ***************
  1850. *** 176,184 ****
  1851.           (void) strcat(deffile, sysp->sy_name);
  1852.           (void) strcat(deffile, BTCHSFX);
  1853. !         free(sysp->sy_cmd);    /* malloced by parse */
  1854. !         sysp->sy_cmd = strsave(fullartfile(deffile));
  1855. !         free(deffile);
  1856. !     }
  1857. !     if (sysp->sy_flags&FLG_BATCH && sysp->sy_cmd[0] != FNDELIM) {
  1858.           register char *absfile = nemalloc((unsigned) STRLEN(BTCHDIR) +
  1859.               strlen(sysp->sy_cmd) + SIZENUL);
  1860. --- 176,182 ----
  1861.           (void) strcat(deffile, sysp->sy_name);
  1862.           (void) strcat(deffile, BTCHSFX);
  1863. !         /* frees old sysp->sy_cmd, deffile */
  1864. !         newartfile(sysp, deffile);
  1865. !     } else if (sysp->sy_flags&FLG_BATCH && sysp->sy_cmd[0] != FNDELIM) {
  1866.           register char *absfile = nemalloc((unsigned) STRLEN(BTCHDIR) +
  1867.               strlen(sysp->sy_cmd) + SIZENUL);
  1868. ***************
  1869. *** 186,195 ****
  1870.           (void) strcpy(absfile, BTCHDIR);
  1871.           (void) strcat(absfile, sysp->sy_cmd);
  1872.           free(sysp->sy_cmd);    /* malloced by parse */
  1873. -         sysp->sy_cmd = strsave(artfile(absfile));
  1874. -         free(absfile);
  1875. -     }
  1876. -     if (!(sysp->sy_flags&FLG_BATCH) && sysp->sy_cmd[0] == '\0') {
  1877. -         free(sysp->sy_cmd);    /* malloced by parse */
  1878.           sysp->sy_cmd = nemalloc((unsigned) STRLEN(CMDPFX) +
  1879.               strlen(sysp->sy_name) + STRLEN(CMDSFX) + SIZENUL);
  1880. --- 184,191 ----
  1881.           (void) strcpy(absfile, BTCHDIR);
  1882.           (void) strcat(absfile, sysp->sy_cmd);
  1883. +         /* frees old sysp->sy_cmd, absfile */
  1884. +         newartfile(sysp, absfile);
  1885. +     } else if (!(sysp->sy_flags&FLG_BATCH) && sysp->sy_cmd[0] == '\0') {
  1886.           free(sysp->sy_cmd);    /* malloced by parse */
  1887.           sysp->sy_cmd = nemalloc((unsigned) STRLEN(CMDPFX) +
  1888.               strlen(sysp->sy_name) + STRLEN(CMDSFX) + SIZENUL);
  1889. ***************
  1890. *** 198,201 ****
  1891. --- 194,207 ----
  1892.           (void) strcat(sysp->sy_cmd, CMDSFX);
  1893.       }
  1894. + }
  1895. + STATIC void
  1896. + newartfile(sysp, file)        /* replace sysp->sy_cmd with artfile(file) */
  1897. + register struct system *sysp;
  1898. + register char *file;
  1899. + {
  1900. +     free(sysp->sy_cmd);        /* malloced by parse */
  1901. +     sysp->sy_cmd = strsave(artfile(file));
  1902. +     free(file);
  1903.   }
  1904.   
  1905.  
  1906. *** cnpatch/old/relay/trbatch.c    Tue Mar 13 13:41:30 1990
  1907. --- relay/trbatch.c    Fri May  4 14:42:10 1990
  1908. ***************
  1909. *** 97,102 ****
  1910.   }
  1911.   
  1912.   statust
  1913. ! bffkclose(ord)                /* close ord's batchfile, if fake */
  1914.   int ord;
  1915.   {
  1916. --- 97,103 ----
  1917.   }
  1918.   
  1919. + /* ARGSUSED ord */
  1920.   statust
  1921. ! bffkclose(ord)            /* close current (ord's) batchfile, if fake */
  1922.   int ord;
  1923.   {
  1924. ***************
  1925. *** 103,107 ****
  1926.       register statust status = ST_OKAY;
  1927.   
  1928. !     if (ord >= NOPENBFS)
  1929.           status |= bfclose(&fakebatf);
  1930.       return status;
  1931. --- 104,108 ----
  1932.       register statust status = ST_OKAY;
  1933.   
  1934. !     if (fakebatf.bf_str != NULL)
  1935.           status |= bfclose(&fakebatf);
  1936.       return status;
  1937.  
  1938. Files that are new:
  1939.  
  1940. new man/active.times.5 (patch can't create, so diff against null):
  1941. Index: man/active.times.5
  1942. *** cnpatch/old/man/active.times.5    Fri May 25 00:18:01 1990
  1943. --- man/active.times.5    Tue May  8 18:00:10 1990
  1944. ***************
  1945. *** 0 ****
  1946. --- 1,82 ----
  1947. + .\" =()<.ds a @<NEWSARTS>@>()=
  1948. + .ds a /usr/spool/news
  1949. + .\" =()<.ds b @<NEWSBIN>@>()=
  1950. + .ds b /usr/lib/newsbin
  1951. + .\" =()<.ds c @<NEWSCTL>@>()=
  1952. + .ds c /usr/lib/news
  1953. + .\" =()<.ds m @<NEWSMASTER>@>()=
  1954. + .ds m usenet
  1955. + .TH ACTIVE.TIMES 5 "8 May 1990"
  1956. + .BY "C News"
  1957. + .SH NAME
  1958. + active.times \- newsgroup creation times and creators
  1959. + .SH DESCRIPTION
  1960. + The
  1961. + .I active.times
  1962. + file records the arrival of new newsgroups by time and creator.
  1963. + This provides a quick
  1964. + way for newsreaders to tell when new groups have arrived,
  1965. + without weird heuristics and time/space expensive schemes
  1966. + like storing old lists of
  1967. + newsgroups and comparing them to the
  1968. + .I active
  1969. + file.
  1970. + .PP
  1971. + When a new newsgroup is created by C News,
  1972. + via
  1973. + .I \*b/ctl/newgroup
  1974. + or
  1975. + .IR \*b/maint/addgroup ,
  1976. + the group name, time of group creation, and identity of the creator
  1977. + are appended to the
  1978. + .I \*c/active.times
  1979. + file.
  1980. + The time is that returned by 
  1981. + .I \*b/maint/getdate
  1982. + and on Unix systems
  1983. + is the number of seconds since January 1, 1970,
  1984. + 00:00, GMT.
  1985. + The identity of the creator is taken from the
  1986. + .B Sender:
  1987. + or
  1988. + .B From:
  1989. + headers in the control message for groups added with
  1990. + .IR \*b/ctl/newgroup ,
  1991. + and from the environment variable USER
  1992. + (if any; the default identity is ``unknown'')
  1993. + for groups created with
  1994. + .IR \*b/maint/addgroup .
  1995. + .PP
  1996. + Each line in the file is of the form
  1997. + .PP
  1998. + .nf
  1999. + .in +0.5i
  2000. + .ft B
  2001. + newsgroup creation-time creator
  2002. + .ft R
  2003. + .in -0.5i
  2004. + .fi
  2005. + .PP
  2006. + The file must always be sorted in increasing order of the creation-time field.
  2007. + The scripts only append to the file, which normally suffices to ensure this.
  2008. + (It is assumed that time on the machine does not jump backward!)
  2009. + .PP
  2010. + An initial version of
  2011. + .I active.times
  2012. + for already existing newsgroups,
  2013. + with all times equal to the time of its creation
  2014. + and all creators ``unknown'',
  2015. + can be built using
  2016. + .I \*b/maint/act.to.times
  2017. + (see
  2018. + .IR newsmaint (8)).
  2019. + .SH FILES
  2020. + .nf
  2021. + \*c/active.times
  2022. + \*b/maint/addgroup
  2023. + \*b/maint/act.to.times
  2024. + \*b/ctl/newgroup
  2025. + .fi
  2026. + .SH HISTORY
  2027. + Conceived and implemented
  2028. + by Mark Moraes and Geoff Collyer as part of the C News project.
  2029.  
  2030. new misc/act.to.times (patch can't create, so diff against null):
  2031. Index: misc/act.to.times
  2032. *** cnpatch/old/misc/act.to.times    Fri May 25 00:18:01 1990
  2033. --- misc/act.to.times    Tue May  8 17:44:38 1990
  2034. ***************
  2035. *** 0 ****
  2036. --- 1,9 ----
  2037. + # act.to.times [file...] - turn an active file into a active.times file inaccurately
  2038. + # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  2039. + . ${NEWSCONFIG-/usr/lib/news/bin/config}
  2040. + # export NEWSCTL NEWSBIN NEWSARTS
  2041. + PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  2042. + umask $NEWSUMASK
  2043. + now=`getdate now`
  2044. + cat $* | sed "s/ .*/ $now unknown/"
  2045.  
  2046.  
  2047. end of patch 25-May-1990
  2048.  
  2049.