ftp.nice.ch/pub/next/unix/disk/mtools.2.0.5n1.N.bs.tar.gz#/mtools2.0.5n1

Configure
 
INSTALL-NeXT
 
Makefile
 
Mattrib.1
 
Mattrib.out
 
Mcd.1
 
Mcd.out
 
Mcopy.1
 
Mcopy.out
 
Mdel.1
 
Mdel.out
 
Mdir.1
 
Mdir.out
 
Mformat.1
 
Mformat.out
 
Mkmanifest.1
 
Mkmanifest.out
 
Mlabel.1
 
Mlabel.out
 
Mmd.1
 
Mmd.out
 
Mrd.1
 
Mrd.out
 
Mread.1
 
Mread.out
 
Mren.1
 
Mren.out
 
Mtools.1
 
Mtools.out
 
Mtype.1
 
Mtype.out
 
Mwrite.1
 
Mwrite.out
 
README
 
README-NeXT
 
Release.notes
 
buf_read.c
[View buf_read.c] 
buf_write.c
[View buf_write.c] 
devices.c
[View devices.c] 
dir_make.c
[View dir_make.c] 
dir_read.c
[View dir_read.c] 
dir_write.c
[View dir_write.c] 
eject
 
eject.c
[View eject.c] 
expand.c
[View expand.c] 
fat_free.c
[View fat_free.c] 
fat_read.c
[View fat_read.c] 
fat_write.c
[View fat_write.c] 
file_read.c
[View file_read.c] 
file_write.c
[View file_write.c] 
init.c
[View init.c] 
is_dir.c
[View is_dir.c] 
match.c
[View match.c] 
mattrib
 
mattrib.c
[View mattrib.c] 
mcd
 
mcd.c
[View mcd.c] 
mcopy
 
mcopy.c
[View mcopy.c] 
mdel
 
mdel.c
[View mdel.c] 
mdir
 
mdir.c
[View mdir.c] 
mformat
 
mformat.c
[View mformat.c] 
mkmanifest
 
mkmanifest.c
[View mkmanifest.c] 
mlabel
 
mlabel.c
[View mlabel.c] 
mmd
 
mmd.c
[View mmd.c] 
mrd
 
mrd.c
[View mrd.c] 
mread
 
mread.c
[View mread.c] 
mren
 
mren.c
[View mren.c] 
msdos.h
[View msdos.h] 
mtype
 
mtype.c
[View mtype.c] 
mwrite
 
mwrite.c
[View mwrite.c] 
parse.c
[View parse.c] 
patchlevel.h
[View patchlevel.h] 
subdir.c
[View subdir.c] 

README

				MTOOLS
			      version 2.0

Mtools is a public domain collection of programs to allow Unix systems
to read, write, and manipulate files on an MSDOS filesystem (typically a
diskette).

The following MSDOS commands are emulated:

Mtool 		MSDOS
name		equivalent	Description
-----		----		-----------
mattrib		ATTRIB		change MSDOS file attribute flags
mcd		CD		change MSDOS directory
mcopy		COPY		copy MSDOS files to/from Unix
mdel		DEL/ERASE	delete an MSDOS file
mdir		DIR		display an MSDOS directory
mformat		FORMAT		add MSDOS filesystem to a low-level format
mlabel		LABEL		make an MSDOS volume label.
mmd		MD/MKDIR	make an MSDOS subdirectory
mrd		RD/RMDIR	remove an MSDOS subdirectory
mread		COPY		low level read (copy) an MSDOS file to Unix
mren		REN/RENAME	rename an existing MSDOS file
mtype		TYPE		display contents of an MSDOS file
mwrite		COPY		low level write (copy) a Unix file to MSDOS

You should be able to just close your eyes and pretend you're on an MSDOS
system.  Everything should work the same... except for the added 'm' at
the beginning of each command.

I really wanted to avoid the use of a 'text' mode and a 'data' mode when
transferring files, but I couldn't find a better way.  It gets rather
confusing and it's quite possible to mess up a file if you apply the
text mode when it is not appropriate (ie:  to a COM or EXE file).

The pattern matching routine more closely resembles Unix than MSDOS.
For example, "*" matches all MSDOS files in lieu of "*.*".

The use of wildcards (or the '\' separator) will require the names to be
enclosed in quotes to protect them from the shell.  For example:

	RIGHT:	mcopy "a:*.c" .

	will copy all files on the A: disk with the extension .C to the
	current Unix directory.

	WRONG:	mcopy a:*.c .

	will cause the shell to expand a:*.c in the current Unix directory
	(which is probably not what you wanted) then copy that list of
	files (if there were any) from A: to the current Unix directory.

	RIGHT:	mcopy *.c a:

	will copy all files with the extension .c in the current Unix
	directory to the A: drive.  (This time you *want* the shell
	the expand the *.c).

The manuals are very terse...  it's assumed that the reader is already
familiar with MSDOS.

Mcopy is really a front-end to the low level Mread and Mwrite commands.

Emmet P. Gray				US Army, HQ III Corps & Fort Hood
...!uunet!uiucuxc!fthood!egray		Attn: AFZF-DE-ENV
fthood!egray@uxc.cso.uiuc.edu		Directorate of Engineering & Housing
					Environmental Management Office
					Fort Hood, TX 76544-5057

README-NeXT

                             MTOOLS
                           
                           Version 2.0
                          Patchlevel 5n




	Here are the Mtools for the NeXT. They are actually almost identical
to the distribution of mtools version 2.0, patchlevel 5. The Mtools are a set
commands to directly access DOS formatted files with a command line 
interface. 

	This distribution contains the sources of the programs, and binaries
to access the internal drive on a NeXT slab.

				Laurent Amon (amon@cs.stanford.edu)
				-lga-                      92-07-28
			Revised -lga-			   95-09-17

<Insert here the usual disclaimer.>

RUNNING THE MTOOLS.

	You've ever used a DOS machine? Then you won't have any problem.
Two things to note. The first is that you will get plenty of error messages 
on the console, like 
	Bad disk label magic number
	fd: UNABLE TO READ DISK LABEL
This is normal. Ignore them. 

	The second thing is that when you insert a disk in the drive, the
WorkSpace tries to mount them. To get around this, use the same solution as
whenn you do tar volumes: Type the command and <return>, and insert the disk
only when a window pops us asking you to insert it.


MODIFICATIONS FOR THE NeXT.

- Added a compiler option NeXT to select the NeXT floppy. This is set right
	now to the internal drive.
- Modified Makefile to use install, and added the install.suid target.
- Added the files README-NeXT and INSTALL-NeXT.
- Added a file 'eject.c' and its binary, not created nor installed by
	Makefile, to be used in case of a SUID installation.

DEVICES.

	The binaries are build to access the internal floppy via the
device /dev/rfd0b. To compile them for another device, you have to 
modify the file 'devices.c'. 

	To set it to an internal floppy, you must use /dev/rfd0b.
r:  Specifies the character device. 
fd: Floppy Drive, need I explain?
0:  The number of the device, starting with the first one. Currently '0'
	since the NeXT only has one internal drive.
b:  Specifies the 'live' device. Accessing rfd0a would write a file system 
	label on the disk, causing an "device error" if you try to read it 
	on other workstations.

	To set it to an external (SCSI) floppy, you must modify 'devices.c'
and replace the device name by /dev/rsd?h where:
r:  Specifies the character device.
sd: SCSI device.
?:  The number of the SCSI device corresponding to the floppy. The number are 
	attributed as follows: '0' for the boot device if it is a SCSI device,
        then by ascending order starting with the device of lowest SCSI id.
	For example, if you boot on your internal disk of ID 0, and have 
	the internal disk at ID 1 and the floppy at ID 3, the device to use 
	will be /dev/rsd2h. In any case, mount a floppy with the WorkSpace,
	do a 'df' in a shell to see what device you need.
h:  Specifies the 'live' device. This is a 'h' and not a 'b'.

	If you have multiple drives, you can create entries in 'devices.c'
for drives A:, B:, etc. Be careful that devices are hard coded in the
binaries. If you shuffle around the SCSI number of your peripherals, you 
may end up accessing the wrong device in case of an external floppy.

	The present configuration should work for 1.44 Megs and 720 K disks.
I have not tested the 720 K option. I do not know the parameters for a 2.88
Megs disk, so ED DOS diskd are not supported here. I don't even think that
they exist anyway.

MAINTENANCE
	I don't maintain this package. Possessors of non-black hardware
should be able to use the vanilla mtools as they don't have the ED floppy.

REVISION
	Correction of the README-NeXT and INSTALL-NeXT files, as well as
pf the eject.c program (use execl instead of system).

REFERENCES.

	The Mtools can be found in the volume 25 of the archives of 
comp.sources.unix.

	Additional information about the the NeXT floppy and the devices
are found with 'man fd', as well as in the include file 
/usr/include/nextdev/fd_extern.h.

	Also, the file 'transferring_data_with_floppy_disks' in the 
Winter 1991 Support Bulletin.


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.