diff -c ../mtools/Makefile .//Makefile
*** ../mtools/Makefile	Sat Jan  4 18:59:15 1992
--- .//Makefile	Sat Jan 11 23:21:39 1992
***************
*** 3,17 ****
  #
  # check the Configure file for some examples of device-specific setups
  # Berkeley flavors of Unix should include -DBSD in the CFLAGS
  
! CFLAGS	= -O
! LDFLAGS	= -s
  LD	= cc
  LINT	= lint
  SHLIB	=
! SHAR	= shar -a
  BINDIR	= /usr/local/bin
! MANSECT	= 1
  MANDIR	= /usr/man/man$(MANSECT)
  #
  # for AT&T Unix PC 7300/3b1 style shared libraries.
--- 3,18 ----
  #
  # check the Configure file for some examples of device-specific setups
  # Berkeley flavors of Unix should include -DBSD in the CFLAGS
+ # This setup is for Xenix 286.  A stack of 5000 seems to work OK.
  
! CFLAGS	= -O -M2e
! LDFLAGS	= -s -M2e -i -F 5000  #Small model, separate I and D space
  LD	= cc
  LINT	= lint
  SHLIB	=
! SHAR	= shar 
  BINDIR	= /usr/local/bin
! MANSECT	= LOCAL
  MANDIR	= /usr/man/man$(MANSECT)
  #
  # for AT&T Unix PC 7300/3b1 style shared libraries.
***************
*** 116,122 ****
  	cp Mkmanifest.1 $(MANDIR)/mkmanifest.$(MANSECT)
  
  clean:
! 	rm $(PROGS)
  
  lint:
  	$(LINT) mattrib.c buf_read.c buf_write.c devices.c dir_read.c \
--- 117,126 ----
  	cp Mkmanifest.1 $(MANDIR)/mkmanifest.$(MANSECT)
  
  clean:
! 	rm -f $(PROGS) core *.o
! 
! relink:
! 	rm -f $(PROGS)
  
  lint:
  	$(LINT) mattrib.c buf_read.c buf_write.c devices.c dir_read.c \
diff -c ../mtools/buf_read.c .//buf_read.c
*** ../mtools/buf_read.c	Sat Jan  4 18:59:30 1992
--- .//buf_read.c	Sat Jan 11 17:09:06 1992
***************
*** 27,32 ****
--- 27,34 ----
  	long where, tail, lseek();
  	void perror(), exit(), disk_flush();
  
+ 	long debug_num;
+ 
  					/* don't use cache? */
  	if (disk_size == 1) {
  		where = (start * MSECTOR_SIZE) + disk_offset;
diff -c ../mtools/devices.c .//devices.c
*** ../mtools/devices.c	Sat Jan  4 18:59:32 1992
--- .//devices.c	Sat Jan 11 18:05:52 1992
***************
*** 46,51 ****
--- 46,77 ----
  };
  #endif /* SPARC */
  
+ /* The following table is for a 1.44 3.5 drive in A:, a 1.2 5.25 
+  * drive in B:, and two hard disks, each beginning with a DOS 
+  * partition.  Drives H: and L: force drive A: to hi and lo 
+  * density; X: and Y: do the same for B:.  This shows all the
+  * possibilities.  /dev/install and /dev/install1 are the preferred
+  * driver entries.  If you do not have a second hard disk, do not
+  * include an entry for /dev/hd1d. (Table added by H. van Cleef,
+  * 12-20-91)
+  */
+ #ifdef M_XENIX
+ struct device devices[] = {
+ 	{'A', "/dev/install", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
+ 	{'A', "/dev/install", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
+ 	{'B', "/dev/install1", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
+ 	{'B', "/dev/install1", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
+ 	{'C', "/dev/hd0d", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
+ 	{'D', "/dev/hd1d", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
+ 	{'E', "/dev/hd12", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
+ 	{'H', "/dev/fd0135ds18", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
+ 	{'L', "/dev/fd0135ds9", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
+ 	{'X', "/dev/fd196ds15", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
+ 	{'Y', "/dev/fd148ds9", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
+ 	{'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
+ };
+ #endif /*M_XENIX*/
+ 
  #ifdef UNIXPC
  #include <sys/gdioctl.h>
  #include <fcntl.h>
diff -c ../mtools/fat_read.c .//fat_read.c
*** ../mtools/fat_read.c	Sat Jan  4 18:59:54 1992
--- .//fat_read.c	Sat Jan 11 01:12:31 1992
***************
*** 17,24 ****
  fat_decode(num)
  unsigned int num;
  {
! 	unsigned int fat, fat_hi, fat_low, byte_1, byte_2;
! 	int start;
  
  	if (fat_bits == 12) {
  		/*
--- 17,24 ----
  fat_decode(num)
  unsigned int num;
  {
! 	unsigned long fat, fat_hi, fat_low, byte_1, byte_2;
! 	long start;
  
  	if (fat_bits == 12) {
  		/*
***************
*** 60,66 ****
  		 */
  					/* which bytes contain the entry */
  		start = num * 2;
! 		if (start <= 3 || start + 1 > (fat_len * MSECTOR_SIZE))
  			return(1);
  
  		fat = (*(fat_buf + start + 1) * 0x100) + *(fat_buf + start);
--- 60,66 ----
  		 */
  					/* which bytes contain the entry */
  		start = num * 2;
! 		if (start <= 3 || start + 1 > ((long)fat_len * MSECTOR_SIZE))
  			return(1);
  
  		fat = (*(fat_buf + start + 1) * 0x100) + *(fat_buf + start);
***************
*** 76,82 ****
  fat_read(start)
  int start;
  {
! 	int buflen;
  	char *malloc();
  	void perror(), exit(), disk_read();
  					/* only the first copy of the FAT */
--- 76,82 ----
  fat_read(start)
  int start;
  {
! 	long buflen;
  	char *malloc();
  	void perror(), exit(), disk_read();
  					/* only the first copy of the FAT */
diff -c ../mtools/fat_write.c .//fat_write.c
*** ../mtools/fat_write.c	Sat Jan  4 18:59:55 1992
--- .//fat_write.c	Sat Jan 11 01:13:49 1992
***************
*** 14,20 ****
  unsigned int num;
  unsigned int code;
  {
! 	int start;
  
  	if (fat_bits == 12) {
  		/*
--- 14,20 ----
  unsigned int num;
  unsigned int code;
  {
! 	long start;
  
  	if (fat_bits == 12) {
  		/*
***************
*** 52,58 ****
  		 */
  					/* which bytes contain the entry */
  		start = num * 2;
! 		if (start <= 3 || start + 1 > (fat_len * MSECTOR_SIZE))
  			return(1);
  
  		*(fat_buf + start + 1) =  code / 0x100;
--- 52,58 ----
  		 */
  					/* which bytes contain the entry */
  		start = num * 2;
! 		if (start <= 3 || start + 1 > ((long)fat_len * MSECTOR_SIZE))
  			return(1);
  
  		*(fat_buf + start + 1) =  code / 0x100;
***************
*** 70,76 ****
  void
  fat_write()
  {
! 	int fat_start, buflen, dups;
  	void disk_write();
  
  	if (fd < 0)
--- 70,76 ----
  void
  fat_write()
  {
! 	long fat_start, buflen, dups;
  	void disk_write();
  
  	if (fd < 0)
diff -c ../mtools/mdir.c .//mdir.c
*** ../mtools/mdir.c	Sat Jan  4 19:00:07 1992
--- .//mdir.c	Sat Jan 11 18:12:58 1992
***************
*** 78,86 ****
  			if (last_drive != 'x') {
  				blocks = getfree() * MSECTOR_SIZE;
  				if (!files)
! 					printf("File \"%s\" not found\n\n", newname);
  				else
! 					printf("     %3d File(s)     %6ld bytes free\n\n", files, blocks);
  			}
  			if (init(drive, 0)) {
  				fprintf(stderr, "%s: Cannot initialize '%c:'\n", argv[0], drive);
--- 78,86 ----
  			if (last_drive != 'x') {
  				blocks = getfree() * MSECTOR_SIZE;
  				if (!files)
! 					printf("File \"%s\" not found %8ld bytes free\n\n", newname,blocks);
  				else
! 					printf("     %3d File(s)     %8ld bytes free\n\n", files, blocks);
  			}
  			if (init(drive, 0)) {
  				fprintf(stderr, "%s: Cannot initialize '%c:'\n", argv[0], drive);
***************
*** 196,204 ****
  
  	blocks = getfree() * MSECTOR_SIZE;
  	if (!files)
! 		printf("File \"%s\" not found\n", newname);
  	else
! 		printf("     %3d File(s)     %6ld bytes free\n", files, blocks);
  	close(fd);
  	exit(0);
  }
--- 196,204 ----
  
  	blocks = getfree() * MSECTOR_SIZE;
  	if (!files)
! 		printf("File \"%s\" not found %8ld bytes free\n\n", newname,blocks);
  	else
! 		printf("     %3d File(s)     %8ld bytes free\n", files, blocks);
  	close(fd);
  	exit(0);
  }
diff -c ../mtools/msdos.h .//msdos.h
*** ../mtools/msdos.h	Sat Jan  4 19:00:29 1992
--- .//msdos.h	Sat Jan 11 14:56:34 1992
***************
*** 2,10 ****
   * msdos common header file
   */
  
! #define MSECTOR_SIZE	512		/* MSDOS sector size in bytes */
  #define MDIR_SIZE	32		/* MSDOS directory size in bytes */
! #define MAX_CLUSTER	8192		/* largest cluster size */
  #define MAX_PATH	128		/* largest MSDOS path length */
  #define MAX_DIR_SECS	64		/* largest directory (in sectors) */
  
--- 2,10 ----
   * msdos common header file
   */
  
! #define MSECTOR_SIZE	512L		/* MSDOS sector size in bytes */
  #define MDIR_SIZE	32		/* MSDOS directory size in bytes */
! #define MAX_CLUSTER	8192L		/* largest cluster size */
  #define MAX_PATH	128		/* largest MSDOS path length */
  #define MAX_DIR_SECS	64		/* largest directory (in sectors) */
  
Only in ./: mtools.patch
