[mod.sources] v07i041: 2.11 News Documentation and Conversion, Part01/08

sources-request@mirror.UUCP (10/29/86)

Submitted by: seismo!rick (Rick Adams)
Mod.sources: Volume 7, Issue 41
Archive-name: 2.11news/Part01

[ At last!  -r$ ]

# To extract, sh this file
#
#	news 2.11 cvt + uucp  File 1 of 1
#
if test ! -d cvt
then
	mkdir cvt
fi
echo x - cvt/cvt.active.sh 1>&2
sed 's/.//' >cvt/cvt.active.sh <<'*-*-END-of-cvt/cvt.active.sh-*-*'
-: "convert the active file format over"
-L=$1
-S=$2
-cc cvtactive.c
-a.out $L $S
-mv $L/active $L/oactive
-mv $L/nactive $L/active
*-*-END-of-cvt/cvt.active.sh-*-*
echo x - cvt/cvt.clean.sh 1>&2
sed 's/.//' >cvt/cvt.clean.sh <<'*-*-END-of-cvt/cvt.clean.sh-*-*'
-: "clean up after 2.10 works cleanly.  This tears down the 2.9 structure."
-: "The one parameter should be SPOOL"
-if test x$1 = x ; then
-	echo "Usage: cvt.clean /usr/spool/news" 
-	exit 1
-fi
-cd $1
-rm -f .??*
-rm -rf *.*
*-*-END-of-cvt/cvt.clean.sh-*-*
echo x - cvt/cvt.links.sh 1>&2
sed 's/.//' >cvt/cvt.links.sh <<'*-*-END-of-cvt/cvt.links.sh-*-*'
-: "Convert from B 2.9 to 2.10 spool format, with dots turned into slashes."
-L=$1
-S=$2
-cat $L/active >> xtmp
-ed - xtmp << 'X'
-g; ;s; .*;;
-1,$s;.*;ln & &/*;
-1,$s;\.;/;
-1,$s;\.\([^ ]* \);/\1;
-1,$s; \(.*\) \(.*\); \2 \1;
-w
-q
-X
-cat xtmp | (cd $S ; sh -v)
-rm -f a.out parents xtmp
*-*-END-of-cvt/cvt.links.sh-*-*
echo x - cvt/cvt.names.sh 1>&2
sed 's/.//' >cvt/cvt.names.sh <<'*-*-END-of-cvt/cvt.names.sh-*-*'
-: change truncated group names to their full length
-: not tested on a real 2.9 system
-if test $# -lt 2
-then
-	echo Useage: cvt.names.sh libdir spooldir
-fi
-echo Expect some errors about missing directories
-cd $2
-mv fa/laser-lover fa/laser-lovers
-mv net/announce/n net/announce/newusers
-mv net/astro/expe net/astro/expert
-mv net/games/rogu net/games/rogue
-mv net/games/triv net/games/trivia
-mv net/games/vide net/games/video
-mv net/lang/pasca net/lang/pascal
-mv net/lang/prolo net/lang/prolog
-mv net/mail/heade net/mail/headers
-mv net/mail/msggr net/mail/msggroup
-mv net/micro/appl net/micro/apple
-mv net/micro/atar net/micro/atari
-mv net/micro/trs- net/micro/trs-80
-mv net/music/clas net/music/classical
-mv net/news/confi net/news/config
-mv net/news/newsi net/news/newsite
-mv net/nlang/celt net/nlang/celts
-mv net/nlang/gree net/nlang/greek
-mv net/rec/skydiv net/rec/skydive
-mv net/religion/j net/religion/jewish
-mv net/sport/base net/sport/baseball
-mv net/sport/foot net/sport/football
-mv net/sport/hock net/sport/hockey
-mv net/sport/hoop net/sport/hoops
-mv net/unix-wizar net/unix-wizards
-mv net/works/apol net/works/apollo
-
-cd $1
-sed 's/^fa.laser-lover /fa.laser-lovers /
-s/^net.announce.n /net.announce.newusers /
-s/^net.astro.expe /net.astro.expert /
-s/^net.games.rogu /net.games.rogue /
-s/^net.games.triv /net.games.trivia /
-s/^net.games.vide /net.games.video /
-s/^net.lang.pasca /net.lang.pascal /
-s/^net.lang.prolo /net.lang.prolog /
-s/^net.mail.heade /net.mail.headers /
-s/^net.mail.msggr /net.mail.msggroup /
-s/^net.micro.appl /net.micro.apple /
-s/^net.micro.atar /net.micro.atari /
-s/^net.micro.trs- /net.micro.trs-80 /
-s/^net.music.clas /net.music.classical /
-s/^net.news.confi /net.news.config /
-s/^net.news.newsi /net.news.newsite /
-s/^net.nlang.celt /net.nlang.celts /
-s/^net.nlang.gree /net.nlang.greek /
-s/^net.rec.skydiv /net.rec.skydive /
-s/^net.religion.j /net.religion.jewish /
-s/^net.sport.base /net.sport.baseball /
-s/^net.sport.foot /net.sport.football /
-s/^net.sport.hock /net.sport.hockey /
-s/^net.sport.hoop /net.sport.hoops /
-s/^net.unix-wizar /net.unix-wizards /
-s/^net.works.apol /net.works.apollo /' active > nactive
-mv active oactive
-mv nactive active
*-*-END-of-cvt/cvt.names.sh-*-*
echo x - cvt/cvtactive.c 1>&2
sed 's/.//' >cvt/cvtactive.c <<'*-*-END-of-cvt/cvtactive.c-*-*'
-/*
- * Convert from the dot files and one field active file to a
- * two field active file.
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-char *LIB, *SPOOL;
-char oactive[100], nactive[100];
-char dotfile[100];
-char ng[100];
-FILE *ofd, *nfd;
-
-struct stat sbuf;
-
-main(argc, argv)
-char **argv;
-{
-	register char *p;
-	
-	if (argc != 3) {
-		printf("Usage: cvtdot LIB SPOOL\n");
-		exit(1);
-	}
-
-	LIB = argv[1];
-	SPOOL = argv[2];
-
-	sprintf(oactive, "%s/%s", LIB, "active");
-	sprintf(nactive, "%s/%s", LIB, "nactive");
-	ofd = fopen(oactive, "r");
-	if (ofd == NULL) {
-		fprintf(stderr, "Cannot open %s\n", oactive);
-		exit(1);
-	}
-	nfd = fopen(nactive, "w");
-	if (nfd == NULL) {
-		fprintf(stderr, "Cannot create %s\n", nactive);
-		exit(1);
-	}
-
-	while (fgets(ng, sizeof ng, ofd) != NULL) {
-		for (p=ng; *p!='\n'; p++)
-			;
-		*p = 0;
-		sprintf(dotfile, "%s/.%s", SPOOL, ng);
-		stat(dotfile, &sbuf);
-		fprintf(nfd, "%s %05ld\n", ng, sbuf.st_size);
-	}
-	fclose(ofd);
-	fclose(nfd);
-}
*-*-END-of-cvt/cvtactive.c-*-*
if test ! -d uucp
then
	mkdir uucp
fi
echo x - uucp/=batch 1>&2
sed 's/.//' >uucp/=batch <<'*-*-END-of-uucp/=batch-*-*'
-*** chkpth.c	Sun May 27 20:55:39 1979
---- chkpth.c.new	Sat Apr  2 21:34:39 1983
-***************
-*** 40,45
-  	char c;
-  	int ret, i;
-  
-  	if (Uptfirst) {
-  		ret = rdpth(Upt);
-  		ASSERT(ret == 0, "INIT USERFILE %d", Nbrusers);
-
---- 40,48 -----
-  	char c;
-  	int ret, i;
-  
-+ 	if (prefix("=/usr/lib/news/batch", path))
-+ 		return(0);
-+ 
-  	if (Uptfirst) {
-  		ret = rdpth(Upt);
-  		ASSERT(ret == 0, "INIT USERFILE %d", Nbrusers);
-*** cntrl.c	Sun May 27 20:56:46 1979
---- cntrl.c.new	Sat Apr  2 21:37:03 1983
-***************
-*** 82,87
-  char Wfile[MAXFULLNAME] = {'\0'};
-  char Dfile[MAXFULLNAME];
-  
-  /*******
-   *	cntrl(role, wkpre)
-   *	int role;
-
---- 82,89 -----
-  char Wfile[MAXFULLNAME] = {'\0'};
-  char Dfile[MAXFULLNAME];
-  
-+ FILE *pfopen();
-+ 
-  /*******
-   *	cntrl(role, wkpre)
-   *	int role;
-***************
-*** 164,170
-  			if (index(W_OPTNS, 'c') == NULL)
-  				fp = fopen(Dfile, "r");
-  			if (fp == NULL &&
-! 			   (fp = fopen(filename, "r")) == NULL) {
-  				/*  can not read data file  */
-  				logent("CAN'T READ DATA", "FAILED");
-  				unlinkdf(Dfile);
-
---- 166,172 -----
-  			if (index(W_OPTNS, 'c') == NULL)
-  				fp = fopen(Dfile, "r");
-  			if (fp == NULL &&
-! 			   (fp = pfopen(filename, "r")) == NULL) {
-  				/*  can not read data file  */
-  				logent("CAN'T READ DATA", "FAILED");
-  				unlinkdf(Dfile);
-***************
-*** 282,288
-  			notify(mailopt, W_USER, W_FILE1, Rmtname, &msg[1]);
-  			ASSERT(role == MASTER,
-  				"role - %d", role);
-! 			fclose(fp);
-  			unlinkdf(W_DFILE);
-  			goto top;
-  		}
-
---- 284,290 -----
-  			notify(mailopt, W_USER, W_FILE1, Rmtname, &msg[1]);
-  			ASSERT(role == MASTER,
-  				"role - %d", role);
-! 			pfclose(fp);
-  			unlinkdf(W_DFILE);
-  			goto top;
-  		}
-***************
-*** 292,298
-  			ASSERT(role == MASTER,
-  				"role - %d", role);
-  			ret = (*Wrdata)(fp, Ofn);
-! 			fclose(fp);
-  			if (ret != 0) {
-  				(*Turnoff)();
-  				return(FAIL);
-
---- 294,300 -----
-  			ASSERT(role == MASTER,
-  				"role - %d", role);
-  			ret = (*Wrdata)(fp, Ofn);
-! 			pfclose(fp);
-  			if (ret != 0) {
-  				(*Turnoff)();
-  				return(FAIL);
-*** expfile.c	Sun May 27 20:57:47 1979
---- expfile.c.new	Sat Apr  2 21:39:05 1983
-***************
-*** 19,24
-  	int uid;
-  
-  	switch(file[0]) {
-  	case '/':
-  		return;
-  	case '~':
-
---- 19,25 -----
-  	int uid;
-  
-  	switch(file[0]) {
-+ 	case '=':
-  	case '/':
-  		return;
-  	case '~':
-*** uux.c	Wed Aug 19 16:56:29 1981
---- uux.c.new	Sat Apr  2 21:40:01 1983
-***************
-*** 231,240
-  			expfile(rest);
-  			gename(DATAPRE, xsys, 'A', dfile);
-  			DEBUG(4, "rest %s\n", rest);
-! 			if ((chkpth(User, "", rest) || anyread(rest)) != 0) {
-! 				fprintf(stderr, "permission denied %s\n", rest);
-! 				cleanup(1);
-! 			}
-  			if (xcp(rest, dfile) != 0) {
-  				fprintf(stderr, "can't copy %s to %s\n", rest, dfile);
-  				cleanup(1);
-
---- 231,241 -----
-  			expfile(rest);
-  			gename(DATAPRE, xsys, 'A', dfile);
-  			DEBUG(4, "rest %s\n", rest);
-! 			if (rest[0] == '/')
-! 				if ((chkpth(User, "", rest) || anyread(rest)) != 0) {
-! 					fprintf(stderr, "permission denied %s\n", rest);
-! 					cleanup(1);
-! 				}
-  			if (xcp(rest, dfile) != 0) {
-  				fprintf(stderr, "can't copy %s to %s\n", rest, dfile);
-  				cleanup(1);
-******************
-pfopen.c:
-------------------
-/*
- * Routine like fopen, but checks for processes to open.
- * The process name begins with =, and any underscores
- * are translated into blanks.  We don't do things in the
- * obvious way (start with | or !, use blanks as themselves)
- * because getargs can't parse strings containing blanks in
- * all versions of uucp.
- */
-
-#include <stdio.h>
-
-static FILE *prevval = NULL;
-
-FILE *popen();
-
-FILE *
-pfopen(name, mode)
-char *name, *mode;
-{
-	char cmdbuf[256];
-	register char *p;
-
-	if (*name != '=') {
-		prevval = NULL;
-		return fopen(name, mode);
-	}
-
-	strcpy(cmdbuf, name);
-	for (p=cmdbuf; *p; p++)
-		if (*p == '_')
-			*p = ' ';
-	p = cmdbuf+1;
-	prevval = popen(p, mode);
-	return prevval;
-}
-
-pfclose(fd)
-FILE *fd;
-{
-	if (fd == prevval) {
-		pclose(fd);
-		prevval = NULL;
-	} else
-		fclose(fd);
-}
-****************
-Also be sure to add pfopen.o to the list of .o files in the makefile.
*-*-END-of-uucp/=batch-*-*
echo x - uucp/README 1>&2
sed 's/.//' >uucp/README <<'*-*-END-of-uucp/README-*-*'
-This directory contains a number of modifications to UUCP that
-are useful for news.  Only the minus.z mod is really crucial,
-the others are there primarily to boost performance so as to
-cut down on the load on your machine.  There are many other
-mods to UUCP kicking around - many bug fixes and security improvements.
-Watch net.bugs.uucp for these.  One large mod that is very useful
-is the Duke uudir mod, which puts files in SPOOL into subdirectories.
-This mod is very much a kludge, and it certainly could be done
-better, but until a wonderful version is made available, substantial
-performance gains can be attained.  (Since scanning a UNIX directory
-is quadratic on the size of the directory, the 5-fold reduction in
-directory size from uudir can result in a factor of 25 improvement
-in disk utilization.)  uudir is easy to install in any UUCP, but
-it contains some assembly language code, which has been written
-only for the VAX and PDP-11.  All these changes are transparent to
-your UUCP neighbors - you can still talk to UUCP's that don't have
-these mods made - you can even exchange news with older systems.
-(Batching, with or without the =batch mod, requires at least a 2.10
-news system on the other end.)
-
-minus.z.5 
-minux.z.v7 
-	This mod implements the -z and -n options to uux.  These
-	prevent uuxqt from mailing back annoying little messages to
-	whoever happened to start up the uucico daemon telling them
-	that the rnews command executed OK.  -z says "only send a message
-	if the rnews command bombed out", -n says "never send one".
-	-z is recommended.  In order for your users not to be bombarded
-	with these messages, all your USENET neighbors must install this.
-	"5" is for System V and UNIX 5.0, "v7" is for V7 and 4BSD.
-cpu.speedup 
-	A simple fix to V7 and 4BSD UUCP to keep uicico from eating up
-	all the CPU time on your system when receiving files.  Highly
-	recommended, especially if all your traffic is at 2400 baud
-	or slower.
-uux.minus.c 
-	A mod to uux.c to support a uux -c option, e.g.
-		uux -c yoursys!rnews '<' /usr/spool/news/net/news/123
-	which prevents uux from making a separate copy of each article
-	in the spool directory for each system.
-=batch 
-	Code to allow commands such as
-	uux -c yoursys!rnews '<' =/usr/lib/news/batch_/usr/spool/batch/yoursys
-	so that, once the connection is fired up and ready to transfer the
-	file, the command "/usr/lib/news/batch /usr/spool/batch/yoursys"
-	will be started up, and its output copied to the other system.
-	The advantage here is that batching is possible without keeping
-	a full copy of the news on spool waiting for a connection to
-	be established.  This can be a big win if the other system is
-	down for any length of time.  It does not good without the
-	uux.minus.c mod below.  Beware of security issues - they have
-	not been carefully addressed here, and this mod opens up some
-	potential security holes.  It only allows one command to
-	be fired up, and batch should check that the file of names
-	is in a safe directory (not /usr/lib/uucp/L.sys or /etc/passwd).
-	Ideally batch should be suid, since the command will run as uucp.
*-*-END-of-uucp/README-*-*
echo x - uucp/bugfix 1>&2
sed 's/.//' >uucp/bugfix <<'*-*-END-of-uucp/bugfix-*-*'
-Date: 19 Apr 1983 6:31-PST
-From: Jim Rees  <jim@uw-beaver>
-Subject: Re:  news 2.10
-Message-Id: <83/04/19 0631.950@uw-beaver>
-
-Meanwhile, I thought of something else you may want to include in the
-distribution.  I know that there are lots of bugs in uucp, and that it
-would be impossible to list them all in a reasonable amount of space,
-but news will not work at all on a 4.1bsd system unless this bug is
-fixed.  This bug is still in even the latest tape from Berkeley, and is
-not traceable with a debugger because of other bugs in uucp.  This bug
-causes uucico to core-dump after transferring some small (~20) number
-of files.
-
-The fix is easy.  In anlwrk.c, routine iswrk():
-
-*** anlwrk.c_o	Wed Mar  9 07:53:09 1983
---- anlwrk.c	Wed Sep 22 10:21:43 1982
-***************
-*** 64,70
-  {
-  	static char **listp, *list[LLEN];
-  
-! 	if (listp == NULL || *listp == NULL || listp > (list + LLEN)
-  	  || !prefix(pre, *listp)) {
-  		int i;
-  		for (i = 0, listp = list; i < LLEN; i++) {
-
---- 64,70 -----
-  {
-  	static char **listp, *list[LLEN];
-  
-! 	if (listp == NULL || *listp == NULL || listp >= (list + LLEN)
-  	  || !prefix(pre, *listp)) {
-  		int i;
-  		for (i = 0, listp = list; i < LLEN; i++) {
-
-
-[uucp is fully of nasty bugs.  watch net.bugs.uucp for them and
-hopefully their fixes.]
*-*-END-of-uucp/bugfix-*-*
echo x - uucp/cpu.speedup 1>&2
sed 's/.//' >uucp/cpu.speedup <<'*-*-END-of-uucp/cpu.speedup-*-*'
-Under certain circumstances, you may find that when 2 or 3 uucicos
-are running on your system, they are eating up all the CPU time,
-and system performance suffers horribly.  If this is your problem,
-you can do a "vmstat 5" and watch the system calls and context switches
-counters.  If they are both very high whenever 2 or more uucicos
-are running (100-200 system calls/second, over 100 context switches),
-chances are that the problem is as follows:
-
-When another system is sending you a file, your uucico reads characters
-from the line.  The read returns whatever is there waiting, or if
-nothing is waiting, waits for one character and returns.  Since uucico
-usually wants 64 characters at a time, at 1200 baud it's quite common
-to read these in 1 or 2 character pieces.  Each uucico will read 1 or
-2 characters, wake up the user process, go back for more, there won't
-be any, so it hangs and gives up the CPU.  A very short time later,
-(often within the same clock tick) there will be a character available,
-the process will wake up, read one character, and try again.
-
-This modification is very simple.  If the first read returned fewer
-characters than requested, before doing another read, the process
-will sleep for one second.  Then, when it wakes up, there will probably
-be as many characters waiting as it needs.
-
-This modification makes a big difference when you are RECEIVING a file
-from another system.  It won't make much difference when you are
-SENDING a file, because the user process doesn't usually have to hang
-to write to the line, and when it does, the high/low water mark
-mechanism in the tty driver keeps it from waking up too often.
-This change is intended for a V7 or 4BSD system.  It may not
-help much on System V, because uucp uses a USG tty driver feature
-to make it wake up only every 6 characters.
-
-The amount this fix helps depends a LOT on the baud rate.  Since it
-is sleeping while it had been reading characters, it is reasonable
-to expect the file to get transferred more slowly than before.  This
-might, in turn, lead to increased phone bills.  Some experimentation
-receiving a file over a hardwired link is detailed here.  The file
-received is /etc/termcap, which is 66405 bytes long.  The local system
-is a 4.1BSD VAX 11/750, the remote system is a UNIX 5.0 VAX 11/750.
-The link is over a develcon dataswitch.  Both systems were almost
-idle, although when another uucico did start up, it didn't seem to
-affect the numbers.  The commands
-	uucp -r othersys!~/termcap ~uucp/termcap
-	time /usr/lib/uucp/uucico -r1 -sothersys
-were given.
-
-"type" is the type of uucico run: "old" is without the sleep, "sleep"
-has a sleep(1) added after every short read, "nap" is the same as
-sleep except that at 4800 baud and higher the sleep is for less than
-one second (the parameter is the number of milliseconds).  "user" and
-"sys" are the user and system CPU times from the time command, in
-seconds.  "elapsed" is the time, in seconds, to transfer the file,
-taken from /usr/spool/uucp/SYSLOG.  (Elapsed time does not include time to
-get the connection going or close it down, just to transfer the file.)
-"%" is the percentage of the system the uucico command took, from the
-time command.
-
-type	speed	user	sys	elapsed	%
-
-old	1200	35.3	120.8	606	21%
-sleep	1200	14.2	 35.9	609	 7%
-
-old	2400	27.4	115.8	305	31%
-sleep	2400	13.2	 35.0	351	 9%
-
-old	4800	23.9	116.0	152	57%
-sleep	4800	14.4	 40.3	338	12%
-
-old	9600	14.4	 68.1	79	42%
-nap 60	9600	14.6	 52.7	97	39%
-nap 100	9600	14.9	 48.5	113	32%
-nap 200	9600	15.0	 47.1	127	37%
-sleep	9600	12.0	 46.1	279	15%
-
-It is clear that at 2400 baud or less, the load on the system was
-cut considerably, while the penalty in slower transfer speed is
-negligible.  At 9600 baud, the sleep version (equivalent to nap 1000)
-cut the system load by about 1/3, the elapsed time shot way up.
-(It takes much less than 1 second to accumulate 64 characters at
-9600 baud.) At 4800 baud the results are somewhere in between.
-The system time was cut by a factor of 3, but the elapsed time doubled.
-
-Putting in shorter naps at 9600 baud brought the elapsed time down, while
-increasing the system load moderately.  Essentially, the system time
-remained constant when any sleeping was done.  The difference in
-percentage of the system used shows that, in effect, the same work
-was spread out over different lengths of time.  This results in a tradeoff
-that can only be evaluated by each system in terms of their priorities.
-
-An added complication is that most V7 and 4BSD systems do not have
-a way to sleep for less than a second.  4.2BSD has the select system
-call, or you may have installed a nap system call or the Cornell fast
-timer driver.  Otherwise, your only choices are either sleep(1) or
-nothing.  The napms call below calls a routine in the new curses, to
-sleep for around 1 clock tick (60 ms).
-
-If your top priority is to keep system response good, it is recommended
-that you do the sleep(1) no matter what the baud rate is.  If your top
-priority is to make 9600 baud transfers go as quickly as possible, you
-should do the sleep for 1200 baud or less, and otherwise do nothing.
-If you want a well balanced compromise and have a high resolution sleep
-or nap or select available, the changes shown here are appropriate.
-
-This change is trivial except for the change to conn.c to make the
-baud rate available to the packet driver.  The code dealing with the
-speed is different in different versions of UUCP.  If you have trouble
-with conn.c, search for the string "speed" and look for a conveniently
-available integer version of the speed.  The variable linebaudrate is
-a global integer, exported to pk1.c for purposes of this test.  The
-changes shown here are for the 4.1BSD version of UUCP.
-
-*** conn.c	Wed Jun  4 01:47:12 1980
---- conn.c.new	Sat Apr  2 18:13:25 1983
-***************
-*** 85,90
-  	char *D_calldev;
-  	int D_speed;
-  	} Devs [MAXDEV];
-  
-  char Devbuff[MAXDCH];
-  
-
---- 85,91 -----
-  	char *D_calldev;
-  	int D_speed;
-  	} Devs [MAXDEV];
-+ int linebaudrate;
-  
-  char Devbuff[MAXDCH];
-  
-***************
-*** 344,349
-  	alarm(0);
-  	fflush(stdout);
-  	fixline(dcf, pd->D_speed);
-  	DEBUG(4, "Forked %d ", pid);
-  	DEBUG(4, "Wait got %d ", nw);
-  	DEBUG(4, "Status %o\n", lt);
-
---- 345,351 -----
-  	alarm(0);
-  	fflush(stdout);
-  	fixline(dcf, pd->D_speed);
-+ 	linebaudrate = pd->D_speed;
-  	DEBUG(4, "Forked %d ", pid);
-  	DEBUG(4, "Wait got %d ", nw);
-  	DEBUG(4, "Status %o\n", lt);
-*** pk1.c	Mon May 28 00:44:06 1979
---- pk1.c.new	Sat Apr  2 18:16:02 1983
-[This is routine pkcget, near the end of pk1.c.]
-***************
-*** 335,340
-  char *b;
-  {
-  	int nchars, ret;
-  
-  	if (setjmp(Getjbuf)) {
-  		Ntimeout++;
-
---- 335,341 -----
-  char *b;
-  {
-  	int nchars, ret;
-+ 	extern int linebaudrate;
-  
-  	if (setjmp(Getjbuf)) {
-  		Ntimeout++;
-***************
-*** 343,349
-  	}
-  	signal(SIGALRM, cgalarm);
-  
-! 	for (nchars = 0; nchars < n; nchars += ret) {
-  		alarm(PKTIME);
-  		ret = read(fn, b, n - nchars);
-  		if (ret == 0) {
-
---- 344,350 -----
-  	}
-  	signal(SIGALRM, cgalarm);
-  
-! 	for (nchars = 0; nchars < n; ) {
-  		alarm(PKTIME);
-  		ret = read(fn, b, n - nchars);
-  		if (ret == 0) {
-***************
-*** 352,357
-  		}
-  		PKASSERT(ret > 0, "PKCGET READ %d", ret);
-  		b += ret;
-  	}
-  	alarm(0);
-  	return(0);
-
---- 353,364 -----
-  		}
-  		PKASSERT(ret > 0, "PKCGET READ %d", ret);
-  		b += ret;
-+ 		nchars += ret;
-+ 		if (nchars < n)
-+ 			if (linebaudrate > 0 && linebaudrate < 4800)
-+ 				sleep(1);
-+ 			else
-+ 				napms(60);
-  	}
-  	alarm(0);
-  	return(0);
*-*-END-of-uucp/cpu.speedup-*-*
echo x - uucp/gename.s5 1>&2
sed 's/.//' >uucp/gename.s5 <<'*-*-END-of-uucp/gename.s5-*-*'
-From burl!lda Tue Apr  5 12:50:04 1983
-Date: 5-Apr-83 12:49:57-EST (Tue)
-From: burl!lda
-Subject: base 62 sequencing on USG 5.0 uucp
-Via: cbosgd.UUCP (V3.94 [3/6/82]); 5-Apr-83 12:50:00-EST (Tue)
-To: teklabs!stevenm
-Status: R
-
-This is a listing of the changes made to USG 5.0 uucp to support the
-base 62 numbering scheme submitted to the 'uucp.buglist' by Alan S. Watt, 
-ittvax!swatt.  Simply changing the gename routine was not enough. 
-These changes were made by Curtis Jackson, burl!rcj.
-
-Note: The diff here on 'ogename.c gename.c' is for Alan's gename.c
-
-                                                Larry Auton
-                                                 burl!lda
-[Caution - a few weeks later, burl's UUCP started behaving very
-strangely.  UUCP would record that it xqt'ed rnews, but rnews was
-never started up.  Access time on /usr/bin/rnews was unchanged.
-We don't know if this change had anything to do with it, but if
-you see this symptom, be suspicious of this change.]
-_________________________________________________________________________
-**** ocntrl.c	cntrl.c
-135c135
-< 	jobid = 0;
----
-> 	strcpy(jobid,"0000");
-
-**** ogename.c	gename.c
-29c29,30
-< 	sprintf(file, "%c.%.7s%c%.4s", pre, sys, grade, sqnum);
----
-> 	strcpy(jobid,sqnum);
-> 	updjb(); sprintf(file, "%c.%.6s%c%.1s%.4s", pre, sys, grade, subjob, jobid);
-
-**** ogtcfile.c	gtcfile.c
-57c57
-< 		if(jobid == 0){
----
-> 		if(!strcmp(jobid,"0000")){
-60c60
-< 			DEBUG(4,"gtcfile2: sqnm - %d\n",sqnm);
----
-> 			DEBUG(4,"gtcfile2: sqnm - %s\n",sqnm);
-62,63c62,63
-< 		updjb(); sprintf(Cfile, "%c.%.6s%c%.1s%.4d", CMDPRE, sys, Grade, subjob, jobid); 
-<                 DEBUG(4,"gtcfile3: jobid - %d\n",jobid);
----
-> 		updjb(); sprintf(Cfile, "%c.%.6s%c%.1s%.4s", CMDPRE, sys, Grade, subjob, jobid); 
->                 DEBUG(4,"gtcfile3: jobid - %s\n",jobid);
-70c70
-< 		sprintf(Cfile, "%c.%.6s%c%.1s%.4d", CMDPRE, sys, Grade, p->pre_id, jobid); 
----
-> 		sprintf(Cfile, "%c.%.6s%c%.1s%.4s", CMDPRE, sys, Grade, p->pre_id, jobid); 
-81c81
-< 	static int jid = 0;
----
-> 	static char jid[5] = "0000";
-83,85c83,85
-< 	if(jobid != jid){
-< 		DEBUG(4,"csys0 - jobid: %d\n",jobid);
-< 		jid = jobid;
----
-> 	if(strcmp(jobid,jid)){
-> 		DEBUG(4,"csys0 - jobid: %s\n",jobid);
-> 		strcpy(jid,jobid);
-
-**** ouucp.c		uucp.c
-597c597
-< 			updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4d", DATAPRE, s2, Grade, subjob, jobid); 
----
-> 			updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4s", DATAPRE, s2, Grade, subjob, jobid); 
-754c754
-< 				fprintf(stdout,"uucp job %d\n", jobid);
----
-> 				fprintf(stdout,"uucp job %s\n", jobid);
-756c756
-< 		updjb(); sprintf(Cfile, "%c.%.6s%c%.1s%.4d", CMDPRE, sys, Grade, subjob, jobid); 
----
-> 		updjb(); sprintf(Cfile, "%c.%.6s%c%.1s%.4s", CMDPRE, sys, Grade, subjob, jobid); 
-764c764
-< 		sprintf(Cfile, "%c.%.6s%c%.1s%.4d", CMDPRE, sys, Grade, p->pre_id, jobid); 
----
-> 		sprintf(Cfile, "%c.%.6s%c%.1s%.4s", CMDPRE, sys, Grade, p->pre_id, jobid); 
-775c775
-< 	static int jid = 0;
----
-> 	static char jid[5] = "0000";
-777,778c777,778
-< 	if(jobid != jid){
-< 		jid = jobid;
----
-> 	if(strcmp(jobid,jid)){
-> 		strcpy(jid,jobid);
-
-**** ouucp.h		uucp.h
-201c201
-< extern int	jobid;
----
-> extern char	jobid[5];
-
-**** ouucpdefs.c	uucpdefs.c
-26c26
-< int	jobid;
----
-> char	jobid[5];
-
-**** ouux.c		uux.c
-216c216
-< 	updjb(); sprintf(tcfile, "%c.%.6s%c%.1s%.4d", DATAPRE, local, 'T', subjob, jobid);
----
-> 	updjb(); sprintf(tcfile, "%c.%.6s%c%.1s%.4s", DATAPRE, local, 'T', subjob, jobid);
-303c303
-< 		updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4d", DATAPRE, xsys, 'B', subjob, jobid);
----
-> 		updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4s", DATAPRE, xsys, 'B', subjob, jobid);
-345c345
-< 		fprintf(stdout,"uucp job %d\n", jobid);
----
-> 		fprintf(stdout,"uucp job %s\n", jobid);
-505c505
-< 			updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4d", DATAPRE, xsys, 'A', subjob, jobid);
----
-> 			updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4s", DATAPRE, xsys, 'A', subjob, jobid);
-570c570
-< 			updjb(); sprintf(tfile, "%c.%.6s%c%.1s%.4d", CMDPRE, syspart, 'R', subjob, jobid);
----
-> 			updjb(); sprintf(tfile, "%c.%.6s%c%.1s%.4s", CMDPRE, syspart, 'R', subjob, jobid);
-644c644
-< 			updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4d", DATAPRE, syspart, 'R', subjob, jobid);
----
-> 			updjb(); sprintf(dfile, "%c.%.6s%c%.1s%.4s", DATAPRE, syspart, 'R', subjob, jobid);
-655c655
-< 			updjb(); sprintf(t2file, "%c.%.6s%c%.1s%.4d", DATAPRE, xsys, 'T', subjob, jobid);
----
-> 			updjb(); sprintf(t2file, "%c.%.6s%c%.1s%.4s", DATAPRE, xsys, 'T', subjob, jobid);
-767c767
-< 		updjb(); sprintf(cfile, "%c.%.6s%c%.1s%.4d", CMDPRE, xsys, 'A', subjob, jobid);
----
-> 		updjb(); sprintf(cfile, "%c.%.6s%c%.1s%.4s", CMDPRE, xsys, 'A', subjob, jobid);
-
-
*-*-END-of-uucp/gename.s5-*-*
echo x - uucp/minus.z.5 1>&2
sed 's/.//' >uucp/minus.z.5 <<'*-*-END-of-uucp/minus.z.5-*-*'
-This shows the changes needed to a System V or UNIX 5.0 UUCP to
-implement the -z option.  The -n option is in the standard system,
-but you usually want to be notified if something goes wrong.
-
-I looked at the 4.0 sources and compared them to the 5.0.  The programs
-have changed but the changes aren't many.  Only uucp.h, uux.c, and uuxqt.c
-need be changed.  I'll be putting in the changes once I get permission from
-our systems people.
-
-==============================================================
----- uucp.h ---- 137,139 ----
-   #define X_USER		'U'
-   #define X_NONOTI	'N'
- > #define X_NONZERO	'Z'	/* don't notify if zero return */
-   #define X_SENDFILE	'S'
-==============================================================
----- uux.c ----  54, 55 ----
-   	int nonoti = 0;
- > #ifdef X_NONZERO
- > 	int nonzero = 0;
- > #endif
-   	int	uid, ret;
----- uux.c ---- 146,149 ----
-   		case 'n':
-   			nonoti = 1;
-   			break;
- > #ifdef X_NONZERO
- > 		case 'z':
- > 			nonzero = 1;
- > 			break;
- > #endif
-   		default:
----- uux.c ---- 218,221 ----
-   	if (nonoti)
-   		fprintf(fprx,"%c\n", X_NONOTI);
- > #ifdef X_NONZERO
- > 	if (nonzero)
- >		fprintf(fprx,"%c\n", X_NONZERO);
- > #endif
-   	if (statop)
-   		fprintf(fprx,"%c %s\n", X_MAILF, Sfile);
-==============================================================
----- uuxqt.c ---- 185,188 ----
-   	int stcico = 0;
-   	int argnok;
- > #ifdef X_NONZERO
- > 	int nonzero = 0;
- > #endif
-   	char xcmd[200];
----- uuxqt.c ----  43, 45 ----
-   			case X_NONOTI:
-   				notiok = 0;
-   				break;
- > #ifdef X_NONZERO
- > 			/*
- > 			 * notify only if non-zero status return
- > 			 */
- > 			case X_NONZERO:
- > 				nonzero = 1;
- > 				break;
- > #endif
-   			default:
----- uuxqt.c ---- 273,278 ----
-   		if (strcmp(xcmd, "rmail") != SAME
- > #ifndef X_NONZERO
-   		  && strcmp(xcmd, "mail") != SAME) {
- > #else
- > 		  && strcmp(xcmd, "mail") != SAME
- > 		  && (!nonzero || (nonzero && ret != 0)) {
- > #endif
-   
-   		/*
-   		 * see if user wants respcifiction
-   		 */
-==============================================================
-
-
*-*-END-of-uucp/minus.z.5-*-*
echo x - uucp/minus.z.v7 1>&2
sed 's/.//' >uucp/minus.z.v7 <<'*-*-END-of-uucp/minus.z.v7-*-*'
-Script started on Wed Feb 24 13:41:52 1982
-Comet }{ foreach i (uucp.h uux.c uuxqt.c)
-? echo $i
-? diff -c $i.1.1 $i.1.2
-? end
-uucp.h
-*** uucp.h.1.1	Wed Feb 24 13:40:04 1982
---- uucp.h.1.2	Wed Feb 24 13:40:14 1982
-***************
-*** 114,119
-  #define X_CMD		'C'
-  #define X_USER		'U'
-  #define X_SENDFILE	'S'
-  #define X_LOCK		"LCK.XQT"
-  #define X_LOCKTIME	3600
-  
-
---- 114,121 -----
-  #define X_CMD		'C'
-  #define X_USER		'U'
-  #define X_SENDFILE	'S'
-+ #define X_NONOTI	'N'
-+ #define X_NONZERO	'Z'
-  #define X_LOCK		"LCK.XQT"
-  #define X_LOCKTIME	3600
-  
-uux.c
-*** uux.c.1.1	Wed Feb 24 13:40:34 1982
---- uux.c.1.2	Wed Feb 24 13:40:54 1982
-***************
-*** 51,56
-  	extern FILE *ufopen();
-  	int uid, ret;
-  	char redir = '\0';
-  
-  	strcpy(Progname, "uux");
-  	uucpname(Myname);
-
---- 51,58 -----
-  	extern FILE *ufopen();
-  	int uid, ret;
-  	char redir = '\0';
-+ 	int nonoti = 0;
-+ 	int nonzero = 0;
-  
-  	strcpy(Progname, "uux");
-  	uucpname(Myname);
-***************
-*** 71,76
-  			if (Debug <= 0)
-  				Debug = 1;
-  			break;
-  		default:
-  			fprintf(stderr, "unknown flag %s\n", argv[1]);
-  				break;
-
---- 73,84 -----
-  			if (Debug <= 0)
-  				Debug = 1;
-  			break;
-+ 		case 'n':
-+ 			nonoti = 1;
-+ 			break;
-+ 		case 'z':
-+ 			nonzero = 1;
-+ 			break;
-  		default:
-  			fprintf(stderr, "unknown flag %s\n", argv[1]);
-  				break;
-***************
-*** 107,112
-  	fpc = ufopen(tcfile, "w");
-  	ASSERT(fpc != NULL, "CAN'T OPEN", tcfile, 0);
-  	fprintf(fprx, "%c %s %s\n", X_USER, User, local);
-  
-  	/* find remote system name */
-  	ap = inargs;
-
---- 115,124 -----
-  	fpc = ufopen(tcfile, "w");
-  	ASSERT(fpc != NULL, "CAN'T OPEN", tcfile, 0);
-  	fprintf(fprx, "%c %s %s\n", X_USER, User, local);
-+ 	if (nonoti)
-+ 		fprintf(fprx,"%c\n", X_NONOTI);
-+ 	if (nonzero)
-+ 		fprintf(fprx,"%c\n", X_NONZERO);
-  
-  	/* find remote system name */
-  	ap = inargs;
-uuxqt.c
-*** uuxqt.c.1.1	Wed Feb 24 13:41:14 1982
---- uuxqt.c.1.2	Wed Feb 24 13:41:39 1982
-***************
-*** 22,27
-  void exit();
-  char *strcpy();
-  
-  #define PATH	"PATH=/bin:/usr/bin;"
-  /*  to remove restrictions from uuxqt
-   *  define ALLOK 1
-
---- 22,29 -----
-  void exit();
-  char *strcpy();
-  
-+ int notiok = 1;
-+ int nonzero = 0;
-  #define PATH	"PATH=/bin:/usr/bin;"
-  /*  to remove restrictions from uuxqt
-   *  define ALLOK 1
-***************
-*** 117,122
-  				if (*(cmd + strlen(cmd) - 1) == '\n')
-  					*(cmd + strlen(cmd) - 1) = '\0';
-  				break;
-  			default:
-  				break;
-  			}
-
---- 119,130 -----
-  				if (*(cmd + strlen(cmd) - 1) == '\n')
-  					*(cmd + strlen(cmd) - 1) = '\0';
-  				break;
-+ 			case X_NONOTI:
-+ 				notiok = 0;
-+ 				break;
-+ 			case X_NONZERO:
-+ 				nonzero = 1;
-+ 				break;
-  			default:
-  				break;
-  			}
-***************
-*** 180,186
-  		sprintf(retstat, "exit %d, signal %d", ret & 0377,
-  		  (ret>>8) & 0377);
-  		if (strcmp(xcmd, "rmail") != SAME
-! 		  && strcmp(xcmd, "mail") != SAME)
-  			notify(user, Rmtname, cmd, retstat);
-  		else if (ret != 0) {
-  			/* mail failed - return letter to sender  */
-
---- 188,195 -----
-  		sprintf(retstat, "exit %d, signal %d", ret & 0377,
-  		  (ret>>8) & 0377);
-  		if (strcmp(xcmd, "rmail") != SAME
-! 		  && strcmp(xcmd, "mail") != SAME
-! 		  && notiok && (!nonzero || (nonzero && ret != 0)))
-  			notify(user, Rmtname, cmd, retstat);
-  		else if (ret != 0 && strcmp(xcmd, "rmail") == SAME) {
-  			/* mail failed - return letter to sender  */
-# I think this change doesn't apply to all systems - it can be safely ignored.
-***************
-*** 182,188
-  		if (strcmp(xcmd, "rmail") != SAME
-  		  && strcmp(xcmd, "mail") != SAME)
-  			notify(user, Rmtname, cmd, retstat);
-! 		else if (ret != 0) {
-  			/* mail failed - return letter to sender  */
-  			retosndr(user, Rmtname, fin, buf);
-  			sprintf(buf, "ret (%o) from %s!%s", ret, Rmtname, user);
-
---- 191,197 -----
-  		  && strcmp(xcmd, "mail") != SAME
-  		  && notiok && (!nonzero || (nonzero && ret != 0)))
-  			notify(user, Rmtname, cmd, retstat);
-! 		else if (ret != 0 && strcmp(xcmd, "rmail") == SAME) {
-  			/* mail failed - return letter to sender  */
-  			retosndr(user, Rmtname, fin, buf);
-  			sprintf(buf, "ret (%o) from %s!%s", ret, Rmtname, user);
-Comet }{ 
-script done on Wed Feb 24 13:42:39 1982
*-*-END-of-uucp/minus.z.v7-*-*
echo x - uucp/uux.minus.c 1>&2
sed 's/.//' >uucp/uux.minus.c <<'*-*-END-of-uucp/uux.minus.c-*-*'
-*** /tmp/uux.c.old	Sat Apr  2 20:16:45 1983
---- /tmp/uux.c.new	Sat Apr  2 20:16:54 1983
-***************
-*** 11,18
-  *cmdp++ = ' ';\
-  *cmdp = '\0';}
-  
-! #define GENSEND(f, a, b, c, d) {\
-! fprintf(f, "S %s %s %s - %s 0666\n", a, b, c, d);\
-  }
-  #define GENRCV(f, a, b, c) {\
-  fprintf(f, "R %s %s %s - \n", a, b, c);\
-
---- 11,18 -----
-  *cmdp++ = ' ';\
-  *cmdp = '\0';}
-  
-! #define GENSEND(f, a, b, c, d, e) {\
-! fprintf(f, "S %s %s %s -%s %s 0666\n", a, b, c, d, e);\
-  }
-  #define GENRCV(f, a, b, c) {\
-  fprintf(f, "R %s %s %s - \n", a, b, c);\
-***************
-*** 36,41
-  	char inargs[BUFSIZ];
-  	int pipein = 0;
-  	int startjob = 1;
-  	char path[MAXFULLNAME];
-  	char cmd[BUFSIZ];
-  	char *ap, *cmdp;
-
---- 36,42 -----
-  	char inargs[BUFSIZ];
-  	int pipein = 0;
-  	int startjob = 1;
-+ 	int Copy = 1;
-  	char path[MAXFULLNAME];
-  	char cmd[BUFSIZ];
-  	char *ap, *cmdp;
-***************
-*** 65,70
-  		case 'r':
-  			startjob = 0;
-  			break;
-  		case 'x':
-  			Debug = atoi(&argv[1][2]);
-  			if (Debug <= 0)
-
---- 66,74 -----
-  		case 'r':
-  			startjob = 0;
-  			break;
-+ 		case 'c':
-+ 			Copy = 0;
-+ 			break;
-  		case 'x':
-  			Debug = atoi(&argv[1][2]);
-  			if (Debug <= 0)
-***************
-*** 148,154
-  		}
-  		fclose(fpd);
-  		if (strcmp(local, xsys) != SAME) {
-! 			GENSEND(fpc, dfile, dfile, User, dfile);
-  			cflag++;
-  		}
-  		fprintf(fprx, "%c %s\n", X_RQDFILE, dfile);
-
---- 152,158 -----
-  		}
-  		fclose(fpd);
-  		if (strcmp(local, xsys) != SAME) {
-! 			GENSEND(fpc, dfile, dfile, User, "", dfile);
-  			cflag++;
-  		}
-  		fprintf(fprx, "%c %s\n", X_RQDFILE, dfile);
-***************
-*** 230,240
-  				fprintf(stderr, "permission denied %s\n", rest);
-  				cleanup(1);
-  			}
-! 			if (xcp(rest, dfile) != 0) {
-! 				fprintf(stderr, "can't copy %s to %s\n", rest, dfile);
-! 				cleanup(1);
-! 			}
-! 			GENSEND(fpc, rest, dfile, User, dfile);
-  			cflag++;
-  			if (redir == '<') {
-  				fprintf(fprx, "%c %s\n", X_STDIN, dfile);
-
---- 234,247 -----
-  				fprintf(stderr, "permission denied %s\n", rest);
-  				cleanup(1);
-  			}
-! 			if (Copy) {
-! 				if (xcp(rest, dfile) != 0) {
-! 					fprintf(stderr, "can't copy %s to %s\n", rest, dfile);
-! 					cleanup(1);
-! 				}
-! 				GENSEND(fpc, rest, dfile, User, "", dfile);
-! 			} else
-! 				GENSEND(fpc, rest, dfile, User, "c", dfile);
-  			cflag++;
-  			if (redir == '<') {
-  				fprintf(fprx, "%c %s\n", X_STDIN, dfile);
-***************
-*** 288,294
-  			gename(DATAPRE, xsys, 'T', t2file);
-  			GENRCV(fpd, rest, t2file, User);
-  			fclose(fpd);
-! 			GENSEND(fpc, dfile, tfile, User, dfile);
-  			cflag++;
-  			if (redir == '<') {
-  				fprintf(fprx, "%c %s\n", X_RQDFILE, t2file);
-
---- 295,301 -----
-  			gename(DATAPRE, xsys, 'T', t2file);
-  			GENRCV(fpd, rest, t2file, User);
-  			fclose(fpd);
-! 			GENSEND(fpc, dfile, tfile, User, "", dfile);
-  			cflag++;
-  			if (redir == '<') {
-  				fprintf(fprx, "%c %s\n", X_RQDFILE, t2file);
-***************
-*** 332,338
-  				xuuxqt();
-  	}
-  	else {
-! 		GENSEND(fpc, rxfile, tfile, User, rxfile);
-  		cflag++;
-  	}
-  
-
---- 339,345 -----
-  				xuuxqt();
-  	}
-  	else {
-! 		GENSEND(fpc, rxfile, tfile, User, "", rxfile);
-  		cflag++;
-  	}
-  
*-*-END-of-uucp/uux.minus.c-*-*
exit