diff -r -c ./Makefile /usr/ibmpc-release/vax/c86/lib86/Makefile
*** ./Makefile	Thu Jul 18 23:11:06 1985
--- /usr/ibmpc-release/vax/c86/lib86/Makefile	Tue Sep 25 20:08:20 1984
***************
*** 1,5
- LIB = ../lib
- 
  remake:
  	- rm libc.a nlibc.a
  	make all

--- 1,3 -----
  remake:
  	- rm libc.a nlibc.a
  	make all
***************
*** 12,19
  	cd gen; make
  	cd stdio; make
  	ls crt/*.b gen/*.b sys/*.b stdio/*.b | sort -t/ +1 > t1
! 	ar cr ${LIB}/libc.a `lorder86 \`cat t1\` | tsort`;
! 	ranlib ${LIB}/libc.a
  	rm -f t1
  
  nlibc.a:

--- 10,17 -----
  	cd gen; make
  	cd stdio; make
  	ls crt/*.b gen/*.b sys/*.b stdio/*.b | sort -t/ +1 > t1
! 	ar cr libc.a `lorder \`cat t1\` | tsort`;
! 	ranlib libc.a
  	rm -f t1
  
  nlibc.a:
***************
*** 22,29
  	cd ngen; make
  	cd nstdio; make
  	ls ncrt/*.b ngen/*.b sys/*.b nstdio/*.b | sort -t/ +1 > t1
! 	ar cr ${LIB}/libnc.a `lorder86 \`cat t1\` | tsort`;
! 	ranlib ${LIB}/libnc.a
  	rm -f t1
  
  crt0.b:	crt0.a86

--- 20,27 -----
  	cd ngen; make
  	cd nstdio; make
  	ls ncrt/*.b ngen/*.b sys/*.b nstdio/*.b | sort -t/ +1 > t1
! 	ar cr nlibc.a `lorder \`cat t1\` | tsort`;
! 	ranlib nlibc.a
  	rm -f t1
  
  crt0.b:	crt0.a86
***************
*** 28,31
  
  crt0.b:	crt0.a86
  	a86 crt0
! 	mv crt0.b ${LIB}

--- 26,29 -----
  
  crt0.b:	crt0.a86
  	a86 crt0
! 
Common subdirectories: ./crt and /usr/ibmpc-release/vax/c86/lib86/crt
diff -r -c ./crt0.a86 /usr/ibmpc-release/vax/c86/lib86/crt0.a86
*** ./crt0.a86	Mon Sep 16 16:24:37 1985
--- /usr/ibmpc-release/vax/c86/lib86/crt0.a86	Fri Sep  7 12:16:37 1984
***************
*** 2,8
  | Non-8087 version
  | Modified for MSDOS 2.0, 6/26/83 SAW
  | Modified again, 9/7/84 PZ + SAW
- | added version stuff, 10/84 Romkey
  
  | proper operation requires that this be linked as first file.
  

--- 2,7 -----
  | Non-8087 version
  | Modified for MSDOS 2.0, 6/26/83 SAW
  | Modified again, 9/7/84 PZ + SAW
  
  | proper operation requires that this be linked as first file.
  
***************
*** 20,27
  	.globl	fpinit		| 8087 initialization
  	.globl	_dos_ini	| system call writearound initialization
  	.globl	_prints		| trivial string i/o for messages
- 	.globl	_version
- 	.globl  __net_if_name
  
  qmark = 077	| question mark character
  space = 040	| space character

--- 19,24 -----
  	.globl	fpinit		| 8087 initialization
  	.globl	_dos_ini	| system call writearound initialization
  	.globl	_prints		| trivial string i/o for messages
  
  qmark = 077	| question mark character
  space = 040	| space character
***************
*** 42,54
  |	    stack
  |	---------------  <- min(base of data + 64K, top of memory)
  
- 	.data
- 	.even
- _version:
- 	.zerow	1
- __net_if_name:
- 	.byte	0
- 	.text
  || set up segment registers and stack pointer
  	jmp	crtstart
  version:

--- 39,44 -----
  |	    stack
  |	---------------  <- min(base of data + 64K, top of memory)
  
  || set up segment registers and stack pointer
  	cli			| turn off interupts until segment hacking complete
  	mov	ax,#_etext+15	| top of program segment
***************
*** 50,62
  	.byte	0
  	.text
  || set up segment registers and stack pointer
- 	jmp	crtstart
- version:
- 	.word	0
- net_if_name:
- 	.byte	0xa5
- 	.byte	0
- crtstart:
  	cli			| turn off interupts until segment hacking complete
  	mov	ax,#_etext+15	| top of program segment
  	movb	cl,*4		| convert into segment value

--- 40,45 -----
  |	---------------  <- min(base of data + 64K, top of memory)
  
  || set up segment registers and stack pointer
  	cli			| turn off interupts until segment hacking complete
  	mov	ax,#_etext+15	| top of program segment
  	movb	cl,*4		| convert into segment value
***************
*** 181,188
  	call	_prints
  	int	0x20
  
! Lok:
! 	mov	cx,#_end	| zero bss storage
  	mov	di,#_edata	| starting at end of initialized data
  	sub	cx,di
  	jz	Lclear		| no bss => nothing to do

--- 164,170 -----
  	call	_prints
  	int	0x20
  
! Lok:	mov	cx,#_end	| zero bss storage
  	mov	di,#_edata	| starting at end of initialized data
  	sub	cx,di
  	jz	Lclear		| no bss => nothing to do
***************
*** 193,206
  
  Lclear:
  |	call	fpinit		| set up 8087 modes
- 	seg	cs
- 	mov	ax,version
- 	mov	_version,ax
- 
- 	seg	cs
- 	mov	ax,net_if_name
- 	mov	__net_if_name,ah
- 
  	call	_dos_ini	| set up for system calls
  
  	call	_main		| let user do his thing...

--- 175,180 -----
  
  Lclear:
  |	call	fpinit		| set up 8087 modes
  	call	_dos_ini	| set up for system calls
  
  	call	_main		| let user do his thing...
***************
*** 207,212
  	add	sp,*4
  
  	push	ax
  
  	call	_exit		| clean up, etc.
  

--- 181,187 -----
  	add	sp,*4
  
  	push	ax
+ 	call	__exit		| clean up, etc.
  
  	mov	bx,sp		| if anyone cares, put exit status in ax
  	mov	ax,*2(bx)
***************
*** 208,215
  
  	push	ax
  
- 	call	_exit		| clean up, etc.
- 
  	mov	bx,sp		| if anyone cares, put exit status in ax
  	mov	ax,*2(bx)
  	int	0x20		| this really exits

--- 183,188 -----
  	push	ax
  	call	__exit		| clean up, etc.
  
  	mov	bx,sp		| if anyone cares, put exit status in ax
  	mov	ax,*2(bx)
  	int	0x20		| this really exits
***************
*** 241,246
  
  Lmsg:	.ascii	"*** Not enough memory, aborting..."
  	.byte	0xa,0xd,0
- 
- 	.asciz "Copyright 1984 Massachusetts Institute of Technology"
- 	.asciz "See notice in file <notice.h>"

--- 214,216 -----
  
  Lmsg:	.ascii	"*** Not enough memory, aborting..."
  	.byte	0xa,0xd,0
Common subdirectories: ./gen and /usr/ibmpc-release/vax/c86/lib86/gen
Only in /usr/ibmpc-release/vax/c86/lib86: include
Only in /usr/ibmpc-release/vax/c86/lib86: lorder
Only in .: mout
Common subdirectories: ./ncrt and /usr/ibmpc-release/vax/c86/lib86/ncrt
Common subdirectories: ./ngen and /usr/ibmpc-release/vax/c86/lib86/ngen
Common subdirectories: ./nstdio and /usr/ibmpc-release/vax/c86/lib86/nstdio
Common subdirectories: ./stdio and /usr/ibmpc-release/vax/c86/lib86/stdio
Common subdirectories: ./sys and /usr/ibmpc-release/vax/c86/lib86/sys
Only in ./crt: READ.ME
Only in ./crt: abort.b
Only in ./crt: arith.b
Only in ./crt: mcount.b
diff -r -c ./gen/Makefile /usr/ibmpc-release/vax/c86/lib86/gen/Makefile
*** ./gen/Makefile	Thu Jul 18 23:10:45 1985
--- /usr/ibmpc-release/vax/c86/lib86/gen/Makefile	Tue Sep 25 20:18:22 1984
***************
*** 2,8
  .c.b: ; cc86 -c $<
  
  OBJECTS =	abs.b atoi.b blt.b atof.b atol.b  calloc.b crypt.b\
! 		ctime.b ctype_.b cuexit.b ecvt.b execvp.b clear.b\
  		getlogin.b index.b l3.b\
  		malloc.b mfill.b frexp.b\
  		mktemp.b mon.b perror.b qsort.b rand.b\

--- 2,8 -----
  .c.b: ; cc86 -c $<
  
  OBJECTS =	abs.b atoi.b blt.b atof.b atol.b  calloc.b crypt.b\
! 		ctime.b ctype_.b cuexit.b ecvt.b errlst.b execvp.b clear.b\
  		getlogin.b index.b l3.b\
  		malloc.b mfill.b frexp.b\
  		mktemp.b mon.b perror.b qsort.b rand.b\
Only in ./gen: abs.b
Only in ./gen: access.b
Only in ./gen: atof.b
Only in ./gen: atoi.b
Only in ./gen: atol.b
Only in ./gen: blt.b
Only in ./gen: calloc.b
Only in ./gen: clear.b
Only in ./gen: crypt.b
Only in ./gen: ctime.b
Only in ./gen: ctype_.b
Only in ./gen: cuexit.b
diff -r -c ./gen/cuexit.c /usr/ibmpc-release/vax/c86/lib86/gen/cuexit.c
*** ./gen/cuexit.c	Thu Jul 18 23:10:47 1985
--- /usr/ibmpc-release/vax/c86/lib86/gen/cuexit.c	Fri Sep  7 12:31:52 1984
***************
*** 1,22
! 
! static int (*closers[30])();
! static int nclosers = 0;
! 
! exit_hook(func)
! 	int (*func)(); {
! 
! /*	printf("exit_hook: adding func %04x\n", func);	*/
! 
! 	closers[++nclosers] = func;
! 	}
! 
! exit(code) {
! 	int n;
! 
! 	for(n=nclosers; n; n--) {
! /*		printf("exit: calling func %04x\n", closers[n]);	*/
! 		(*closers[n])();
! 		}
! 
! 	_exit(code);
   }

--- 1,3 -----
! exit(code)
!  {	_exit(code);
   }
Only in ./gen: ecvt.b
Only in ./gen: execvp.b
Only in ./gen: frexp.b
Only in ./gen: getlogin.b
Only in ./gen: index.b
Only in ./gen: l3.b
Only in ./gen: malloc.b
Only in ./gen: mfill.b
Only in ./gen: mktemp.b
Only in ./gen: mon.b
Only in ./gen: perror.b
diff -r -c ./gen/perror.c /usr/ibmpc-release/vax/c86/lib86/gen/perror.c
*** ./gen/perror.c	Thu Jul 18 23:10:51 1985
--- /usr/ibmpc-release/vax/c86/lib86/gen/perror.c	Fri Sep  7 12:29:48 1984
***************
*** 1,5
- #include <stdio.h>
- 
  /*
   * Print the error indicated
   * in the cerror cell.

--- 1,3 -----
  /*
   * Print the error indicated
   * in the cerror cell.
***************
*** 6,32
   */
  
  int	errno;
! int	sys_nerr = 18;
! char	*sys_errlist[] = {
! 	"No error",
! 	"Invalid function",
! 	"File not found",
! 	"Path not found",
! 	"Too many open files",
! 	"Access denied",
! 	"Invalid handle",
! 	"Memory control corrupted",
! 	"Out of memory",
! 	"Bad memory block address",
! 	"Invalid environment",
! 	"Invalid format",
! 	"Invalid data",
! 	"Invalid drive",
! 	"Can't remove current directory",
! 	"Not same device",
! 	"No more files"
! 	};
! 
  perror(s)
  char *s;
  {

--- 4,11 -----
   */
  
  int	errno;
! int	sys_nerr;
! char	*sys_errlist[];
  perror(s)
  char *s;
  {
***************
*** 37,44
  	if(errno < sys_nerr)
  		c = sys_errlist[errno];
  	n = strlen(s);
! 	if(n)
! 		fprintf(stderr, "%s: ", s);
! 
! 	fprintf(stderr, "%s\n", c);
  }

--- 16,25 -----
  	if(errno < sys_nerr)
  		c = sys_errlist[errno];
  	n = strlen(s);
! 	if(n) {
! 		write(2, s, n);
! 		write(2, ": ", 2);
! 	}
! 	write(2, c, strlen(c));
! 	write(2, "\n", 1);
  }
Only in ./gen: qsort.b
Only in ./gen: rand.b
Only in ./gen: rindex.b
Only in ./gen: setjmp.b
Only in ./gen: sleep.b
Only in ./gen: stat.b
Only in ./gen: stat.c.esv
Only in ./gen: strcat.b
Only in ./gen: strcatn.b
Only in ./gen: strcmp.b
Only in ./gen: strcmpn.b
Only in ./gen: strcpy.b
Only in ./gen: strcpyn.b
Only in ./gen: strlen.b
Only in ./gen: strncat.b
Only in ./gen: strncmp.b
Only in ./gen: strncpy.b
Only in ./gen: stty.b
Only in ./gen: swab.b
Only in ./gen: tell.b
Only in ./gen: timezone.b
Only in ./gen: ttyname.b
Only in ./gen: ttyslot.b
Only in ./ncrt: abort.b
diff -r -c ./ncrt/arith.a86 /usr/ibmpc-release/vax/c86/lib86/ncrt/arith.a86
*** ./ncrt/arith.a86	Thu Jul 18 23:11:00 1985
--- /usr/ibmpc-release/vax/c86/lib86/ncrt/arith.a86	Thu Sep  6 16:20:54 1984
***************
*** 34,41
  | This should work for almul and aulmul
  
  	.globl	almul
- 	.globl	aulmul
- aulmul:
  almul:	mov	bx,sp
  	mov	bx,*2(bx)	| load ptr to arg in bx
  	push	*2(bx)		| push high

--- 34,39 -----
  | This should work for almul and aulmul
  
  	.globl	almul
  almul:	mov	bx,sp
  	mov	bx,*2(bx)	| load ptr to arg in bx
  	push	*2(bx)		| push high
***************
*** 223,230
  	ret
  
  	.globl	aldiv
- 	.globl	auldiv
- auldiv:
  aldiv:	push	bp		| This one is REALLY cheap! -SAW.
  	mov	bp,sp
  	push	bx

--- 221,226 -----
  	ret
  
  	.globl	aldiv
  aldiv:	push	bp		| This one is REALLY cheap! -SAW.
  	mov	bp,sp
  	push	bx
Only in ./ncrt: arith.b
Only in ./ncrt: mcount.b
Only in ./ngen: abs.b
Only in ./ngen: access.b
Only in ./ngen: atoi.b
Only in ./ngen: atol.b
Only in ./ngen: blt.b
Only in ./ngen: calloc.b
Only in ./ngen: clear.b
Only in ./ngen: crypt.b
Only in ./ngen: ctime.b
Only in ./ngen: ctype_.b
Only in ./ngen: cuexit.b
Only in ./ngen: execvp.b
Only in ./ngen: getlogin.b
Only in ./ngen: index.b
Only in ./ngen: l3.b
Only in ./ngen: malloc.b
Only in ./ngen: mfill.b
Only in ./ngen: mktemp.b
Only in ./ngen: mon.b
Only in ./ngen: perror.b
Only in ./ngen: qsort.b
Only in ./ngen: rand.b
Only in ./ngen: rindex.b
Only in ./ngen: setjmp.b
Only in ./ngen: sleep.b
Only in ./ngen: stat.b
Only in ./ngen: strcat.b
Only in ./ngen: strcatn.b
Only in ./ngen: strcmp.b
Only in ./ngen: strcmpn.b
Only in ./ngen: strcpy.b
Only in ./ngen: strcpyn.b
Only in ./ngen: strlen.b
Only in ./ngen: strncat.b
Only in ./ngen: strncmp.b
Only in ./ngen: strncpy.b
Only in ./ngen: stty.b
Only in ./ngen: swab.b
Only in ./ngen: tell.b
Only in ./ngen: timezone.b
Only in ./ngen: ttyname.b
Only in ./ngen: ttyslot.b
diff -r -c ./nstdio/Makefile /usr/ibmpc-release/vax/c86/lib86/nstdio/Makefile
*** ./nstdio/Makefile	Thu Jul 18 23:11:13 1985
--- /usr/ibmpc-release/vax/c86/lib86/nstdio/Makefile	Thu Sep  6 16:21:55 1984
***************
*** 1,5
  all:
  	cd ../stdio; make
  	cp ../stdio/*.b .
! 	rm doscan.b gcvt.b
  	cc86 -c doscan.c

--- 1,6 -----
  all:
  	cd ../stdio; make
  	cp ../stdio/*.b .
! 	rm doscan.b doprnt.b gcvt.b
  	cc86 -c doscan.c
  	cc86 -c doprnt.c
***************
*** 3,5
  	cp ../stdio/*.b .
  	rm doscan.b gcvt.b
  	cc86 -c doscan.c

--- 3,6 -----
  	cp ../stdio/*.b .
  	rm doscan.b doprnt.b gcvt.b
  	cc86 -c doscan.c
+ 	cc86 -c doprnt.c
Only in ./nstdio: _rbyte.b
Only in ./nstdio: _wbyte.b
Only in ./nstdio: clrerr.b
Only in ./nstdio: data.b
Only in /usr/ibmpc-release/vax/c86/lib86/nstdio: doprnt.c
Only in ./nstdio: doscan.b
Only in ./nstdio: fdopen.b
Only in ./nstdio: fgetc.b
Only in ./nstdio: fgets.b
Only in ./nstdio: filbuf.b
Only in ./nstdio: flsbuf.b
Only in ./nstdio: fopen.b
Only in ./nstdio: fputc.b
Only in ./nstdio: fputs.b
Only in ./nstdio: freopen.b
Only in ./nstdio: fseek.b
Only in ./nstdio: ftell.b
Only in ./nstdio: getc.b
Only in ./nstdio: gets.b
Only in ./nstdio: getw.b
Only in ./nstdio: printf.b
Only in ./nstdio: putc.b
Only in ./nstdio: putchar.b
Only in ./nstdio: puts.b
Only in ./nstdio: putw.b
Only in ./nstdio: rdwr.b
Only in ./nstdio: rew.b
Only in ./nstdio: scanf.b
Only in ./nstdio: setbuf.b
Only in ./nstdio: strout.b
Only in ./nstdio: ungetc.b
diff -r -c ./stdio/Makefile /usr/ibmpc-release/vax/c86/lib86/stdio/Makefile
*** ./stdio/Makefile	Wed Nov  6 16:19:30 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/Makefile	Tue Sep 25 12:44:02 1984
***************
*** 1,9
  .SUFFIXES: .b
  .c.b: ; cc86 -c $<
  
! OBJECTS =	printf.b scanf.b clrerr.b doscan.b\
! 		fdopen.b fgetc.b fopen.b fgets.b fputc.b\
! 		getc.b putc.b _rbyte.b _wbyte.b \
  		fputs.b freopen.b fseek.b ftell.b gcvt.b gets.b getw.b \
  		putchar.b puts.b putw.b	rdwr.b rew.b strout.b\
  		ungetc.b setbuf.b flsbuf.b filbuf.b data.b

--- 1,8 -----
  .SUFFIXES: .b
  .c.b: ; cc86 -c $<
  
! OBJECTS =	fprintf.b sprintf.b printf.b scanf.b clrerr.b doscan.b\
! 		doprnt.b fdopen.b fgetc.b fopen.b fgets.b fputc.b\
  		fputs.b freopen.b fseek.b ftell.b gcvt.b gets.b getw.b \
  		putchar.b puts.b putw.b	rdwr.b rew.b strout.b\
  		ungetc.b setbuf.b flsbuf.b filbuf.b data.b
***************
*** 8,20
  		putchar.b puts.b putw.b	rdwr.b rew.b strout.b\
  		ungetc.b setbuf.b flsbuf.b filbuf.b data.b
  
- SRCS =   	printf.c scanf.c clrerr.c doscan.c\
- 		fdopen.c fgetc.c fopen.c fgets.c fputc.c\
- 		getc.c putc.c _rbyte.c _wbyte.c \
- 		fputs.c freopen.c fseek.c ftell.c gcvt.c gets.c getw.c \
- 		putchar.c puts.c putw.c	rdwr.c rew.c strout.c\
- 		ungetc.c setbuf.c flsbuf.c filbuf.c data.c
- 
  all:		$(OBJECTS)
  
  $(OBJECTS):	../../cc86_include/stdio.h

--- 7,12 -----
  		putchar.b puts.b putw.b	rdwr.b rew.b strout.b\
  		ungetc.b setbuf.b flsbuf.b filbuf.b data.b
  
  all:		$(OBJECTS)
  
  $(OBJECTS):	../include/stdio.h
***************
*** 17,23
  
  all:		$(OBJECTS)
  
! $(OBJECTS):	../../cc86_include/stdio.h
  
  doprnt.b:	doprnt.c
  		cc86 -8087 -c doprnt.c

--- 9,15 -----
  
  all:		$(OBJECTS)
  
! $(OBJECTS):	../include/stdio.h
  
  doprnt.b:	doprnt.c
  		cc86 -8087 -c doprnt.c
***************
*** 27,34
  
  gcvt.b:		gcvt.c
  		cc86 -8087 -c gcvt.c
- 
- lintlib:
- 		lint86 -Cnet -DDEBUG $(SRCS)
- 		mv llib-lnet.ln /usr/ibm/lib
- 

--- 19,21 -----
  
  gcvt.b:		gcvt.c
  		cc86 -8087 -c gcvt.c
Only in ./stdio: Makefile~
Only in ./stdio: _rbyte.b
Only in ./stdio: _rbyte.c
Only in ./stdio: _wbyte.b
Only in ./stdio: _wbyte.c
Only in ./stdio: a.com
Only in ./stdio: clrerr.b
Only in ./stdio: data.b
diff -r -c ./stdio/data.c /usr/ibmpc-release/vax/c86/lib86/stdio/data.c
*** ./stdio/data.c	Thu Jul 18 23:11:20 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/data.c	Thu Sep  6 16:21:37 1984
***************
*** 3,11
  char	_sobuf[BUFSIZ];
  
  struct	_iobuf	_iob[_NFILE] = {
! 	{ _sibuf, 0, _sibuf, _IOREAD+_IONBF+_IOASCII, 0},
! 	{ NULL, 0, NULL, _IOWRT+_IONBF+_IOASCII, 1},
! 	{NULL, 0, NULL, _IOWRT+_IONBF+_IOASCII, 2},
  };
  /*
   * Ptr to end of buffers

--- 3,11 -----
  char	_sobuf[BUFSIZ];
  
  struct	_iobuf	_iob[_NFILE] = {
! 	{ _sibuf, 0, _sibuf, _IOREAD+_IONBF, 0},
! 	{ NULL, 0, NULL, _IOWRT+_IONBF, 1},
! 	{NULL, 0, NULL, _IOWRT+_IONBF, 2},
  };
  /*
   * Ptr to end of buffers
Only in /usr/ibmpc-release/vax/c86/lib86/stdio: doprnt.c
Only in ./stdio: doscan.b
diff -r -c ./stdio/doscan.c /usr/ibmpc-release/vax/c86/lib86/stdio/doscan.c
*** ./stdio/doscan.c	Thu Jul 18 23:11:21 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/doscan.c	Thu Sep  6 16:21:39 1984
***************
*** 99,104
  int **ptr, *eofptr;
  struct _iobuf *iop;
  {
  	register char *np;
  	char numbuf[64];
  int c, base;

--- 99,105 -----
  int **ptr, *eofptr;
  struct _iobuf *iop;
  {
+ 	extern double atof();
  	register char *np;
  	char numbuf[64];
  int c, base;
***************
*** 110,115
  	lcval = 0;
  	ndigit = 0;
  	scale = INT;
  	base = 10;
  	if (type=='o')
  		base = 8;

--- 111,118 -----
  	lcval = 0;
  	ndigit = 0;
  	scale = INT;
+ 	if (type=='e'||type=='f')
+ 		scale = FLOAT;
  	base = 10;
  	if (type=='o')
  		base = 8;
***************
*** 178,183
  		return(0);
  	*np++ = 0;
  	switch((scale<<4) | size) {
  
  	case (INT<<4) | SHORT:
  		**(short **)ptr = lcval;

--- 181,195 -----
  		return(0);
  	*np++ = 0;
  	switch((scale<<4) | size) {
+ 
+ 	case (FLOAT<<4) | SHORT:
+ 	case (FLOAT<<4) | REGULAR:
+ 		*(*((float **)ptr)) = atof(numbuf);
+ 		break;
+ 
+ 	case (FLOAT<<4) | LONG:
+ 		*(*((double **)ptr)) = atof(numbuf);
+ 		break;
  
  	case (INT<<4) | SHORT:
  		**(short **)ptr = lcval;
Only in ./stdio: doscan.c.ckp
Only in ./stdio: fdopen.b
Only in ./stdio: fgetc.b
Only in ./stdio: fgets.b
Only in ./stdio: filbuf.b
diff -r -c ./stdio/filbuf.c /usr/ibmpc-release/vax/c86/lib86/stdio/filbuf.c
*** ./stdio/filbuf.c	Thu Jul 18 23:11:22 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/filbuf.c	Thu Sep  6 16:21:41 1984
***************
*** 1,8
  #include	<stdio.h>
  char	*malloc();
  
- #define	CONTROL_Z	26
- 
  _filbuf(iop)
  register FILE *iop;
  {

--- 1,6 -----
  #include	<stdio.h>
  char	*malloc();
  
  _filbuf(iop)
  register FILE *iop;
  {
***************
*** 34,43
  		iop->_cnt = 0;
  		return(-1);
  	}
! 	if((iop->_flag & _IOASCII) && (*iop->_ptr == CONTROL_Z)) {
! 		iop->_cnt = -1;
! 		iop->_flag |= _IOEOF;
! 		return EOF;
! 		}
! 	else return(*iop->_ptr++&0377);
  }

--- 32,36 -----
  		iop->_cnt = 0;
  		return(-1);
  	}
! 	return(*iop->_ptr++&0377);
  }
Only in ./stdio: flsbuf.b
diff -r -c ./stdio/flsbuf.c /usr/ibmpc-release/vax/c86/lib86/stdio/flsbuf.c
*** ./stdio/flsbuf.c	Thu Jul 18 23:11:22 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/flsbuf.c	Thu Sep  6 16:21:41 1984
***************
*** 87,96
  	register r;
  
  	r = EOF;
! 	if ((iop->_flag&(_IOREAD|_IOWRT)) && ((iop->_flag&_IOSTRG)==0)) {
! 		if((iop->_flag&(_IOASCII|_IOWRT)) == (_IOASCII|_IOWRT))
! 			_wbyte(26, iop);	/* control Z */
! 
  		r = fflush(iop);
  		if (close(fileno(iop)) < 0)
  			r = EOF;

--- 87,93 -----
  	register r;
  
  	r = EOF;
! 	if (iop->_flag&(_IOREAD|_IOWRT) && (iop->_flag&_IOSTRG)==0) {
  		r = fflush(iop);
  		if (close(fileno(iop)) < 0)
  			r = EOF;
***************
*** 99,105
  		if (iop->_flag&(_IOMYBUF|_IONBF))
  			iop->_base = NULL;
  	}
! 	iop->_flag &= ~(_IOREAD|_IOWRT|_IONBF|_IOMYBUF|_IOERR|_IOEOF|_IOSTRG|_IOASCII);
  	iop->_cnt = 0;
  	return(r);
  }

--- 96,102 -----
  		if (iop->_flag&(_IOMYBUF|_IONBF))
  			iop->_base = NULL;
  	}
! 	iop->_flag &= ~(_IOREAD|_IOWRT|_IONBF|_IOMYBUF|_IOERR|_IOEOF|_IOSTRG);
  	iop->_cnt = 0;
  	return(r);
  }
Only in ./stdio: fopen.b
diff -r -c ./stdio/fopen.c /usr/ibmpc-release/vax/c86/lib86/stdio/fopen.c
*** ./stdio/fopen.c	Wed Oct 16 13:14:52 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/fopen.c	Thu Sep  6 16:21:42 1984
***************
*** 24,31
  	 }
  
  	for (iop = _iob; iop->_flag&(_IOREAD|_IOWRT); iop++)
! 		if (iop >= _lastbuf)
! 			return(NULL);
  
  	if (*mode=='w')
  		f = creat(file, 0);

--- 24,30 -----
  	 }
  
  	for (iop = _iob; iop->_flag&(_IOREAD|_IOWRT); iop++)
! 		if (iop >= _lastbuf) return(NULL);
  
  
  	if (*mode=='w')
***************
*** 27,32
  		if (iop >= _lastbuf)
  			return(NULL);
  
  	if (*mode=='w')
  		f = creat(file, 0);
  	else if (*mode=='a') {

--- 26,32 -----
  	for (iop = _iob; iop->_flag&(_IOREAD|_IOWRT); iop++)
  		if (iop >= _lastbuf) return(NULL);
  
+ 
  	if (*mode=='w')
  		f = creat(file, 0666);
  	else if (*mode=='a') {
***************
*** 28,34
  			return(NULL);
  
  	if (*mode=='w')
! 		f = creat(file, 0);
  	else if (*mode=='a') {
  		if ((f = open(file, 1)) < 0) {
  			if (errno == ENOENT)

--- 28,34 -----
  
  
  	if (*mode=='w')
! 		f = creat(file, 0666);
  	else if (*mode=='a') {
  		if ((f = open(file, 1)) < 0) {
  			if (errno == ENOENT)
***************
*** 32,38
  	else if (*mode=='a') {
  		if ((f = open(file, 1)) < 0) {
  			if (errno == ENOENT)
! 				f = creat(file, 0);
  		}
  		lseek(f, 0L, 2);
  	} else

--- 32,38 -----
  	else if (*mode=='a') {
  		if ((f = open(file, 1)) < 0) {
  			if (errno == ENOENT)
! 				f = creat(file, 0666);
  		}
  		lseek(f, 0L, 2);
  	} else
***************
*** 37,47
  		lseek(f, 0L, 2);
  	} else
  		f = open(file, 0);
- 
- 	if(mode[1] == 'a')
- 		iop->_flag |= _IOASCII;
- 	else iop->_flag &= ~_IOASCII;
- 
  	if (f < 0)
  		return(NULL);
  	iop->_cnt = 0;

--- 37,42 -----
  		lseek(f, 0L, 2);
  	} else
  		f = open(file, 0);
  	if (f < 0)
  		return(NULL);
  	iop->_cnt = 0;
Only in ./stdio: fopen.c~
Only in /usr/ibmpc-release/vax/c86/lib86/stdio: fprintf.c
Only in ./stdio: fputc.b
Only in ./stdio: fputs.b
Only in ./stdio: freopen.b
Only in ./stdio: fseek.b
Only in ./stdio: ftell.b
Only in ./stdio: gcvt.b
Only in ./stdio: getc.b
Only in ./stdio: getc.c
Only in ./stdio: gets.b
Only in ./stdio: getw.b
Only in ./stdio: printf.b
diff -r -c ./stdio/printf.c /usr/ibmpc-release/vax/c86/lib86/stdio/printf.c
*** ./stdio/printf.c	Wed Nov  6 13:02:48 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/printf.c	Thu Sep  6 16:21:45 1984
***************
*** 1,7
- /*  Copyright 1984 by the Massachusetts Institute of Technology  */
- /*  See permission and disclaimer notice in file "notice.h"  */
- #include	<notice.h>
- 
  #include	<stdio.h>
  
  int putc();

--- 1,3 -----
  #include	<stdio.h>
  
  printf(fmt, args)
***************
*** 4,30
  
  #include	<stdio.h>
  
! int putc();
! 
! /*VARARGS1*/
! printf(format)
! 	char	*format; {
! 
! 	_format_string(putc, stdout, &format);
! 	}
! 
! fatal(format)
! 	char *format; {
! 
! 	_format_string(putc, stdout, &format);
! 	putchar('\n');
! 	exit();
! 	}
! 	
! /*VARARGS2*/
! fprintf(fd, format)
! FILE	*fd;
! char	*format;
  {
  	_format_string(putc, fd, &format);
  }

--- 1,7 -----
  #include	<stdio.h>
  
! printf(fmt, args)
! char *fmt;
  {
  	_doprnt(fmt, &args, stdout);
  	return(ferror(stdout)? EOF: 0);
***************
*** 26,169
  FILE	*fd;
  char	*format;
  {
! 	_format_string(putc, fd, &format);
! }
! 
! int	store_string();
! char	*_sp;			/* this should be not be static since it */
! 				/* is used by TCP's printf and others 	 */
! 
! /*VARARGS2*/
! sprintf(s, format)
! char	*s;
! char	*format;
! {
! 	_sp = s;
! 	_format_string(store_string, NULL, &format);
! 	*_sp = '\0';
! }
! 
! store_string(c, foo)
! char	c;
! int	foo;
! {
! 	*_sp++ = c;
! }
! 
! _format_string(routine, outarg, data)
! char	**data;		/* the address to get the format string and the
! 			 * agruments from */
! int	(*routine)();	/* the routine to output the characters */
! int	outarg;		/* an argument to pass to the output routine */
! {
! 	unsigned	*arg;	/* a pointer to the arguments on the stack */
! 	char	*format;	/* a pointer to the format string */
! 	int	field;		/* number after a '%' and before the format
! 				 * character */
! 	int	l_zero;		/* flag is true if the number started with a
! 				 * '0', if so then print out leading zeros */
! 	char	*s;
! 	
! 	format = *data;
! 	arg = (unsigned *)(data) + 1;
! loop:	while ((*format != '%') && (*format != '\0'))
! 		(*routine)(*format++, outarg);
! 	if (*format == '\0')
! 		return;
! 
! 	format++;
! 	if (*format == '0') l_zero = TRUE;
! 	  else l_zero = FALSE;
! 	field = 0;
! 	while (*format >= '0' && *format <= '9') {
! 		field = field * 10 + *format - '0';
! 		format++;
! 	}
! 	switch (*format) {
! 	case 's':
! 		s = *(char **)arg;
! 		while (*s != '\0')
! 			(*routine)(*s++, outarg);
! 		arg++;
! 		break;
! 	case 'c':
! 		(*routine)(*(char *)arg, outarg);
! 		arg++;
! 		break;
! 	case '%':
! 		(*routine)('%', outarg);
! 		break;
! 	case 'o':
! 		int_print((unsigned long)*arg, 010, FALSE, field, l_zero, routine, outarg);
! 		arg++;
! 		break;
! 	case 'O':
! 		int_print(*(unsigned long *)arg, 010, FALSE, field, l_zero, routine, outarg);
! 		arg += 2;
! 		break;
! 	case 'd':
! 		int_print((long)*(int *)arg, 10, TRUE, field, l_zero, routine, outarg);
! 		arg++;
! 		break;
! 	case 'D':
! 		int_print(*(long *)arg, 10, TRUE, field, l_zero, routine, outarg);
! 		arg += 2;
! 		break;
! 	case 'u':
! 		int_print((unsigned long)*arg, 10, FALSE, field, l_zero, routine, outarg);
! 		arg++;
! 		break;
! 	case 'U':
! 		int_print(*(unsigned long *)arg, 10, FALSE, field, l_zero, routine, outarg);
! 		arg += 2;
! 		break;
! 	case 'x':
! 		int_print((unsigned long)*arg, 0x10, FALSE, field, l_zero, routine, outarg);
! 		arg++;
! 		break;
! 	case 'X':
! 		int_print(*(unsigned long *)arg, 0x10, FALSE, field, l_zero, routine, outarg);
! 		arg += 2;
! 		break;
! 
! 	}
! 	format++;
! 	goto	loop;
! }
! 	
! 	
! int_print(number, radix, signed, field, l_zero, routine, outarg)
! unsigned long	number;	/* the number to print */
! int	radix;		/* the radix to print the number in */
! int	signed;		/* true if should print as signed number */
! int	field;		/* the argument in the format control */
! int	l_zero;		/* true if arg had a leading zero */
! int	(*routine)();	/* routine to print out the number */
! int	outarg;		/* an argument to pass to the output routine */
! {
! 	char	table[20];	/* place to make up the output */
! 	int	negative;	/* true if number is signed and negative */
! 	int	i;
! 	char	c;
! 	
! 	if (signed && ((long)number < 0)) {
! 		negative = TRUE;
! 		number = -(long)number;
! 	}
! 	else	negative = FALSE;
! 	
! 	c = l_zero ? '0' : ' ';
! 	for (i=0; i < 20; i++)
! 		table[i] = c;
! 	
! 	for (i = 0; i < 20; i++) {
! 		table[i] = "0123456789ABCDEF"[number % (long)radix];
! 		number /= (long)radix;
! 		if (number == 0) break;
! 	}
! 	
! 	if (negative) table[++i] = '-';
! 	if ((field != 0) && (field < 20)) i = field - 1;
! 	while (i >= 0)
! 		(*routine)(table[i--], outarg);
  }

--- 3,8 -----
  printf(fmt, args)
  char *fmt;
  {
! 	_doprnt(fmt, &args, stdout);
! 	return(ferror(stdout)? EOF: 0);
  }
Only in ./stdio: printf.c~
Only in ./stdio: putc.b
Only in ./stdio: putc.c
Only in ./stdio: putchar.b
Only in ./stdio: puts.b
Only in ./stdio: putw.b
Only in ./stdio: rdwr.b
diff -r -c ./stdio/rdwr.c /usr/ibmpc-release/vax/c86/lib86/stdio/rdwr.c
*** ./stdio/rdwr.c	Thu Jul 18 23:11:27 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/rdwr.c	Thu Sep  6 16:21:47 1984
***************
*** 21,27
  	}
  	return(ndone);
  }
- /*
  
  fwrite(ptr, size, count, iop)
  unsigned size, count;

--- 21,26 -----
  	}
  	return(ndone);
  }
  
  fwrite(ptr, size, count, iop)
  unsigned size, count;
***************
*** 41,60
  		if (ferror(iop))
  			break;
  	}
- 	return(ndone);
- }
- */
- 
- fwrite(ptr, size, count, iop)
- unsigned size, count;
- register char *ptr;
- register FILE *iop;
- {
- 	unsigned ndone;
- 
- 	ndone = 0;
- 	fflush(iop);
- 	ndone = write(fileno(iop), ptr, size*count)/size;
- 	if(ndone < 0) ndone = 0;
  	return(ndone);
  }

--- 40,44 -----
  		if (ferror(iop))
  			break;
  	}
  	return(ndone);
  }
Only in ./stdio: rew.b
Only in ./stdio: scanf.b
diff -r -c ./stdio/scanf.c /usr/ibmpc-release/vax/c86/lib86/stdio/scanf.c
*** ./stdio/scanf.c	Wed Nov  6 16:36:41 1985
--- /usr/ibmpc-release/vax/c86/lib86/stdio/scanf.c	Thu Sep  6 16:21:48 1984
***************
*** 1,6
  #include	<stdio.h>
  
- /*VARARGS1*/
  scanf(fmt, args)
  char *fmt;
  {

--- 1,5 -----
  #include	<stdio.h>
  
  scanf(fmt, args)
  char *fmt;
  {
***************
*** 7,13
  	return(_doscan(stdin, fmt, &args));
  }
  
- /*VARARGS2*/
  fscanf(iop, fmt, args)
  FILE *iop;
  char *fmt;

--- 6,11 -----
  	return(_doscan(stdin, fmt, &args));
  }
  
  fscanf(iop, fmt, args)
  FILE *iop;
  char *fmt;
***************
*** 15,21
  	return(_doscan(iop, fmt, &args));
  }
  
- /*VARARGS2*/
  sscanf(str, fmt, args)
  register char *str;
  char *fmt;

--- 13,18 -----
  	return(_doscan(iop, fmt, &args));
  }
  
  sscanf(str, fmt, args)
  register char *str;
  char *fmt;
Only in ./stdio: scanf.c~
Only in ./stdio: setbuf.b
Only in /usr/ibmpc-release/vax/c86/lib86/stdio: sprintf.c
Only in ./stdio: strout.b
Only in ./stdio: ungetc.b
diff -r -c ./sys/Makefile /usr/ibmpc-release/vax/c86/lib86/sys/Makefile
*** ./sys/Makefile	Thu Jul 18 23:11:01 1985
--- /usr/ibmpc-release/vax/c86/lib86/sys/Makefile	Thu Oct 18 10:08:05 1984
***************
*** 1,7
  .SUFFIXES: .b
  .c.b: ; cc86 -c $<
  
! OBJECTS=	handler.b io.b msd2dot0.b sys2.b dos.b
  
  all:		$(OBJECTS)
  

--- 1,7 -----
  .SUFFIXES: .b
  .c.b: ; cc86 -c $<
  
! OBJECTS=	handler.b io.b msd2dot0.b sys2.b dos.b rwbyte.b
  
  all:		$(OBJECTS)
  
***************
*** 19,21
  
  io.b: io.a86
  	a86 io

--- 19,24 -----
  
  io.b: io.a86
  	a86 io
+ 
+ rwbyte.b:	rwbyte.a86
+ 		a86 rwbyte
Only in ./sys: Makefile.bak
Only in ./sys: Old
Only in ./sys: dos.b
diff -r -c ./sys/handler.a86 /usr/ibmpc-release/vax/c86/lib86/sys/handler.a86
*** ./sys/handler.a86	Thu Jul 18 23:11:02 1985
--- /usr/ibmpc-release/vax/c86/lib86/sys/handler.a86	Mon Oct  1 13:37:33 1984
***************
*** 74,80
  	sti
  
  	pop	es
- 	pop	si
  	pop	di
  	pop	bp
  	ret

--- 74,79 -----
  	sti
  
  	pop	es
  	pop	di
  	pop	si
  	pop	bp
***************
*** 76,81
  	pop	es
  	pop	si
  	pop	di
  	pop	bp
  	ret
  

--- 75,81 -----
  
  	pop	es
  	pop	di
+ 	pop	si
  	pop	bp
  	ret
  
Only in ./sys: handler.b
Only in ./sys: io.b
diff -r -c ./sys/msd2dot0.a86 /usr/ibmpc-release/vax/c86/lib86/sys/msd2dot0.a86
*** ./sys/msd2dot0.a86	Thu Jul 18 23:11:03 1985
--- /usr/ibmpc-release/vax/c86/lib86/sys/msd2dot0.a86	Wed Jul  3 17:29:41 1985
***************
*** 14,21
  pbfcb1:		.word	0,0		| 1st FCB ptr
  pbfcb2:		.word	0,0
  
- 	.globl	_errno
- 
  	.text
  | _exec("path", *paramblk, fnval)
  

--- 14,19 -----
  pbfcb1:		.word	0,0		| 1st FCB ptr
  pbfcb2:		.word	0,0
  
  	.text
  | _exec("path", *paramblk, fnval)
  
***************
*** 34,40
  | Fall thru to...
  
  | Common error handling code: returns >= 0 in AX iff no err, else returns
! |   -1, error number in errno.	Modified 10/31 by John Romkey
  
  cyerr:	jnb	cyerr1		| An error happened.
  	mov	_errno,ax

--- 32,38 -----
  | Fall thru to...
  
  | Common error handling code: returns >= 0 in AX iff no err, else returns
! |   -(error code):
  
  cyerr:	jb	cyerr1		| An error happened.
  	or	ax,ax		| Make sure AX is non-negative
***************
*** 36,46
  | Common error handling code: returns >= 0 in AX iff no err, else returns
  |   -1, error number in errno.	Modified 10/31 by John Romkey
  
! cyerr:	jnb	cyerr1		| An error happened.
! 	mov	_errno,ax
! 	mov	ax,*-1
! 	br	cyerr2
! cyerr1:	mov	_errno,*0
  cyerr2:	mov	__dosax,ax
  	mov	__dosbx,bx
  	mov	__doscx,cx

--- 34,43 -----
  | Common error handling code: returns >= 0 in AX iff no err, else returns
  |   -(error code):
  
! cyerr:	jb	cyerr1		| An error happened.
! 	or	ax,ax		| Make sure AX is non-negative
! 	jge	cyerr2
! cyerr1:	neg	ax		| if neg, negate it.
  cyerr2:	mov	__dosax,ax
  	mov	__dosbx,bx
  	mov	__doscx,cx
***************
*** 83,90
  	int	0x21
  	jmp	syst6
  
! syst5:	mov	_errno,ax
! 	mov	ax,*-1			| error return.
  syst6:	cli
  	seg	cs
  	mov	sp,spsave

--- 80,86 -----
  	int	0x21
  	jmp	syst6
  
! syst5:	mov	ax,#-1			| error return.
  syst6:	cli
  	seg	cs
  	mov	sp,spsave
***************
*** 179,185
  
  	mov	dx,4(bp)
  	mov	di,6(bp)
! 	mov	ah,*0x56
  	int	0x21
  	jmp	cyerr
  

--- 175,181 -----
  
  	mov	dx,4(bp)
  	mov	di,6(bp)
! 	mov	ah,0x56
  	int	0x21
  	jmp	cyerr
  
***************
*** 268,273
  	mov	bx,4(bp)
  	mov	ah,#0x48
  	int	0x21
  	jnb	allbl1		| no error.
  	mov	ax,#0
  	mov	es,ax

--- 264,270 -----
  	mov	bx,4(bp)
  	mov	ah,#0x48
  	int	0x21
+ 	mov	__dosbx,bx
  	jnb	allbl1		| no error.
  	mov	ax,#0
  allbl1:	pop	es
***************
*** 270,278
  	int	0x21
  	jnb	allbl1		| no error.
  	mov	ax,#0
! 	mov	es,ax
! allbl1:	mov	ax,es
! 	pop	es
  	ret
  
  | _getcd(drive, buf); char buf[64];

--- 267,274 -----
  	mov	__dosbx,bx
  	jnb	allbl1		| no error.
  	mov	ax,#0
! allbl1:	pop	es
! 	pop	bp
  	ret
  
  | _getcd(drive, buf); char buf[64];
***************
*** 497,499
  	mov	ah,#0x31
  	jmp	cdos
  

--- 493,505 -----
  	mov	ah,#0x31
  	jmp	cdos
  
+ | _swtch() -- fetch & return switch character.
+ 
+ 	.globl	__swtch
+ __swtch:
+ 	mov	ah,#0x37
+ 	mov	al,#0
+ 	int	0x21
+ 	mov	ah,#0
+ 	mov	al,dl
+ 	ret
Only in ./sys: msd2dot0.a86.bak
Only in ./sys: msd2dot0.b
Only in /usr/ibmpc-release/vax/c86/lib86/sys: rwbyte.a86
Only in ./sys: sys2.b
diff -r -c ./sys/sys2.c /usr/ibmpc-release/vax/c86/lib86/sys/sys2.c
*** ./sys/sys2.c	Thu Jul 18 23:11:03 1985
--- /usr/ibmpc-release/vax/c86/lib86/sys/sys2.c	Wed Jul  3 17:45:30 1985
***************
*** 2,7
  #include <stdio.h>
  
  /* system call writearounds for MSDOS 2.0
   */
  
  #define	SHORT(XX) (*((short *) XX))

--- 2,8 -----
  #include <stdio.h>
  
  /* system call writearounds for MSDOS 2.0
+  * Modified March 85 by JSP [see getenv() and system()]
   */
  
  #define	SHORT(XX) (*((short *) XX))
***************
*** 16,21
  extern long lseek();
  
  /* UNIX-style getenv:
   */
  
  char *getenv(name)

--- 17,23 -----
  extern long lseek();
  
  /* UNIX-style getenv:
+  * Modified March 85 by JSP to include correct '=' and ' ' detection
   */
  
  char *getenv(name)
***************
*** 23,34
   {	static char buf[64];			/* Sigh.		*/
  	int i;
  	register char *aa, *bb;
! 	for (i=0;;i++)
! 	 { _genv(i, buf);
! 	   if (!buf[0]) return 0;
! 	   for (aa=name, bb=buf;; aa++, bb++)
! 		{ if (!*aa && (*bb == '=')) return ++bb;
! 		  if (*aa != *bb) break;
  		}
  	 }
   }

--- 25,41 -----
   {	static char buf[64];			/* Sigh.		*/
  	int i;
  	register char *aa, *bb;
! 
! 	for (i = 0; ; i++) {
! 	    _genv(i, buf);
! 	    if (!buf[0]) return 0;
! 	    for (aa = name, bb = buf; ; aa++, bb++) {
! 		if (!*aa && (*bb == '=' || *bb == ' ')) {
! 		   while (*bb == '=' || *bb == ' ') bb++;
! 		   /* return pos of first non-space char after the '=' */
! 		   return bb;
! 		   }
! 		if (*aa != *bb) break;
  		}
  	    }
   }
***************
*** 30,36
  		{ if (!*aa && (*bb == '=')) return ++bb;
  		  if (*aa != *bb) break;
  		}
! 	 }
   }
  
  /* Call shell to execute cmd.  If cmd==0, simply calls an

--- 37,43 -----
  		   }
  		if (*aa != *bb) break;
  		}
! 	    }
   }
  
  /* Call shell to execute cmd.  If cmd == 0, simply calls an
***************
*** 33,39
  	 }
   }
  
! /* Call shell to execute cmd.  If cmd==0, simply calls an
   * interactive shell.
   */
  

--- 40,46 -----
  	    }
   }
  
! /* Call shell to execute cmd.  If cmd == 0, simply calls an
   * interactive shell.
   * Modified March 85 by JSP to include SWITCHAR sensing
   * Modified July 85 by SAW to do switchar sensing properly.
***************
*** 35,40
  
  /* Call shell to execute cmd.  If cmd==0, simply calls an
   * interactive shell.
   */
  
  system(cmd)

--- 42,49 -----
  
  /* Call shell to execute cmd.  If cmd == 0, simply calls an
   * interactive shell.
+  * Modified March 85 by JSP to include SWITCHAR sensing
+  * Modified July 85 by SAW to do switchar sensing properly.
   */
  
  system(cmd)
***************
*** 41,47
   char *cmd;
   {	char cmdbuf[100];
  	register char *aa, *bb;
! 	char *shell;
  	int i;
  	if (!(shell = getenv("COMSPEC"))) shell = "COMMAND.COM";
  

--- 50,56 -----
   char *cmd;
   {	char cmdbuf[100];
  	register char *aa, *bb;
! 	char *shell, switchar;
  	int i;
  
  	if (!(switchar = _swtch()))
***************
*** 43,49
  	register char *aa, *bb;
  	char *shell;
  	int i;
- 	if (!(shell = getenv("COMSPEC"))) shell = "COMMAND.COM";
  
  	aa = cmdbuf+1; *cmdbuf = 0;
  

--- 52,57 -----
  	register char *aa, *bb;
  	char *shell, switchar;
  	int i;
  
  	if (!(switchar = _swtch()))
  	   switchar = '/';			/* default dos switchar */
***************
*** 45,51
  	int i;
  	if (!(shell = getenv("COMSPEC"))) shell = "COMMAND.COM";
  
! 	aa = cmdbuf+1; *cmdbuf = 0;
  
  	if (cmd)
  	 { for (bb = "/C"; *aa = *bb++; aa++) (*cmdbuf)++;

--- 53,60 -----
  	char *shell, switchar;
  	int i;
  
! 	if (!(switchar = _swtch()))
! 	   switchar = '/';			/* default dos switchar */
  
  	aa = cmdbuf + 1; *cmdbuf = 0;
  
***************
*** 47,54
  
  	aa = cmdbuf+1; *cmdbuf = 0;
  
! 	if (cmd)
! 	 { for (bb = "/C"; *aa = *bb++; aa++) (*cmdbuf)++;
  	   for (bb = cmd; *aa = *bb++; aa++) (*cmdbuf)++;
  	 }
  	*aa++ = '\r'; *aa++ = '\n'; *aa++ = 0;

--- 56,67 -----
  	if (!(switchar = _swtch()))
  	   switchar = '/';			/* default dos switchar */
  
! 	aa = cmdbuf + 1; *cmdbuf = 0;
! 
! 	if (cmd) {
! 	   *aa++ = switchar;		/* forms -C or /C as necessary */
! 	   *aa++ = 'C';
! 	   cmdbuf[0] += 2;
  	   for (bb = cmd; *aa = *bb++; aa++) (*cmdbuf)++;
  	   }
  	*aa++ = '\r'; *aa++ = '\n'; *aa++ = 0;
***************
*** 50,56
  	if (cmd)
  	 { for (bb = "/C"; *aa = *bb++; aa++) (*cmdbuf)++;
  	   for (bb = cmd; *aa = *bb++; aa++) (*cmdbuf)++;
! 	 }
  	*aa++ = '\r'; *aa++ = '\n'; *aa++ = 0;
  
  	i = _system(cmdbuf, shell);

--- 63,69 -----
  	   *aa++ = 'C';
  	   cmdbuf[0] += 2;
  	   for (bb = cmd; *aa = *bb++; aa++) (*cmdbuf)++;
! 	   }
  	*aa++ = '\r'; *aa++ = '\n'; *aa++ = 0;
  
  	if (!(shell = getenv("COMSPEC"))) shell = "COMMAND.COM";
***************
*** 53,58
  	 }
  	*aa++ = '\r'; *aa++ = '\n'; *aa++ = 0;
  
  	i = _system(cmdbuf, shell);
  	return i;
   }

--- 66,73 -----
  	   }
  	*aa++ = '\r'; *aa++ = '\n'; *aa++ = 0;
  
+ 	if (!(shell = getenv("COMSPEC"))) shell = "COMMAND.COM";
+ 
  	i = _system(cmdbuf, shell);
  	return i;
   }
***************
*** 98,104
  	/* allocation succeeds if we didn't wrap around, and if we
  	 * are still below stack.
  	 */
! 	if (p >= _memtop ) /*&& p < &a[-64])	fails with tasking */
  	 { _memtop = p;
  	   return(q);
  	 }

--- 113,119 -----
  	/* allocation succeeds if we didn't wrap around, and if we
  	 * are still below stack.
  	 */
! 	if (p >= _memtop && p < &a[-64])
  	 { _memtop = p;
  	   return(q);
  	 }
