home *** CD-ROM | disk | FTP | other *** search
/ Plex 2 / Plex2.mdf / u_linux / mtoo207.dif < prev    next >
Text File  |  1994-05-28  |  78KB  |  2,759 lines

  1. diff -rc --new-file orig/mtools-2.0.7/Configure mtools-2.0.7/Configure
  2. *** orig/mtools-2.0.7/Configure    Thu Sep 10 16:10:09 1992
  3. --- mtools-2.0.7/Configure    Sun Sep 26 19:24:01 1993
  4. ***************
  5. *** 39,51 ****
  6.           FCNTL    Alternate Berkeley lock method (may not work
  7.               on devices)
  8.   
  9.       The folowing are pre-proccessor variables for the default device
  10.       setups for various flavors of Unix.  Pick one of the these, or
  11.       create a new entry in the devices.c file.
  12.   
  13. -         ISC    default devices for ISC's SVR3.2
  14.   
  15. !         UNIXPC    default devices for AT&T Unix PC 7300/3B1
  16.   
  17.           SPARC    default devices for SunOS 4.1 on a SPARCstation
  18.   
  19. --- 39,53 ----
  20.           FCNTL    Alternate Berkeley lock method (may not work
  21.               on devices)
  22.   
  23. +     Puck *none* if you are on Linux -- record locking is still a bit
  24. +     
  25.       The folowing are pre-proccessor variables for the default device
  26.       setups for various flavors of Unix.  Pick one of the these, or
  27.       create a new entry in the devices.c file.
  28.   
  29.   
  30. !         ISC    default devices for ISC's SVR3.2
  31.   
  32.           SPARC    default devices for SunOS 4.1 on a SPARCstation
  33.   
  34. ***************
  35. *** 59,65 ****
  36. --- 61,75 ----
  37.   
  38.           RT_ACIS    default devices for IBM's BSD clone.        
  39.   
  40. +         UNIXPC    default devices for AT&T Unix PC 7300/3B1
  41.           SPARC_ODD for reading odd-ball disks on a Sparc
  42. +     However if you define LOADDEVS instead the configuration information
  43. +     will be read from /etc/mtools (the path can be changed by editing
  44. +     at devices.c). This should not be done if you would have defined
  45. +     otherwise UNIXPC or SPARC_ODD, as these two choices also imply
  46. +     OS dependent device initialization routines.
  47.           
  48.       There is a variable in msdos.h called SIG_TYPE which should be
  49.       configured to the "base" return type of signal();
  50. ***************
  51. *** 123,128 ****
  52. --- 133,153 ----
  53.       safely ignored.
  54.   
  55.   4)  Some example devices
  56. +     If you define LOADDEVS, then a sample /etc/mtools file may be:
  57. +         A /dev/fd0 12 0 0 0
  58. +         A /dev/fd0 12 40 2 9
  59. +         B /dev/fd1 12 0 0 0
  60. +         B /dev/fd1 12 40 2 9
  61. +         C /dev/hda1 16 0 0 0
  62. +         D /dev/hda6 16 0 0 0
  63. +     which is the default one contained in mtools.etc in this directory,
  64. +     and that is designed for Linux.
  65. +     If you choose to hardcode the devices in, by not defining LOADDEVS,
  66. +     but one of DELL, ..., the following are typical choices:
  67.   
  68.       for Interactive 386ix 2.0.2 with:
  69.           1.2m 5.25" as a: (supports 1.2m, 360k, and 320k)
  70. diff -rc --new-file orig/mtools-2.0.7/Makefile mtools-2.0.7/Makefile
  71. *** orig/mtools-2.0.7/Makefile    Thu Sep 10 16:10:46 1992
  72. --- mtools-2.0.7/Makefile    Thu Oct 28 08:58:34 1993
  73. ***************
  74. *** 14,177 ****
  75.   #CFLAGS = -O -M2e -DINT16 -DXENIX -DLOCKF
  76.   #LDFLAGS = -s -M2e -i -f 5000
  77.   
  78. ! CFLAGS    = -O -DSPARC -DBSD
  79.   LDFLAGS    = -s
  80.   LD    = $(CC)
  81.   LINT    = lint
  82.   SHLIB    =
  83.   SHAR    = shar -a
  84. ! BINDIR    = ${DESTDIR}/usr/local/mtools
  85. ! MANEXT    = 1
  86. ! MANDIR    = ${DESTDIR}/usr/share/local/man/man$(MANEXT)
  87.   #
  88.   # for AT&T Unix PC 7300/3b1 style shared libraries.
  89.   #SHOBJ    = /lib/crt0s.o /lib/shlib.ifile
  90.   #LD    = ld
  91.   
  92. ! PROGS    = mattrib mcd mcopy mdel mdir mformat mlabel mmd mrd mread mren \
  93. !     mtype mwrite mkmanifest
  94.   
  95. ! MATTRIB    = mattrib.o buf_read.o buf_write.o devices.o dir_read.o \
  96. !     dir_write.o expand.o fat_read.o init.o match.o parse.o subdir.o
  97. ! MCD    = mcd.o buf_read.o devices.o dir_read.o expand.o fat_read.o \
  98. !     init.o is_dir.o match.o parse.o subdir.o
  99. ! MCOPY    = mcopy.o
  100. ! MDEL    = mdel.o buf_read.o buf_write.o devices.o dir_read.o dir_write.o \
  101. !     expand.o fat_free.o fat_read.o fat_write.o init.o match.o parse.o \
  102. !     subdir.o 
  103. ! MDIR    = mdir.o buf_read.o devices.o dir_read.o expand.o fat_read.o \
  104. !     init.o is_dir.o match.o parse.o subdir.o
  105. ! MFORMAT    = mformat.o devices.o dir_write.o expand.o
  106. ! MLABEL    = mlabel.o buf_read.o buf_write.o devices.o dir_read.o \
  107. !     dir_write.o expand.o fat_read.o init.o 
  108. ! MMD    = mmd.o buf_read.o buf_write.o devices.o dir_make.o dir_read.o \
  109. !     dir_write.o expand.o fat_read.o fat_write.o init.o match.o parse.o \
  110. !     subdir.o
  111. ! MRD    = mrd.o buf_read.o buf_write.o devices.o dir_read.o dir_write.o \
  112. !     expand.o fat_free.o fat_read.o fat_write.o init.o match.o parse.o \
  113. !     subdir.o
  114. ! MREAD    = mread.o buf_read.o devices.o dir_read.o expand.o fat_read.o \
  115. !     file_read.o init.o match.o parse.o subdir.o
  116. ! MREN    = mren.o buf_read.o buf_write.o devices.o dir_read.o dir_write.o \
  117. !     expand.o fat_read.o init.o match.o parse.o subdir.o
  118. ! MTYPE    = mtype.o buf_read.o devices.o dir_read.o expand.o fat_read.o \
  119. !     file_read.o init.o match.o parse.o subdir.o
  120. ! MWRITE    = mwrite.o buf_read.o buf_write.o devices.o dir_make.o \
  121. !     dir_read.o dir_write.o expand.o fat_free.o fat_read.o fat_write.o \
  122. !     file_write.o init.o is_dir.o match.o parse.o subdir.o
  123. ! MKMANIFEST = mkmanifest.o
  124. ! all:    $(PROGS)
  125. ! mattrib: $(MATTRIB)
  126. !     $(LD) $(LDFLAGS) $(MATTRIB) $(SHOBJ) -o mattrib $(SHLIB)
  127. ! mcd:    $(MCD)
  128. !     $(LD) $(LDFLAGS) $(MCD) $(SHOBJ) -o mcd $(SHLIB)
  129. ! mcopy:    $(MCOPY)
  130. !     $(LD) $(LDFLAGS) $(MCOPY) $(SHOBJ) -o mcopy $(SHLIB)
  131. ! mdel:    $(MDEL)
  132. !     $(LD) $(LDFLAGS) $(MDEL) $(SHOBJ) -o mdel $(SHLIB)
  133. ! mdir:    $(MDIR)
  134. !     $(LD) $(LDFLAGS) $(MDIR) $(SHOBJ) -o mdir $(SHLIB)
  135. ! mformat: $(MFORMAT)
  136. !     $(LD) $(LDFLAGS) $(MFORMAT) $(SHOBJ) -o mformat $(SHLIB)
  137. ! mlabel:    $(MLABEL)
  138. !     $(LD) $(LDFLAGS) $(MLABEL) $(SHOBJ) -o mlabel $(SHLIB)
  139. ! mmd:    $(MMD)
  140. !     $(LD) $(LDFLAGS) $(MMD) $(SHOBJ) -o mmd $(SHLIB)
  141. ! mrd:    $(MRD)
  142. !     $(LD) $(LDFLAGS) $(MRD) $(SHOBJ) -o mrd $(SHLIB)
  143. ! mread:    $(MREAD)
  144. !     $(LD) $(LDFLAGS) $(MREAD) $(SHOBJ) -o mread $(SHLIB)
  145. ! mren:    $(MREN)
  146. !     $(LD) $(LDFLAGS) $(MREN) $(SHOBJ) -o mren $(SHLIB)
  147. ! mtype:    $(MTYPE)
  148. !     $(LD) $(LDFLAGS) $(MTYPE) $(SHOBJ) -o mtype $(SHLIB)
  149. ! mwrite:    $(MWRITE)
  150. !     $(LD) $(LDFLAGS) $(MWRITE) $(SHOBJ) -o mwrite $(SHLIB)
  151. ! mkmanifest:    $(MKMANIFEST)
  152. !     $(LD) $(LDFLAGS) $(MKMANIFEST) $(SHOBJ) -o mkmanifest $(SHLIB)
  153. ! install: all
  154. !     -mkdir $(BINDIR)
  155. !     for prog in $(PROGS); do install $$prog $(BINDIR)/$$prog; gln -sf ../mtools/$$prog ${DESTDIR}/usr/local/bin; done
  156. !     install -c -m 644 Mattrib.1 $(MANDIR)/mattrib.$(MANEXT)
  157. !     install -c -m 644 Mcd.1 $(MANDIR)/mcd.$(MANEXT)
  158. !     install -c -m 644 Mcopy.1 $(MANDIR)/mcopy.$(MANEXT)
  159. !     install -c -m 644 Mdel.1 $(MANDIR)/mdel.$(MANEXT)
  160. !     install -c -m 644 Mdir.1 $(MANDIR)/mdir.$(MANEXT)
  161. !     install -c -m 644 Mformat.1 $(MANDIR)/mformat.$(MANEXT)
  162. !     install -c -m 644 Mlabel.1 $(MANDIR)/mlabel.$(MANEXT)
  163. !     install -c -m 644 Mmd.1 $(MANDIR)/mmd.$(MANEXT)
  164. !     install -c -m 644 Mrd.1 $(MANDIR)/mrd.$(MANEXT)
  165. !     install -c -m 644 Mread.1 $(MANDIR)/mread.$(MANEXT)
  166. !     install -c -m 644 Mren.1 $(MANDIR)/mren.$(MANEXT)
  167. !     install -c -m 644 Mtools.1 $(MANDIR)/mtools.$(MANEXT)
  168. !     install -c -m 644 Mtype.1 $(MANDIR)/mtype.$(MANEXT)
  169. !     install -c -m 644 Mwrite.1 $(MANDIR)/mwrite.$(MANEXT)
  170. !     install -c -m 644 Mkmanifest.1 $(MANDIR)/mkmanifest.$(MANEXT)
  171.   
  172.   clean:
  173. !     rm $(PROGS) *.o core a.out tags TAGS
  174.   
  175. ! lint:
  176. !     $(LINT) mattrib.c buf_read.c buf_write.c devices.c dir_read.c \
  177. !     dir_write.c expand.c fat_read.c init.c match.c parse.c subdir.c
  178. !     $(LINT) mcd.c buf_read.c devices.c dir_read.c expand.c fat_read.c \
  179. !     init.c is_dir.c match.c parse.c subdir.c
  180. !     $(LINT) mcopy.c
  181. !     $(LINT) mdel.c buf_read.c buf_write.c devices.c dir_read.c dir_write.c \
  182. !     expand.c fat_free.c fat_read.c fat_write.c init.c match.c parse.c \
  183. !     subdir.c 
  184. !     $(LINT) mdir.c buf_read.c devices.c dir_read.c expand.c fat_read.c \
  185. !     init.c is_dir.c match.c parse.c subdir.c
  186. !     $(LINT) mformat.c devices.c dir_write.c expand.c
  187. !     $(LINT) mlabel.c buf_read.c buf_write.c devices.c dir_read.c \
  188. !     dir_write.c expand.c fat_read.c init.c 
  189. !     $(LINT) mmd.c buf_read.c buf_write.c devices.c dir_make.c dir_read.c \
  190. !     dir_write.c expand.c fat_read.c fat_write.c init.c match.c parse.c \
  191. !     subdir.c
  192. !     $(LINT) mrd.c buf_read.c buf_write.c devices.c dir_read.c dir_write.c \
  193. !     expand.c fat_free.c fat_read.c fat_write.c init.c match.c parse.c \
  194. !     subdir.c
  195. !     $(LINT) mread.c buf_read.c devices.c dir_read.c expand.c fat_read.c \
  196. !     file_read.c init.c match.c parse.c subdir.c
  197. !     $(LINT) mren.c buf_read.c buf_write.c devices.c dir_read.c dir_write.c \
  198. !     expand.c fat_read.c init.c match.c parse.c subdir.c
  199. !     $(LINT) mtype.c buf_read.c devices.c dir_read.c expand.c fat_read.c \
  200. !     file_read.c init.c match.c parse.c subdir.c
  201. !     $(LINT) mwrite.c buf_read.c buf_write.c devices.c dir_make.c \
  202. !     dir_read.c dir_write.c expand.c fat_free.c fat_read.c fat_write.c \
  203. !     file_write.c init.c is_dir.c match.c parse.c subdir.c
  204. !     $(LINT) mkmanifest.c
  205. ! shar:
  206. !     $(SHAR) Configure Makefile Mattrib.1 Mcd.1 Mcopy.1 Mdel.1 Mdir.1 \
  207. !     Mformat.1 Mkmanifest.1 Mlabel.1 Mmd.1 Mrd.1 Mread.1 Mren.1 \
  208. !     Mtools.1 Mtype.1 Mwrite.1 Readme Release.notes buf_read.c \
  209. !     buf_write.c devices.c dir_make.c dir_read.c dir_write.c expand.c \
  210. !     fat_free.c > mtools_sh.1
  211. !     $(SHAR) fat_read.c fat_write.c file_read.c file_write.c init.c \
  212. !     is_dir.c match.c mattrib.c mcd.c mcopy.c mdel.c mdir.c mformat.c \
  213. !     mkmanifest.c mlabel.c mmd.c > mtools_sh.2
  214. !     $(SHAR) mrd.c mread.c mren.c msdos.h mtype.c mwrite.c parse.c \
  215. !     patchlevel.h subdir.c > mtools_sh.3
  216. !     $(SHAR) Mattrib.out Mcd.out Mcopy.out Mdel.out Mdir.out Mformat.out \
  217. !     Mkmanifest.out Mlabel.out Mmd.out Mrd.out Mread.out Mren.out \
  218. !     Mtools.out Mtype.out Mwrite.out > mtools_sh.4
  219.   
  220.   buf_read.o:    msdos.h
  221.   buf_write.o:    msdos.h
  222. --- 14,95 ----
  223.   #CFLAGS = -O -M2e -DINT16 -DXENIX -DLOCKF
  224.   #LDFLAGS = -s -M2e -i -f 5000
  225.   
  226. ! #for Linux (locking device files does not work reliably?)
  227. ! CFLAGS    = -O2 -m486 -DLOADDEVS #-DFLOCK
  228.   LDFLAGS    = -s
  229.   LD    = $(CC)
  230.   LINT    = lint
  231.   SHLIB    =
  232.   SHAR    = shar -a
  233. ! BINDIR    = ${DEST}/usr/bin
  234. ! ETCDIR    = ${DEST}/etc
  235. ! MAN1EXT    = 1
  236. ! MAN1DIR    = ${DEST}/usr/man/man$(MAN1EXT)
  237. ! MAN5EXT    = 5
  238. ! MAN5DIR    = ${DEST}/usr/man/man$(MAN5EXT)
  239.   #
  240.   # for AT&T Unix PC 7300/3b1 style shared libraries.
  241.   #SHOBJ    = /lib/crt0s.o /lib/shlib.ifile
  242.   #LD    = ld
  243.   
  244. ! LINKS=mattrib mcd mcopy mdel mdir mformat mlabel mmd mrd mread mren  mtype \
  245. !       mwrite
  246. ! MTOOLS = mattrib.o mcd.o mcopy.o mdel.o mdir.o mformat.o mlabel.o mmd.o \
  247. !      mrd.o mread.o mren.o mtype.o mwrite.o buf_read.o buf_write.o \
  248. !      devices.o dir_make.o dir_read.o dir_write.o expand.o fat_free.o \
  249. !      fat_read.o fat_write.o file_read.o file_write.o init.o is_dir.o \
  250. !      match.o parse.o subdir.o mtools.o
  251. ! MKMAN1IFEST = mkmanifest.o
  252. ! all:    mtools $(LINKS)
  253. ! mtools:    $(MTOOLS)
  254. !     $(LD) $(LDFLAGS) $(MTOOLS) $(SHOBJ) -o mtools $(SHLIB)
  255. ! $(LINKS):    mtools
  256. !     for name in $(LINKS); \
  257. !     do rm -f $$name && ln mtools $$name; done
  258.   
  259. ! mkmanifest:    $(MKMAN1IFEST)
  260. !     $(LD) $(LDFLAGS) $(MKMAN1IFEST) $(SHOBJ) -o mkmanifest $(SHLIB)
  261.   
  262.   clean:
  263. !     -rm *.o 2>/dev/null
  264. ! spotless:    clean
  265. !     -rm mtools $(LINKS) 2>/dev/null
  266. ! install:    $(BINDIR)/mtools ${ETCDIR}/mtools install-man install-links
  267.   
  268. ! $(BINDIR)/mtools: mtools
  269. !     cp mtools $(BINDIR)/mtools
  270. ! $(ETCDIR)/mtools: mtools.etc
  271. !     cp mtools.etc $(ETCDIR)/mtools
  272. ! install-links: $(BINDIR)/mtools
  273. !     cd $(BINDIR) && for name in $(LINKS); \
  274. !     do rm -f $$name && ln mtools $$name; done
  275. ! install-man:
  276. !     install -c -m 644 mattrib.1 $(MAN1DIR)/mattrib.$(MAN1EXT)
  277. !     install -c -m 644 mcd.1 $(MAN1DIR)/mcd.$(MAN1EXT)
  278. !     install -c -m 644 mcopy.1 $(MAN1DIR)/mcopy.$(MAN1EXT)
  279. !     install -c -m 644 mdel.1 $(MAN1DIR)/mdel.$(MAN1EXT)
  280. !     install -c -m 644 mdir.1 $(MAN1DIR)/mdir.$(MAN1EXT)
  281. !     install -c -m 644 mformat.1 $(MAN1DIR)/mformat.$(MAN1EXT)
  282. !     install -c -m 644 mlabel.1 $(MAN1DIR)/mlabel.$(MAN1EXT)
  283. !     install -c -m 644 mmd.1 $(MAN1DIR)/mmd.$(MAN1EXT)
  284. !     install -c -m 644 mrd.1 $(MAN1DIR)/mrd.$(MAN1EXT)
  285. !     install -c -m 644 mread.1 $(MAN1DIR)/mread.$(MAN1EXT)
  286. !     install -c -m 644 mren.1 $(MAN1DIR)/mren.$(MAN1EXT)
  287. !     install -c -m 644 mtools.1 $(MAN1DIR)/mtools.$(MAN1EXT)
  288. !     install -c -m 644 mtools.5 $(MAN5DIR)/mtools.$(MAN5EXT)
  289. !     install -c -m 644 mtype.1 $(MAN1DIR)/mtype.$(MAN1EXT)
  290. !     install -c -m 644 mwrite.1 $(MAN1DIR)/mwrite.$(MAN1EXT)
  291. !     install -c -m 644 mkmanifest.1 $(MAN1DIR)/mkmanifest.$(MAN1EXT)
  292.   
  293.   buf_read.o:    msdos.h
  294.   buf_write.o:    msdos.h
  295. ***************
  296. *** 186,203 ****
  297.   file_write.o:    msdos.h
  298.   init.o:        msdos.h
  299.   is_dir.o:    msdos.h
  300. ! mattrib.o:    msdos.h patchlevel.h
  301. ! mcd.o:        msdos.h patchlevel.h
  302. ! mcopy.o:    patchlevel.h
  303. ! mdel.o:        msdos.h patchlevel.h
  304. ! mdir.o:        msdos.h patchlevel.h
  305. ! mformat.o:    msdos.h patchlevel.h
  306. ! mlabel.o:    msdos.h patchlevel.h
  307. ! mmd.o:        msdos.h patchlevel.h
  308. ! mrd.o:        msdos.h patchlevel.h
  309. ! mread.o:    msdos.h patchlevel.h
  310. ! mren.o:        msdos.h patchlevel.h
  311. ! mtype.o:    msdos.h patchlevel.h
  312. ! mwrite.o:    msdos.h patchlevel.h
  313.   parse.o:    msdos.h
  314.   subdir.o:    msdos.h
  315. --- 104,125 ----
  316.   file_write.o:    msdos.h
  317.   init.o:        msdos.h
  318.   is_dir.o:    msdos.h
  319. ! mattrib.o:    msdos.h mattrib.c
  320. ! mcd.o:        msdos.h mcd.c
  321. ! mcopy.o:    msdos.h mcopy.c
  322. ! mdel.o:        msdos.h mdel.c
  323. ! mdir.o:        msdos.h mdir.c
  324. ! mformat.o:    msdos.h mformat.c
  325. ! mlabel.o:    msdos.h mlabel.c
  326. ! mmd.o:        msdos.h mmd.c
  327. ! mrd.o:        msdos.h mrd.c
  328. ! mread.o:    msdos.h mread.c
  329. ! mren.o:        msdos.h mren.c
  330. ! mtype.o:    msdos.h mtype.c
  331. ! mwrite.o:    msdos.h mwrite.c
  332.   parse.o:    msdos.h
  333.   subdir.o:    msdos.h
  334. + mtools.o:    msdos.h patchlevel.h mtools.c
  335. Only in orig/mtools-2.0.7: Mattrib.1
  336. Only in orig/mtools-2.0.7: Mcd.1
  337. Only in orig/mtools-2.0.7: Mcopy.1
  338. Only in orig/mtools-2.0.7: Mdel.1
  339. Only in orig/mtools-2.0.7: Mdir.1
  340. Only in orig/mtools-2.0.7: Mformat.1
  341. Only in orig/mtools-2.0.7: Mkmanifest.1
  342. Only in orig/mtools-2.0.7: Mlabel.1
  343. Only in orig/mtools-2.0.7: Mmd.1
  344. Only in orig/mtools-2.0.7: Mrd.1
  345. Only in orig/mtools-2.0.7: Mread.1
  346. Only in orig/mtools-2.0.7: Mren.1
  347. Only in orig/mtools-2.0.7: Mtools.1
  348. Only in orig/mtools-2.0.7: Mtype.1
  349. Only in orig/mtools-2.0.7: Mwrite.1
  350. diff -rc --new-file orig/mtools-2.0.7/Release.notes mtools-2.0.7/Release.notes
  351. *** orig/mtools-2.0.7/Release.notes    Thu Sep 10 16:00:31 1992
  352. --- mtools-2.0.7/Release.notes    Sun Sep 26 19:24:06 1993
  353. ***************
  354. *** 1,3 ****
  355. --- 1,12 ----
  356. + Patch #7+, 19 sep 93
  357. + This patch merges in the mods against 2.05 under Linux. Two are the main
  358. + changes: that all commands are linked as a single executable, which can
  359. + be linked as different name, and that the device specs are no longer
  360. + hardcompiled but are read dynamically from /etc/mtools (the latter change
  361. + is conditional on LOADDEVS being defined).
  362. + -----------------------------------------------------------------------------
  363.   Patch #7, 6 Sep 92
  364.   
  365.   This patch will change the method of determining if the FAT encoding
  366. diff -rc --new-file orig/mtools-2.0.7/devices.c mtools-2.0.7/devices.c
  367. *** orig/mtools-2.0.7/devices.c    Thu Sep 10 16:11:17 1992
  368. --- mtools-2.0.7/devices.c    Sun Oct 17 21:58:59 1993
  369. ***************
  370. *** 3,50 ****
  371.    */
  372.   
  373.   #include <stdio.h>
  374.   #include "msdos.h"
  375.   
  376.   #ifdef DELL
  377.   struct device devices[] = {
  378. !     {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  379. !     {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  380. !     {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 8},
  381. !     {'B', "/dev/rdsk/f13ht", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  382. !     {'B', "/dev/rdsk/f13dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  383. !     {'C', "/dev/rdsk/dos", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  384. !     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  385.   };
  386.   #endif /* DELL */
  387.   
  388.   #ifdef ISC
  389.   struct device devices[] = {
  390. !     {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  391. !     {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  392. !     {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 8},
  393. !     {'B', "/dev/rdsk/f13ht", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  394. !     {'B', "/dev/rdsk/f13dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  395. !     {'C', "/dev/rdsk/0p1", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  396. !     {'D', "/usr/vpix/defaults/C:", 8704L, 12, 0, (int (*) ()) 0, 0, 0, 0},
  397. !     {'E', "$HOME/vpix/C:", 8704L, 12, 0, (int (*) ()) 0, 0, 0, 0},
  398. !     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  399.   };
  400.   #endif /* ISC */
  401.   
  402.   #ifdef SPARC
  403.   struct device devices[] = {
  404. !     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  405. !     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  406. !     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  407.   };
  408.   #endif /* SPARC */
  409. ! #ifdef RT_ACIS
  410.   struct device devices[] = {
  411. !       {'A', "/dev/rfd0", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  412. !       {'A', "/dev/rfd0", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  413. !       {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  414.   };
  415. ! #endif /* RT_ACIS */
  416.   
  417.   
  418.   #ifdef UNIXPC
  419. --- 3,161 ----
  420.    */
  421.   
  422.   #include <stdio.h>
  423. + #include <string.h>
  424. + #include <ctype.h>
  425. + #include <limits.h>
  426.   #include "msdos.h"
  427.   
  428. + #ifdef LOADDEVS
  429. + #define CFG_FILE    "/etc/mtools"
  430. + #define MAX_LINE    PATH_MAX+40
  431. + #define MAX_DEVICES 10
  432. + #ifdef __STDC__
  433. + # define AUX(x) #x
  434. + # define STR(x) AUX(x)
  435. + #else
  436. + # define STR(x) "x"
  437. + #endif
  438. + #define SET(f,t,h,s) \
  439. +   { devices[dev].fat_bits = (f); devices[dev].tracks = (t); \
  440. +   devices[dev].heads = (h); devices[dev].sectors = (s); }
  441. + struct device devices[MAX_DEVICES+1];
  442. + void load_devices(void)
  443. + {
  444. +     FILE *cfg;
  445. +     char buffer[MAX_LINE+1],name[PATH_MAX+1];
  446. +     char *here,*start;
  447. +     int items,dev,fat_bits;
  448. +     if ((cfg = fopen(CFG_FILE,"r")) == NULL) {
  449. +     perror(CFG_FILE);
  450. +     exit(1);
  451. +     }
  452. +     dev = 0;
  453. +     while (fgets(buffer,MAX_LINE,cfg)) {
  454. +     if (here = strchr(buffer,'#')) *here = 0;
  455. +     else if (here = strchr(buffer,'\n')) *here = 0;
  456. +     for (start = buffer; *start == ' ' || *start == '\t'; start++);
  457. +     if (!*start) continue;
  458. +     items = sscanf(start,"%c %" STR(PATH_MAX) "s %d %d %d %d",
  459. +       &devices[dev].drive,name,&fat_bits,&devices[dev].tracks,
  460. +       &devices[dev].heads,&devices[dev].sectors);
  461. +     if (dev >= MAX_DEVICES) {
  462. +         fprintf(stderr,"Too many devices\n");
  463. +         exit(1);
  464. +     }
  465. +     if (items == 6) devices[dev].fat_bits = fat_bits;
  466. +     else {
  467. +         if (items == 2 || items == 3) {
  468. + #ifdef oldLINUX
  469. +              if (!strncmp("/dev/at",name,7)) { SET(12,80,2,15) }
  470. +         else if (!strncmp("/dev/PS",name,7)) { SET(12,80,2,18) }
  471. +         else if (!strncmp("/dev/ps",name,7)) { SET(12,80,2,9) }
  472. +         else if (!strncmp("/dev/hd",name,7)) { SET(16,0,0,0) }
  473. +         else
  474. + #endif
  475. +         {
  476. +             fprintf(stderr,"Unknown device %s, please specify all "
  477. +               "parameters\n",name);
  478. +             exit(1);
  479. +         }
  480. +         if (items == 3) devices[dev].fat_bits = fat_bits;
  481. +         }
  482. +         else {
  483. +         fprintf(stderr,"Config file syntax: drive device [ fat [ "
  484. +           "tracks heads sectors ] ]\n",items);
  485. +         exit(1);
  486. +         }
  487. +     }
  488. +     if (islower(devices[dev].drive))
  489. +         devices[dev].drive = toupper(devices[dev].drive);
  490. +     devices[dev].offset = 0L;
  491. +     devices[dev].mode = 0;
  492. +     devices[dev].gioctl = NULL;
  493. +     if ((devices[dev].name = (char *) malloc(strlen(name)+1)) == NULL) {
  494. +         fprintf(stderr,"Out of memory\n");
  495. +         exit(1);
  496. +     }
  497. +     strcpy(devices[dev++].name,name);
  498. +     }
  499. +     memset(&devices[dev],0,sizeof(struct device));
  500. +     fclose(cfg);
  501. + }
  502. + #else /* LOADDEVS */
  503. + #define INIT_NOOP ((int (*) ()) 0)
  504.   #ifdef DELL
  505.   struct device devices[] = {
  506. !     {'B', "/dev/rdsk/f1q15dt", 0L, 12, 0, INIT_NOOP, 80, 2, 15},
  507. !     {'B', "/dev/rdsk/f1d9dt", 0L, 12, 0, INIT_NOOP, 40, 2, 9},
  508. !     {'B', "/dev/rdsk/f1d8dt", 0L, 12, 0, INIT_NOOP, 40, 2, 8},
  509. !     {'A', "/dev/rdsk/f03ht", 0L, 12, 0, INIT_NOOP, 80, 2, 18},
  510. !     {'A', "/dev/rdsk/f03dt", 0L, 12, 0, INIT_NOOP, 80, 2, 9},
  511. !     {'C', "/dev/rdsk/dos", 0L, 16, 0, INIT_NOOP, 0, 0, 0},
  512. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  513.   };
  514.   #endif /* DELL */
  515.   
  516.   #ifdef ISC
  517.   struct device devices[] = {
  518. !     {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, INIT_NOOP, 40, 2, 9},
  519. !     {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, INIT_NOOP, 80, 2, 15},
  520. !     {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, INIT_NOOP, 40, 2, 8},
  521. !     {'B', "/dev/rdsk/f13ht", 0L, 12, 0, INIT_NOOP, 80, 2, 18},
  522. !     {'B', "/dev/rdsk/f13dt", 0L, 12, 0, INIT_NOOP, 80, 2, 9},
  523. !     {'C', "/dev/rdsk/0p1", 0L, 16, 0, INIT_NOOP, 0, 0, 0},
  524. !     {'D', "/usr/vpix/defaults/C:", 8704L, 12, 0, INIT_NOOP, 0, 0, 0},
  525. !     {'E', "$HOME/vpix/C:", 8704L, 12, 0, INIT_NOOP, 0, 0, 0},
  526. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  527.   };
  528.   #endif /* ISC */
  529.   
  530. + #ifdef RT_ACIS
  531. + struct device devices[] = {
  532. +     {'A', "/dev/rfd0", 0L, 12, 0, INIT_NOOP, 80, 2, 15},
  533. +     {'A', "/dev/rfd0", 0L, 12, 0, INIT_NOOP, 40, 2, 9},
  534. +     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  535. + };
  536. + #endif /* RT_ACIS */
  537.   #ifdef SPARC
  538.   struct device devices[] = {
  539. !     {'A', "/dev/rfd0c", 0L, 12, 0, INIT_NOOP, 80, 2, 18},
  540. !     {'A', "/dev/rfd0c", 0L, 12, 0, INIT_NOOP, 80, 2, 9},
  541. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  542.   };
  543.   #endif /* SPARC */
  544. ! #ifdef SUN386
  545.   struct device devices[] = {
  546. !     {'A', "/dev/rfdl0c", 0L, 12, 0, INIT_NOOP, 80, 2, 9},
  547. !     {'A', "/dev/rfd0c", 0L, 12, 0, INIT_NOOP, 80, 2, 18},
  548. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  549.   };
  550. ! #endif /* SUN386 */
  551. ! #ifdef XENIX
  552. ! struct device devices[] = {
  553. !     {'A', "/dev/fd096ds15", 0L, 12, 0, INIT_NOOP, 80, 2, 15},
  554. !     {'A', "/dev/fd048ds9", 0L, 12, 0, INIT_NOOP, 40, 2, 9},
  555. !     {'B', "/dev/fd1135ds18", 0L, 12, 0, INIT_NOOP, 80, 2, 18},
  556. !     {'B', "/dev/fd1135ds9", 0L, 12, 0, INIT_NOOP, 80, 2, 9},
  557. !     {'C', "/dev/hd0d", 0L, 16, 0, INIT_NOOP, 0, 0, 0},
  558. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  559. ! };
  560. ! #endif /* XENIX */
  561. ! #endif /* LOADDEVS */
  562.   
  563.   
  564.   #ifdef UNIXPC
  565. ***************
  566. *** 55,62 ****
  567.   
  568.   struct device devices[] = {
  569.       {'A', "/dev/rfp020", 0L, 12, O_NDELAY, init_unixpc, 40, 2, 9},
  570. !     {'C', "/usr/bin/DOS/dvd000", 0L, 12, 0, (int (*) ()) 0, 0, 0, 0},
  571. !     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  572.   };
  573.   
  574.   int
  575. --- 166,173 ----
  576.   
  577.   struct device devices[] = {
  578.       {'A', "/dev/rfp020", 0L, 12, O_NDELAY, init_unixpc, 40, 2, 9},
  579. !     {'C', "/usr/bin/DOS/dvd000", 0L, 12, 0, INIT_NOOP, 0, 0, 0},
  580. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  581.   };
  582.   
  583.   int
  584. ***************
  585. *** 86,108 ****
  586.       return(0);
  587.   }
  588.   #endif /* UNIXPC */
  589. - #ifdef RT_ACIS
  590. - struct device devices[] = {
  591. -     {'A', "/dev/rfd0", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  592. -     {'A', "/dev/rfd0", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  593. -     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  594. - };
  595. - #endif /* RT_ACIS */
  596. - #ifdef SUN386
  597. - struct device devices[] = {
  598. -     {'A', "/dev/rfdl0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  599. -     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  600. -     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  601. - };
  602. - #endif /* SUN386 */
  603.     
  604.   #ifdef SPARC_ODD
  605.   #include <sys/types.h>
  606. --- 197,202 ----
  607. ***************
  608. *** 113,119 ****
  609.   
  610.   struct device devices[] = {
  611.       {'A', "/dev/rfd0c", 0L, 12, 0, init_sparc, 80, 2, 0},
  612. !     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  613.   };
  614.   
  615.   /*
  616. --- 207,213 ----
  617.   
  618.   struct device devices[] = {
  619.       {'A', "/dev/rfd0c", 0L, 12, 0, init_sparc, 80, 2, 0},
  620. !     {'\0', (char *) NULL, 0L, 0, 0, INIT_NOOP, 0, 0, 0}
  621.   };
  622.   
  623.   /*
  624. ***************
  625. *** 162,175 ****
  626.       return(0);
  627.   }
  628.   #endif /* SPARC_ODD */
  629. -   
  630. - #ifdef XENIX
  631. - struct device devices[] = {
  632. -     {'A', "/dev/fd096ds15", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  633. -     {'A', "/dev/fd048ds9", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  634. -     {'B', "/dev/fd1135ds18", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  635. -     {'B', "/dev/fd1135ds9", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  636. -     {'C', "/dev/hd0d", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  637. -     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  638. - };
  639. - #endif /* XENIX */
  640. --- 256,258 ----
  641. diff -rc --new-file orig/mtools-2.0.7/init.c mtools-2.0.7/init.c
  642. *** orig/mtools-2.0.7/init.c    Thu Sep 10 15:59:47 1992
  643. --- mtools-2.0.7/init.c    Sun Sep 26 19:24:09 1993
  644. ***************
  645. *** 26,31 ****
  646. --- 26,32 ----
  647.   extern unsigned char *fat_buf, *disk_buf, *dir_buf;
  648.   extern struct device devices[];
  649.   static struct bootsector *read_boot();
  650. + static int lock_dev();
  651.   
  652.   int
  653.   init(drive, mode)
  654. ***************
  655. *** 214,219 ****
  656. --- 215,227 ----
  657.   #else /* FULL_CYL */
  658.       disk_size = (dev->tracks) ? sectors : 1;
  659.   #endif /* FULL_CYL */
  660. +   
  661. + #ifdef DELL201
  662. +     /*
  663. +      * The driver in Dell's SVR4 v2.01 is unreliable with large writes.
  664. +      */
  665. +         disk_size = 1;
  666. + #endif /* DELL201 */
  667.   
  668.       disk_buf = (unsigned char *) malloc((unsigned int) disk_size * MSECTOR_SIZE);
  669.       if (disk_buf == NULL) {
  670. ***************
  671. *** 225,230 ****
  672. --- 233,245 ----
  673.       disk_dirty = 0;
  674.       fat_error = 0;
  675.       fat_bits = dev->fat_bits;
  676. +     if (fat_bits < 0) fat_bits = -fat_bits;
  677. +     else if (fat_bits == 12 && num_clus > FAT12 || fat_bits == 16 &&
  678. +           num_clus <= FAT12 || (fat_bits != 12 && fat_bits != 16)) {
  679. +         fprintf(stderr,"%d bit FAT on %c: sure ? (Use -%d in \
  680. + the device config file to bypass.)\n",fat_bits,drive,fat_bits);
  681. +         exit(1);
  682. +         }
  683.       fat_read(fat_start);
  684.                       /* set dir_chain[] to root directory */
  685.       dir_dirty = 0;
  686. diff -rc --new-file orig/mtools-2.0.7/mattrib.1 mtools-2.0.7/mattrib.1
  687. *** orig/mtools-2.0.7/mattrib.1    Thu Jan  1 01:00:00 1970
  688. --- mtools-2.0.7/mattrib.1    Thu Sep 10 15:59:46 1992
  689. ***************
  690. *** 0 ****
  691. --- 1,59 ----
  692. + .TH MATTRIB 1 local
  693. + .SH NAME
  694. + mattrib \- change MSDOS file attribute flags
  695. + .SH SYNOPSIS
  696. + .B mattrib
  697. + [
  698. + .B -a|+a
  699. + ]
  700. + [
  701. + .B -h|+h
  702. + ]
  703. + [
  704. + .B -r|+r
  705. + ]
  706. + [
  707. + .B -s|+s
  708. + ] msdosfile [ msdosfiles... ]
  709. + .SH DESCRIPTION
  710. + .I Mattrib
  711. + will add attribute flags to an MSDOS file (with the '+' operator) or
  712. + remove attribute flags (with the '-' operator).
  713. + .PP
  714. + .I Mattrib
  715. + will allow the following command line options:
  716. + .TP
  717. + .B a
  718. + Archive bit.  Used by some backup programs to indicate a new file.
  719. + .TP
  720. + .B r
  721. + Read-only bit.  Used to indicate a read-only file.  Files with this bit
  722. + set cannot be erased by DEL.  However, 
  723. + .I
  724. + mdel
  725. + is more cunning.
  726. + .TP
  727. + .B s
  728. + System bit.  Used by MSDOS to indicate a operating system file.
  729. + .TP
  730. + .B h
  731. + Hidden bit.  Used to make files hidden from DIR.  However,
  732. + .I
  733. + mdir
  734. + is more cunning.
  735. + .PP
  736. + MSDOS subdirectory names are supported with either the '/' or '\e'
  737. + separator.  The use of the '\e' separator or wildcards will require the
  738. + names to be enclosed in quotes to protect them from the shell.
  739. + .PP
  740. + The
  741. + .I mcd
  742. + command may be used to establish the device and the current working
  743. + directory (relative to MSDOS), otherwise the default is A:/.
  744. + .PP
  745. + .I Mattrib
  746. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  747. + .SH SEE ALSO
  748. + mcd(1)
  749. + .SH BUGS
  750. + Most MSDOS versions of ATTRIB don't allow this many options.
  751. diff -rc --new-file orig/mtools-2.0.7/mattrib.c mtools-2.0.7/mattrib.c
  752. *** orig/mtools-2.0.7/mattrib.c    Thu Sep 10 15:59:47 1992
  753. --- mtools-2.0.7/mattrib.c    Sun Oct 17 22:13:01 1993
  754. ***************
  755. *** 10,30 ****
  756.   
  757.   #include <stdio.h>
  758.   #include "msdos.h"
  759. - #include "patchlevel.h"
  760.   
  761. - int fd = -1;                /* the file descriptor for the device */
  762. - int dir_start;                /* starting sector for directory */
  763. - int dir_len;                /* length of directory (in sectors) */
  764. - int dir_entries;            /* number of directory entries */
  765. - int clus_size;                /* cluster size (in sectors) */
  766. - char *mcwd;                /* the Current Working Directory */
  767. - int fat_error;                /* FAT error detected? */
  768.   #define ADD    1
  769.   #define REMOVE    (-1)
  770.   #define LEAVE    0
  771.   
  772. ! main(argc, argv)
  773.   int argc;
  774.   char *argv[];
  775.   {
  776. --- 10,21 ----
  777.   
  778.   #include <stdio.h>
  779.   #include "msdos.h"
  780.   
  781.   #define ADD    1
  782.   #define REMOVE    (-1)
  783.   #define LEAVE    0
  784.   
  785. ! mattrib(argc, argv)
  786.   int argc;
  787.   char *argv[];
  788.   {
  789. ***************
  790. *** 84,90 ****
  791.               break;
  792.       }
  793.       if (argc < 3 || argv[fargn][0] == '\0' || oops) {
  794. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  795.           fprintf(stderr, "Usage: %s [-a|+a] [-h|+h] [-r|+r] [-s|+s] msdosfile [msdosfiles...]\n", argv[0]);
  796.           exit(1);
  797.       }
  798. --- 75,81 ----
  799.               break;
  800.       }
  801.       if (argc < 3 || argv[fargn][0] == '\0' || oops) {
  802. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  803.           fprintf(stderr, "Usage: %s [-a|+a] [-h|+h] [-r|+r] [-s|+s] msdosfile [msdosfiles...]\n", argv[0]);
  804.           exit(1);
  805.       }
  806. diff -rc --new-file orig/mtools-2.0.7/mcd.1 mtools-2.0.7/mcd.1
  807. *** orig/mtools-2.0.7/mcd.1    Thu Jan  1 01:00:00 1970
  808. --- mtools-2.0.7/mcd.1    Thu Sep 10 15:59:46 1992
  809. ***************
  810. *** 0 ****
  811. --- 1,33 ----
  812. + .TH MCD 1 local
  813. + .SH NAME
  814. + mcd \- change MSDOS directory
  815. + .SH SYNOPSIS
  816. + .B mcd
  817. + [ msdosdirectory ]
  818. + .SH DESCRIPTION
  819. + Without arguments,
  820. + .I mcd
  821. + will report the current device and working directory.  Otherwise,
  822. + .I mcd
  823. + changes the current device and current working directory relative to an
  824. + MSDOS filesystem.
  825. + .PP
  826. + The environmental variable MCWD may be used to locate the file where the
  827. + device and current working directory information is stored.  The default
  828. + is '$HOME/.mcwd'.  Information in this file is ignored if the file is
  829. + more than 6 hours old.
  830. + .PP
  831. + MSDOS subdirectory names are supported with either the '/' or '\e'
  832. + separator.  The use of the '\e' separator or wildcards will require the
  833. + directory name to be enclosed in quotes to protect it from the shell.
  834. + .PP
  835. + .I Mcd
  836. + returns 0 on success or 1 on failure.
  837. + .SH SEE ALSO
  838. + mdir(1)
  839. + .SH BUGS
  840. + Unlike MSDOS versions of CD,
  841. + .I mcd
  842. + can be used to change to another device.
  843. + .PP
  844. + It may be wise to remove old .mcwd files at logout.
  845. diff -rc --new-file orig/mtools-2.0.7/mcd.c mtools-2.0.7/mcd.c
  846. *** orig/mtools-2.0.7/mcd.c    Thu Sep 10 15:59:15 1992
  847. --- mtools-2.0.7/mcd.c    Sun Oct 17 22:13:27 1993
  848. ***************
  849. *** 10,26 ****
  850.   
  851.   #include <stdio.h>
  852.   #include "msdos.h"
  853. - #include "patchlevel.h"
  854.   
  855. ! int fd = -1;                /* the file descriptor for the device */
  856. ! int dir_start;                /* starting sector for directory */
  857. ! int dir_len;                /* length of directory (in sectors) */
  858. ! int dir_entries;            /* number of directory entries */
  859. ! int clus_size;                /* cluster size (in sectors) */
  860. ! char *mcwd;                /* the Current Working Directory */
  861. ! int fat_error;                /* FAT error detected? */
  862. ! main(argc, argv)
  863.   int argc;
  864.   char *argv[];
  865.   {
  866. --- 10,17 ----
  867.   
  868.   #include <stdio.h>
  869.   #include "msdos.h"
  870.   
  871. ! mcd(argc, argv)
  872.   int argc;
  873.   char *argv[];
  874.   {
  875. ***************
  876. *** 31,37 ****
  877.       void exit();
  878.   
  879.       if (argc > 2) {
  880. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  881.           fprintf(stderr, "Usage: %s: msdosdirectory\n", argv[0]);
  882.           exit(1);
  883.       }
  884. --- 22,28 ----
  885.       void exit();
  886.   
  887.       if (argc > 2) {
  888. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  889.           fprintf(stderr, "Usage: %s: msdosdirectory\n", argv[0]);
  890.           exit(1);
  891.       }
  892. ***************
  893. *** 90,115 ****
  894.       fprintf(fp, "%c:%s\n", drive, newpath);
  895.       fclose(fp);
  896.       exit(0);
  897. - }
  898. - /*
  899. -  * stubs for read-only programs
  900. -  */
  901. - void
  902. - disk_flush()
  903. - {
  904. -     extern int disk_dirty;
  905. -     disk_dirty = 0;
  906. -     return;
  907. - }
  908. - void
  909. - dir_flush()
  910. - {
  911. -     extern int dir_dirty;
  912. -     dir_dirty = 0;
  913. -     return;
  914.   }
  915. --- 81,84 ----
  916. diff -rc --new-file orig/mtools-2.0.7/mcopy.1 mtools-2.0.7/mcopy.1
  917. *** orig/mtools-2.0.7/mcopy.1    Thu Jan  1 01:00:00 1970
  918. --- mtools-2.0.7/mcopy.1    Thu Sep 10 15:59:46 1992
  919. ***************
  920. *** 0 ****
  921. --- 1,74 ----
  922. + .TH MCOPY 1 local
  923. + .SH NAME
  924. + mcopy \- copy MSDOS files to/from Unix
  925. + .SH SYNOPSIS
  926. + .B mcopy
  927. + [
  928. + .B -tnvm
  929. + ] sourcefile targetfile
  930. + .PP
  931. + .B mcopy
  932. + [
  933. + .B -tnvm
  934. + ] sourcefile [ sourcefiles... ] targetdirectory
  935. + .SH DESCRIPTION
  936. + .I Mcopy
  937. + copies the specified file to the named file, or copies multiple files to
  938. + the named directory.  The source and target can be either MSDOS or Unix
  939. + files.
  940. + .PP
  941. + The use of a drive letter designation on the MSDOS files, 'a:' for
  942. + example, determines the direction of the transfer.  A missing drive
  943. + designation implies a Unix file whose path starts in the current
  944. + directory
  945. + .PP
  946. + .I Mcopy
  947. + will allow the following command line options:
  948. + .TP
  949. + .B t
  950. + Text file transfer.
  951. + .I Mcopy
  952. + will translate incoming carriage return/line feeds to line feeds.
  953. + .TP
  954. + .B n
  955. + No warning.
  956. + .I Mcopy
  957. + will not warn the user when overwriting an existing file.
  958. + .TP
  959. + .B v
  960. + Verbose mode.
  961. + .TP
  962. + .B m
  963. + Preserve the file modification time.
  964. + .PP
  965. + If the target file already exists, and the
  966. + .I -n
  967. + option is not in effect,
  968. + .I mcopy
  969. + asks whether or not to overwrite the file.
  970. + .PP
  971. + MSDOS subdirectory names are supported with either the '/' or '\e'
  972. + separator.  The use of the '\e' separator or wildcards will require the
  973. + names to be enclosed in quotes to protect them from the shell.
  974. + .PP
  975. + The
  976. + .I mcd
  977. + command may be used to establish the device and the current working
  978. + directory (relative to MSDOS), otherwise the default is A:/.
  979. + .PP
  980. + .I Mcopy
  981. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  982. + .SH SEE ALSO
  983. + mcd(1), mread(1), mwrite(1)
  984. + .SH BUGS
  985. + Unlike MSDOS, the destination directory may
  986. + .B not
  987. + be omitted.
  988. + .PP
  989. + The '+' operator (append) from MSDOS is not supported.
  990. + .PP
  991. + No other
  992. + .I Mtools
  993. + command
  994. + .B requires
  995. + the use of a drive letter designation on MSDOS files.
  996. diff -rc --new-file orig/mtools-2.0.7/mcopy.c mtools-2.0.7/mcopy.c
  997. *** orig/mtools-2.0.7/mcopy.c    Thu Sep 10 15:59:47 1992
  998. --- mtools-2.0.7/mcopy.c    Sun Oct 17 22:18:13 1993
  999. ***************
  1000. *** 12,18 ****
  1001.   #include <ctype.h>
  1002.   #include <sys/types.h>
  1003.   #include <sys/wait.h>
  1004. ! #include "patchlevel.h"
  1005.   
  1006.   #define NONE    0
  1007.   #define MREAD    1
  1008. --- 12,18 ----
  1009.   #include <ctype.h>
  1010.   #include <sys/types.h>
  1011.   #include <sys/wait.h>
  1012. ! #include "msdos.h"
  1013.   
  1014.   #define NONE    0
  1015.   #define MREAD    1
  1016. ***************
  1017. *** 23,29 ****
  1018.   #define WEXITSTATUS(x) (((x)>>8)&0xff)
  1019.   #endif /* WEXITSTATUS */
  1020.   
  1021. ! main(argc, argv)
  1022.   int argc;
  1023.   char *argv[];
  1024.   {
  1025. --- 23,29 ----
  1026.   #define WEXITSTATUS(x) (((x)>>8)&0xff)
  1027.   #endif /* WEXITSTATUS */
  1028.   
  1029. ! mcopy(argc, argv)
  1030.   int argc;
  1031.   char *argv[];
  1032.   {
  1033. ***************
  1034. *** 50,56 ****
  1035.       }
  1036.   
  1037.       if (oops || (argc - optind) < 2) {
  1038. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1039.           fprintf(stderr, "Usage: %s [-tnvm] sourcefile targetfile\n", argv[0]);
  1040.           fprintf(stderr, "       %s [-tnvm] sourcefile [sourcefiles...] targetdirectory\n", argv[0]);
  1041.           exit(1);
  1042. --- 50,56 ----
  1043.       }
  1044.   
  1045.       if (oops || (argc - optind) < 2) {
  1046. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1047.           fprintf(stderr, "Usage: %s [-tnvm] sourcefile targetfile\n", argv[0]);
  1048.           fprintf(stderr, "       %s [-tnvm] sourcefile [sourcefiles...] targetdirectory\n", argv[0]);
  1049.           exit(1);
  1050. ***************
  1051. *** 82,88 ****
  1052.        * with a null when it passes it to main()
  1053.        */
  1054.       nargv = (char **) malloc((unsigned int) (argc + 1) * sizeof(*argv));
  1055. !     nargv[0] = "mcopy";
  1056.       for (i = 1; i < argc; i++)
  1057.           nargv[i] = argv[i];
  1058.       nargv[argc] = NULL;
  1059. --- 82,88 ----
  1060.        * with a null when it passes it to main()
  1061.        */
  1062.       nargv = (char **) malloc((unsigned int) (argc + 1) * sizeof(*argv));
  1063. !     nargv[0] = destination == MWRITE ? "mwrite" : "mread";
  1064.       for (i = 1; i < argc; i++)
  1065.           nargv[i] = argv[i];
  1066.       nargv[argc] = NULL;
  1067. diff -rc --new-file orig/mtools-2.0.7/mdel.1 mtools-2.0.7/mdel.1
  1068. *** orig/mtools-2.0.7/mdel.1    Thu Jan  1 01:00:00 1970
  1069. --- mtools-2.0.7/mdel.1    Thu Sep 10 15:59:46 1992
  1070. ***************
  1071. *** 0 ****
  1072. --- 1,36 ----
  1073. + .TH MDEL 1 local
  1074. + .SH NAME
  1075. + mdel \- delete an MSDOS file
  1076. + .SH SYNOPSIS
  1077. + .B mdel
  1078. + [
  1079. + .B -v
  1080. + ] msdosfile [ msdosfiles...  ]
  1081. + .SH DESCRIPTION
  1082. + .I Mdel
  1083. + deletes a file on an MSDOS filesystem.
  1084. + .PP
  1085. + .I Mdel
  1086. + will allow the following command line option:
  1087. + .TP
  1088. + .B v
  1089. + Verbose mode.  Echo the filenames as they are processed.
  1090. + .PP
  1091. + .I Mdel
  1092. + will ask for verification prior to removing a read\-only file.
  1093. + .PP
  1094. + MSDOS subdirectory names are supported with either the '/' or '\e'
  1095. + separator.  The use of the '\e' separator or wildcards will require the
  1096. + names to be enclosed in quotes to protect them from the shell.
  1097. + .PP
  1098. + The
  1099. + .I mcd
  1100. + command may be used to establish the device and the current working
  1101. + directory (relative to MSDOS), otherwise the default is A:/.
  1102. + .PP
  1103. + .I Mdel
  1104. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  1105. + .SH SEE ALSO
  1106. + mcd(1)
  1107. + .SH BUGS
  1108. + Allows multiple arguments, which does not follow the MSDOS convention.
  1109. diff -rc --new-file orig/mtools-2.0.7/mdel.c mtools-2.0.7/mdel.c
  1110. *** orig/mtools-2.0.7/mdel.c    Thu Sep 10 15:59:47 1992
  1111. --- mtools-2.0.7/mdel.c    Sun Oct 17 22:14:00 1993
  1112. ***************
  1113. *** 11,29 ****
  1114.   #include <stdio.h>
  1115.   #include <signal.h>
  1116.   #include "msdos.h"
  1117. - #include "patchlevel.h"
  1118.   
  1119. ! int fd = -1;                /* the file descriptor for the device */
  1120. ! int dir_start;                /* starting sector for directory */
  1121. ! int dir_len;                /* length of directory (in sectors) */
  1122. ! int dir_entries;            /* number of directory entries */
  1123. ! int clus_size;                /* cluster size (in sectors) */
  1124. ! char *mcwd;                /* the Current Working Directory */
  1125. ! int fat_error;                /* FAT error detected? */
  1126.   
  1127. ! static int got_signal();
  1128. ! main(argc, argv)
  1129.   int argc;
  1130.   char *argv[];
  1131.   {
  1132. --- 11,20 ----
  1133.   #include <stdio.h>
  1134.   #include <signal.h>
  1135.   #include "msdos.h"
  1136.   
  1137. ! extern int got_signal();
  1138.   
  1139. ! mdel(argc, argv)
  1140.   int argc;
  1141.   char *argv[];
  1142.   {
  1143. ***************
  1144. *** 50,56 ****
  1145.           fargn = 1;
  1146.       }
  1147.       if (argc < 2 || (argv[1][0] == '-' && !verbose)) {
  1148. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1149.           fprintf(stderr, "Usage: %s [-v] msdosfile [msdosfiles...]\n", argv[0]);
  1150.           exit(1);
  1151.       }
  1152. --- 41,47 ----
  1153.           fargn = 1;
  1154.       }
  1155.       if (argc < 2 || (argv[1][0] == '-' && !verbose)) {
  1156. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1157.           fprintf(stderr, "Usage: %s [-v] msdosfile [msdosfiles...]\n", argv[0]);
  1158.           exit(1);
  1159.       }
  1160. ***************
  1161. *** 103,108 ****
  1162. --- 94,100 ----
  1163.                   if (dir->attr & 0x01) {
  1164.                       while (!nogo) {
  1165.                           printf("%s: \"%s\" is read only, erase anyway (y/n) ? ", argv[0], newfile);
  1166. +                         fflush(stdout);
  1167.                           gets(ans);
  1168.                           if (ans[0] == 'y' || ans[0] == 'Y')
  1169.                               break;
  1170. ***************
  1171. *** 140,163 ****
  1172.       if (missed_one)
  1173.           exit(1);
  1174.       exit(0);
  1175. - }
  1176. - /*
  1177. -  * Do a graceful exit if the program is interrupted.  This will reduce
  1178. -  * (but not eliminate) the risk of generating a corrupted disk on
  1179. -  * a user abort.
  1180. -  */
  1181. - static int
  1182. - got_signal()
  1183. - {
  1184. -     void exit(), disk_flush(), fat_write(), dir_flush();
  1185. -     if (fd < 0)
  1186. -         exit(1);
  1187. -     fat_write();
  1188. -     dir_flush();
  1189. -     disk_flush();
  1190. -     close(fd);
  1191. -     exit(1);
  1192.   }
  1193. --- 132,135 ----
  1194. diff -rc --new-file orig/mtools-2.0.7/mdir.1 mtools-2.0.7/mdir.1
  1195. *** orig/mtools-2.0.7/mdir.1    Thu Jan  1 01:00:00 1970
  1196. --- mtools-2.0.7/mdir.1    Thu Sep 10 15:59:46 1992
  1197. ***************
  1198. *** 0 ****
  1199. --- 1,43 ----
  1200. + .TH MDIR 1 local
  1201. + .SH NAME
  1202. + mdir \- display an MSDOS directory
  1203. + .SH SYNOPSIS
  1204. + .B mdir
  1205. + [
  1206. + .B -w
  1207. + ] msdosdirectory
  1208. + .PP
  1209. + .B mdir
  1210. + [
  1211. + .B -w
  1212. + ] msdosfile [ msdosfiles...  ] 
  1213. + .SH DESCRIPTION
  1214. + .I Mdir
  1215. + displays the contents of an MSDOS directory.
  1216. + .PP
  1217. + .I Mdir
  1218. + will allow the following command line option:
  1219. + .TP
  1220. + .B w
  1221. + Wide output.  This option will print the filenames across the page
  1222. + without displaying the file size or creation date.
  1223. + .PP
  1224. + An error occurs if a component of the path is not a directory.
  1225. + .PP
  1226. + MSDOS subdirectory names are supported with either the '/' or '\e'
  1227. + separator.  The use of the '\e' separator or wildcards will require the
  1228. + names to be enclosed in quotes to protect them from the shell.
  1229. + .PP
  1230. + The
  1231. + .I mcd
  1232. + command may be used to establish the device and the current working
  1233. + directory (relative to MSDOS), otherwise the default is A:/.
  1234. + .PP
  1235. + .I Mdir
  1236. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  1237. + .SH SEE ALSO
  1238. + mcd(1)
  1239. + .SH BUGS
  1240. + Allows multiple arguments, which does not follow the MSDOS convention.
  1241. + .PP
  1242. + There is no /P (pause) option.
  1243. diff -rc --new-file orig/mtools-2.0.7/mdir.c mtools-2.0.7/mdir.c
  1244. *** orig/mtools-2.0.7/mdir.c    Thu Sep 10 15:59:17 1992
  1245. --- mtools-2.0.7/mdir.c    Sun Oct 17 22:14:34 1993
  1246. ***************
  1247. *** 10,29 ****
  1248.   
  1249.   #include <stdio.h>
  1250.   #include "msdos.h"
  1251. - #include "patchlevel.h"
  1252.   
  1253. - int fd = -1;                /* the file descriptor for the device */
  1254. - int dir_start;                /* starting sector for directory */
  1255. - int dir_len;                /* length of directory (in sectors) */
  1256. - int dir_entries;            /* number of directory entries */
  1257. - int clus_size;                /* cluster size (in sectors) */
  1258. - char *mcwd;                /* the Current Working Directory */
  1259. - int fat_error;                /* FAT error detected? */
  1260.   static long getfree();
  1261.   static char *conv_date(), *conv_time();
  1262.   
  1263. ! main(argc, argv)
  1264.   int argc;
  1265.   char *argv[];
  1266.   {
  1267. --- 10,20 ----
  1268.   
  1269.   #include <stdio.h>
  1270.   #include "msdos.h"
  1271.   
  1272.   static long getfree();
  1273.   static char *conv_date(), *conv_time();
  1274.   
  1275. ! mdir(argc, argv)
  1276.   int argc;
  1277.   char *argv[];
  1278.   {
  1279. ***************
  1280. *** 47,53 ****
  1281.           }
  1282.           if (argv[1][0] == '-' && !wide) {
  1283.               fprintf(stderr, "%s: illegal option -- %c\n", argv[0], argv[1][1]);
  1284. !             fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1285.               fprintf(stderr, "Usage: %s: [-w] msdosdirectory\n", argv[0]);
  1286.               fprintf(stderr, "       %s: [-w] msdosfile [msdosfiles...]\n", argv[0]);
  1287.               exit(1);
  1288. --- 38,44 ----
  1289.           }
  1290.           if (argv[1][0] == '-' && !wide) {
  1291.               fprintf(stderr, "%s: illegal option -- %c\n", argv[0], argv[1][1]);
  1292. !             fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1293.               fprintf(stderr, "Usage: %s: [-w] msdosdirectory\n", argv[0]);
  1294.               fprintf(stderr, "       %s: [-w] msdosfile [msdosfiles...]\n", argv[0]);
  1295.               exit(1);
  1296. ***************
  1297. *** 279,304 ****
  1298.       min_low = time_low >> 5;
  1299.       sprintf(ans, "%2d:%02d%c", hour, min_hi + min_low, am_pm);
  1300.       return(ans);
  1301. - }
  1302. - /*
  1303. -  * stubs for read-only programs
  1304. -  */
  1305. - void
  1306. - disk_flush()
  1307. - {
  1308. -     extern int disk_dirty;
  1309. -     disk_dirty = 0;
  1310. -     return;
  1311. - }
  1312. - void
  1313. - dir_flush()
  1314. - {
  1315. -     extern int dir_dirty;
  1316. -     dir_dirty = 0;
  1317. -     return;
  1318.   }
  1319. --- 270,273 ----
  1320. diff -rc --new-file orig/mtools-2.0.7/mformat.1 mtools-2.0.7/mformat.1
  1321. *** orig/mtools-2.0.7/mformat.1    Thu Jan  1 01:00:00 1970
  1322. --- mtools-2.0.7/mformat.1    Thu Sep 10 15:59:46 1992
  1323. ***************
  1324. *** 0 ****
  1325. --- 1,45 ----
  1326. + .TH MFORMAT 1 local
  1327. + .SH NAME
  1328. + mformat \- add an MSDOS filesystem to a low-level formatted diskette.
  1329. + .SH SYNOPSIS
  1330. + .B mformat
  1331. + [
  1332. + .B -t
  1333. + tracks ] [
  1334. + .B -h
  1335. + heads ] [
  1336. + .B -s
  1337. + sectors ] [
  1338. + .B -l
  1339. + volume label ] drive:
  1340. + .SH DESCRIPTION
  1341. + .I Mformat
  1342. + adds a minimal MSDOS filesystem (boot sector, FAT, and root directory) to
  1343. + a diskette that has already been formatted by a Unix low-level format.
  1344. + .PP
  1345. + The follow options are supported:
  1346. + .TP
  1347. + .B t
  1348. + The number of tracks (not cylinders).
  1349. + .TP
  1350. + .B h
  1351. + The number of heads (sides).
  1352. + .TP
  1353. + .B s
  1354. + The number of sectors per track.
  1355. + .TP
  1356. + .B l
  1357. + An optional volume label.
  1358. + .PP
  1359. + To format a diskette at a density other than the default, you must supply
  1360. + (at least) those command line parameters that are different from the
  1361. + default.
  1362. + .PP
  1363. + .I Mformat
  1364. + returns 0 on success or 1 on failure.
  1365. + .SH SEE ALSO
  1366. + mlabel(1)
  1367. + .SH BUGS
  1368. + Requires a low-level format utility from Unix.
  1369. + .PP
  1370. + Doesn't detect (or record) bad block information.
  1371. diff -rc --new-file orig/mtools-2.0.7/mformat.c mtools-2.0.7/mformat.c
  1372. *** orig/mtools-2.0.7/mformat.c    Thu Sep 10 15:59:16 1992
  1373. --- mtools-2.0.7/mformat.c    Sun Oct 17 22:14:51 1993
  1374. ***************
  1375. *** 11,23 ****
  1376.   #include <stdio.h>
  1377.   #include <ctype.h>
  1378.   #include "msdos.h"
  1379. - #include "patchlevel.h"
  1380.   
  1381. ! int fd, dir_dirty, dir_entries;
  1382. ! long dir_chain[MAX_DIR_SECS];
  1383. ! unsigned char *dir_buf;
  1384. ! main(argc, argv)
  1385.   int argc;
  1386.   char *argv[];
  1387.   {
  1388. --- 11,18 ----
  1389.   #include <stdio.h>
  1390.   #include <ctype.h>
  1391.   #include "msdos.h"
  1392.   
  1393. ! mformat(argc, argv)
  1394.   int argc;
  1395.   char *argv[];
  1396.   {
  1397. ***************
  1398. *** 62,68 ****
  1399.       }
  1400.   
  1401.       if (oops || (argc - optind) != 1) {
  1402. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1403.           fprintf(stderr, "Usage: %s [-t tracks] [-h heads] [-s sectors] [-l label] device\n", argv[0]);
  1404.           exit(1);
  1405.       }
  1406. --- 57,63 ----
  1407.       }
  1408.   
  1409.       if (oops || (argc - optind) != 1) {
  1410. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1411.           fprintf(stderr, "Usage: %s [-t tracks] [-h heads] [-s sectors] [-l label] device\n", argv[0]);
  1412.           exit(1);
  1413.       }
  1414. ***************
  1415. *** 243,248 ****
  1416.       close(fd);
  1417.       exit(0);
  1418.   }
  1419. - /* hooks for the missing parts */
  1420. - void disk_write() {}
  1421. --- 238,240 ----
  1422. diff -rc --new-file orig/mtools-2.0.7/mkmanifest.1 mtools-2.0.7/mkmanifest.1
  1423. *** orig/mtools-2.0.7/mkmanifest.1    Thu Jan  1 01:00:00 1970
  1424. --- mtools-2.0.7/mkmanifest.1    Thu Sep 10 15:59:09 1992
  1425. ***************
  1426. *** 0 ****
  1427. --- 1,74 ----
  1428. + .TH MKMANIFEST 1 local
  1429. + .SH NAME
  1430. + mkmanifest \- create a shell script to restore Unix filenames
  1431. + .SH SYNOPSIS
  1432. + .B mkmanifest
  1433. + [ files ]
  1434. + .SH DESCRIPTION
  1435. + .I Mkmanifest
  1436. + creates a shell script that will aid in the restoration of Unix filenames
  1437. + that got clobbered by the MSDOS filename restrictions.  MSDOS filenames
  1438. + are restricted to 8 character names, 3 character extensions, upper case
  1439. + only, no device names, and no illegal characters.
  1440. + .PP
  1441. + The mkmanifest program is compatible with the methods used in
  1442. + .I pcomm, arc,
  1443. + and
  1444. + .I mtools
  1445. + to change perfectly good Unix filenames to fit the MSDOS restrictions.
  1446. + .SH EXAMPLE
  1447. + I want to copy the following Unix files to a MSDOS diskette (using the
  1448. + .I mcopy
  1449. + command).
  1450. + .PP
  1451. + .in +0.5i
  1452. + .nf
  1453. + very_long_name
  1454. + 2.many.dots
  1455. + illegal:
  1456. + good.c
  1457. + prn.dev
  1458. + Capital
  1459. + .fi
  1460. + .in
  1461. + .PP
  1462. + .I Mcopy
  1463. + will convert the names to:
  1464. + .PP
  1465. + .in +0.5i
  1466. + .nf
  1467. + very_lon
  1468. + 2xmany.dot
  1469. + illegalx
  1470. + good.c
  1471. + xprn.dev
  1472. + capital
  1473. + .fi
  1474. + .in
  1475. + .PP
  1476. + The command:
  1477. + .PP
  1478. + mkmanifest very_long_name 2.many.dots illegal: good.c prn.dev Capital >
  1479. + manifest
  1480. + .PP
  1481. + would produce the following:
  1482. + .PP
  1483. + .in +0.5i
  1484. + .nf
  1485. + mv very_lon very_long_name
  1486. + mv 2xmany.dot 2.many.dots
  1487. + mv illegalx illegal:
  1488. + mv xprn.dev prn.dev
  1489. + mv capital Capital
  1490. + .fi
  1491. + .in
  1492. + .PP
  1493. + Notice that "good.c" did not require any conversion, so it did not appear
  1494. + in the output.
  1495. + .PP
  1496. + Suppose I've copied these files from the diskette to another Unix
  1497. + system, and I now want the files back to their original names.  If the
  1498. + file "manifest" (the output captured above) was sent along with those
  1499. + files, it could be used to convert the filenames.
  1500. + .SH SEE ALSO
  1501. + arc(1), pcomm(1), mtools(1)
  1502. diff -rc --new-file orig/mtools-2.0.7/mlabel.1 mtools-2.0.7/mlabel.1
  1503. *** orig/mtools-2.0.7/mlabel.1    Thu Jan  1 01:00:00 1970
  1504. --- mtools-2.0.7/mlabel.1    Thu Sep 10 15:59:46 1992
  1505. ***************
  1506. *** 0 ****
  1507. --- 1,31 ----
  1508. + .TH MLABEL 1 local
  1509. + .SH NAME
  1510. + mlabel \- make an MSDOS volume label
  1511. + .SH SYNOPSIS
  1512. + .B mlabel
  1513. + [
  1514. + .B -v
  1515. + ] drive:
  1516. + .SH DESCRIPTION
  1517. + .I Mlabel
  1518. + displays the current volume label, if present, and prompts the user
  1519. + for a new volume label.  To delete an existing volume label, press
  1520. + return at the prompt.
  1521. + .PP
  1522. + .I Mlabel
  1523. + will allow the following command line option:
  1524. + .TP
  1525. + .B v
  1526. + Verbose mode.  Display the new volume label if the label supplied is
  1527. + invalid.
  1528. + .PP
  1529. + Reasonable care is taken to create a valid MSDOS volume label.  If an
  1530. + invalid label is specified,
  1531. + .I mlabel
  1532. + will change the label (and display the new label if the verbose mode is
  1533. + set).
  1534. + .PP
  1535. + .I Mlabel
  1536. + returns 0 on success or 1 on failure.
  1537. + .SH SEE ALSO
  1538. + mformat(1)
  1539. diff -rc --new-file orig/mtools-2.0.7/mlabel.c mtools-2.0.7/mlabel.c
  1540. *** orig/mtools-2.0.7/mlabel.c    Thu Sep 10 15:59:16 1992
  1541. --- mtools-2.0.7/mlabel.c    Sun Oct 17 22:15:17 1993
  1542. ***************
  1543. *** 11,27 ****
  1544.   #include <stdio.h>
  1545.   #include <ctype.h>
  1546.   #include "msdos.h"
  1547. - #include "patchlevel.h"
  1548.   
  1549. ! int fd = -1;                /* the file descriptor for the device */
  1550. ! int dir_start;                /* starting sector for directory */
  1551. ! int dir_len;                /* length of directory (in sectors) */
  1552. ! int dir_entries;            /* number of directory entries */
  1553. ! int clus_size;                /* cluster size (in sectors) */
  1554. ! char *mcwd;                /* the Current Working Directory */
  1555. ! int fat_error;                /* FAT error detected? */
  1556. ! main(argc, argv)
  1557.   int argc;
  1558.   char *argv[];
  1559.   {
  1560. --- 11,18 ----
  1561.   #include <stdio.h>
  1562.   #include <ctype.h>
  1563.   #include "msdos.h"
  1564.   
  1565. ! mlabel(argc, argv)
  1566.   int argc;
  1567.   char *argv[];
  1568.   {
  1569. ***************
  1570. *** 45,51 ****
  1571.               oops++;
  1572.       }
  1573.       if (argc < 2 || argv[fargn][1] != ':' || oops) {
  1574. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1575.           fprintf(stderr, "Usage: %s [-v] drive:\n", argv[0]);
  1576.           exit(1);
  1577.       }
  1578. --- 36,42 ----
  1579.               oops++;
  1580.       }
  1581.       if (argc < 2 || argv[fargn][1] != ':' || oops) {
  1582. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1583.           fprintf(stderr, "Usage: %s [-v] drive:\n", argv[0]);
  1584.           exit(1);
  1585.       }
  1586. ***************
  1587. *** 98,103 ****
  1588. --- 89,95 ----
  1589.   
  1590.                       /* ask for new label */
  1591.       printf("Enter the new volume label (11 characters): ");
  1592. +     fflush(stdout);
  1593.       gets(filename);
  1594.       if (filename[0] != '\0') {
  1595.           sprintf((char *) fixed, "%-11.11s", filename);
  1596. ***************
  1597. *** 109,114 ****
  1598. --- 101,107 ----
  1599.               exit(0);
  1600.   
  1601.           printf("Delete volume label (y/n): ");
  1602. +         fflush(stdout);
  1603.           gets(ans);
  1604.           if (ans[0] == 'y' || ans[0] == 'Y') {
  1605.               strcpy((char *) fixed, (char *) vol);
  1606. diff -rc --new-file orig/mtools-2.0.7/mmd.1 mtools-2.0.7/mmd.1
  1607. *** orig/mtools-2.0.7/mmd.1    Thu Jan  1 01:00:00 1970
  1608. --- mtools-2.0.7/mmd.1    Thu Sep 10 15:59:46 1992
  1609. ***************
  1610. *** 0 ****
  1611. --- 1,42 ----
  1612. + .TH MMD 1 local
  1613. + .SH NAME
  1614. + mmd \- make an MSDOS subdirectory
  1615. + .SH SYNOPSIS
  1616. + .B mmd
  1617. + [
  1618. + .B -v
  1619. + ] msdosdirectory [ msdosdirectories... ]
  1620. + .SH DESCRIPTION
  1621. + .I Mmd
  1622. + makes a new directory on an MSDOS filesystem.
  1623. + .PP
  1624. + .I Mmd
  1625. + will allow the following command line option:
  1626. + .TP
  1627. + .B v
  1628. + Verbose mode.  Display the new directory name if the name supplied is
  1629. + invalid.
  1630. + .PP
  1631. + Reasonable care is taken to create a valid MSDOS directory name.  If an
  1632. + invalid name is specified,
  1633. + .I mmd
  1634. + will change the name (and display the new name if the verbose mode is
  1635. + set).
  1636. + .PP
  1637. + An error occurs if the directory already exists.
  1638. + .PP
  1639. + MSDOS subdirectory names are supported with either the '/' or '\e'
  1640. + separator.  The use of the '\e' separator or wildcards will require the
  1641. + directory name to be enclosed in quotes to protect it from the shell.
  1642. + .PP
  1643. + The
  1644. + .I mcd
  1645. + command may be used to establish the device and the current working
  1646. + directory (relative to MSDOS), otherwise the default is A:/.
  1647. + .PP
  1648. + .I Mmd
  1649. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  1650. + .SH SEE ALSO
  1651. + mcd(1), mrd(1)
  1652. + .SH BUGS
  1653. + Allows multiple arguments, which does not follow the MSDOS convention.
  1654. diff -rc --new-file orig/mtools-2.0.7/mmd.c mtools-2.0.7/mmd.c
  1655. *** orig/mtools-2.0.7/mmd.c    Thu Sep 10 15:59:48 1992
  1656. --- mtools-2.0.7/mmd.c    Sun Oct 17 22:15:30 1993
  1657. ***************
  1658. *** 11,30 ****
  1659.   #include <stdio.h>
  1660.   #include <signal.h>
  1661.   #include "msdos.h"
  1662. - #include "patchlevel.h"
  1663.   
  1664. ! int fd = -1;                /* the file descriptor for the device */
  1665. ! int dir_start;                /* starting sector for directory */
  1666. ! int dir_len;                /* length of directory (in sectors) */
  1667. ! int dir_entries;            /* number of directory entries */
  1668. ! int clus_size;                /* cluster size (in sectors) */
  1669. ! char *mcwd;                /* the Current Working Directory */
  1670. ! int fat_error;                /* FAT error detected? */
  1671.   
  1672. - static int got_signal();
  1673.   static void empty_dir();
  1674.   
  1675. ! main(argc, argv)
  1676.   int argc;
  1677.   char *argv[];
  1678.   {
  1679. --- 11,22 ----
  1680.   #include <stdio.h>
  1681.   #include <signal.h>
  1682.   #include "msdos.h"
  1683.   
  1684. ! extern int got_signal();
  1685.   
  1686.   static void empty_dir();
  1687.   
  1688. ! mmd(argc, argv)
  1689.   int argc;
  1690.   char *argv[];
  1691.   {
  1692. ***************
  1693. *** 56,62 ****
  1694.               oops++;
  1695.       }
  1696.       if (argc == 1 || oops) {
  1697. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1698.           fprintf(stderr, "Usage: %s [-v] msdosdirectory [msdosdirectories...]\n", argv[0]);
  1699.           exit(1);
  1700.       }
  1701. --- 48,54 ----
  1702.               oops++;
  1703.       }
  1704.       if (argc == 1 || oops) {
  1705. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1706.           fprintf(stderr, "Usage: %s [-v] msdosdirectory [msdosdirectories...]\n", argv[0]);
  1707.           exit(1);
  1708.       }
  1709. ***************
  1710. *** 201,224 ****
  1711.                       /* write the cluster */
  1712.       disk_write(start, (unsigned char *) buf, buflen);
  1713.       return;
  1714. - }
  1715. - /*
  1716. -  * Do a graceful exit if the program is interrupted.  This will reduce
  1717. -  * (but not eliminate) the risk of generating a corrupted disk on
  1718. -  * a user abort.
  1719. -  */
  1720. - static int
  1721. - got_signal()
  1722. - {
  1723. -     void exit(), disk_flush(), fat_write(), dir_flush();
  1724. -     if (fd < 0)
  1725. -         exit(1);
  1726. -     fat_write();
  1727. -     dir_flush();
  1728. -     disk_flush();
  1729. -     close(fd);
  1730. -     exit(1);
  1731.   }
  1732. --- 193,196 ----
  1733. diff -rc --new-file orig/mtools-2.0.7/mrd.1 mtools-2.0.7/mrd.1
  1734. *** orig/mtools-2.0.7/mrd.1    Thu Jan  1 01:00:00 1970
  1735. --- mtools-2.0.7/mrd.1    Thu Sep 10 15:59:47 1992
  1736. ***************
  1737. *** 0 ****
  1738. --- 1,27 ----
  1739. + .TH MRD 1 local
  1740. + .SH NAME
  1741. + mrd \- remove an MSDOS subdirectory
  1742. + .SH SYNOPSIS
  1743. + .B mrd
  1744. + msdosdirectory [ msdosdirectories... ]
  1745. + .SH DESCRIPTION
  1746. + .I Mrd
  1747. + removes a directory from an MSDOS filesystem.
  1748. + .PP
  1749. + An error occurs if the directory is not empty.
  1750. + .PP
  1751. + MSDOS subdirectory names are supported with either the '/' or '\e'
  1752. + separator.  The use of the '\e' separator or wildcards will require the
  1753. + directory name to be enclosed in quotes to protect it from the shell.
  1754. + .PP
  1755. + The
  1756. + .I mcd
  1757. + command may be used to establish the device and the current working
  1758. + directory (relative to MSDOS), otherwise the default is A:/.
  1759. + .PP
  1760. + .I Mrd
  1761. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  1762. + .SH SEE ALSO
  1763. + mcd(1), mmd(1)
  1764. + .SH BUGS
  1765. + Allows multiple arguments, which does not follow the MSDOS convention.
  1766. diff -rc --new-file orig/mtools-2.0.7/mrd.c mtools-2.0.7/mrd.c
  1767. *** orig/mtools-2.0.7/mrd.c    Thu Sep 10 15:59:48 1992
  1768. --- mtools-2.0.7/mrd.c    Sun Oct 17 22:15:43 1993
  1769. ***************
  1770. *** 11,29 ****
  1771.   #include <stdio.h>
  1772.   #include <signal.h>
  1773.   #include "msdos.h"
  1774. - #include "patchlevel.h"
  1775.   
  1776. ! int fd = -1;                /* the file descriptor for the device */
  1777. ! int dir_start;                /* starting sector for directory */
  1778. ! int dir_len;                /* length of directory (in sectors) */
  1779. ! int dir_entries;            /* number of directory entries */
  1780. ! int clus_size;                /* cluster size (in sectors) */
  1781. ! char *mcwd;                /* the Current Working Directory */
  1782. ! int fat_error;                /* FAT error detected? */
  1783.   
  1784. ! static int got_signal(), is_empty();
  1785.   
  1786. ! main(argc, argv)
  1787.   int argc;
  1788.   char *argv[];
  1789.   {
  1790. --- 11,22 ----
  1791.   #include <stdio.h>
  1792.   #include <signal.h>
  1793.   #include "msdos.h"
  1794.   
  1795. ! extern int got_signal();
  1796.   
  1797. ! static int is_empty();
  1798.   
  1799. ! mrd(argc, argv)
  1800.   int argc;
  1801.   char *argv[];
  1802.   {
  1803. ***************
  1804. *** 39,45 ****
  1805.       signal(SIGQUIT, (SIG_TYPE(*) ()) got_signal);
  1806.   
  1807.       if (argc == 1) {
  1808. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1809.           fprintf(stderr, "Usage: %s mdsosdirectory [msdosdirectories...]\n", argv[0]);
  1810.           exit(1);
  1811.       }
  1812. --- 32,38 ----
  1813.       signal(SIGQUIT, (SIG_TYPE(*) ()) got_signal);
  1814.   
  1815.       if (argc == 1) {
  1816. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1817.           fprintf(stderr, "Usage: %s mdsosdirectory [msdosdirectories...]\n", argv[0]);
  1818.           exit(1);
  1819.       }
  1820. ***************
  1821. *** 178,201 ****
  1822.           fat = next;
  1823.       }
  1824.       return(1);
  1825. - }
  1826. - /*
  1827. -  * Do a graceful exit if the program is interrupted.  This will reduce
  1828. -  * (but not eliminate) the risk of generating a corrupted disk on
  1829. -  * a user abort.
  1830. -  */
  1831. - static int
  1832. - got_signal()
  1833. - {
  1834. -     void exit(), disk_flush(), fat_write(), dir_flush();
  1835. -     if (fd < 0)
  1836. -         exit(1);
  1837. -     fat_write();
  1838. -     dir_flush();
  1839. -     disk_flush();
  1840. -     close(fd);
  1841. -     exit(1);
  1842.   }
  1843. --- 171,174 ----
  1844. diff -rc --new-file orig/mtools-2.0.7/mread.1 mtools-2.0.7/mread.1
  1845. *** orig/mtools-2.0.7/mread.1    Thu Jan  1 01:00:00 1970
  1846. --- mtools-2.0.7/mread.1    Thu Sep 10 15:59:47 1992
  1847. ***************
  1848. *** 0 ****
  1849. --- 1,58 ----
  1850. + .TH MREAD 1 local
  1851. + .SH NAME
  1852. + mread \- low level read (copy) an MSDOS file to Unix
  1853. + .SH SYNOPSIS
  1854. + .B mread
  1855. + [
  1856. + .B -tnm
  1857. + ] msdosfile unixfile
  1858. + .PP
  1859. + .B mread
  1860. + [
  1861. + .B -tnm
  1862. + ] msdosfile [ msdosfiles... ] unixdirectory
  1863. + .SH DESCRIPTION
  1864. + In the first form,
  1865. + .I mread
  1866. + copies the specified MSDOS file to the named Unix file.  The second form
  1867. + of the command copies multiple MSDOS files to the named Unix directory.
  1868. + .PP
  1869. + .I Mread
  1870. + will allow the following command line options:
  1871. + .TP
  1872. + .B t
  1873. + Text file transfer.
  1874. + .I Mread
  1875. + will translate incoming carriage return/line feeds to line feeds.
  1876. + .TP
  1877. + .B n
  1878. + No warning.
  1879. + .I Mread
  1880. + will not warn the user when overwriting an existing file.
  1881. + .TP
  1882. + .B m
  1883. + Preserve the file modification times.
  1884. + .PP
  1885. + If the target file already exists, and the
  1886. + .I -n
  1887. + option is not in effect,
  1888. + .I mread
  1889. + asks whether or not to overwrite the file.
  1890. + .PP
  1891. + MSDOS subdirectory names are supported with either the '/' or '\e'
  1892. + separator.  The use of the '\e' separator or wildcards will require the
  1893. + names to be enclosed in quotes to protect them from the shell.
  1894. + .PP
  1895. + The
  1896. + .I mcd
  1897. + command may be used to establish the device and the current working
  1898. + directory (relative to MSDOS), otherwise the default is A:/.
  1899. + .PP
  1900. + .I Mread
  1901. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  1902. + .SH SEE ALSO
  1903. + mcd(1), mcopy(1), mtype(1), mwrite(1)
  1904. + .SH BUGS
  1905. + Unlike MSDOS, the destination directory may
  1906. + .B not
  1907. + be omitted.
  1908. diff -rc --new-file orig/mtools-2.0.7/mread.c mtools-2.0.7/mread.c
  1909. *** orig/mtools-2.0.7/mread.c    Thu Sep 10 15:59:48 1992
  1910. --- mtools-2.0.7/mread.c    Sun Oct 17 22:15:59 1993
  1911. ***************
  1912. *** 20,40 ****
  1913.   #include <time.h>
  1914.   #endif /* BSD */
  1915.   #include "msdos.h"
  1916. - #include "patchlevel.h"
  1917.   
  1918. - int fd = -1;                /* the file descriptor for the device */
  1919. - int dir_start;                /* starting sector for directory */
  1920. - int dir_len;                /* length of directory (in sectors) */
  1921. - int dir_entries;            /* number of directory entries */
  1922. - int clus_size;                /* cluster size (in sectors) */
  1923. - char *mcwd;                /* the Current Working Directory */
  1924. - int fat_error;                /* FAT error detected? */
  1925.   static void set_mtime();
  1926.   static FILE *open_file();
  1927.   static long conv_stamp();
  1928.   
  1929. ! main(argc, argv)
  1930.   int argc;
  1931.   char *argv[];
  1932.   {
  1933. --- 20,31 ----
  1934.   #include <time.h>
  1935.   #endif /* BSD */
  1936.   #include "msdos.h"
  1937.   
  1938.   static void set_mtime();
  1939.   static FILE *open_file();
  1940.   static long conv_stamp();
  1941.   
  1942. ! mread(argc, argv)
  1943.   int argc;
  1944.   char *argv[];
  1945.   {
  1946. ***************
  1947. *** 79,85 ****
  1948.       }
  1949.   
  1950.       if (oops || (argc - optind) < 2) {
  1951. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  1952.           fprintf(stderr, "Usage: %s [-tnm] msdosfile unixfile\n", argv[0]);
  1953.           fprintf(stderr, "       %s [-tnm] msdosfile [msdosfiles...] unixdirectory\n", argv[0]);
  1954.           exit(1);
  1955. --- 70,76 ----
  1956.       }
  1957.   
  1958.       if (oops || (argc - optind) < 2) {
  1959. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  1960.           fprintf(stderr, "Usage: %s [-tnm] msdosfile unixfile\n", argv[0]);
  1961.           fprintf(stderr, "       %s [-tnm] msdosfile [msdosfiles...] unixdirectory\n", argv[0]);
  1962.           exit(1);
  1963. ***************
  1964. *** 230,235 ****
  1965. --- 221,227 ----
  1966.               /* CONSTCOND */
  1967.               while (1) {
  1968.                   printf("File \"%s\" exists, overwrite (y/n) ? ", target);
  1969. +                 fflush(stdout);
  1970.                   gets(ans);
  1971.                   if (ans[0] == 'n' || ans[0] == 'N')
  1972.                       return(NULL);
  1973. ***************
  1974. *** 341,367 ****
  1975.           utime(target, &utbuf);
  1976.       }
  1977.   #endif /* BSD */
  1978. -     return;
  1979. - }
  1980. - /*
  1981. -  * stubs for read-only programs
  1982. -  */
  1983. - void
  1984. - disk_flush()
  1985. - {
  1986. -     extern int disk_dirty;
  1987. -     disk_dirty = 0;
  1988. -     return;
  1989. - }
  1990. - void
  1991. - dir_flush()
  1992. - {
  1993. -     extern int dir_dirty;
  1994. -     dir_dirty = 0;
  1995.       return;
  1996.   }
  1997. --- 333,337 ----
  1998. diff -rc --new-file orig/mtools-2.0.7/mren.1 mtools-2.0.7/mren.1
  1999. *** orig/mtools-2.0.7/mren.1    Thu Jan  1 01:00:00 1970
  2000. --- mtools-2.0.7/mren.1    Thu Sep 10 15:59:47 1992
  2001. ***************
  2002. *** 0 ****
  2003. --- 1,50 ----
  2004. + .TH MREN 1 local
  2005. + .SH NAME
  2006. + mren \- rename an existing MSDOS file
  2007. + .SH SYNOPSIS
  2008. + .B mren
  2009. + [
  2010. + .B -v
  2011. + ] sourcefile targetfile
  2012. + .SH DESCRIPTION
  2013. + .I Mren
  2014. + renames an existing file on an MSDOS filesystem.
  2015. + .PP
  2016. + .I Mren
  2017. + will allow the following command line option:
  2018. + .TP
  2019. + .B v
  2020. + Verbose mode.  Display the new filename if the name supplied is
  2021. + invalid.
  2022. + .PP
  2023. + Reasonable care is taken to create a valid MSDOS filename.  If an invalid
  2024. + MSDOS target name is specified,
  2025. + .I mren
  2026. + will change the name (and prompt the user to accept or reject the new name
  2027. + if the verbose mode is set).
  2028. + .PP
  2029. + The path component of the target filename (if supplied) is ignored.  In
  2030. + other words, you may not use
  2031. + .I mren
  2032. + to move a file from one subdirectory to another.
  2033. + .PP 
  2034. + .I Mren
  2035. + may be used to rename directories.
  2036. + .PP
  2037. + MSDOS subdirectory names are supported with either the '/' or '\e'
  2038. + separator.  The use of the '\e' separator or wildcards will require the
  2039. + names to be enclosed in quotes to protect them from the shell.
  2040. + .PP
  2041. + The
  2042. + .I mcd
  2043. + command may be used to establish the device and the current working
  2044. + directory (relative to MSDOS), otherwise the default is A:/.
  2045. + .PP
  2046. + .I Mread
  2047. + returns 0 on success or 1 on failure.
  2048. + .SH SEE ALSO
  2049. + mcd(1)
  2050. + .SH BUGS
  2051. + Unlike the MSDOS version of REN,
  2052. + .I mren
  2053. + can be used to rename directories.
  2054. diff -rc --new-file orig/mtools-2.0.7/mren.c mtools-2.0.7/mren.c
  2055. *** orig/mtools-2.0.7/mren.c    Thu Sep 10 15:59:16 1992
  2056. --- mtools-2.0.7/mren.c    Sun Oct 17 22:16:12 1993
  2057. ***************
  2058. *** 10,26 ****
  2059.   
  2060.   #include <stdio.h>
  2061.   #include "msdos.h"
  2062. - #include "patchlevel.h"
  2063.   
  2064. ! int fd = -1;                /* the file descriptor for the device */
  2065. ! int dir_start;                /* starting sector for directory */
  2066. ! int dir_len;                /* length of directory (in sectors) */
  2067. ! int dir_entries;            /* number of directory entries */
  2068. ! int clus_size;                /* cluster size (in sectors) */
  2069. ! char *mcwd;                /* the Current Working Directory */
  2070. ! int fat_error;                /* FAT error detected? */
  2071. ! main(argc, argv)
  2072.   int argc;
  2073.   char *argv[];
  2074.   {
  2075. --- 10,17 ----
  2076.   
  2077.   #include <stdio.h>
  2078.   #include "msdos.h"
  2079.   
  2080. ! mren(argc, argv)
  2081.   int argc;
  2082.   char *argv[];
  2083.   {
  2084. ***************
  2085. *** 41,47 ****
  2086.           }
  2087.       }
  2088.       if (argc != fargn + 2) {
  2089. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  2090.           fprintf(stderr, "Usage: %s [-v] sourcefile targetfile\n", argv[0]);
  2091.           exit(1);
  2092.       }
  2093. --- 32,38 ----
  2094.           }
  2095.       }
  2096.       if (argc != fargn + 2) {
  2097. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  2098.           fprintf(stderr, "Usage: %s [-v] sourcefile targetfile\n", argv[0]);
  2099.           exit(1);
  2100.       }
  2101. ***************
  2102. *** 66,71 ****
  2103. --- 57,63 ----
  2104.       if (strcmp(temp, new) && verbose) {
  2105.           while (!nogo) {
  2106.               printf("Do you accept \"%s\" as the new filename (y/n) ? ", new);
  2107. +             fflush(stdout);
  2108.               gets(ans);
  2109.               if (ans[0] == 'y' || ans[0] == 'Y')
  2110.                   break;
  2111. diff -rc --new-file orig/mtools-2.0.7/msdos.h mtools-2.0.7/msdos.h
  2112. *** orig/mtools-2.0.7/msdos.h    Thu Sep 10 15:59:13 1992
  2113. --- mtools-2.0.7/msdos.h    Sun Oct 17 22:17:20 1993
  2114. ***************
  2115. *** 59,61 ****
  2116. --- 59,74 ----
  2117.   #define strchr index
  2118.   #define strrchr rindex
  2119.   #endif /* BSD */
  2120. + #define FAT12 4086 /* max. number of clusters described by a 12 bit FAT */
  2121. + extern int fd;                /* the file descriptor for the device */
  2122. + extern int dir_start;            /* starting sector for directory */
  2123. + extern int dir_len;            /* length of directory (in sectors) */
  2124. + extern int dir_entries;            /* number of directory entries */
  2125. + extern int clus_size;            /* cluster size (in sectors) */
  2126. + extern char *mcwd;            /* the Current Working Directory */
  2127. + extern int fat_error;            /* FAT error detected? */
  2128. + extern char *mversion;
  2129. + extern char *mdate;
  2130. diff -rc --new-file orig/mtools-2.0.7/mtools.1 mtools-2.0.7/mtools.1
  2131. *** orig/mtools-2.0.7/mtools.1    Thu Jan  1 01:00:00 1970
  2132. --- mtools-2.0.7/mtools.1    Sun Sep 26 19:24:05 1993
  2133. ***************
  2134. *** 0 ****
  2135. --- 1,84 ----
  2136. + .TH MTOOLS 1 local
  2137. + .SH NAME
  2138. + Mtools \- a collection of tools for manipulating MSDOS files
  2139. + .SH SYNOPSIS
  2140. + .nf
  2141. + \fBmattrib\fR \- change MSDOS file attribute flags
  2142. + \fBmcd\fR \- change MSDOS directory
  2143. + \fBmcopy\fR \- copy MSDOS files to/from Unix
  2144. + \fBmdel\fR \- delete an MSDOS file
  2145. + \fBmdir\fR \- display an MSDOS directory
  2146. + \fBmformat\fR \- add an MSDOS filesystem to a low-level formatted diskette
  2147. + \fBmlabel\fR \- make an MSDOS volume label
  2148. + \fBmmd\fR \- make an MSDOS subdirectory
  2149. + \fBmrd\fR \- remove an MSDOS subdirectory
  2150. + \fBmread\fR \- low level read (copy) an MSDOS file to Unix
  2151. + \fBmren\fR \- rename an existing MSDOS file
  2152. + \fBmtype\fR \- display contents of an MSDOS file
  2153. + \fBmwrite\fR \- low level write (copy) a Unix file to MSDOS
  2154. + .fi
  2155. + .SH DESCRIPTION
  2156. + Mtools is a public domain collection of programs to allow Unix systems
  2157. + to read, write, and manipulate files on an MSDOS filesystem (typically a
  2158. + diskette).  Each program attempts to emulate the MSDOS equivalent
  2159. + command as closely as practical.
  2160. + .PP
  2161. + MSDOS filenames are optionally composed of a drive letter followed by a
  2162. + colon, a subdirectory, and a filename.  Subdirectory names can use either
  2163. + the '/' or '\e' separator.  The use of the '\e' separator or wildcards
  2164. + will require the names to be enclosed in quotes to protect them from the
  2165. + shell.
  2166. + .PP
  2167. + The regular expression "pattern matching" routines follow the Unix-style
  2168. + rules.  For example, '*' matches all MSDOS files in lieu of '*.*'.  The
  2169. + archive, hidden, read-only and system attribute bits are ignored during
  2170. + pattern matching.
  2171. + .PP
  2172. + Not all Unix filenames are appropriate in the MSDOS world.  The Mtools
  2173. + commands may have to alter Unix names to fit the MSDOS filename
  2174. + restrictions.  Most commands have a -v (verbose) option that will
  2175. + display the new names if they have been changed.  The following table
  2176. + shows some examples of filename conversions:
  2177. + .PP
  2178. + .in +0.5i
  2179. + .(b L
  2180. + .TS
  2181. + l l l.
  2182. + Unix name    MSDOS name    Reason for the change
  2183. + _    _    _
  2184. + thisisatest    THISISAT    filename too long
  2185. + emmet.gray    EMMET.GRA    extension too long
  2186. + prn.txt    XRN.TXT    PRN is a device name
  2187. + \.abc    X.ABC    null filename
  2188. + hot+cold    HOTXCOLD    illegal character
  2189. + .TE
  2190. + .)b
  2191. + .in
  2192. + .PP
  2193. + All options use the '-' (minus) flag, not '/' as you'd expect in MSDOS.
  2194. + .PP
  2195. + The
  2196. + .I mcd
  2197. + command is used to establish the device and the current working
  2198. + directory (relative to the MSDOS filesystem), otherwise the default is
  2199. + assumed to be A:/.
  2200. + .PP
  2201. + All the Mtools commands return 0 on success, 1 on utter failure, or 2
  2202. + on partial failure.
  2203. + .PP
  2204. + Unless the host operating requires hardwired device setup,
  2205. + the description of the devices on which to operate is loaded from
  2206. + .I /etc/mtools 
  2207. + where each line describes one device. The first word is the device
  2208. + letter name, the second the type of FAT (12 or 16 bits), the third the
  2209. + number of cylinder, the fourth is the number of heads, and the fifth
  2210. + word is the number of sector per track. If zero is specified for any of
  2211. + the last three a guess will be attempted; if using any one line fails,
  2212. + the next lines that apply to that device are tried in turn.
  2213. + .SH SEE ALSO
  2214. + mattrib(1), mcd(1), mdel(1), mformat(1), mrd(1), mren(1), mtype(1),
  2215. + mcopy(1), mdir(1), mlabel(1), mmd(1), mread(1), mwrite(1)
  2216. + .SH BUGS
  2217. + An unfortunate side effect of not guessing the proper device (when
  2218. + multiple disk capacities are supported) is an occasional error message
  2219. + from the device driver.  These can be safely ignored.
  2220. diff -rc --new-file orig/mtools-2.0.7/mtools.5 mtools-2.0.7/mtools.5
  2221. *** orig/mtools-2.0.7/mtools.5    Thu Jan  1 01:00:00 1970
  2222. --- mtools-2.0.7/mtools.5    Thu Oct 28 08:55:58 1993
  2223. ***************
  2224. *** 0 ****
  2225. --- 1,42 ----
  2226. + .TH MTOOLS 5 "Oct 20, 1993" "" "Linux Programmer's Manual"
  2227. + .SH NAME
  2228. + mtools \- table of DOS devices
  2229. + .SH DESCRIPTION
  2230. + .B /etc/mtools
  2231. + is a text file which contains the description of valid DOS
  2232. + drive letters for
  2233. + .IR mtools (1).
  2234. + .PP
  2235. + There are six columns in each line, and each line describes
  2236. + a device.
  2237. + .PP
  2238. + The first is the drive letter, the second the pathname of
  2239. + drive aliased to that letter; the third column is the number of
  2240. + bits, 12 or 16, in the FAT. The last three columns are the
  2241. + geometry of the drive, cuylinders, tracks per cylinder,
  2242. + sectors per track.
  2243. + .PP
  2244. + .B Mtools
  2245. + will attempt to query the drive for its geometry if the files
  2246. + contains zeroes for those three parameters.
  2247. + .PP
  2248. + There can be several lines for the same drice letter; if IO fails
  2249. + with the parameters specified in the first such line, the other
  2250. + lines are tried in sequence.
  2251. + .SH EXAMPLES
  2252. + .B /etc/mtools may contain the following paths:
  2253. + .sp
  2254. + .RS
  2255. + .nf
  2256. + A /dev/fd0 12 80 2 18
  2257. + A /dev/fd0 12 0 0 0
  2258. + A /dev/fd0 12 40 2 9
  2259. + B /dev/fd1 12 0 0 0
  2260. + B /dev/fd1 12 40 2 9
  2261. + C /dev/hda2 16 32 64 300
  2262. + .fi
  2263. + .RE
  2264. + .SH FILES
  2265. + /etc/mtools
  2266. + .SH "SEE ALSO"
  2267. + .IR mtools (1)
  2268. diff -rc --new-file orig/mtools-2.0.7/mtools.c mtools-2.0.7/mtools.c
  2269. *** orig/mtools-2.0.7/mtools.c    Thu Jan  1 01:00:00 1970
  2270. --- mtools-2.0.7/mtools.c    Sun Oct 17 22:16:36 1993
  2271. ***************
  2272. *** 0 ****
  2273. --- 1,71 ----
  2274. + #include <stdio.h>
  2275. + #include <string.h>
  2276. + #include "msdos.h"
  2277. + #include "patchlevel.h"
  2278. + int fd = -1;                /* the file descriptor for the device */
  2279. + int dir_start;                /* starting sector for directory */
  2280. + int dir_len;                /* length of directory (in sectors) */
  2281. + int dir_entries;            /* number of directory entries */
  2282. + int clus_size;                /* cluster size (in sectors) */
  2283. + char *mcwd;                /* the Current Working Directory */
  2284. + int fat_error;                /* FAT error detected? */
  2285. + char *mversion = VERSION;
  2286. + char *mdate = DATE;
  2287. + #define DISPATCH(cmd,fn) if (!strcmp(name,cmd)) { extern fn(); \
  2288. +   return fn(argc,argv); }
  2289. + main(int argc,char **argv)
  2290. + {
  2291. +     char *name;
  2292. + #ifdef LOADDEVS
  2293. +     load_devices();
  2294. + #endif
  2295. +     if (name = strrchr(argv[0],'/'))
  2296. +          name++;
  2297. +     else name = argv[0];
  2298. +     DISPATCH("mattrib",mattrib)
  2299. +     DISPATCH("mcd",mcd)
  2300. +     DISPATCH("mcopy",mcopy)
  2301. +     DISPATCH("mdel",mdel)
  2302. +     DISPATCH("mdir",mdir)
  2303. +     DISPATCH("mformat",mformat)
  2304. +     DISPATCH("mlabel",mlabel)
  2305. +     DISPATCH("mmd",mmd)
  2306. +     DISPATCH("mrd",mrd)
  2307. +     DISPATCH("mread",mread)
  2308. +     DISPATCH("mren",mren)
  2309. +     DISPATCH("mtype",mtype)
  2310. +     DISPATCH("mwrite",mwrite)
  2311. +     fprintf(stderr,"Unknown mtools command '%s'\n",name);
  2312. +     return 1;
  2313. + }
  2314. + /*
  2315. +  * Do a graceful exit if the program is interrupted.  This will reduce
  2316. +  * (but not eliminate) the risk of generating a corrupted disk on
  2317. +  * a user abort.
  2318. +  */
  2319. + extern int fd;
  2320. + int
  2321. + got_signal()
  2322. + {
  2323. +     void exit(), disk_flush(), fat_write(), dir_flush();
  2324. +     if (fd < 0)
  2325. +         exit(1);
  2326. +     fat_write();
  2327. +     dir_flush();
  2328. +     disk_flush();
  2329. +     close(fd);
  2330. +     exit(1);
  2331. + }
  2332. diff -rc --new-file orig/mtools-2.0.7/mtools.etc mtools-2.0.7/mtools.etc
  2333. *** orig/mtools-2.0.7/mtools.etc    Thu Jan  1 01:00:00 1970
  2334. --- mtools-2.0.7/mtools.etc    Thu Oct 28 08:46:42 1993
  2335. ***************
  2336. *** 0 ****
  2337. --- 1,6 ----
  2338. + A /dev/fd0 12 80 2 18
  2339. + A /dev/fd0 12 0 0 0
  2340. + A /dev/fd0 12 40 2 9
  2341. + B /dev/fd1 12 0 0 0
  2342. + B /dev/fd1 12 40 2 9
  2343. + C /etc/dosemu/hdimage 16 80 2 18
  2344. diff -rc --new-file orig/mtools-2.0.7/mtype.1 mtools-2.0.7/mtype.1
  2345. *** orig/mtools-2.0.7/mtype.1    Thu Jan  1 01:00:00 1970
  2346. --- mtools-2.0.7/mtype.1    Thu Sep 10 15:59:47 1992
  2347. ***************
  2348. *** 0 ****
  2349. --- 1,40 ----
  2350. + .TH MTYPE 1 local
  2351. + .SH NAME
  2352. + mtype \- display contents of an MSDOS file
  2353. + .SH SYNOPSIS
  2354. + .B mtype
  2355. + [
  2356. + .B -ts
  2357. + ] msdosfile [ msdosfiles... ]
  2358. + .SH DESCRIPTION
  2359. + .I Mtype
  2360. + displays the specified MSDOS file on the screen.
  2361. + .PP
  2362. + .I Mtype
  2363. + will allow the following command line options:
  2364. + .TP
  2365. + .B t
  2366. + Text file viewing.
  2367. + .I Mtype
  2368. + will translate incoming carriage return/line feeds to line feeds.
  2369. + .TP
  2370. + .B s
  2371. + Strip high bit.
  2372. + .I Mtype
  2373. + will strip the high bit from the data.
  2374. + .PP
  2375. + MSDOS subdirectory names are supported with either the '/' or '\e'
  2376. + separator.  The use of the '\e' separator or wildcards will require the
  2377. + names to be enclosed in quotes to protect them from the shell.
  2378. + .PP
  2379. + The
  2380. + .I mcd
  2381. + command may be used to establish the device and the current working
  2382. + directory (relative to MSDOS), otherwise the default is A:/.
  2383. + .PP
  2384. + .I Mtype
  2385. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  2386. + .SH SEE ALSO
  2387. + mcd(1), mread(1)
  2388. + .SH BUGS
  2389. + Allows multiple arguments, which does not follow the MSDOS convention.
  2390. diff -rc --new-file orig/mtools-2.0.7/mtype.c mtools-2.0.7/mtype.c
  2391. *** orig/mtools-2.0.7/mtype.c    Thu Sep 10 15:59:48 1992
  2392. --- mtools-2.0.7/mtype.c    Sun Oct 17 22:16:48 1993
  2393. ***************
  2394. *** 10,26 ****
  2395.   
  2396.   #include <stdio.h>
  2397.   #include "msdos.h"
  2398. - #include "patchlevel.h"
  2399.   
  2400. ! int fd = -1;                /* the file descriptor for the device */
  2401. ! int dir_start;                /* starting sector for directory */
  2402. ! int dir_len;                /* length of directory (in sectors) */
  2403. ! int dir_entries;            /* number of directory entries */
  2404. ! int clus_size;                /* cluster size (in sectors) */
  2405. ! char *mcwd;                /* the Current Working Directory */
  2406. ! int fat_error;                /* FAT error detected? */
  2407. ! main(argc, argv)
  2408.   int argc;
  2409.   char *argv[];
  2410.   {
  2411. --- 10,17 ----
  2412.   
  2413.   #include <stdio.h>
  2414.   #include "msdos.h"
  2415.   
  2416. ! mtype(argc, argv)
  2417.   int argc;
  2418.   char *argv[];
  2419.   {
  2420. ***************
  2421. *** 56,62 ****
  2422.       }
  2423.   
  2424.       if (oops || (argc - optind) < 1) {
  2425. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  2426.           fprintf(stderr, "Usage: %s [-st] msdosfile [msdosfiles...]\n", argv[0]);
  2427.           exit(1);
  2428.       }
  2429. --- 47,53 ----
  2430.       }
  2431.   
  2432.       if (oops || (argc - optind) < 1) {
  2433. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  2434.           fprintf(stderr, "Usage: %s [-st] msdosfile [msdosfiles...]\n", argv[0]);
  2435.           exit(1);
  2436.       }
  2437. ***************
  2438. *** 121,146 ****
  2439.       if (missed_one)
  2440.           exit(1);
  2441.       exit(0);
  2442. - }
  2443. - /*
  2444. -  * stubs for read-only programs
  2445. -  */
  2446. - void
  2447. - disk_flush()
  2448. - {
  2449. -     extern int disk_dirty;
  2450. -     disk_dirty = 0;
  2451. -     return;
  2452. - }
  2453. - void
  2454. - dir_flush()
  2455. - {
  2456. -     extern int dir_dirty;
  2457. -     dir_dirty = 0;
  2458. -     return;
  2459.   }
  2460. --- 112,115 ----
  2461. diff -rc --new-file orig/mtools-2.0.7/mwrite.1 mtools-2.0.7/mwrite.1
  2462. *** orig/mtools-2.0.7/mwrite.1    Thu Jan  1 01:00:00 1970
  2463. --- mtools-2.0.7/mwrite.1    Thu Sep 10 15:59:47 1992
  2464. ***************
  2465. *** 0 ****
  2466. --- 1,68 ----
  2467. + .TH MWRITE 1 local
  2468. + .SH NAME
  2469. + mwrite \- low level write (copy) a Unix file to MSDOS
  2470. + .SH SYNOPSIS
  2471. + .B mwrite
  2472. + [
  2473. + .B -tnvm
  2474. + ] unixfile msdosfile
  2475. + .PP
  2476. + .B mwrite
  2477. + [
  2478. + .B -tnvm
  2479. + ] unixfile [ unixfiles... ] msdosdirectory
  2480. + .SH DESCRIPTION
  2481. + In the first form,
  2482. + .I mwrite
  2483. + copies the specified Unix file to the named MSDOS file.  The second form
  2484. + of the command copies multiple Unix files to the named MSDOS directory.
  2485. + .PP
  2486. + .I Mwrite
  2487. + will allow the following command line options:
  2488. + .TP
  2489. + .B t
  2490. + Text file transfer.
  2491. + .I Mwrite
  2492. + will translate incoming line feeds to carriage return/line feeds.
  2493. + .TP
  2494. + .B n
  2495. + No warning.
  2496. + .I Mwrite
  2497. + will not warn the user when overwriting an existing file.
  2498. + .TP
  2499. + .B v
  2500. + Verbose mode.  Display the new filename if the Unix filename requires
  2501. + conversion.
  2502. + .TP
  2503. + .B m
  2504. + Preserve the file modification times.
  2505. + .PP
  2506. + If the target file already exists, and the
  2507. + .I -n
  2508. + option is not in effect,
  2509. + .I mwrite
  2510. + asks whether or not to overwrite the file.
  2511. + .PP
  2512. + Reasonable care is taken to create a valid MSDOS filename.  If an
  2513. + invalid name is specified,
  2514. + .I mwrite
  2515. + will change the name (and display the new name if the verbose mode is
  2516. + set).
  2517. + .PP
  2518. + MSDOS subdirectory names are are supported with either the '/' or '\e'
  2519. + separator.  The use of the '\e' separator or wildcards will require the
  2520. + names to be enclosed in quotes to protect them from the shell.
  2521. + .PP
  2522. + The
  2523. + .I mcd
  2524. + command may be used to establish the device and the current working
  2525. + directory (relative to MSDOS), otherwise the default is A:/.
  2526. + .PP
  2527. + .I Mwrite
  2528. + returns 0 on success, 1 on utter failure, or 2 on partial failure.
  2529. + .SH SEE ALSO
  2530. + mcd(1), mcopy(1), mread(1)
  2531. + .SH BUGS
  2532. + Unlike MSDOS, the destination directory may
  2533. + .B not
  2534. + be omitted.
  2535. diff -rc --new-file orig/mtools-2.0.7/mwrite.c mtools-2.0.7/mwrite.c
  2536. *** orig/mtools-2.0.7/mwrite.c    Thu Sep 10 15:59:48 1992
  2537. --- mtools-2.0.7/mwrite.c    Sun Oct 17 22:17:01 1993
  2538. ***************
  2539. *** 13,36 ****
  2540.   #include <sys/types.h>
  2541.   #include <sys/stat.h>
  2542.   #include "msdos.h"
  2543. - #include "patchlevel.h"
  2544.   
  2545. ! int fd = -1;                /* the file descriptor for the device */
  2546. ! int dir_start;                /* starting sector for directory */
  2547. ! int dir_len;                /* length of directory (in sectors) */
  2548. ! int dir_entries;            /* number of directory entries */
  2549. ! int clus_size;                /* cluster size (in sectors) */
  2550. ! char *mcwd;                /* the Current Working Directory */
  2551. ! int fat_error;                /* FAT error detected? */
  2552.   
  2553.   int full = 0;
  2554.   int textmode = 0;
  2555.   int nowarn = 0;
  2556. - static int got_signal();
  2557.   static struct directory *writeit();
  2558.   static long free_space();
  2559.   
  2560. ! main(argc, argv)
  2561.   int argc;
  2562.   char *argv[];
  2563.   {
  2564. --- 13,28 ----
  2565.   #include <sys/types.h>
  2566.   #include <sys/stat.h>
  2567.   #include "msdos.h"
  2568.   
  2569. ! extern int got_signal();
  2570.   
  2571.   int full = 0;
  2572.   int textmode = 0;
  2573.   int nowarn = 0;
  2574.   static struct directory *writeit();
  2575.   static long free_space();
  2576.   
  2577. ! mwrite(argc, argv)
  2578.   int argc;
  2579.   char *argv[];
  2580.   {
  2581. ***************
  2582. *** 76,82 ****
  2583.       }
  2584.   
  2585.       if (oops || (argc - optind) < 2) {
  2586. !         fprintf(stderr, "Mtools version %s, dated %s\n", VERSION, DATE);
  2587.           fprintf(stderr, "Usage: %s [-tnvm] unixfile msdosfile\n", argv[0]);
  2588.           fprintf(stderr, "       %s [-tnvm] unixfile [unixfiles...] msdosdirectory\n", argv[0]);
  2589.           exit(1);
  2590. --- 68,74 ----
  2591.       }
  2592.   
  2593.       if (oops || (argc - optind) < 2) {
  2594. !         fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate);
  2595.           fprintf(stderr, "Usage: %s [-tnvm] unixfile msdosfile\n", argv[0]);
  2596.           fprintf(stderr, "       %s [-tnvm] unixfile [unixfiles...] msdosdirectory\n", argv[0]);
  2597.           exit(1);
  2598. ***************
  2599. *** 177,182 ****
  2600. --- 169,175 ----
  2601.                       /* CONSTCOND */
  2602.                       while (1) {
  2603.                           printf("File \"%s\" exists, overwrite (y/n) ? ", target);
  2604. +                         fflush(stdout);
  2605.                           gets(ans);
  2606.                           if (ans[0] == 'n' || ans[0] == 'N') {
  2607.                               nogo = 1;
  2608. ***************
  2609. *** 322,348 ****
  2610.       dir = mk_entry(fixed, 0x20, fat, size, now);
  2611.       return(dir);
  2612.   }
  2613. - /*
  2614. -  * Do a graceful exit if the program is interrupted.  This will reduce
  2615. -  * (but not eliminate) the risk of generating a corrupted disk on
  2616. -  * a user abort.
  2617. -  */
  2618. - static int
  2619. - got_signal()
  2620. - {
  2621. -     void exit(), disk_flush(), fat_write(), dir_flush();
  2622. -     if (fd < 0)
  2623. -         exit(1);
  2624. -     fat_write();
  2625. -     dir_flush();
  2626. -     disk_flush();
  2627. -     close(fd);
  2628. -     exit(1);
  2629. - }
  2630.   
  2631.   /*
  2632.    * Get the amount of remaining free space
  2633. --- 315,320 ----
  2634. diff -rc --new-file orig/mtools-2.0.7/patchlevel.h mtools-2.0.7/patchlevel.h
  2635. *** orig/mtools-2.0.7/patchlevel.h    Thu Sep 10 16:00:31 1992
  2636. --- mtools-2.0.7/patchlevel.h    Fri Nov  5 19:41:30 1993
  2637. ***************
  2638. *** 1,2 ****
  2639.   #define VERSION    "2.0.7"
  2640. ! #define DATE    "6 Sep 92"
  2641. --- 1,2 ----
  2642.   #define VERSION    "2.0.7"
  2643. ! #define DATE    "17 Oct 93"
  2644.