v06i059: Changes to calls, compress, ditrev, getpaths, nbatcher (Misc.Patches1)

sources-request at mirror.UUCP sources-request at mirror.UUCP
Thu Jul 17 01:46:05 AEST 1986


Mod.sources: Volume 6, Issue 59
Submitted by: rs at mirror.UUCP (Rich $alz)
Archive-name: Misc.Patches1

This article contains suggestions for enhancements, bugfixes, and revised
documentation for calls and getpaths, compress, and nbatcher, respectively.
I am packaging them up together and sound them out as one piece because
the changes are small and straightforward.  Any comments for or against
this process?  I will not do it often -- generally, I redirect questions
and comments to the original authors (some people apparently have trouble
understanding what the Submitted_by line means).
		--r$

#!/bin/sh
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
# Wrapped by rs at mirror.UUCP on Wed Jul 16 11:40:31 EDT 1986
#
# Contents:  calls.mods compress.mods ditrev.mods getpaths.mods
#	nbatcher.page
 
echo x - calls.mods
sed 's/^XX//' > "calls.mods" <<'@//E*O*F calls.mods//'
XXFrom: wjh12!pixel!pixutl!chris
XXSubject: Re: v06i003:  new calls; shows function call flow (calls.new)
XXI would like to suggest a minor change to your 'calls' program. It does
XXnot accept stdin unless you specify '-' as an argument. This can easily
XXbe fixed by adding an extern variable:
XX	int anyproc;

XXthen, inside of process(), do:
XX	anyproc++;

XXand in main(), after the  'while (EOF != getarg (argc, argv)) {'  loop, add:
XX	if (anyproc == 0)
XX		dostdin();

XXChris
@//E*O*F calls.mods//
chmod u=rw,g=rw,o=rw calls.mods
 
echo x - compress.mods
sed 's/^XX//' > "compress.mods" <<'@//E*O*F compress.mods//'

XXFrom: seismo!elsie!ado
XXSubject: Re: v06i023:  Xenix patches to compress4.0 (compress.xenix)

XX(Forgiveness, gentle moderator:  my mail to the original poster was bounced.)

XX+ The XENIX_16 code for compress did not work.  The problem was:
XX+	a) a problem with the large model code optimizer.
XX+	b) the constant (1<<16) as assigned to maxcode evaluates
XX+	   to zero on a 16 bit machine!
XX+ After fixing problem b, I removed the XENIX_16 code and instead declared
XX+ the large arrays as 'huge'.
XX+ . . .
XX+ XX< #ifndef M_XENIX
XX+ XX< #  define huge		/* needed only for 16-bit machines */
XX+ XX< #endif

XXThe Xenix 3.0 C compiler *does* predefine M_XENIX; it *does not* allow arrays
XXto be declared "huge."  If sixteen-bit compress is to be run on Xenix 3.0
XXsystems, the existing "XENIX_16" code should be (fixed and) kept; if not,
XX"M_XENIX" above should be changed to some symbol that's predefined only by
XXcompilers that support "huge" arrays.
XX--
XXXenix is a Microsoft trademark, right?
XX--
XX	UUCP: ..decvax!seismo!elsie!ado		ARPA: elsie!ado at seismo.ARPA
XX	DEC, VAX, Elsie & Ado are Digital, Borden & Shakespeare trademarks.
@//E*O*F compress.mods//
chmod u=rw,g=rw,o=rw compress.mods
 
echo x - ditrev.mods
sed 's/^XX//' > "ditrev.mods" <<'@//E*O*F ditrev.mods//'
XXFrom: cca!caip!uw-beaver!uw-wally!schwartz (Michael F. Schwartz)
XXSubject: Re: v06i042:  Page reverser for ditroff (ditrev)

XXI noticed the following bug in the comments for my ditrev program:

XX36c36
XX< 				postscript page.  I empirically determined that
XX---
XX> 				ditroff page.  I empirically determined that

XXThis is pretty minor, but might as well be fixed for the archives.
XX - Mike Schwartz
XX   University of Washington Computer Science Department
XX   ihnp4!uw-beaver!schwartz  (USENET)
XX   schwartz at wally.arpa  (ARPANET)
XX   schwartz%wally.arpa at csnet-relay.arpa  (CSNET)
@//E*O*F ditrev.mods//
chmod u=rw,g=rw,o=rw ditrev.mods
 
echo x - getpaths.mods
sed 's/^XX//' > "getpaths.mods" <<'@//E*O*F getpaths.mods//'
XXFrom: ihnp4!icom!andy (Andrew H. Marrinson at Icom Systems, Inc.)
XXSubject: Re: getpaths -- oscantree.c NG on sysV
XXCc: jbuck at epimass

XXThe scan_tree function supplied for system V and V7 doesn't work on my
XXSV.2 Vax.  Fortunately, there is an easy solution; I just added the line:
XX	#define scan_tree(XP,XF) ftw(XP,XF,10)
XXto the front of my getpath.c, changed the makefile accordingly, and voila.
XXNow on version 7 you've got a bug to fix.

XX---
XXAndrew H. Marrinson
XXICOM Systems, Inc.
XXArlington Heights, IL 60005
XXandy at icom.UUCP {ihnp4!icom!andy}
@//E*O*F getpaths.mods//
chmod u=rw,g=rw,o=rw getpaths.mods
 
echo x - nbatcher.page
sed 's/^XX//' > "nbatcher.page" <<'@//E*O*F nbatcher.page//'
XXFrom: cca!caip!cbmvax!bpa!espo (Bob Esposito)
XXSubject: Revised manual page for Nbatcher

XXI found 3 small errors in nbatcher.1  I sending you the corrected manual page.

XX=============================================
XX.TH NBATCHER 1 LOCAL
XX.SH NAME
XXnbatcher  \- new batching system for news
XX.SH SYNOPSIS
XX.B nbatcher
XX.IR "(run out of " cron ".)"
XX.SH DESCRIPTION
XX.PP
XX.I Nbatcher
XXis a program designed to send batched USENET data out
XXin an orderly and controlled fashion, while providing alternative
XXtransmission methods.  As such, it is a replacement for
XX.I csendbatch
XXand the like, which typically require many entries in
XX.IR crontab .
XX.I Nbatcher
XXis intended to be run hourly out of
XX.I cron
XXas the USENET administrator (NEWSID).
XX.PP
XX.I Nbatcher
XXscans the file
XX.I nbatcher.ctl
XXin the NEWSLIB directory to determine if work should be spooled
XXfor a system.  In the control file, lines starting with asterisks
XXare ignored; data lines are comprised of five colon\-separated
XXfields:
XX.RS
XXsite:hour:bits:queue_size:command
XX.RE
XX.TP
XXThe ``site'' field is the USENET neighbor; it is the same as the site in the
XXnews
XX.I sys
XXfile.
XX.TP
XXThe ``hours'' field is patterned after
XX.IR cron's.
XXIf the hour is ``off,'' no work is spooled for the site.  An hour of
XX``*'' matches every hour.  It is also possible to specify specific
XXhours, (e.g., 8, 09, or 22), a comma-separated list (e.g., 8,09,22),
XXor a twenty\-four range, like 10-\15 for 10am through 3pm and 22\-4,
XXfor 10pm through 4am.
XX.TP
XXThe ``bits'' field specifies the number of bits to use in compression;
XXit should be a number between nine and 16, inclusive, or null.  If
XXa number is specified, it is passed on to the
XX.I compress
XXprogram via the ``\-b'' flag.
XX.TP
XXThe ``queue_size'' field specifies the maximum number of bytes allowed
XXin the UUCP queue for this site.  The default is 100K.
XXThe UUCP queue size is determined by lookin in the
XX.IR /usr/spool/uucp/ site
XXdirectory; if it doesn't exist, the check is bypassed.  If there is
XXdata in the UUCP queue,
XX.I nbatcher
XXwill only queue up as many USENET transfers as will fit within the limit
XXspecified by the ``queue_size'' field.
XX.TP
XXThe ``command'' field is used to specific the UUCP command that should
XXbe used to queue the job; the default is ``uux \- \-r site!rnews'';
XXnote the absence of the ``\-z'' flag.
XX.PP
XXTo set up a USENET neighbor to be controlled by nbatcher, the news
XX.I sys
XXentry for the neighbor must be modified to specify the ``F'' flag,
XXand the file used to contain the article names must be
XX.RI BATCHDIR/sysname ,
XXwhere BATCHDIR is set in the Makefile as distributed.
XX.SH "FILES"
XXNEWSLIB/nbatcher.log
XX.br
XX.in +1i
XXa logfile of failures, postponements, etc.
XX.in -1i
XX.SH BUGS
XXParsing of the control file is fairly robust, but not perfect.


@//E*O*F nbatcher.page//
chmod u=rw,g=rw,o=rw nbatcher.page
 
echo Inspecting for damage in transit...
temp=/tmp/sharin$$; dtemp=/tmp/sharout$$
trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
cat > $temp <<\!!!
      15      74     460 calls.mods
      27     182    1107 compress.mods
      16      69     569 ditrev.mods
      15      83     540 getpaths.mods
      86     466    2746 nbatcher.page
     159     874    5422 total
!!!
wc  calls.mods compress.mods ditrev.mods getpaths.mods nbatcher.page | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
if test -s $dtemp
then echo "Ouch [diff of wc output]:" ; cat $dtemp
else echo "No problems found."
fi
exit 0



More information about the Mod.sources mailing list