Subject: C News patch CR.A
Newsgroups: news.software.b

This is the first patch for the Cleanup Release.  The distribution files
on ftp.cs.toronto.edu and zoo.toronto.edu have been updated to match.
See the README.changes diff below for what's been done.

start of patch CR.A
(suggested archive name:  patchCR.A)
apply with   patch -p0 <thisfile

*** README.mastercopy	Mon Oct 17 23:09:00 1994
--- README	Mon Oct 17 22:43:27 1994
***************
*** 1,4 ****
! This is the Cleanup Release of C News.				Sept 1994
  
  The current C News distribution can be retrieved by anonymous FTP from
  ftp.cs.toronto.edu (file pub/c-news/c-news.tar.Z) or ftp.zoo.toronto.edu
--- 1,4 ----
! This is the Cleanup Release of C News, with patch CR.A.		Oct 1994
  
  The current C News distribution can be retrieved by anonymous FTP from
  ftp.cs.toronto.edu (file pub/c-news/c-news.tar.Z) or ftp.zoo.toronto.edu

*** README.changes.mastercopy	Mon Oct 17 23:09:01 1994
--- README.changes	Mon Oct 17 23:03:03 1994
***************
*** 1,5 ****
! These are just the high points.
  
  First, the source has been extensively reorganized, so don't bother diffing
  against older releases.
  
--- 1,16 ----
! High points of patch CR.A:
! Quiz now pays attention to the compiler-name and config-file-location
! question answers.  The PATH bug in control-message handling has been fixed.
! Upact now checks for duplicate newsgroups in active, which foul it up.
! Doexpire -e means expire only, don't run upact and expov.  Newsrun uses
! suffix .t, rather than .Z.t, for decompressed compressed batches.  Expov
! reports articles with numbers below min (which mean something's wrong).
! "make cmp" tests whether spacefor works.  The names of the batcher local
! locks have changed.  Lots of little portability fixes and minor bug fixes.
! Overviews are still mandatory, bash is still broken; fixes for these later.
  
+ High points of the Cleanup Release:
+ 
  First, the source has been extensively reorganized, so don't bother diffing
  against older releases.
  
***************
*** 69,75 ****
  
  Relaynews, apart from being faster, now copes fully with article trees
  split across file systems, doing symbolic links and/or data copying as
! necessary.
  
  There is support for SVR4 statvfs() space checking and UUCP queue checking.
  Shell-file locking has been organized and packaged up for cleanliness and
--- 80,86 ----
  
  Relaynews, apart from being faster, now copes fully with article trees
  split across file systems, doing symbolic links and/or data copying as
! necessary.  RELAYNEWS OPTIONS HAVE CHANGED.
  
  There is support for SVR4 statvfs() space checking and UUCP queue checking.
  Shell-file locking has been organized and packaged up for cleanliness and

*** README.install.mastercopy	Mon Oct 17 23:09:01 1994
--- README.install	Sun Oct  9 22:18:38 1994
***************
*** 10,16 ****
  2. "make".  This will build all the software.  If you asked for the stdio
  	speedups, it will check them out before actually deciding to rely
  	on them; don't panic if you see a messy-looking failure but make
! 	charges onward -- it knows what it's doing.
  
  3. (optional but recommended) "make r".  This will run regression tests.
  	They take a while.  Errors that don't cause make to stop are not
--- 10,19 ----
  2. "make".  This will build all the software.  If you asked for the stdio
  	speedups, it will check them out before actually deciding to rely
  	on them; don't panic if you see a messy-looking failure but make
! 	charges onward -- it knows what it's doing.  Note:  getting the
! 	command search path set up properly for compiling is up to you --
! 	the search path which quiz asks about is used only for *running*
! 	them.
  
  3. (optional but recommended) "make r".  This will run regression tests.
  	They take a while.  Errors that don't cause make to stop are not
***************
*** 21,27 ****
  	NEWSBIN can be owned by most anyone; the rest should be owned
  	by the news-database owner.
  
! 5. Running as the NEWSBIN owner, "make install".
  
  6. Running as the news-database owner, "make setup".  These makes, by the
  	way, are generally fairly careful not to step on existing files
--- 24,32 ----
  	NEWSBIN can be owned by most anyone; the rest should be owned
  	by the news-database owner.
  
! 5. Running as the NEWSBIN owner, "make install".  Note:  getting the
! 	umask set up properly for installation is up to you -- the umask
! 	which quiz asks about is used only for *running* the software.
  
  6. Running as the news-database owner, "make setup".  These makes, by the
  	way, are generally fairly careful not to step on existing files
***************
*** 38,45 ****
  	news-database owner, and mode rwsr-sr-x (both s's are mandatory).
  
  10. Go to NEWSCTL and edit some control files, at least:  batchparms,
! 	explist, mailname, mailpaths, organization, postdefltgroup,
! 	readnews.ctl, sys, whoami.  In particular, editing mailname
  	(to the name appropriate in From headers) and whoami (to the news
  	name of the system) is MANDATORY at this point, unless you're
  	updating an old system (in which case the old ones will still
--- 43,50 ----
  	news-database owner, and mode rwsr-sr-x (both s's are mandatory).
  
  10. Go to NEWSCTL and edit some control files, at least:  batchparms,
! 	controlperm, explist, mailname, mailpaths, organization,
! 	postdefltgroup, readnews.ctl, sys, whoami.  Notably, editing mailname
  	(to the name appropriate in From headers) and whoami (to the news
  	name of the system) is MANDATORY at this point, unless you're
  	updating an old system (in which case the old ones will still

*** quiz.mastercopy	Mon Oct 17 23:09:02 1994
--- quiz	Sun Oct  9 22:16:45 1994
***************
*** 118,125 ****
  
  cat <<!
  
! C News normally uses a umask of 022, turning off only the others-write
! and group-write bits in the permissions of files used.  (The correspondence
  between bits and number is:  rwx = 421, so turning off group-write bits and
  all others-access bits would be a mask of 027, for example.)  Usually
  a umask of 002 or 022 is appropriate.
--- 118,125 ----
  
  cat <<!
  
! C News normally uses a umask of 022, turning off only the others-write and
! group-write bits in the permissions of files it creates.  (The correspondence
  between bits and number is:  rwx = 421, so turning off group-write bits and
  all others-access bits would be a mask of 027, for example.)  Usually
  a umask of 002 or 022 is appropriate.

*** batch/sendbatches.mastercopy	Mon Oct 17 23:09:03 1994
--- batch/sendbatches	Mon Oct 17 12:32:16 1994
***************
*** 122,130 ****
  	fi
  
  	# lock against multiple simultaneous batchers for this site
! 	if lock -o ./LOCKbatch $$
  	then
! 		llock="$here/LOCKbatch"
  	else
  		continue	# try the next site
  	fi
--- 122,130 ----
  	fi
  
  	# lock against multiple simultaneous batchers for this site
! 	if lock -o ./LOCKb $$
  	then
! 		llock="$here/LOCKb"
  	else
  		continue	# try the next site
  	fi
***************
*** 230,236 ****
  
  	# unlock this site
  	llock=
! 	unlock ./LOCKbatch
  done
  
  echo "`date`, sendbatches $$ $args" >>$log
--- 230,236 ----
  
  	# unlock this site
  	llock=
! 	unlock ./LOCKb
  done
  
  echo "`date`, sendbatches $$ $args" >>$log

*** conf/maker.mastercopy	Mon Oct 17 23:09:03 1994
--- conf/maker	Tue Oct  4 14:53:59 1994
***************
*** 30,43 ****
  	fi
  fi
  
! tmp=tmp.maker
  status=1
! trap "rm -f $tmp ; trap 0 ; exit $status" 0 1 2 15
  
! awk '	BEGIN { includeline = 0 }
  	$0 == "# =()<@<INCLUDE>@>()=" { includeline = NR + 1 }
! 	NR == includeline { system("cat '"$CONFIG_MAKE"'") ; next }
! 	{ print }' $mfs >$tmp || exit
! $REALMAKE -f $tmp $options $*
  status=$?
  # and the exit trap does the actual exiting
--- 30,50 ----
  	fi
  fi
  
! tmp=/tmp/maker$$
  status=1
! trap "rm -f $tmp ; trap 0 ; exit \$status" 0 1 2 15
  
! ( cat $CONFIG_MAKE ; echo '===' ; cat $mfs ) |
! awk '	BEGIN { includeline = 0 ; inconfig = 1 }
! 	$0 ~ /^===$/ && inconfig == 1 { inconfig = 0 ; next }
! 	inconfig == 1 { config[++nconfig] = $0 ; next }
  	$0 == "# =()<@<INCLUDE>@>()=" { includeline = NR + 1 }
! 	NR == includeline {
! 		for (i = 1; i <= nconfig; i++)
! 			print config[i]
! 		next
! 	}
! 	{ print }' >$tmp
! ${REALMAKE-make} -f $tmp $options $*
  status=$?
  # and the exit trap does the actual exiting

*** conf/subst.mastercopy	Mon Oct 17 23:09:04 1994
--- conf/subst	Sun Oct  2 00:41:48 1994
***************
*** 62,75 ****
  
  	# generate the new version
  	trap "rm -f $new; exit 1" 1 2 15
! 	sed "/=()<.*>()=/{
  		h
  		n
  		g
  		s/.*=()<//
  		s/>()=.*//
! 		$them
! 	}" $f >$new
  
  	# substitute new for old, if necessary
  	if cmp -s $new $f
--- 62,77 ----
  
  	# generate the new version
  	trap "rm -f $new; exit 1" 1 2 15
! 	# the ''""'' business is more robust against stupid shell implementors
! 	# than just ""
! 	sed '/=()<.*>()=/{
  		h
  		n
  		g
  		s/.*=()<//
  		s/>()=.*//
! 		'"$them"'
! 	}' $f >$new
  
  	# substitute new for old, if necessary
  	if cmp -s $new $f

*** conf/subst.all.mastercopy	Mon Oct 17 23:09:04 1994
--- conf/subst.all	Mon Oct 17 23:03:31 1994
***************
*** 6,11 ****
--- 6,12 ----
  batch/batchsplitter
  batch/bpfind
  batch/sendbatches
+ batch/usenntpxmit
  batch/viainews
  conf/config
  conf/config.r
***************
*** 97,100 ****
  util/staleness
  util/touchlock
  util/unlock
- batch/usenntpxmit
--- 98,100 ----

*** conf/makefile.mastercopy	Tue Oct 18 12:44:56 1994
--- conf/makefile	Tue Oct 18 12:26:26 1994
***************
*** 1,18 ****
  # =()<@<INCLUDE>@>()=
  .include "../include/config.make"
  
- LIBDIRS=include libc libcnews libdbz libfake libbig
- PDIRS=batch expire explode inject input maint \
- 	nov readnews relay util
- CMPDIRS=batch conf expire input man misc relay rna explode inject
- RDIRS=util batch expire input nov relay explode inject maint libdbz
- SHS=doit.root doit.bin doit.news again.root
- 
  A=$(NEWSARTS)
  C=$(NEWSCTL)
  NDIRS=$(A) $(A)/in.coming $(A)/in.coming/bad $(A)/out.master $(C) $(C)/bin
  
! EGS=active.eg active.times.eg mailname.eg mailpaths.eg organization\
  	sys.eg whoami.eg
  ALL=$(EGS) report.ctl crontab $(SERVER)
  
--- 1,11 ----
  # =()<@<INCLUDE>@>()=
  .include "../include/config.make"
  
  A=$(NEWSARTS)
  C=$(NEWSCTL)
  NDIRS=$(A) $(A)/in.coming $(A)/in.coming/bad $(A)/out.master $(C) $(C)/bin
  
! EGS=active.eg active.times mailname.eg mailpaths.eg organization\
  	sys.eg whoami.eg
  ALL=$(EGS) report.ctl crontab $(SERVER)
  
***************
*** 21,30 ****
  
  install:	$(ALL)
  
  setup:	$(ALL)
  	$(MKDIR) $(NEWSCTL)/bin
  	$(TO) -n $(NEWSCTL) report.ctl $(SERVER)
! 	$(TO) $(NEWSCTL)/bin config
  	$(TO) -e -n $(NEWSCTL) $(EGS)
  	touch $(NEWSCTL)/history
  	if test ! -s $(NEWSCTL)/history.dir ;\
--- 14,25 ----
  
  install:	$(ALL)
  
+ LASTGROUP=`egrep -v = $(NEWSCTL)/active | tr . / | sed -n '$$s/ .*//p'`
+ 
  setup:	$(ALL)
  	$(MKDIR) $(NEWSCTL)/bin
  	$(TO) -n $(NEWSCTL) report.ctl $(SERVER)
! 	$(TO) `echo $(NEWSCONFIG) | sed 's;/[^/]*$$;;'` config
  	$(TO) -e -n $(NEWSCTL) $(EGS)
  	touch $(NEWSCTL)/history
  	if test ! -s $(NEWSCTL)/history.dir ;\
***************
*** 31,38 ****
  	then \
  		$(NEWSBIN)/dbz $(NEWSCTL)/history ;\
  	fi
! 	if test `wc -l <$(NEWSCTL)/active` -eq `wc -l <active.eg` ;\
  	then \
  		$(NEWSBIN)/maint/adddirs ;\
  	fi
  
--- 26,35 ----
  	then \
  		$(NEWSBIN)/dbz $(NEWSCTL)/history ;\
  	fi
! 	if test -d $(NEWSARTS)/$(LASTGROUP) -a -d $(NEWSOV)/$(LASTGROUP) ;\
  	then \
+ 		: no adddirs needed ;\
+ 	else \
  		$(NEWSBIN)/maint/adddirs ;\
  	fi
  
***************
*** 42,48 ****
  cmp:	$(ALL)
  	@$(CF) $(UID) $(GID) '^drwx' $(NDIRS)
  	@$(IN) -i $(NEWSCTL) report.ctl
! 	@$(IN) $(NEWSCTL)/bin config
  	test " `cat $(NEWSCTL)/whoami`" != " nosuchsite" ;
  	test " `cat $(NEWSCTL)/mailname`" != " no.such.domain" ;
  	test -r $(NEWSCTL)/history ;
--- 39,45 ----
  cmp:	$(ALL)
  	@$(CF) $(UID) $(GID) '^drwx' $(NDIRS)
  	@$(IN) -i $(NEWSCTL) report.ctl
! 	@$(IN) `echo $(NEWSCONFIG) | sed 's;/[^/]*$$;;'` config
  	test " `cat $(NEWSCTL)/whoami`" != " nosuchsite" ;
  	test " `cat $(NEWSCTL)/mailname`" != " no.such.domain" ;
  	test -r $(NEWSCTL)/history ;
***************
*** 49,60 ****
  	test -s $(NEWSCTL)/history.dir ;
  	test -r $(NEWSCTL)/history.pag ;
  	@$(IN) $(NEWSCTL) versionname
  
  mx:
  	$(MX) checkfile cmpto config.r cpto inall libcheck libcmp maker
  	$(MX) mkdirs subst update.*
  
! active.times.eg:	active.eg
  	sed 's/ .*/ 0 unknown/' active.eg >$@
  
  crontab:	cron.proto
--- 46,58 ----
  	test -s $(NEWSCTL)/history.dir ;
  	test -r $(NEWSCTL)/history.pag ;
  	@$(IN) $(NEWSCTL) versionname
+ 	test -d $(NEWSARTS)/$(LASTGROUP) -a -d $(NEWSOV)/$(LASTGROUP) ;
  
  mx:
  	$(MX) checkfile cmpto config.r cpto inall libcheck libcmp maker
  	$(MX) mkdirs subst update.*
  
! active.times:	active.eg
  	sed 's/ .*/ 0 unknown/' active.eg >$@
  
  crontab:	cron.proto
***************
*** 73,76 ****
  r rclean:	$(ALL)
  
  clean:
! 	rm -f active.times.eg crontab server report.ctl
--- 71,74 ----
  r rclean:	$(ALL)
  
  clean:
! 	rm -f active.times crontab server report.ctl

*** conf/versionname.mastercopy	Mon Oct 17 23:09:05 1994
--- conf/versionname	Mon Oct 17 22:42:55 1994
***************
*** 1 ****
! Cleanup Release
--- 1 ----
! Cleanup Release, with patch CR.A

*** conf/useanswers.mastercopy	Mon Oct 17 23:09:06 1994
--- conf/useanswers	Mon Oct  3 13:42:55 1994
***************
*** 27,33 ****
  	echo "# how to include ../include/config.make"
  	case "$include" in
  	svr4)	echo 'INCLUDE		include ../include/config.make' ;;
! 	bsd)	echo 'INCLUDE		.include "../include/config.make"' ;;
  	*)	echo 'Internal error, aborting...' >&2
  		exit 1
  		;;
--- 27,33 ----
  	echo "# how to include ../include/config.make"
  	case "$include" in
  	svr4)	echo 'INCLUDE		include ../include/config.make' ;;
! 	bsd|noway)	echo 'INCLUDE		.include "../include/config.make"' ;;
  	*)	echo 'Internal error, aborting...' >&2
  		exit 1
  		;;
***************
*** 44,50 ****
  		exit 1
  	fi
  	cp $tf $uamakeinc || exit 1
- 	echo done
  fi
  
  test " $uaverbose" = " yes" && echo "building $uasubsts..."
--- 44,49 ----
***************
*** 69,75 ****
  		exit 1
  	fi
  	cp $tf $uasubsts || exit 1
- 	echo done
  fi
  
  test " $uaverbose" = " yes" && echo "building $uacm..."
--- 68,73 ----
***************
*** 84,89 ****
--- 82,89 ----
  	echo "NEWSBIN=$newsbin"
  	echo "# =()<NEWSCTL=@<NEWSCTL>@>()="
  	echo "NEWSCTL=$newsctl"
+ 	echo "# =()<NEWSCONFIG=@<NEWSCONFIG>@>()="
+ 	echo "NEWSCONFIG=$newsconfig"
  	echo
  	echo "# workaround for System V make bug"
  	echo "SHELL=/bin/sh"
***************
*** 109,115 ****
  	echo
  	echo "# directories etc."
  	echo "CONF=../conf"
! 	echo "MAKE=$make"
  	echo "TO=\$(CONF)/cpto"
  	echo "IN=\$(CONF)/cmpto \$(CMPOPT)"
  	echo "CF=\$(CONF)/checkfile \$(CMPOPT)"
--- 109,122 ----
  	echo
  	echo "# directories etc."
  	echo "CONF=../conf"
! 	case "$include" in
! 	noway)	echo "MAKE=../conf/maker"	;;
! 	*)	echo "MAKE=$make"		;;
! 	esac
! 	case "$cc" in
! 	''|cc)	;;
! 	*)	echo "CC=$cc"	;;
! 	esac
  	echo "TO=\$(CONF)/cpto"
  	echo "IN=\$(CONF)/cmpto \$(CMPOPT)"
  	echo "CF=\$(CONF)/checkfile \$(CMPOPT)"
***************
*** 172,178 ****
  		exit 1
  	fi
  	cp $tf $uacm || exit 1
- 	echo done
  fi
  
  rm -f $tf
--- 179,184 ----

*** ctl/delsendsys.mastercopy	Mon Oct 17 23:09:07 1994
--- ctl/delsendsys	Tue Oct  4 14:46:52 1994
***************
*** 4,10 ****
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  replyto="`newsreply`"
--- 4,10 ----
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  replyto="`newsreply`"

*** ctl/sendsys.mastercopy	Mon Oct 17 23:09:07 1994
--- ctl/sendsys	Tue Oct  4 14:47:11 1994
***************
*** 4,10 ****
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  export NEWSCTL NEWSBIN NEWSARTS
! PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  canonhdr >/tmp/ctl$$
--- 4,10 ----
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  export NEWSCTL NEWSBIN NEWSARTS
! PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  canonhdr >/tmp/ctl$$

*** ctl/delversion.mastercopy	Mon Oct 17 23:09:08 1994
--- ctl/delversion	Tue Oct  4 14:47:01 1994
***************
*** 4,10 ****
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  replyto="`newsreply`"
--- 4,10 ----
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  replyto="`newsreply`"

*** ctl/version.mastercopy	Mon Oct 17 23:09:08 1994
--- ctl/version	Tue Oct  4 14:47:22 1994
***************
*** 4,10 ****
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  canonhdr >/tmp/ctl$$
--- 4,10 ----
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  canonhdr >/tmp/ctl$$

*** ctl/dodelayed.mastercopy	Mon Oct 17 23:09:08 1994
--- ctl/dodelayed	Tue Oct  4 14:44:51 1994
***************
*** 3,9 ****
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN/ctl:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  lock LOCK $$ || exit 1
--- 3,9 ----
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  umask $NEWSUMASK
  
  lock LOCK $$ || exit 1
***************
*** 44,50 ****
  	for f in `cat /tmp/delaydo$$`
  	do
  		canonhdr $f | 
! 			sed -n 's;^Control:[	 ]*;'$NEWSBIN/ctlaux/del';p' |
  			egrep -v '/^(cancel|ihave|sendme) ' >/tmp/ctl$$
  		# It might seem as if we need to duplicate relaynews's
  		# security checks -- for .. or metacharacters -- but a
--- 44,50 ----
  	for f in `cat /tmp/delaydo$$`
  	do
  		canonhdr $f | 
! 			sed -n 's;^Control:[	 ]*;'$NEWSBIN/relay/del';p' |
  			egrep -v '/^(cancel|ihave|sendme) ' >/tmp/ctl$$
  		# It might seem as if we need to duplicate relaynews's
  		# security checks -- for .. or metacharacters -- but a

*** ctl/makefile.mastercopy	Mon Oct 17 23:09:09 1994
--- ctl/makefile	Mon Oct 17 21:45:13 1994
***************
*** 67,74 ****
  	echo "comp.lang.beta 0000000000 00001 y" >>active.good
  	cp active.times at.good
  	echo "comp.lang.beta 0 [email-masked] (David C Lawrence)" >>at.good
! 	cp newsgroups newsgroups.good
! 	egrep '^comp.lang.beta	' reg/n.1 >>newsgroups.good
  	$(HERE) ./newgroup comp.lang.beta <reg/n.1 >out.tmp 2>err.tmp
  	test ! -s out.tmp ;
  	test ! -s err.tmp ;
--- 67,74 ----
  	echo "comp.lang.beta 0000000000 00001 y" >>active.good
  	cp active.times at.good
  	echo "comp.lang.beta 0 [email-masked] (David C Lawrence)" >>at.good
! 	cp newsgroups newsgroups.ok
! 	egrep '^comp.lang.beta	' reg/n.1 >>newsgroups.ok
  	$(HERE) ./newgroup comp.lang.beta <reg/n.1 >out.tmp 2>err.tmp
  	test ! -s out.tmp ;
  	test ! -s err.tmp ;
***************
*** 75,81 ****
  	cmp active.good active || diff active.good active
  	sed 's/ [0-9][0-9]* / 0 /' active.times >at.tmp
  	cmp at.good at.tmp || diff at.good at.tmp
! 	cmp newsgroups.good newsgroups || diff newsgroups.good newsgroups
  	cmp reg/n.1r reports || diff reg/n.1r reports
  	test -d arts/comp/lang/beta ;
  	test -r arts/comp/lang/beta/.overview ;
--- 75,81 ----
  	cmp active.good active || diff active.good active
  	sed 's/ [0-9][0-9]* / 0 /' active.times >at.tmp
  	cmp at.good at.tmp || diff at.good at.tmp
! 	cmp newsgroups.ok newsgroups || diff newsgroups.ok newsgroups
  	cmp reg/n.1r reports || diff reg/n.1r reports
  	test -d arts/comp/lang/beta ;
  	test -r arts/comp/lang/beta/.overview ;
***************
*** 83,95 ****
  	: rmgroup
  	egrep -v soundcard active >active.good
  	egrep -v soundcard active.times >at.good
! 	egrep -v soundcard newsgroups >newsgroups.good
  	$(HERE) ./rmgroup comp.sys.ibm.pc.soundcard <reg/r.1 >out.tmp 2>err.tmp
  	test ! -s out.tmp ;
  	test ! -s err.tmp ;
  	cmp active.good active || diff active.good active
  	cmp at.good active.times || diff at.good active.times
! 	cmp newsgroups.good newsgroups || diff newsgroups.good newsgroups
  	cmp reg/r.1r reports || diff reg/r.1r reports
  	test " `cat dirs.tbd`" = " comp/sys/ibm/pc/soundcard" ;
  	: success
--- 83,95 ----
  	: rmgroup
  	egrep -v soundcard active >active.good
  	egrep -v soundcard active.times >at.good
! 	egrep -v soundcard newsgroups >newsgroups.ok
  	$(HERE) ./rmgroup comp.sys.ibm.pc.soundcard <reg/r.1 >out.tmp 2>err.tmp
  	test ! -s out.tmp ;
  	test ! -s err.tmp ;
  	cmp active.good active || diff active.good active
  	cmp at.good active.times || diff at.good active.times
! 	cmp newsgroups.ok newsgroups || diff newsgroups.ok newsgroups
  	cmp reg/r.1r reports || diff reg/r.1r reports
  	test " `cat dirs.tbd`" = " comp/sys/ibm/pc/soundcard" ;
  	: success
***************
*** 96,102 ****
  
  rclean:
  	rm -f controlperm active active.times newsgroups dirs.tbd reports
! 	rm -f *.good *.tmp namecheck.awk canonsys.awk whoami sys
  	rm -rf bin arts
  
  clean:	rclean
--- 96,102 ----
  
  rclean:
  	rm -f controlperm active active.times newsgroups dirs.tbd reports
! 	rm -f *.good *.tmp namecheck.awk canonsys.awk whoami sys newsgroups.ok
  	rm -rf bin arts
  
  clean:	rclean

*** ctl/controlperm.eg.mastercopy	Mon Oct 17 23:09:09 1994
--- ctl/controlperm.eg	Tue Oct 11 15:04:59 1994
***************
*** 5,10 ****
--- 5,15 ----
  # and nobody else gets any attention in these hierarchies
  comp,sci,misc,rec,soc,talk	any			nr	nq
  
+ # same for Jim McIntosh in bit
+ bit				[email-masked]	n	y
+ bit				[email-masked]	r	n
+ bit				any			nr	nq
+ 
  # it's really tempting to change this one to nq...
  alt				any			nr	nv

*** doc/problems.mastercopy	Mon Oct 17 23:09:10 1994
--- doc/problems	Sun Oct  2 00:59:31 1994
***************
*** 1092,1094 ****
--- 1092,1104 ----
  but it's meant only for cross-development work.
  The correct answer to ``does your system have \fIranlib\fR?'' is \fIno\fR
  on such systems.
+ .SH
+ GNU join
+ .Ix join
+ .Ix "GNU join"
+ .PP
+ GNU \fIjoin\fR, from shellutils 1.9, has
+ the \fB\-a\fR option badly botched.
+ This breaks \fIupact\fR; the \fIupact\fR regression test catches this.
+ Steve Robbins found this and posted a fix;
+ it's too long to reproduce here.

*** expire/upact.mastercopy	Mon Oct 17 23:09:11 1994
--- expire/upact	Sun Oct  9 21:55:03 1994
***************
*** 28,34 ****
  
  cd $NEWSCTL
  
! # check active file format
  nf=`sed 1q active | awk '{print NF}'`
  if test $nf -ne 4
  then
--- 28,34 ----
  
  cd $NEWSCTL
  
! # check out the active file
  nf=`sed 1q active | awk '{print NF}'`
  if test $nf -ne 4
  then
***************
*** 35,40 ****
--- 35,45 ----
  	echo "$0: active file has other than 4 fields" >&2
  	exit 1
  fi
+ if test " `awk '{print $1}' active | sort | uniq -d`" != " "
+ then
+ 	echo "$0: duplicate entries in active file, unable to run" >&2
+ 	exit 1
+ fi
  
  # Bernd Felsche of MetaPro Systems came up with this general approach,
  # which minimizes the number of processes spawned, although this code is
***************
*** 69,75 ****
  	}' | ( cd $NEWSARTS ; sh 2>$lserr ) |
  	awk -F' ' 'BEGIN {
  		OFMT = "%.12g"
! 		big = 999999999999
  		lowest = big
  		small = 0
  		highest = small
--- 74,80 ----
  	}' | ( cd $NEWSARTS ; sh 2>$lserr ) |
  	awk -F' ' 'BEGIN {
  		OFMT = "%.12g"
! 		big = 99999999999
  		lowest = big
  		small = 0
  		highest = small

*** expire/explist.eg.mastercopy	Mon Oct 17 23:09:11 1994
--- expire/explist.eg	Fri Sep 30 01:41:01 1994
***************
*** 6,11 ****
--- 6,16 ----
  /expired/			x	14	-
  /bounds/			x	0-1-90	-
  
+ # keep local groups a while, with some exceptions
+ sirius.trivia			x	7	-
+ sirius.announce			x	never	-
+ sirius				x	30	-
+ 
  # override later defaults for some groups of note
  sci.space.shuttle,rec.birds	x	7	-
  
***************
*** 14,23 ****
  
  # real noise gets thrown away fast
  news.groups			x	2	-
! junk,tor.news.stats		x	2	-
  
  # throw away some technical stuff that's particularly boring
! comp.os.vms,comp.mail.maps	x	4	-
  
  # This moderator is abusing expiry dates, putting them on everything instead
  # of just things of lasting value.  So override him -- his stuff expires in
--- 19,28 ----
  
  # real noise gets thrown away fast
  news.groups			x	2	-
! junk,tor.news.stats		x	1.5	-
  
  # throw away some technical stuff that's particularly boring
! comp.os.vms			x	4	-
  
  # This moderator is abusing expiry dates, putting them on everything instead
  # of just things of lasting value.  So override him -- his stuff expires in

*** expire/doexpire.mastercopy	Mon Oct 17 23:09:12 1994
--- expire/doexpire	Mon Oct 17 20:28:55 1994
***************
*** 9,14 ****
--- 9,15 ----
  
  dor='?'
  opts=
+ aux=yes
  histdir=$NEWSCTL
  for dummy
  do
***************
*** 15,20 ****
--- 16,22 ----
  	case "$1" in
  	-r)	dor=yes ; opts="$opts -r"	;;
  	-f)	dor=no				;;
+ 	-e)	aux=no				;;
  	--)					;;
  	-a)	opts="$opts $1 $2" ; shift	;;
  	-H)	opts="$opts $1 $2"
***************
*** 22,31 ****
  		shift
  		;;
  	-*)	opts="$opts $1"			;;
! 	*)	echo "$0: unknown argument \`$1'" >&2 ; exit 2	;;
  	esac
  	shift
  done
  
  lock -o LOCKexpire $$ || {
  	echo "$0: doexpire apparently already running, won't start another" |
--- 24,37 ----
  		shift
  		;;
  	-*)	opts="$opts $1"			;;
! 	*)	break				;;
  	esac
  	shift
  done
+ case $# in
+ 0)	;;
+ *)	echo "$0: unknown arguments \`$*'" >&2 ; exit 2	;;
+ esac
  
  lock -o LOCKexpire $$ || {
  	echo "$0: doexpire apparently already running, won't start another" |
***************
*** 78,89 ****
  	fi
  	;;
  esac
  
  expire $opts $NEWSCTL/explist 2>/tmp/doex$$
  
  # don't run auxiliaries if this is a panic expire
! case "$dor" in
! yes)	;;
  *)	upact 2>>/tmp/doex$$
  	expov 2>>/tmp/doex$$
  	;;
--- 84,98 ----
  	fi
  	;;
  esac
+ case "$dor" in
+ yes)	aux=no	;;
+ esac
  
  expire $opts $NEWSCTL/explist 2>/tmp/doex$$
  
  # don't run auxiliaries if this is a panic expire
! case "$aux" in
! no)	;;
  *)	upact 2>>/tmp/doex$$
  	expov 2>>/tmp/doex$$
  	;;

*** include/sys/timeb.fake.mastercopy	Mon Oct 17 23:09:12 1994
--- include/sys/timeb.fake	Fri Sep 30 13:39:08 1994
***************
*** 4,7 ****
--- 4,10 ----
  	short timezone;
  	short dstflag;
  };
+ #ifdef ftime
+ #undef ftime
+ #endif
  #define	ftime(x)	fakeftime(x)

*** include/libc.h.mastercopy	Mon Oct 17 23:09:13 1994
--- include/libc.h	Sat Oct  1 00:27:10 1994
***************
*** 2,45 ****
  #define LIBC_H
  /*
   * declarations of (supposedly) standard C library functions and types.
-  * we don't declare functions that once returned int but may now return void
-  * to avoid fatal but spurious compilation errors.  VOID is an attempt to deal
-  * with this transition.
-  *
-  * The function declarations need to be prototyped to give ansi compilers
-  * less gastric distress.
   */
  
- #ifndef VOID
- #define VOID void
- #endif
- 
- /* Unix system calls */
- #ifdef __STDC__
- extern int execv(char *, char **), execl(char *, char *, ...);
- extern int execve(char *, char **, char **), execle(char *, char *, ...);
- #endif
  extern time_t time();			/* sys/timeb.h? time.h sez POSIX */
  
- extern char **environ;
- 
- #ifdef A_STABLE_WORLD
- extern VOID rewind();			/* stdio.h */
- extern VOID exit();			/* stdio.h */
- #endif					/* A_STABLE_WORLD */
  extern FILE *popen();			/* stdio.h */
- /* stdio.h is supposed to declare *printf */
  
  /* these unfortunately cannot be relied upon to be in the right header */
  extern struct passwd *getpwnam();	/* pwd.h */
- extern struct group *getgrnam();	/* grp.h */
  extern char *ctime();			/* time.h */
  
! extern long atol();
! extern char *mktemp(), *getenv();
  
  extern int optind;
  extern char *optarg;
  
! #include "alloc.h"			/* ugh */
  #endif					/* LIBC_H */
--- 2,22 ----
  #define LIBC_H
  /*
   * declarations of (supposedly) standard C library functions and types.
   */
  
  extern time_t time();			/* sys/timeb.h? time.h sez POSIX */
  
  extern FILE *popen();			/* stdio.h */
  
  /* these unfortunately cannot be relied upon to be in the right header */
  extern struct passwd *getpwnam();	/* pwd.h */
  extern char *ctime();			/* time.h */
  
! extern char *mktemp();
  
  extern int optind;
  extern char *optarg;
  
! #include "alloc.h"
! #include <stdlib.h>
  #endif					/* LIBC_H */

*** input/newsrun.mastercopy	Mon Oct 17 23:09:13 1994
--- input/newsrun	Tue Oct  4 16:22:26 1994
***************
*** 122,132 ****
  		fi
  
  		# Decompress if necessary.
- 		text=${f}.t
  		case $f in
! 		*.Z)	uncompress <$f >$text	;;
  		*.t)	text=$f ; : okay	;;
! 		*)	uncompress <$f >$text 2>/dev/null ||
  				{ rm -f $text ; text=$f ; : okay ; }	;;
  		esac || ln $f bad/$f
  		if test " $f" != " $text"
--- 122,134 ----
  		fi
  
  		# Decompress if necessary.
  		case $f in
! 		*.Z)	text=`echo $f | sed 's/Z\$/t/'`
! 			uncompress <$f >$text
! 			;;
  		*.t)	text=$f ; : okay	;;
! 		*)	text=${f}.t
! 			uncompress <$f >$text 2>/dev/null ||
  				{ rm -f $text ; text=$f ; : okay ; }	;;
  		esac || ln $f bad/$f
  		if test " $f" != " $text"

*** input/makefile.mastercopy	Mon Oct 17 23:09:14 1994
--- input/makefile	Mon Oct 10 23:37:21 1994
***************
*** 119,125 ****
  	mkdir decompressors
  	echo 'sed 1d $$*' >decompressors/dejunk
  	$(MX) bin/* decompressors/*
! 	mkdir arts arts/in.coming		# but not bad, yet
  
  AIN=arts/in.coming
  
--- 119,125 ----
  	mkdir decompressors
  	echo 'sed 1d $$*' >decompressors/dejunk
  	$(MX) bin/* decompressors/*
! 	mkdir arts arts/in.coming ;		# but not bad, yet
  
  AIN=arts/in.coming
  
***************
*** 127,133 ****
  	$(HERE) ./rnews <test.1
  	cmp $(AIN)/* test.1
  	expr $(AIN)/* : '.*\.t' >junk
! 	sleep 2			# must delay for sake of "ls -t"!
  	$(HERE) ./rnews <test.2
  	$(HERE) ./rnews <test.n1
  	$(HERE) ./rnews <test.n2
--- 127,133 ----
  	$(HERE) ./rnews <test.1
  	cmp $(AIN)/* test.1
  	expr $(AIN)/* : '.*\.t' >junk
! 	sleep 2 ;		# must delay for sake of "ls -t"!
  	$(HERE) ./rnews <test.2
  	$(HERE) ./rnews <test.n1
  	$(HERE) ./rnews <test.n2

*** libcnews/fakeftime.c.mastercopy	Mon Oct 17 23:09:14 1994
--- libcnews/fakeftime.c	Fri Sep 30 13:38:42 1994
***************
*** 3,11 ****
   */
  
  #include <sys/types.h>
- #include <sys/timeb.h>
  #include <sys/time.h>
  #include <time.h>
  #include <stdlib.h>
  
  #define	DUNNO	1000000L	/* impossible seconds timezone offset */
--- 3,11 ----
   */
  
  #include <sys/types.h>
  #include <sys/time.h>
  #include <time.h>
+ #include <sys/timeb.h>
  #include <stdlib.h>
  
  #define	DUNNO	1000000L	/* impossible seconds timezone offset */

*** libdbz/dbzmain.c.mastercopy	Mon Oct 17 23:09:15 1994
--- libdbz/dbzmain.c	Fri Sep 30 13:15:21 1994
***************
*** 316,322 ****
  FILE *in;
  char *name;
  {
! 	register off_t place;
  
  	inname = name;
  	lineno = 0;
--- 316,322 ----
  FILE *in;
  char *name;
  {
! 	register long place;
  
  	inname = name;
  	lineno = 0;
***************
*** 342,353 ****
  void
  doline(lp, inoffset)
  char *lp;
! off_t inoffset;
  {
  	register char *p;
  	register char pc;
  	datum key, value;
! 	off_t place = inoffset;
  	register int shouldfind;
  	register int llen;
  	char keytext[DBZMAXKEY+1];
--- 342,353 ----
  void
  doline(lp, inoffset)
  char *lp;
! long inoffset;
  {
  	register char *p;
  	register char pc;
  	datum key, value;
! 	long place = inoffset;
  	register int shouldfind;
  	register int llen;
  	char keytext[DBZMAXKEY+1];
***************
*** 384,390 ****
  				fail("`%s' already present", lp);
  		}
  		value.dptr = (char *)&place;
! 		value.dsize = (int)sizeof(off_t);
  		if (((dbzint) ? dbzstore(key, value) : store(key, value)) < 0)
  			fail("store failed on `%s'", lp);
  		break;
--- 384,390 ----
  				fail("`%s' already present", lp);
  		}
  		value.dptr = (char *)&place;
! 		value.dsize = (int)sizeof(place);
  		if (((dbzint) ? dbzstore(key, value) : store(key, value)) < 0)
  			fail("store failed on `%s'", lp);
  		break;
***************
*** 394,403 ****
  		if (!shouldfind && (value.dptr != NULL || value.dsize != 0))
  			fail("`%s' found, shouldn't be", lp);
  		if (shouldfind && (value.dptr == NULL ||
! 					value.dsize != sizeof(off_t)))
  			fail("can't find `%s'", lp);
  		if (shouldfind && !quick) {
! 			(void) memcpy((char *)&place, value.dptr, sizeof(off_t));
  			if (place != inoffset)
  				fail("offset mismatch on `%s'", lp);
  			if (fseek(base, place, SEEK_SET) != 0)
--- 394,403 ----
  		if (!shouldfind && (value.dptr != NULL || value.dsize != 0))
  			fail("`%s' found, shouldn't be", lp);
  		if (shouldfind && (value.dptr == NULL ||
! 					value.dsize != sizeof(place)))
  			fail("can't find `%s'", lp);
  		if (shouldfind && !quick) {
! 			(void) memcpy((char *)&place, value.dptr, sizeof(place));
  			if (place != inoffset)
  				fail("offset mismatch on `%s'", lp);
  			if (fseek(base, place, SEEK_SET) != 0)
***************
*** 411,417 ****
  	case 'x':
  		value = (dbzint) ? dbzfetch(key) : fetch(key);
  		if (value.dptr != NULL && !quick) {
! 			(void) memcpy((char *)&place, value.dptr, sizeof(off_t));
  			if (fseek(base, place, SEEK_SET) != 0)
  				fail("fseek failed on `%s'", lp);
  			if (fgets(cmp, buflen, base) == NULL)
--- 411,417 ----
  	case 'x':
  		value = (dbzint) ? dbzfetch(key) : fetch(key);
  		if (value.dptr != NULL && !quick) {
! 			(void) memcpy((char *)&place, value.dptr, sizeof(place));
  			if (fseek(base, place, SEEK_SET) != 0)
  				fail("fseek failed on `%s'", lp);
  			if (fgets(cmp, buflen, base) == NULL)
***************
*** 441,447 ****
  char *file;
  {
  	register FILE *fd;
! 	off_t it;
  	register long run;
  
  	fd = fopen(file, "r");
--- 441,447 ----
  char *file;
  {
  	register FILE *fd;
! 	long it;
  	register long run;
  
  	fd = fopen(file, "r");
***************
*** 448,454 ****
  	if (fd == NULL)
  		fail("cannot reopen `%s'", file);
  	run = 0;
! 	while (fread((char *)&it, sizeof(off_t), 1, fd) == 1) {
  		if (it != 0)
  			run++;
  		else if (run > 0) {
--- 448,454 ----
  	if (fd == NULL)
  		fail("cannot reopen `%s'", file);
  	run = 0;
! 	while (fread((char *)&it, sizeof(it), 1, fd) == 1) {
  		if (it != 0)
  			run++;
  		else if (run > 0) {
***************
*** 468,474 ****
  char *pn;
  {
  	register FILE *pf;
! 	off_t it;
  	char nl;
  	register FILE *hf;
  
--- 468,474 ----
  char *pn;
  {
  	register FILE *pf;
! 	long it;
  	char nl;
  	register FILE *hf;
  
***************
*** 478,485 ****
  	pf = fopen(pn, "r");
  	if (pf == NULL)
  		fail("cannot reopen `%s'", pn);
! 	while (fread((char *)&it, sizeof(off_t), 1, pf) == 1) {
! 		it = (it & ((off_t)0x80000000)) ? (it&~((off_t)0xff000000)) : it;
  		if (it != 0 && it != 1) {	/* 0 empty, 1 known okay */
  			it--;		/* get rid of bias */
  			(void) fseek(hf, it-1, SEEK_SET);
--- 478,485 ----
  	pf = fopen(pn, "r");
  	if (pf == NULL)
  		fail("cannot reopen `%s'", pn);
! 	while (fread((char *)&it, sizeof(it), 1, pf) == 1) {
! 		it = (it & 0x80000000) ? (it&~0xf8000000) : it;
  		if (it != 0 && it != 1) {	/* 0 empty, 1 known okay */
  			it--;		/* get rid of bias */
  			(void) fseek(hf, it-1, SEEK_SET);

*** maint/makefile.mastercopy	Mon Oct 17 23:09:16 1994
--- maint/makefile	Mon Oct 10 23:37:54 1994
***************
*** 54,83 ****
  	mkdir arts arts/foo arts/bar arts/bar/ugh arts/urp
  	mkdir arts/bletch arts/lost+found
  	echo nevermore >arts/lost+found/1
! 	echo '<okay1>	9999~-	foo/1' >history.good
  	echo 'MeSsAge-ID: <okay1>' >arts/foo/1
! 	echo '<okay2>	9999~-	bar.ugh/7' >>history.good
  	echo 'Message-ID: <okay2>' >arts/bar/ugh/7
! 	echo '<cross2>	9999~-	bar.ugh/8 foo/2' >>history.good
  	echo 'Message-ID: <cross2>' >arts/foo/2
  	ln arts/foo/2 arts/bar/ugh/8
! 	echo '<cross4>	9999~-	bar.ugh/9 bar/13 foo/3 urp/2' >>history.good
  	echo 'Message-ID: <cross4>' >arts/foo/3
  	ln arts/foo/3 arts/bar/ugh/9
  	ln arts/foo/3 arts/bar/13
  	ln arts/foo/3 arts/urp/2
! 	echo '<link2>	9999~tomorrow	bar.ugh/10 foo/4' >>history.good
  	echo 'Message-ID: <link2>' >arts/foo/4
  	echo 'Expires: tomorrow' >>arts/foo/4
  	ln arts/foo/4 arts/bar/ugh/10
! 	echo '<bar.ugh/11@trash>	0~0	bar.ugh/11' >>history.good
  	echo >arts/bar/ugh/11
! 	echo '<bar.ugh/12@trash>	0~0	bar.ugh/12' >>history.good
  	echo 'Expires: not~today' >arts/bar/ugh/12
  	echo 'Message-ID: <legal>' >>arts/bar/ugh/12
! 	echo '<bar.ugh/13@trash>	0~0	bar.ugh/13' >>history.good
  	echo 'Message-ID: illegal' >arts/bar/ugh/13
! 	sed $(FIXMIDFIELD) history.good | sort -o history.good
  
  r:	$(PROGS) rclean rsetup
  	: "mkhistory"
--- 54,83 ----
  	mkdir arts arts/foo arts/bar arts/bar/ugh arts/urp
  	mkdir arts/bletch arts/lost+found
  	echo nevermore >arts/lost+found/1
! 	echo '<okay1>	9999~-	foo/1' >history.gbase
  	echo 'MeSsAge-ID: <okay1>' >arts/foo/1
! 	echo '<okay2>	9999~-	bar.ugh/7' >>history.gbase
  	echo 'Message-ID: <okay2>' >arts/bar/ugh/7
! 	echo '<cross2>	9999~-	bar.ugh/8 foo/2' >>history.gbase
  	echo 'Message-ID: <cross2>' >arts/foo/2
  	ln arts/foo/2 arts/bar/ugh/8
! 	echo '<cross4>	9999~-	bar.ugh/9 bar/13 foo/3 urp/2' >>history.gbase
  	echo 'Message-ID: <cross4>' >arts/foo/3
  	ln arts/foo/3 arts/bar/ugh/9
  	ln arts/foo/3 arts/bar/13
  	ln arts/foo/3 arts/urp/2
! 	echo '<link2>	9999~tomorrow	bar.ugh/10 foo/4' >>history.gbase
  	echo 'Message-ID: <link2>' >arts/foo/4
  	echo 'Expires: tomorrow' >>arts/foo/4
  	ln arts/foo/4 arts/bar/ugh/10
! 	echo '<bar.ugh/11@trash>	0~0	bar.ugh/11' >>history.gbase
  	echo >arts/bar/ugh/11
! 	echo '<bar.ugh/12@trash>	0~0	bar.ugh/12' >>history.gbase
  	echo 'Expires: not~today' >arts/bar/ugh/12
  	echo 'Message-ID: <legal>' >>arts/bar/ugh/12
! 	echo '<bar.ugh/13@trash>	0~0	bar.ugh/13' >>history.gbase
  	echo 'Message-ID: illegal' >arts/bar/ugh/13
! 	sed $(FIXMIDFIELD) history.gbase | sort >history.good
  
  r:	$(PROGS) rclean rsetup
  	: "mkhistory"
***************
*** 91,100 ****
  	test -r history.pag ;
  	test -r history.dir ;
  	: "addmissing"
! 	echo '<missing>	9999~-	bar.ugh/14' >>history.good
  	echo 'Message-ID: <missing>' >arts/bar/ugh/14
! 	sed $(FIXMIDFIELD) history.good | sort -o history.good
! 	sleep 2		# ensure article looks older than addmissing startup
  	$(HERE) ./addmissing -v >addm.out 2>addm.diag
  	sed $(FIXMIDFIELD) history | sort >history.fixed
  	cmp history.good history.fixed || diff history.good history.fixed
--- 91,100 ----
  	test -r history.pag ;
  	test -r history.dir ;
  	: "addmissing"
! 	echo '<missing>	9999~-	bar.ugh/14' >>history.gbase
  	echo 'Message-ID: <missing>' >arts/bar/ugh/14
! 	sed $(FIXMIDFIELD) history.gbase | sort >history.good
! 	sleep 2 ;	# ensure article looks older than addmissing startup
  	$(HERE) ./addmissing -v >addm.out 2>addm.diag
  	sed $(FIXMIDFIELD) history | sort >history.fixed
  	cmp history.good history.fixed || diff history.good history.fixed
***************
*** 104,113 ****
  	cmp addm.good addm.fixed || diff addm.good addm.fixed
  	test ! -s addm.diag ;
  	: "cnewsdo, using addmissing as test command"
! 	echo '<missing2>	9999~-	bar.ugh/15' >>history.good
  	echo 'Message-ID: <missing2>' >arts/bar/ugh/15
! 	sed $(FIXMIDFIELD) history.good | sort -o history.good
! 	sleep 2		# ensure article looks older than addmissing startup
  	touch active
  	$(HERE) ./cnewsdo addmissing >addm.out 2>addm.diag
  	sed $(FIXMIDFIELD) history | sort >history.fixed
--- 104,113 ----
  	cmp addm.good addm.fixed || diff addm.good addm.fixed
  	test ! -s addm.diag ;
  	: "cnewsdo, using addmissing as test command"
! 	echo '<missing2>	9999~-	bar.ugh/15' >>history.gbase
  	echo 'Message-ID: <missing2>' >arts/bar/ugh/15
! 	sed $(FIXMIDFIELD) history.gbase | sort >history.good
! 	sleep 2 ;	# ensure article looks older than addmissing startup
  	touch active
  	$(HERE) ./cnewsdo addmissing >addm.out 2>addm.diag
  	sed $(FIXMIDFIELD) history | sort >history.fixed

*** maint/newsdaily.mastercopy	Mon Oct 17 23:09:16 1994
--- maint/newsdaily	Fri Sep 30 13:43:48 1994
***************
*** 16,22 ****
  cd $NEWSCTL
  
  # keep one generation of log -- it's big
! rm -f log.o
  mv log log.o
  touch log
  # log.o gets compressed below
--- 16,22 ----
  cd $NEWSCTL
  
  # keep one generation of log -- it's big
! rm -f log.o log.o.Z
  mv log log.o
  touch log
  # log.o gets compressed below

*** maint/addmissing.mastercopy	Mon Oct 17 23:09:17 1994
--- maint/addmissing	Wed Oct  5 13:55:30 1994
***************
*** 37,43 ****
  >/tmp/time$$
  
  # put together a list of known filenames from history
! egrep '	.*	' history | sed 's/.*	//' | tr '. ' '/
  ' | egrep '/' | sort -u $SORTTMP >/tmp/hist$$
  
  # release the main lock, temporarily
--- 37,43 ----
  >/tmp/time$$
  
  # put together a list of known filenames from history
! egrep '	.*	' $NEWSCTL/history | sed 's/.*	//' | tr '. ' '/
  ' | egrep '/' | sort -u $SORTTMP >/tmp/hist$$
  
  # release the main lock, temporarily

*** maint/locknews.mastercopy	Mon Oct 17 23:09:17 1994
--- maint/locknews	Tue Oct  4 18:23:39 1994
***************
*** 3,9 ****
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH	# don't export it
  umask $NEWSUMASK
  
  cd $NEWSCTL
--- 3,13 ----
  # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  . ${NEWSCONFIG-/etc/news/bin/config}
  
! oldpath="${PATH-$NEWSPATH}"
! newpath=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH
! PATH=$newpath
! export PATH
! 
  umask $NEWSUMASK
  
  cd $NEWSCTL
***************
*** 11,20 ****
  if lock -v LOCK $$ 10			# try frequently
  then
  	NEWSHELD="$NEWSHELD LOCK"
! 	PS1="newslocked$PS1"
  	export NEWSHELD PS1
  	echo 'news system locked by you'
  	${SHELL-/bin/sh}
  	unlock LOCK
  	echo 'news system unlocked now'
  	exit 0
--- 15,26 ----
  if lock -v LOCK $$ 10			# try frequently
  then
  	NEWSHELD="$NEWSHELD LOCK"
! 	PS1="newslocked${PS1-> }"
  	export NEWSHELD PS1
  	echo 'news system locked by you'
+ 	PATH="$oldpath"
  	${SHELL-/bin/sh}
+ 	PATH="$newpath"
  	unlock LOCK
  	echo 'news system unlocked now'
  	exit 0

*** makefile.mastercopy	Mon Oct 17 23:09:18 1994
--- makefile	Mon Oct 17 22:02:08 1994
***************
*** 16,22 ****
  # System V bug fix
  SHELL=/bin/sh
  
! build:	msub sub mx libcnews.a pgms
  	: everything built successfully
  
  lib:	libcnews.a
--- 16,22 ----
  # System V bug fix
  SHELL=/bin/sh
  
! all:	msub sub mx libcnews.a pgms
  	: everything built successfully
  
  lib:	libcnews.a
***************
*** 126,128 ****
--- 126,132 ----
  
  sterile:	spotless
  	rm -f conf/quiz.def
+ 
+ # this is strictly for development use
+ .DEFAULT:
+ 	$(MAKE) -f mfile $@

*** man/expire.8cn.mastercopy	Mon Oct 17 23:09:19 1994
--- man/expire.8cn	Mon Oct  3 13:08:56 1994
***************
*** 4,10 ****
  .ds b /usr/libexec/news
  .\" =()<.ds c @<NEWSCTL>@>()=
  .ds c /etc/news
! .TH EXPIRE 8CN "15 Sept 1994"
  .BY "C News"
  .SH NAME
  expire, doexpire, expireiflow \- expire old news
--- 4,10 ----
  .ds b /usr/libexec/news
  .\" =()<.ds c @<NEWSCTL>@>()=
  .ds c /etc/news
! .TH EXPIRE 8CN "3 Oct 1994"
  .BY "C News"
  .SH NAME
  expire, doexpire, expireiflow \- expire old news
***************
*** 51,56 ****
--- 51,58 ----
  [ expireoptions ]
  [
  .B \-f
+ ] [
+ .B \-e
  ]
  .br
  .B \*b/expire/expireiflow
***************
*** 281,286 ****
--- 283,298 ----
  and invokes \fIexpire\fR with the \fB\-r\fR option anyway.
  \fB\-f\fR suppresses this, forcing \fIexpire\fR to be run \fIwithout\fR
  \fB\-r\fR regardless of the space situation.
+ \fB\-e\fR suppresses running of
+ .I upact
+ and
+ .IR expov ,
+ restricting
+ .I doexpire
+ to running
+ .I expire
+ only.
+ \fB\-r\fR implies \fB\-e\fR.
  .PP
  .I Expireiflow
  checks whether there are at least \fIminimum\fR megabytes available for

*** man/newsbatch.8cn.mastercopy	Mon Oct 17 23:09:21 1994
--- man/newsbatch.8cn	Mon Oct  3 12:41:31 1994
***************
*** 4,10 ****
  .ds b /usr/libexec/news
  .\" =()<.ds c @<NEWSCTL>@>()=
  .ds c /etc/news
! .TH NEWSBATCH 8 "22 Sept 1994"
  .BY "C News"
  .SH NAME
  sendbatches, batchsplit \- news batching to other sites
--- 4,10 ----
  .ds b /usr/libexec/news
  .\" =()<.ds c @<NEWSCTL>@>()=
  .ds c /etc/news
! .TH NEWSBATCH 8 "3 Oct 1994"
  .BY "C News"
  .SH NAME
  sendbatches, batchsplit \- news batching to other sites
***************
*** 159,165 ****
  only for sites of the specified
  .IR class .
  A class is a single letter, by convention `u' for UUCP feeds
! and `n' for NNTP feeds.
  .PP
  The third field is the size of batches to be prepared (before compression),
  in bytes.
--- 159,166 ----
  only for sites of the specified
  .IR class .
  A class is a single letter, by convention `u' for UUCP feeds
! and `n' for NNTP feeds;
! user-defined classes should be uppercase letters.
  .PP
  The third field is the size of batches to be prepared (before compression),
  in bytes.

*** nov/mkov.c.mastercopy	Mon Oct 17 23:09:22 1994
--- nov/mkov.c	Mon Oct  3 13:48:28 1994
***************
*** 305,311 ****
  	putfld(hdrp->h_bytes);
  	putfld(hdrp->h_lines);
  	/* put Xref in only if there is more than one locator in it */
! 	p = strchr(hdrp->h_xref, ' ');	/* p -> space after relayer */
  	if (p != NULL)
  		p = strchr(p, ':');	/* p -> colon in first location */
  	if (p != NULL)
--- 305,314 ----
  	putfld(hdrp->h_bytes);
  	putfld(hdrp->h_lines);
  	/* put Xref in only if there is more than one locator in it */
! 	if (hdrp->h_xref != NULL)
! 		p = strchr(hdrp->h_xref, ' ');	/* p -> space after relayer */
! 	else
! 		p = NULL;
  	if (p != NULL)
  		p = strchr(p, ':');	/* p -> colon in first location */
  	if (p != NULL)

*** nov/expovguts.c.mastercopy	Mon Oct 17 23:09:22 1994
--- nov/expovguts.c	Thu Oct  6 18:10:03 1994
***************
*** 104,109 ****
--- 104,110 ----
  	register char *line;
  	register char *p;
  	register long fno;
+ 	register int nbad = 0;
  
  	while ((line = fgetline(f, (size_t *)NULL)) != NULL) {
  		fno = 0;
***************
*** 116,124 ****
  				map[fno - start] = 1;
  				if (debug)
  					printf("setting %ld\n", fno-start);
! 			}
! 			/* otherwise, well, simplest to just ignore it */
  		}
  	}
  }
  
--- 117,132 ----
  				map[fno - start] = 1;
  				if (debug)
  					printf("setting %ld\n", fno-start);
! 			} else if (fno < start)
! 				nbad++;
! 			/* fno >= stop presumably will be filed later */
  		}
+ 	}
+ 
+ 	if (nbad > 0) {
+ 		fprintf(stderr, "%s: in expiring `%s',\n", progname, inname);
+ 		fprintf(stderr, "\tfound %d files with numbers < min (%ld)\n",
+ 								nbad, start);
  	}
  }

*** nov/expov.mastercopy	Mon Oct 17 23:09:23 1994
--- nov/expov	Fri Oct 14 11:17:06 1994
***************
*** 30,36 ****
  		then
  			if test ! -d $o
  			then
! 				echo "$0: directory \`$o' does not exist" >&2
  				continue
  			fi
  			touch $o/.overview
--- 30,39 ----
  		then
  			if test ! -d $o
  			then
! 				case "$rest" in
! 				x*|=*)	;;	# not worth complaining
! 				*)	echo "$0: directory \`$o' does not exist" >&2 ;;
! 				esac
  				continue
  			fi
  			touch $o/.overview
***************
*** 52,54 ****
--- 55,59 ----
  			rm -f $o/.sov
  		fi
  	done
+ 
+ # and the trap handles cleanup

*** relay/hdrdefs.c.mastercopy	Mon Oct 17 23:09:23 1994
--- relay/hdrdefs.c	Sun Oct  9 23:15:18 1994
***************
*** 69,83 ****
  
  /* these are parsed into a struct headers */
  
! hdrlist reqdhdrs = {
! 	&msghdr,
! 	&ngshdr,
! 	&pathhdr,		/* modified by hdrmunge.c (emithdr()) */
! 	&subjhdr,
! 	&datehdr,
! 	&fromhdr,
! 	NULL
! };
  hdrlist opthdrs = {
  	&arthdr,		/* obsolete */
  	&apphdr,
--- 69,75 ----
  
  /* these are parsed into a struct headers */
  
! /* putting opthdrs first makes some broken compilers happier */
  hdrlist opthdrs = {
  	&arthdr,		/* obsolete */
  	&apphdr,
***************
*** 87,92 ****
--- 79,93 ----
  	&exphdr,
  	&sendhdr,
  	&xrefhdr,		/* for -b only */
+ 	NULL
+ };
+ hdrlist reqdhdrs = {
+ 	&msghdr,
+ 	&ngshdr,
+ 	&pathhdr,		/* modified by hdrmunge.c (emithdr()) */
+ 	&subjhdr,
+ 	&datehdr,
+ 	&fromhdr,
  	NULL
  };

*** util/ctime.c.mastercopy	Mon Oct 17 23:09:24 1994
--- util/ctime.c	Sat Oct  1 00:23:30 1994
***************
*** 6,15 ****
  #include <ctype.h>
  #include <time.h>
  #include <sys/types.h>
  
  /* imports */
! extern long atol();
! extern char *malloc(), *ctime(), *asctime();
  extern struct tm *gmtime();
  extern time_t time();
  extern char *ascingmtime();
--- 6,15 ----
  #include <ctype.h>
  #include <time.h>
  #include <sys/types.h>
+ #include <stdlib.h>
  
  /* imports */
! extern char *ctime(), *asctime();
  extern struct tm *gmtime();
  extern time_t time();
  extern char *ascingmtime();

*** util/sizeof.c.mastercopy	Mon Oct 17 23:09:24 1994
--- util/sizeof.c	Mon Oct  3 12:48:27 1994
***************
*** 17,23 ****
  off_t multiplier = 1;
  char *progname;
  
! extern void error(), exit();
  
  /*
   - main - do it all
--- 17,23 ----
  off_t multiplier = 1;
  char *progname;
  
! extern void error();
  
  /*
   - main - do it all

*** util/makefile.mastercopy	Mon Oct 17 23:09:24 1994
--- util/makefile	Sun Oct  9 23:18:57 1994
***************
*** 20,25 ****
--- 20,32 ----
  
  cmp:	$(ALL)
  	@$(IN) $(DEST) $(ALLNB)
+ 	: the numbers here do not matter, but all the spacefors should succeed
+ 	$(DEST)/spacefor 1000 incoming
+ 	$(DEST)/spacefor 1000 articles
+ 	$(DEST)/spacefor 1000 control
+ 	$(DEST)/spacefor 1000 outbound
+ 	$(DEST)/spacefor 1000 batchfiles
+ 	$(DEST)/spacefor 1000 archive
  
  $(BINS):	$(LIB)
  
***************
*** 90,95 ****
--- 97,107 ----
  
  r:	$(ALL) rclean
  	$(MX) $(PROGS)
+ 	: If this fails, your make is broken, and later regression tests
+ 	: would fail spuriously for that reason.
+ 	echo $$NEWSARTS >tmp.mc
+ 	test " `cat tmp.mc`" = " " ;
+ 	: looks like make is okay
  	# 756362361 is Mon, 20 Dec 1993 04:39:21 GMT -- checked by calculator
  	: ctime
  	test "`./ctime -u 756362361`" = "Mon Dec 20 04:39:21 1993"

*** util/dostatfs.c.mastercopy	Mon Oct 17 23:09:25 1994
--- util/dostatfs.c	Mon Oct 17 20:32:17 1994
***************
*** 19,30 ****
  #include <sys/statfs.h>
  #endif
  
- #define	f_fsize	f_bsize		/* idiotic incompatible naming in 4.4 */
  #endif	/* MNAMELEN */
  
  extern int debug;
  
! extern void error(), exit();
  
  /*
   - spacefor - do the work
--- 19,33 ----
  #include <sys/statfs.h>
  #endif
  
  #endif	/* MNAMELEN */
  
+ #ifdef BSD4_4
+ #define	f_fsize	f_bsize		/* idiotic incompatible naming in 4.4 */
+ #endif
+ 
  extern int debug;
  
! extern void error();
  
  /*
   - spacefor - do the work

*** util/dostatvfs.c.mastercopy	Mon Oct 17 23:09:25 1994
--- util/dostatvfs.c	Mon Oct  3 12:49:20 1994
***************
*** 11,17 ****
  
  extern int debug;
  
! extern void error(), exit();
  
  /*
   - spacefor - do the work
--- 11,17 ----
  
  extern int debug;
  
! extern void error();
  
  /*
   - spacefor - do the work

*** util/doultrix.c.mastercopy	Mon Oct 17 23:09:26 1994
--- util/doultrix.c	Mon Oct  3 12:49:24 1994
***************
*** 10,16 ****
  
  extern int debug;
  
! extern void error(), exit();
  
  /*
   - spacefor - do the work
--- 10,16 ----
  
  extern int debug;
  
! extern void error();
  
  /*
   - spacefor - do the work

*** util/doustat.c.mastercopy	Mon Oct 17 23:09:26 1994
--- util/doustat.c	Mon Oct  3 12:49:29 1994
***************
*** 10,16 ****
  
  extern int debug;
  
! extern void error(), exit();
  
  /*
   - spacefor - do the work
--- 10,16 ----
  
  extern int debug;
  
! extern void error();
  
  /*
   - spacefor - do the work

*** util/dowhatever.c.mastercopy	Mon Oct 17 23:09:26 1994
--- util/dowhatever.c	Mon Oct  3 12:50:05 1994
***************
*** 5,17 ****
  #include <stdio.h>
  #include <string.h>
  #include <sys/types.h>
  
  long bperi = 1000000000L;	/* how many bytes per inode? */
  
  int debug = 0;
  char *progname;
- 
- extern void error(), exit();
  
  /*
   - main - parse arguments and handle options
--- 5,16 ----
  #include <stdio.h>
  #include <string.h>
  #include <sys/types.h>
+ #include <stdlib.h>
  
  long bperi = 1000000000L;	/* how many bytes per inode? */
  
  int debug = 0;
  char *progname;
  
  /*
   - main - parse arguments and handle options

*** util/namecheck.t.mastercopy	Mon Oct 17 23:09:27 1994
--- util/namecheck.t	Fri Oct 14 11:05:50 1994
***************
*** 2,16 ****
  a.b
  
  # dots
! .a.b		bad dot(s) in name
! a.b.		bad dot(s) in name
! a..b		bad dot(s) in name
! .		bad dot(s) in name
  
  # odd starts
! 0.a		name does not begin with a letter
! +.a		name does not begin with a letter
! A.a		uppercase letter(s) in name
  control.foo	name starts with control or junk
  junk.blah	name starts with control or junk
  
--- 2,16 ----
  a.b
  
  # dots
! .a.b	bad dot(s) in name
! a.b.	bad dot(s) in name
! a..b	bad dot(s) in name
! .	bad dot(s) in name
  
  # odd starts
! 0.a	name does not begin with a letter
! +.a	name does not begin with a letter
! A.a	uppercase letter(s) in name
  control.foo	name starts with control or junk
  junk.blah	name starts with control or junk
  
***************
*** 37,43 ****
  comp.lang.c__	repeated punctuation in name
  comp.lang.c.c	repeated component(s) in name
  comp.c.lang.c
! comp.lang.=c		name component resembles encoded word but isn't one
  comp.lang.=?a?b?x?	name component resembles encoded word but isn't one
  comp.lang.=?a?b?x??	name component resembles encoded word but isn't one
  comp.lang.=?=a?b?x?=	name component resembles encoded word but isn't one
--- 37,43 ----
  comp.lang.c__	repeated punctuation in name
  comp.lang.c.c	repeated component(s) in name
  comp.c.lang.c
! comp.lang.=c	name component resembles encoded word but isn't one
  comp.lang.=?a?b?x?	name component resembles encoded word but isn't one
  comp.lang.=?a?b?x??	name component resembles encoded word but isn't one
  comp.lang.=?=a?b?x?=	name component resembles encoded word but isn't one

end of patch CR.A