[comp.sys.handhelds] pf-bootstrap-v1.1a part 9 of 9

dan@i10s7.ira.uka.de (Dan Mosedale) (05/17/91)

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 9 (of 9)."
# Contents:  pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs
# Wrapped by dan@nostromo on Fri May 17 02:31:43 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs'\"
else
echo shar: Extracting \"'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs'\" \(21493 characters\)
sed "s/^X//" >'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs' <<'END_OF_FILE'
XThis is version 3.9 (circa 11/90) of the xmodem program which incorporates
Xa few bugfixes (one important!) and some enhancements: 1) status messages
Xwhen running xmodem through Sun's tip program ("p" flag); 2) delayed
Xstartup (via the "w" flag); 3) ability to turn off EOT verification (via
X"e" flag); 4) ability to allow CAN-CAN abort in the midst of a file
Xtransfer (via "n"  flag) and 5) YMODEM-G support (via the "g" flag).  See
Xupdate.doc for details. 
X
X--------------------------------------------------------------------------------
X
XThis is version 3.8 (circa 11/88) of the xmodem program which incorporates
Xminor enhancements over version 3.7 which incoporates minor enhancements
Xover version 3.6.  See update.doc. 
X
X--------------------------------------------------------------------------------
X
XThis is version 3.6 (finished 4/88) of the xmodem program which includes a
Xfew bugfixes and some enhancements (requested by Macintosh users)
Xstimulated by the xmodem release through comp.sources.unix.  See the file
Xupdate.doc for details. 
X
X--------------------------------------------------------------------------------
X
XThis is version 3.4 (finished 10/87) of the xmodem program, a full-featured
XXMODEM implementation for 4.3BSD.  Since the previous release (version
X3.2, see volume 7 of the archives), substantial improvements have been
Xmade. See the file update.doc for details.  Also, some attempt has been
Xmade to support SysV Unix systems; see below.
X
XAs far as I am concerned, this program has reached the end of its evolution.
XNewer protocols (such as ZMODEM) will not be incorporated into xmodem.  Check
Xout Chuck Forsberg's rz/sz programs if you are interested in ZMODEM.
X
X--------------------------------------------------------------------------------
X
XThe xmodem program implements the Christensen (XMODEM) file transfer
Xprotocol for moving files between 4.2/4.3BSD Unix systems and microcomputers.
XThe XMODEM/CRC protocol, the MODEM7 batch protocol, the XMODEM-1K
Xblock protocol and the YMODEM batch protocol are all supported by xmodem.
XFor details of the protocols, see the document edited by Chuck Forsberg titled
XXMODEM/YMODEM Protocol Reference (the latest version is dated 6-18-88).
X
XThis program runs on 4.2/4.3BSD systems ONLY.  It has been tested on VAXes
Xand Suns against the MEX-PC program from Niteowl Software and the ZCOMM and
XDSZ programs from Omen Technology.
X
XI have tried to keep the 4.2isms (select system call, 4.2BSD/v7 tty structures,
Xgettimeofday system call, etc.) confined to the source file getput.c; but I 
Xmake no guarantees.  Also, I have made no attempt to keep variable names 
Xunder 7 characters.  A version of getput.c that MAY work on Sys V Unix
Xsystems is included.
X
X--------------------------------------------------------------------------------
X
XThanks to Emmet Gray (ihnp4!uiucuxc!fthood!egray) and John Rupley 
X(arizona!rupley!root) for the following notes about converting xmodem to Sys V.
XSince I don't have a Sys V system to test a Sys V version, I won't even try.
X
X1) Change the includes in xmodem.h from <sys/time.h> to <time.h>
X   and from <sgtty.h> to <termio.h>
X
X2) Convert the occurrences of rindex to strrchr in batch.c
X
X3) Substitute getput.sysv.c for getput.c
X
XA further "gotcha" regarding Sys V is contained in the following message :
X
XFrom: Bill Stubblebine <hplsdls!was@hp-lsd.UUCP>
XDate: Sat, 25 Jun 88 13:36:20 mdt
XTo: grandi@noao.arizona.edu
XSubject: xmodem3.6 bug, fix and THANKS!!
X
X						1:30 PM MDT
X						June 25, 1988
X
XFirst, thanks for posting a really useful program, xmodem 3.6.
X
XI installed the xmodem program on an HP 9000 Series 350 workstation,
Xrunning HP-UX version 6.01 (AT&T System V compatible) to talk to my
XCP/M system at home.  MODEM7 batch is particularly useful.
X
XI'd like to report a bug I found and the fix I developed in the source
Xfile getput.sysv.c so that you can include it in future releases.
X
XI've reproduced the relevant portion of getput.sysv.c, modified to fix
Xthe bug, at the end of this file.  See the routine getspeed() starting
Xat line 382.  Getspeed() derives the serial port speed from the
Xc_cflag ioctl parameter, for use in estimating transmission times.
X
XI suspected something was wrong when xmodem kept reporting 1200 baud
Xmodem connections as 1800 baud in the log file, but the transfers
Xstill worked OK at 1200 baud.  However, I also have a Courier HST 9600
Xbaud modem at home, and when I tried 9600 baud xmodem transfers,
Xxmodem would core dump on the UNIX host.
X
XOn line 386 of getput.sysv.c, in the procedure getspeed(), an array is
Xdeclared containing numerical constants representing the various baud
Xrates supported by the host terminal interface.  The appropriate baud
Xrate constant is selected by the statements in lines 392-394, which
Xmask the c_cflag baud rate bitfield to index into the speedtbl[]
Xarray.
X
XThere are two problems here.  The first problem is that speedtbl[] is
Xmissing some valid baud rate entries, as the modified declaration
Xshows.  I got the entries for the modified declaration from the
Xtermio(7) manpage in my System V user's manual.  The missing entries
Xthrow off the indexing arithmetic.  Notice, for example, that the
Xmissing entry 900 was responsible for mapping the c_cflag bits for
X1200 baud to the 1800 baud constant.
X
XOriginal declaration:
X  static int speedtbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600,
X  1200, 1800, 2400, 4800, 9600, 19200, 0};
X
XModified declaration:
X  static int speedtbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600,
X  900, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400, 0};
X  ^^^                    ^^^^        ^^^^        ^^^^^  ^^^^^
X
XThe second problem didn't show up until I used 9600 baud.  The c_cflag
Xbitfield value for 9600 baud is 16 decimal (020 octal).  The masking
Xconstant in lines 392-394 was originally 017 octal, which masked the
X9600 baud bitfield to 0, indexing to the speedtbl[] value of 0.  Speed
Xcalculations using a baudrate of 0 caused floating point exceptions
Xleading to the host core dumps at 9600 baud.
X
XI changed the mask value from 017 octal to 037 octal (which is
Xactually the size of the c_cflag baudrate field), and changed the
Xlimit test in line 392 from 14 to 18, the new correct number of
Xelements in the speedtbl[] array.
X
XI'm not familiar with 4.2BSD, but I noticed that getput.c, the 4.2BSD
Xversion of the I/O routines, contains virtually the same code for
Xdetermining the baudrate as that in getput.sysv.c.  It may be OK for
X4.2BSD, but definitely not for System V.
X
XThe modified code now works great at all baud rates!  Thanks again for
Xposting the program.
X
X                                Bill Stubblebine
X                                Hewlett-Packard Logic Systems Div.
X				8245 N. Union Blvd.
X                                Colorado Springs, Co. 80918
X				ARPA: was%hp-lsd@hplabs.hp.com
X				UUCP: {hplabs,hpfcla}!{hpldola,hp-lsd}!was
X
X--------------------------------------------------------------------------------
X
XA common request to me concerns running xmodem through tip in order to do
XXMODEM or YMODEM transfers.  I have discovered that SunOS has a nice
Xfeature in tip (accessed through ~C) that connects a named program to a
Xremote machine.  It turns out that 4.3BSD tip has a similar (but
Xundocumented) feature, but far less convenient: SunOS tip connects file
Xdescriptor 0 of the program to the remote line input and file descriptor 1
Xto remote line output while 4.3BSD connects up file descriptors 3 and 4! 
X
XIf you would like to use xmodem through 4.3BSD tip, the following message
Xshould be of interest (note that the patches given below are against an old
Xversion of the source):
X
XTo: grandi@noao.edu (Steve Grandi CCS)
XSubject: Re: xmodem 
XDate: Tue, 02 Jan 90 12:34:58 -0500
XFrom: Benson I. Margulies <benson@odi.com>
X
X
X    Yes, I would like to receive the changes!
X
X    Steve, grandi@noao.edu
X
XOK, here are the diffs. I've tested them in receive mode,
Xbut I haven't been able to verify that they work for sending.
XThe reason why is a long sob story.
X
XIt would be good to do two additional things:
X
X1) add some \r's to the messages printed.
X2) when in tip mode, print more messages on stdout
Xto report progress, like a . every 100 blocks.
X
XRCS file: RCS/xmodem.c,v
Xretrieving revision 1.1
Xretrieving revision 1.2
Xdiff -c -r1.1 -r1.2
X*** /tmp/,RCSt1a02154	Tue Jan  2 12:33:12 1990
X--- /tmp/,RCSt2a02154	Tue Jan  2 12:33:12 1990
X***************
X*** 52,57 ****
X--- 52,60 ----
X  	MDM7BAT = FALSE;	/* no MODEM7 batch mode */
X  	YMDMBAT = FALSE;	/* no YMODEM batch mode */
X  	TOOBUSY = FALSE;	/* not too busy for sleeping in packet read */
X+ 	INFD = 0;
X+ 	OUTFD = 1;
X+ 	FDS_DISTINCT = 0;
X  
X  	fprintf(stderr, "XMODEM Version %d.%d", VERSION/10, VERSION%10);
X  	fprintf(stderr, " -- UNIX-Microcomputer Remote File Transfer Facility\n");
X***************
X*** 101,106 ****
X--- 104,115 ----
X  		case 's' : SENDFLAG = TRUE;  /* send file */
X  			   XMITTYPE = gettype(argv[1][index++]);
X  			   break;
X+ 		case 'p':  /* TIP */
X+ 		case 'P':
X+ 		           INFD = 3;
X+ 			   OUTFD = 4;
X+ 			   FDS_DISTINCT = TRUE;
X+ 			   break;
X  		default  : fprintf(stderr, "Invalid Flag %c ignored\n", flag);
X  			   break;
X  	   }
X***************
X*** 120,133 ****
X  		LOGFP = fopen(fname, "w");  /* new LOG file */
X  	     if (!LOGFP)
X  		error("Fatal - Can't Open Log File", FALSE);
X  
X  	     fprintf(LOGFP,"\n++++++++  %s", stamptime());
X  	     fprintf(LOGFP,"XMODEM Version %d.%d\n", VERSION/10, VERSION%10);
X  	     fprintf(LOGFP,"Command line: %s %s", argv[0], argv[1]);
X! 	     for (index=2; index<argc; ++index)
X! 		fprintf(LOGFP, " %s", argv[index]);
X  	     fprintf(LOGFP, "\n");
X! 	   }
X  
X  	getspeed();		/* get tty-speed for time estimates */
X  
X--- 129,147 ----
X  		LOGFP = fopen(fname, "w");  /* new LOG file */
X  	     if (!LOGFP)
X  		error("Fatal - Can't Open Log File", FALSE);
X+ 	     setlinebuf(LOGFP);
X  
X  	     fprintf(LOGFP,"\n++++++++  %s", stamptime());
X+ 		 
X  	     fprintf(LOGFP,"XMODEM Version %d.%d\n", VERSION/10, VERSION%10);
X+ 
X  	     fprintf(LOGFP,"Command line: %s %s", argv[0], argv[1]);
X! 
X! 	     for (index=2; index<argc; ++index) {
X! 		 fprintf(LOGFP, " %s", argv[index]);
X! 	     }
X  	     fprintf(LOGFP, "\n");
X! 	 }
X  
X  	getspeed();		/* get tty-speed for time estimates */
X  
X===================================================================
XRCS file: RCS/xmodem.h,v
Xretrieving revision 1.1
Xretrieving revision 1.2
Xdiff -c -r1.1 -r1.2
X*** /tmp/,RCSt1a02154	Tue Jan  2 12:33:13 1990
X--- /tmp/,RCSt2a02154	Tue Jan  2 12:33:14 1990
X***************
X*** 10,16 ****
X  #define  logit(string) if(LOGFLAG)fprintf(LOGFP,string)
X  #define  logitarg(string,argument) if(LOGFLAG)fprintf(LOGFP,string,argument)
X  
X! #define	     VERSION	36	/* Version Number */
X  #define      FALSE      0
X  #define      TRUE       1
X  
X--- 10,16 ----
X  #define  logit(string) if(LOGFLAG)fprintf(LOGFP,string)
X  #define  logitarg(string,argument) if(LOGFLAG)fprintf(LOGFP,string,argument)
X  
X! #define	     VERSION	37	/* Version Number */
X  #define      FALSE      0
X  #define      TRUE       1
X  
X***************
X*** 73,78 ****
X--- 73,81 ----
X  int	YMDMBAT;	/* YMODEM batch protocol */
X  int	TOOBUSY;	/* turn off sleeping in packet read routine */
X  int	CHECKLENGTH;	/* Are we truncating a file to a YMODEM length? */
X+ int 	INFD;		/* file descriptor for protocol reading */
X+ int	OUTFD;		/* file descriptor for protocol reading */
X+ int     FDS_DISTINCT;   /* in,out fd's not 0 and 1 */
X  
X  
X  /*   CRC-16 constants.  From Usenet contribution by Mark G. Mendel, 
X===================================================================
XRCS file: RCS/getput.c,v
Xretrieving revision 1.1
Xretrieving revision 1.2
Xdiff -c -r1.1 -r1.2
X*** /tmp/,RCSt1a02154	Tue Jan  2 12:33:14 1990
X--- /tmp/,RCSt2a02154	Tue Jan  2 12:33:15 1990
X***************
X*** 4,9 ****
X--- 4,10 ----
X   */
X  
X  #include "xmodem.h"
X+ #include <sys/types.h>
X  
X  /*
X   *
X***************
X*** 103,113 ****
X  /* get a byte from data stream -- timeout if "seconds" elapses */
X  /* This routine is VERY 4.2 specific */
X  
X  int
X  readbyte(seconds)
X  int seconds;
X  	{
X- 	int readfd;
X  	char c;
X  	struct timeval tmout;
X  
X--- 104,122 ----
X  /* get a byte from data stream -- timeout if "seconds" elapses */
X  /* This routine is VERY 4.2 specific */
X  
X+ int select_input (tmout)
X+ struct timeval * tmout;
X+ {
X+     fd_set readfd;		/* mask for select call */
X+     FD_ZERO(&readfd);
X+     FD_SET(INFD, &readfd);
X+     return select(getdtablesize(), &readfd, (int *)0, (int *)0, tmout);
X+ }
X+ 
X  int
X  readbyte(seconds)
X  int seconds;
X  	{
X  	char c;
X  	struct timeval tmout;
X  
X***************
X*** 114,125 ****
X  	tmout.tv_sec = seconds;
X  	tmout.tv_usec = 0;
X  
X- 	readfd = 1<<0;
X  
X! 	if ((select(1, &readfd, (int *)0, (int *)0, &tmout)) == 0)
X! 		return(TIMEOUT);
X  
X! 	read(0, &c, 1);
X  
X  	if (DEBUG)
X  		fprintf(LOGFP, "DEBUG: readbyte %02xh\n", c & 0xff);
X--- 123,133 ----
X  	tmout.tv_sec = seconds;
X  	tmout.tv_usec = 0;
X  
X  
X! 	if (select_input(&tmout) == 0)
X! 	    return(TIMEOUT);
X  
X! 	read(INFD, &c, 1);
X  
X  	if (DEBUG)
X  		fprintf(LOGFP, "DEBUG: readbyte %02xh\n", c & 0xff);
X***************
X*** 138,151 ****
X  	/* set up a usec timeout on stdin */
X  	tmout.tv_sec = 0;
X  	tmout.tv_usec = 1;
X! 	readfd = 1<<0;
X  
X  	/* any characters pending?; return if none */
X! 	if ((select(1, &readfd, (int *)0, (int *)0, &tmout)) == 0)
X! 		return;
X  
X  	/* read the characters to flush them (assume there are fewer than BBUFSIZ */
X! 	(void) read(0, inbuf, BBUFSIZ);
X  	}
X--- 146,159 ----
X  	/* set up a usec timeout on stdin */
X  	tmout.tv_sec = 0;
X  	tmout.tv_usec = 1;
X! 	readfd = 1<<INFD;
X  
X  	/* any characters pending?; return if none */
X! 	if (select_input(&tmout) == 0)
X! 	    return;
X  
X  	/* read the characters to flush them (assume there are fewer than BBUFSIZ */
X! 	(void) read(INFD, inbuf, BBUFSIZ);
X  	}
X***************
X*** 170,181 ****
X  long recvsectcnt;	/* running sector count (128 byte sectors) */
X  
X  {
X- 	int readfd;		/* mask for select call */
X- 	struct timeval tmout;	/* timeout structure for select */
X  	int numread;		/* number of chars read */
X  	int left;		/* number of chars left to read */
X  	int recfin = FALSE;		/* flag that EOF read */
X  	char inbuf[BBUFSIZ];	/* buffer for incoming packet */
X  	register unsigned char c;	/* character being processed */
X  	register unsigned short chksm;	/* working copy of checksum */
X  	register int bfctr;	/* working copy of bufctr */
X--- 178,188 ----
X  long recvsectcnt;	/* running sector count (128 byte sectors) */
X  
X  {
X  	int numread;		/* number of chars read */
X  	int left;		/* number of chars left to read */
X  	int recfin = FALSE;		/* flag that EOF read */
X  	char inbuf[BBUFSIZ];	/* buffer for incoming packet */
X+ 	struct timeval tmout;	/* timeout structure for select */
X  	register unsigned char c;	/* character being processed */
X  	register unsigned short chksm;	/* working copy of checksum */
X  	register int bfctr;	/* working copy of bufctr */
X***************
X*** 184,190 ****
X  
X  	tmout.tv_sec = seconds;
X  	tmout.tv_usec = 0;
X- 	readfd = 1<<0;
X  	chksm = 0;
X  	bfctr = 0;
X  
X--- 191,196 ----
X***************
X*** 192,201 ****
X  
X  		/* read however many chars are waiting */
X  
X! 		if ((select(1, &readfd, (int *)0, (int *)0, &tmout)) == 0)
X! 			return(TIMEOUT);
X  
X! 		numread = read(0, inbuf, left);
X  		left -= numread;
X  
X  		if (DEBUG)
X--- 198,207 ----
X  
X  		/* read however many chars are waiting */
X  
X! 		if (select_input(&tmout) == 0)
X! 		    return(TIMEOUT);
X  
X! 		numread = read(INFD, inbuf, left);
X  		left -= numread;
X  
X  		if (DEBUG)
X***************
X*** 275,281 ****
X  	if (DEBUG)
X  		fprintf(LOGFP, "DEBUG: sendbyte %02xh\n", data & 0xff);
X  
X! 	if (write(1, &data, 1) != 1)  	/* write the byte (assume it goes NOW; no flushing needed) */
X  		error ("Write error on stream", TRUE);
X  	return;
X  	}
X--- 281,287 ----
X  	if (DEBUG)
X  		fprintf(LOGFP, "DEBUG: sendbyte %02xh\n", data & 0xff);
X  
X! 	if (write(OUTFD, &data, 1) != 1)  	/* write the byte (assume it goes NOW; no flushing needed) */
X  		error ("Write error on stream", TRUE);
X  	return;
X  	}
X***************
X*** 289,295 ****
X  	if (DEBUG)
X  		fprintf(LOGFP, "DEBUG: writebuf (%d bytes)\n", nbytes);
X  
X! 	if (write(1, buffer, nbytes) != nbytes)		/* write the buffer (assume no TIOCFLUSH needed) */
X  		error ("Write error on stream", TRUE);
X  	return;
X  	}
X--- 295,301 ----
X  	if (DEBUG)
X  		fprintf(LOGFP, "DEBUG: writebuf (%d bytes)\n", nbytes);
X  
X! 	if (write(OUTFD, buffer, nbytes) != nbytes)		/* write the buffer (assume no TIOCFLUSH needed) */
X  		error ("Write error on stream", TRUE);
X  	return;
X  	}
X***************
X*** 302,308 ****
X  int	milliseconds;
X  {
X  	struct	timeval	timeout;
X- 	int readfd;
X  
X  	if (milliseconds == 0)
X  		return;
X--- 308,313 ----
X***************
X*** 310,318 ****
X  		fprintf (LOGFP, "DEBUG: napping for %d ms\n", milliseconds);
X  	timeout.tv_sec = 0;
X  	timeout.tv_usec = milliseconds * 1000;
X- 	readfd = 0;
X  
X! 	(void) select(1, &readfd, (int *)0, (int *)0, &timeout);
X  }
X--- 315,322 ----
X  		fprintf (LOGFP, "DEBUG: napping for %d ms\n", milliseconds);
X  	timeout.tv_sec = 0;
X  	timeout.tv_usec = milliseconds * 1000;
X  
X! 	(void) select(0, (int *)0, (int *)0, (int *)0, &timeout);
X  }
X***************
X*** 335,344 ****
X  	extern onintr();
X  
X  	sleep(2);			/* let the output appear */
X! 	if (ioctl(0,TIOCGETP,&ttys)<0)  /* get tty params [V7] */
X  		error("Can't get TTY Parameters", TRUE);
X  
X! 	tty = ttyname(0);  /* identify current tty */
X  	
X  	ttysnew.sg_ispeed = ttys.sg_ispeed;	/* copy input speed */
X  	ttysnew.sg_ospeed = ttys.sg_ospeed;	/* copy input speed */
X--- 339,348 ----
X  	extern onintr();
X  
X  	sleep(2);			/* let the output appear */
X! 	if (ioctl(INFD,TIOCGETP,&ttys)<0)  /* get tty params [V7] */
X  		error("Can't get TTY Parameters", TRUE);
X  
X! 	tty = ttyname(INFD);  /* identify current tty */
X  	
X  	ttysnew.sg_ispeed = ttys.sg_ispeed;	/* copy input speed */
X  	ttysnew.sg_ospeed = ttys.sg_ospeed;	/* copy input speed */
X***************
X*** 347,358 ****
X  	ttysnew.sg_flags &= ~TANDEM;	/* turn off flow control */
X  
X  	/* set new paramters */
X! 	if (ioctl(0,TIOCSETP,&ttysnew) < 0)
X  		error("Can't set new TTY Parameters", TRUE);
X  
X  	/* Flush characters waiting for read or write */
X  	n = 0;
X! 	if (ioctl(0,TIOCFLUSH,&n) < 0)
X  		error("Can't flush terminal queue", TRUE);
X  
X  	/* get tty status */ 
X--- 351,362 ----
X  	ttysnew.sg_flags &= ~TANDEM;	/* turn off flow control */
X  
X  	/* set new paramters */
X! 	if (ioctl(INFD,TIOCSETP,&ttysnew) < 0)
X  		error("Can't set new TTY Parameters", TRUE);
X  
X  	/* Flush characters waiting for read or write */
X  	n = 0;
X! 	if (ioctl(INFD,TIOCFLUSH,&n) < 0)
X  		error("Can't flush terminal queue", TRUE);
X  
X  	/* get tty status */ 
X***************
X*** 381,387 ****
X  	if (wason)
X  		if (chmod(tty, (int)statbuf.st_mode | 022) < 0)
X  			error("Can't change TTY mode", FALSE);
X! 	if (ioctl(0,TIOCSETP,&ttys) < 0)
X  		{ if (!errcall)
X  		   error("RESET - Can't restore normal TTY Params", FALSE);
X  		else
X--- 385,391 ----
X  	if (wason)
X  		if (chmod(tty, (int)statbuf.st_mode | 022) < 0)
X  			error("Can't change TTY mode", FALSE);
X! 	if (ioctl(INFD,TIOCSETP,&ttys) < 0)
X  		{ if (!errcall)
X  		   error("RESET - Can't restore normal TTY Params", FALSE);
X  		else
X***************
X*** 423,429 ****
X  	{
X  	static int speedtbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 
X  	   1200, 1800, 2400, 4800, 9600, 19200, 0};
X! 	if (ioctl(0,TIOCGETP,&ttys) < 0)	/* get tty structure */
X  		error("Can't get TTY parameters", FALSE);
X  
X  	if (ttys.sg_ispeed >= 0 && ttys.sg_ispeed <= 14)
X--- 427,433 ----
X  	{
X  	static int speedtbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 
X  	   1200, 1800, 2400, 4800, 9600, 19200, 0};
X! 	if (ioctl(INFD,TIOCGETP,&ttys) < 0)	/* get tty structure */
X  		error("Can't get TTY parameters", FALSE);
X  
X  	if (ttys.sg_ispeed >= 0 && ttys.sg_ispeed <= 14)
X
X--------------------------------------------------------------------------------
X
Xxmodem Program history:
X
XDescended from UMODEM 3.5 by Lauren Weinstein, Richard Conn, and others.
X
XBased on XMODEM Version 1.0 by Brian Kantor, UCSD (3/84)  (Don't blame him 
X    in any way for what follows....)
X
XVersion 2.0 (CRC-16 and Modem7 batch file transfer) (5/85) (Thanks to D'Anne
X    Thompson for the batch transfer code).
X
XVersion 2.1 (1K packets) (7/85)
X
XVersion 2.2 (general clean-ups and multi-character read speed-ups) (9/85)
X
XVersion 2.3 (nap while reading packets; split into several source files) (1/86)
X
XVersion 3.0 (Ymodem batch receive; associated changes) (2/86)
X
XVersion 3.1 (Ymodem batch send; associated changes) (8/86)
X
XVersion 3.2 (general cleanups) (9/86) 
X    (Released to the world 1/87)
X
XVersion 3.3 (general fixes and cleanups; see update.doc) (5/87)
X
XVersion 3.4 (general fixes and cleanups; see update.doc) (10/87) 
X    (Released to the world 3/88)
X
XVersion 3.5 (general fixes and cleanups; see update.doc) (3/88)
X
XVersion 3.6 (general fixes and cleanups; text file translation for Mac; 
X    see update.doc) (4/88) 
X    (Released to the world 4/88)
X
XVersion 3.7 (general fixes and cleanups; see update.doc) (5/88)
X
XVersion 3.8 (general fixes and cleanups; see update.doc) (11/88)
X
XVersion 3.9 (general fixes and cleanups; Sun tip support; 
X    see update.doc) (11/90)
X
X--------------------------------------------------------------------------------
X
XPlease send bug fixes, additions and comments to:
XSteve Grandi, National Optical Astronomy Observatories (Tucson, Arizona, USA)
X	grandi@noao.edu
END_OF_FILE
if test 21493 -ne `wc -c <'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs'`; then
    echo shar: \"'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs'\" unpacked with wrong size!
fi
# end of 'pf-bootstrap-v1.1a/xmodem-3.9/tip.diffs'
fi
echo shar: End of archive 9 \(of 9\).
cp /dev/null ark9isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 9 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0