summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS10
-rw-r--r--buffer.c14
-rwxr-xr-xbuildMingw.sh1
-rw-r--r--charsetConv.c12
-rw-r--r--codepages.c4
-rw-r--r--config.c49
-rw-r--r--config.h.in18
-rwxr-xr-xconfigure107
-rw-r--r--configure-stamp0
-rw-r--r--configure.in11
-rw-r--r--debian/changelog9
-rw-r--r--debian/mtools.dirs1
-rwxr-xr-xdebian/rules1
-rw-r--r--devices.c10
-rw-r--r--dirCache.c47
-rw-r--r--dirCache.h14
-rw-r--r--directory.c8
-rw-r--r--direntry.c2
-rw-r--r--expand.c2
-rw-r--r--fat.c5
-rw-r--r--file.c4
-rw-r--r--file_name.c2
-rw-r--r--floppyd.12
-rw-r--r--floppyd.c16
-rw-r--r--floppyd_installtest.12
-rw-r--r--floppyd_installtest.c2
-rw-r--r--floppyd_io.c6
-rw-r--r--fs.h2
-rw-r--r--hash.c1
-rw-r--r--init.c8
-rw-r--r--llong.c2
-rw-r--r--lockdev.c9
-rw-r--r--man/floppyd.1257
-rw-r--r--man/floppyd_installtest.196
-rw-r--r--man/mattrib.1133
-rw-r--r--man/mbadblocks.198
-rw-r--r--man/mcat.1103
-rw-r--r--man/mcd.1116
-rw-r--r--man/mclasserase.1115
-rw-r--r--man/mcopy.1183
-rw-r--r--man/mdel.199
-rw-r--r--man/mdeltree.1100
-rw-r--r--man/mdir.1121
-rw-r--r--man/mdu.199
-rw-r--r--man/mformat.1282
-rw-r--r--man/minfo.1101
-rw-r--r--man/mkmanifest.1181
-rw-r--r--man/mlabel.1117
-rw-r--r--man/mmd.195
-rw-r--r--man/mmount.199
-rw-r--r--man/mmove.1101
-rw-r--r--man/mpartition.1187
-rw-r--r--man/mrd.1100
-rw-r--r--man/mren.1107
-rw-r--r--man/mshowfat.194
-rw-r--r--man/mtools.1555
-rw-r--r--man/mtools.5633
-rw-r--r--man/mtoolstest.193
-rw-r--r--man/mtype.1113
-rw-r--r--man/mzip.1155
-rw-r--r--match.c63
-rw-r--r--mattrib.12
-rw-r--r--mattrib.c2
-rw-r--r--mbadblocks.12
-rw-r--r--mbadblocks.c9
-rw-r--r--mcat.12
-rw-r--r--mcat.c6
-rw-r--r--mcd.12
-rw-r--r--mcd.c1
-rw-r--r--mclasserase.12
-rw-r--r--mclasserase.c13
-rw-r--r--mcopy.12
-rw-r--r--mcopy.c3
-rw-r--r--mdel.12
-rw-r--r--mdel.c4
-rw-r--r--mdeltree.12
-rw-r--r--mdir.12
-rw-r--r--mdir.c10
-rw-r--r--mdoctorfat.c4
-rw-r--r--mdu.12
-rw-r--r--mdu.c1
-rw-r--r--mformat.12
-rw-r--r--mformat.c8
-rw-r--r--minfo.12
-rw-r--r--minfo.c1
-rw-r--r--misc.c29
-rw-r--r--mk_direntry.c5
-rw-r--r--mkmanifest.12
-rw-r--r--mlabel.12
-rw-r--r--mlabel.c3
-rw-r--r--mmd.12
-rw-r--r--mmd.c4
-rw-r--r--mmount.12
-rw-r--r--mmount.c1
-rw-r--r--mmove.12
-rw-r--r--mmove.c7
-rw-r--r--mpartition.12
-rw-r--r--mpartition.c3
-rw-r--r--mrd.12
-rw-r--r--mren.12
-rw-r--r--mshortname.12
-rw-r--r--mshortname.c1
-rw-r--r--mshowfat.12
-rw-r--r--mshowfat.c4
-rw-r--r--mtools.110
-rw-r--r--mtools.54
-rw-r--r--mtools.h40
-rw-r--r--mtools.info12
-rw-r--r--mtools.spec9
-rw-r--r--mtools.tmpl.110
-rw-r--r--mtools.tmpl.54
-rw-r--r--mtoolstest.12
-rw-r--r--mtype.12
-rw-r--r--mzip.12
-rw-r--r--mzip.c4
-rw-r--r--old_dos.c13
-rw-r--r--patchlevel.c9
-rw-r--r--plain_io.c8
-rw-r--r--precmd.c3
-rw-r--r--scsi.c2
-rw-r--r--sysincludes.h15
-rw-r--r--tty.c3
-rw-r--r--version.texi4
-rw-r--r--vfat.c2
-rw-r--r--xdf_io.c6
125 files changed, 488 insertions, 4816 deletions
diff --git a/NEWS b/NEWS
index 4e501f8..af2772d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+v4_0_21
+ - Fixed compilation for MingW
+ - After MingW compilation, make sure executable has .exe extension
+ - Addressed compiler warnings
+ - Fixed length handling in character set conversion (Unicode file names)
+ - Fixed matching of character range, when containing Unicode
+ characters (mdir "c:test[α-ω].exe")
+ - Fixed initialization of my_scsi_cmd constructor
v4_0_20
- initialize directory entries to 0
- bad message "Too few sectors" replaced with "Too many sectors"
@@ -1014,7 +1022,7 @@ v19951124
<rant>
Folks, please don't use quoted-printable. It sometimes changes
the CONTENT of your messages. Even the MIME RFC's acknowledge this.
- Case in point: £400 gets transformed into =A3400, which looks
+ Case in point: £400 gets transformed into =A3400, which looks
like 3400 pounds to a person unaware of this MIME "feature".
</rant>
v19951123
diff --git a/buffer.c b/buffer.c
index 41d4e50..f6334d5 100644
--- a/buffer.c
+++ b/buffer.c
@@ -109,10 +109,10 @@ typedef enum position_t {
static position_t isInBuffer(Buffer_t *This, mt_off_t start, size_t *len)
{
if(start >= This->current &&
- start < This->current + This->cur_size) {
+ start < This->current + (mt_off_t) This->cur_size) {
maximize(*len, This->cur_size - OFFSET);
return INSIDE;
- } else if(start == This->current + This->cur_size &&
+ } else if(start == This->current + (mt_off_t) This->cur_size &&
This->cur_size < This->size &&
*len >= This->sectorSize) {
/* append to the buffer for this, three conditions have to
@@ -137,7 +137,7 @@ static position_t isInBuffer(Buffer_t *This, mt_off_t start, size_t *len)
static int buf_read(Stream_t *Stream, char *buf, mt_off_t start, size_t len)
{
size_t length;
- int offset;
+ mt_off_t offset;
char *disk_ptr;
int ret;
DeclareThis(Buffer_t);
@@ -162,7 +162,7 @@ static int buf_read(Stream_t *Stream, char *buf, mt_off_t start, size_t len)
if ( ret < 0 )
return ret;
This->cur_size += ret;
- if (This->current+This->cur_size < start) {
+ if (This->current+(mt_off_t)This->cur_size < start) {
fprintf(stderr, "Short buffer fill\n");
exit(1);
}
@@ -185,7 +185,7 @@ static int buf_write(Stream_t *Stream, char *buf, mt_off_t start, size_t len)
{
char *disk_ptr;
DeclareThis(Buffer_t);
- size_t offset;
+ size_t offset=0;
if(!len)
return 0;
@@ -258,11 +258,11 @@ static int buf_write(Stream_t *Stream, char *buf, mt_off_t start, size_t len)
break;
case ERROR:
return -1;
- default:
#ifdef DEBUG
+ default:
fprintf(stderr, "Should not happen\n");
-#endif
exit(1);
+#endif
}
disk_ptr = This->buf + offset;
diff --git a/buildMingw.sh b/buildMingw.sh
index 3414f3d..d3ded53 100755
--- a/buildMingw.sh
+++ b/buildMingw.sh
@@ -14,3 +14,4 @@
dir=`dirname $0`
$dir/configure --srcdir $dir --host i586-mingw32msvc --disable-floppyd
make
+mv mtools mtools.exe
diff --git a/charsetConv.c b/charsetConv.c
index 7466844..f2dece3 100644
--- a/charsetConv.c
+++ b/charsetConv.c
@@ -59,8 +59,8 @@ static int try(const char *testCp) {
char outbuf[3];
char *outbufP = outbuf;
size_t outbufLen = 2*sizeof(char);
- iconv_t test;
- int i;
+ iconv_t test = 0;
+ size_t i;
for(i=0; i < sizeof(asciiTries) / sizeof(asciiTries[0]); i++) {
test = iconv_open(asciiTries[i], testCp);
@@ -178,7 +178,7 @@ static int safe_iconv(iconv_t conv, const wchar_t *wchar, char *dest,
int r;
unsigned int i;
size_t in_len=len*sizeof(wchar_t);
- size_t out_len=len*4;
+ size_t out_len=len;
char *dptr = dest;
while(in_len > 0) {
@@ -192,7 +192,7 @@ static int safe_iconv(iconv_t conv, const wchar_t *wchar, char *dest,
if(dptr)
*dptr++ = '_';
- in_len--;
+ in_len -= sizeof(wchar_t);
wchar++;
out_len--;
@@ -266,7 +266,7 @@ void cp_close(doscp_t *cp)
free(cp);
}
-int dos_to_wchar(doscp_t *cp, char *dos, wchar_t *wchar, size_t len)
+int dos_to_wchar(doscp_t *cp, const char *dos, wchar_t *wchar, size_t len)
{
int i;
@@ -368,7 +368,7 @@ int wchar_to_native(const wchar_t *wchar, char *native, size_t len)
int r;
initialize_to_native();
len = wcsnlen(wchar,len);
- r=safe_iconv(to_native, wchar, native, len, &mangled);
+ r=safe_iconv(to_native, wchar, native, len*4, &mangled);
native[r]='\0';
return r;
#else
diff --git a/codepages.c b/codepages.c
index 5558724..5c437e0 100644
--- a/codepages.c
+++ b/codepages.c
@@ -113,5 +113,7 @@ Codepage_t codepages[]= {
{ 0 }
};
-
+#else
+/* Should down ISO C forbids an empty translation unit warning [-Wpedantic]: */
+typedef int make_iso_compilers_happy;
#endif
diff --git a/config.c b/config.c
index ea41784..14de933 100644
--- a/config.c
+++ b/config.c
@@ -41,13 +41,14 @@ static const char *filename=NULL; /* current file name. Used for printing
static int file_nr=0;
-static int flag_mask; /* mask of currently set flags */
+static unsigned int flag_mask; /* mask of currently set flags */
/* devices */
-static int cur_devs; /* current number of defined devices */
+static unsigned int cur_devs; /* current number of defined devices */
static int cur_dev; /* device being filled in. If negative, none */
static int trusted=0; /* is the currently parsed device entry trusted? */
-static int nr_dev; /* number of devices that the current table can hold */
+static unsigned int nr_dev; /* number of devices that the current table can
+ hold */
struct device *devices; /* the device table */
static int token_nr; /* number of tokens in line */
@@ -97,7 +98,7 @@ static switches_t global_switches[] = {
typedef struct {
const char *name;
- int flag;
+ unsigned int flag;
} flags_t;
static flags_t openflags[] = {
@@ -131,7 +132,7 @@ static flags_t misc_flags[] = {
static struct {
const char *name;
signed char fat_bits;
- int tracks;
+ unsigned int tracks;
unsigned short heads;
unsigned short sectors;
} default_formats[] = {
@@ -175,6 +176,12 @@ static switches_t dswitches[]= {
{ "CODEPAGE", OFFS(codepage), T_UINT }
};
+static __inline__ char ch_toupper(char ch)
+{
+ return (char) toupper( (unsigned char) ch);
+}
+
+
static void maintain_default_drive(char drive)
{
if(default_drive == ':')
@@ -192,6 +199,7 @@ char get_default_drive(void)
return 'A';
}
+static void syntax(const char *msg, int thisLine) NORETURN;
static void syntax(const char *msg, int thisLine)
{
char drive='\0';
@@ -217,7 +225,8 @@ static void get_env_conf(void)
if(global_switches[i].type == T_INT)
* ((int *)global_switches[i].address) = (int) strtol(s,0,0);
if(global_switches[i].type == T_UINT)
- * ((int *)global_switches[i].address) = (unsigned int) strtoul(s,0,0);
+ * ((unsigned int *)global_switches[i].address) =
+ (unsigned int) strtoul(s,0,0);
else if (global_switches[i].type == T_STRING)
* ((char **)global_switches[i].address) = s;
}
@@ -318,7 +327,7 @@ static unsigned int get_unumber(void)
return n;
}
-static unsigned int get_number(void)
+static int get_number(void)
{
char *last;
int n;
@@ -336,9 +345,9 @@ static unsigned int get_number(void)
/* purge all entries pertaining to a given drive from the table */
static void purge(char drive, int fn)
{
- int i,j;
+ unsigned int i, j;
- drive = toupper(drive);
+ drive = ch_toupper(drive);
for(j=0, i=0; i < cur_devs; i++) {
if(devices[i].drive != drive ||
devices[i].file_nr == fn)
@@ -368,7 +377,7 @@ static void init_drive(void)
/* prepends a device to the table */
static void prepend(void)
{
- int i;
+ unsigned int i;
grow();
for(i=cur_devs; i>0; i--)
@@ -430,7 +439,7 @@ static int set_var(struct switches_l *switches, int nr,
if(match_token(switches[i].name)) {
expect_char('=');
if(switches[i].type == T_UINT)
- * ((int *)((long)switches[i].address+base_address)) =
+ * ((unsigned int *)((long)switches[i].address+base_address)) =
get_unumber();
if(switches[i].type == T_INT)
* ((int *)((long)switches[i].address+base_address)) =
@@ -557,7 +566,7 @@ static void parse_old_device_line(char drive)
/* reserve slot */
append();
- items = sscanf(token,"%c %s %i %i %i %i %li",
+ items = sscanf(token,"%c %s %i %ui %ui %ui %li",
&devices[cur_dev].drive,name,&devices[cur_dev].fat_bits,
&devices[cur_dev].tracks,&devices[cur_dev].heads,
&devices[cur_dev].sectors, &offset);
@@ -581,14 +590,13 @@ static void parse_old_device_line(char drive)
case 4:
case 5:
syntax("bad number of parameters", 1);
- exit(1);
}
if(!devices[cur_dev].tracks){
devices[cur_dev].sectors = 0;
devices[cur_dev].heads = 0;
}
- devices[cur_dev].drive = toupper(devices[cur_dev].drive);
+ devices[cur_dev].drive = ch_toupper(devices[cur_dev].drive);
maintain_default_drive(devices[cur_dev].drive);
if (!(devices[cur_dev].name = strdup(name))) {
printOom();
@@ -629,7 +637,7 @@ static int parse_one(int privilege)
memset((char*)(devices+cur_dev), 0, sizeof(*devices));
trusted = privilege;
flag_mask = 0;
- devices[cur_dev].drive = toupper(token[0]);
+ devices[cur_dev].drive = ch_toupper(token[0]);
maintain_default_drive(devices[cur_dev].drive);
expect_char(':');
return 1;
@@ -655,7 +663,7 @@ static int parse_one(int privilege)
static int parse(const char *name, int privilege)
{
if(fp) {
- fprintf(stderr, "File descriptor already set (%p)!\n", fp);
+ fprintf(stderr, "File descriptor already set!\n");
exit(1);
}
fp = fopen(name, "r");
@@ -730,6 +738,7 @@ void read_config(void)
mtools_fat_compatibility=1;
}
+void mtoolstest(int argc, char **argv, int type UNUSEDP) NORETURN;
void mtoolstest(int argc, char **argv, int type UNUSEDP)
{
/* testing purposes only */
@@ -737,7 +746,7 @@ void mtoolstest(int argc, char **argv, int type UNUSEDP)
char drive='\0';
if(argc > 1 && argv[1][0] && argv[1][1] == ':') {
- drive = toupper(argv[1][0]);
+ drive = ch_toupper(argv[1][0]);
}
for (dev=devices; dev->name; dev++) {
@@ -806,3 +815,9 @@ void mtoolstest(int argc, char **argv, int type UNUSEDP)
exit(0);
}
+
+/*
+ * Local Variables:
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/config.h.in b/config.h.in
index 3b55084..db7abbc 100644
--- a/config.h.in
+++ b/config.h.in
@@ -6,6 +6,9 @@
/* Define when sys_errlist is defined in the standard include files */
#undef DECL_SYS_ERRLIST
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
@@ -54,6 +57,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
/* Define to 1 if you have the `bsd' library (-lbsd). */
#undef HAVE_LIBBSD
@@ -225,6 +231,9 @@
/* Define to 1 if you have the `strtol' function. */
#undef HAVE_STRTOL
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
@@ -336,9 +345,18 @@
/* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
+/* The size of `time_t', as computed by sizeof. */
+#undef SIZEOF_TIME_T
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
diff --git a/configure b/configure
index 4bd0715..f5d84e4 100755
--- a/configure
+++ b/configure
@@ -4404,7 +4404,7 @@ fi
for ac_header in getopt.h sys/stat.h stdlib.h unistd.h linux/unistd.h \
libc.h fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h strings.h string.h \
-sys/param.h memory.h malloc.h signal.h sys/signal.h utime.h sgtty.h \
+sys/param.h memory.h malloc.h io.h signal.h sys/signal.h utime.h sgtty.h \
sys/floppy.h mntent.h sys/sysmacros.h netinet/in.h assert.h \
iconv.h wctype.h wchar.h locale.h linux/fs.h
do :
@@ -4489,6 +4489,105 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+$as_echo_n "checking size of time_t... " >&6; }
+if ${ac_cv_sizeof_time_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_time_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+$as_echo "$ac_cv_sizeof_time_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+$as_echo_n "checking size of long long... " >&6; }
+if ${ac_cv_sizeof_long_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether llseek declared in unistd.h" >&5
$as_echo_n "checking whether llseek declared in unistd.h... " >&6; }
@@ -4812,13 +4911,13 @@ _ACEOF
for ac_func in strerror random srandom strchr strrchr lockf flock \
strcasecmp strncasecmp strnlen atexit on_exit getpass memmove \
-strdup strndup strcspn strspn strtoul strtol memcpy strpbrk memset setenv \
-seteuid setresuid setpgrp \
+strdup strndup strcspn strspn strtoul strtol strtoll memcpy strpbrk memset \
+setenv seteuid setresuid setpgrp \
tcsetattr tcflush basename fchdir media_oldaliases llseek lseek64 \
snprintf stat64 setlocale \
wcsdup wcscasecmp wcsnlen putwc \
getuserid getgroupid \
-sigaction usleep
+alarm sigaction usleep
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/configure-stamp b/configure-stamp
deleted file mode 100644
index e69de29..0000000
--- a/configure-stamp
+++ /dev/null
diff --git a/configure.in b/configure.in
index 859c94d..42504db 100644
--- a/configure.in
+++ b/configure.in
@@ -94,7 +94,7 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(getopt.h sys/stat.h stdlib.h unistd.h linux/unistd.h \
libc.h fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h strings.h string.h \
-sys/param.h memory.h malloc.h signal.h sys/signal.h utime.h sgtty.h \
+sys/param.h memory.h malloc.h io.h signal.h sys/signal.h utime.h sgtty.h \
sys/floppy.h mntent.h sys/sysmacros.h netinet/in.h assert.h \
iconv.h wctype.h wchar.h locale.h linux/fs.h)
AC_CHECK_HEADERS(termio.h sys/termio.h, [break])
@@ -102,6 +102,9 @@ AC_CHECK_HEADERS(termios.h sys/termios.h, [break])
AC_CHECK_TYPES(caddr_t)
AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(time_t)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
dnl
dnl Check to see if llseek() is declared in unistd.h. On some libc's
@@ -152,13 +155,13 @@ dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(strerror random srandom strchr strrchr lockf flock \
strcasecmp strncasecmp strnlen atexit on_exit getpass memmove \
-strdup strndup strcspn strspn strtoul strtol memcpy strpbrk memset setenv \
-seteuid setresuid setpgrp \
+strdup strndup strcspn strspn strtoul strtol strtoll memcpy strpbrk memset \
+setenv seteuid setresuid setpgrp \
tcsetattr tcflush basename fchdir media_oldaliases llseek lseek64 \
snprintf stat64 setlocale \
wcsdup wcscasecmp wcsnlen putwc \
getuserid getgroupid \
-sigaction usleep)
+alarm sigaction usleep)
dnl
dnl Check for 64-bit off_t
diff --git a/debian/changelog b/debian/changelog
index c21f868..0959bf4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+mtools (4.0.21) stable; urgency=low
+ * Fixed compilation for MingW
+ * After MingW compilation, make sure executable has .exe extension
+ * Addressed compiler warnings
+ * Fixed length handling in character set conversion (Unicode file names)
+ * Fixed matching of character range, when containing Unicode characters (mdir "c:test[α-ω].exe")
+ * Fixed initialization of my_scsi_cmd constructor
+ -- Alain Knaff <alain@knaff.lu> Sat, 24 Nov 2018 09:50:03 +0100
+
mtools (4.0.20) stable; urgency=low
* initialize directory entries to 0
* bad message "Too few sectors" replaced with "Too many sectors"
diff --git a/debian/mtools.dirs b/debian/mtools.dirs
deleted file mode 100644
index ee19d5d..0000000
--- a/debian/mtools.dirs
+++ /dev/null
@@ -1 +0,0 @@
-etc
diff --git a/debian/rules b/debian/rules
index 196fb91..768e6c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,6 +34,7 @@ install: build
dh_prep
dh_installdirs
$(MAKE) install prefix=$$( pwd )/debian/tmp/usr
+ [ -d debian/mtools/etc/ ] || mkdir -p debian/mtools/etc
install -m 644 debian/mtools.conf debian/mtools/etc/
dh_movefiles
diff --git a/devices.c b/devices.c
index ca1f9f5..f9d894e 100644
--- a/devices.c
+++ b/devices.c
@@ -576,7 +576,7 @@ struct device devices[] = {
#ifdef OS_linux
-const char *error_msg[22]={
+static const char *error_msg[22]={
"Missing Data Address Mark",
"Bad cylinder",
"Scan not satisfied",
@@ -764,7 +764,7 @@ static __inline__ void set_2m(struct floppy_struct *floppy, int value)
value = FD_2M;
else
value = 0;
- floppy->rate = (floppy->rate & ~FD_2M) | value;
+ floppy->rate = (floppy->rate & ~FD_2M) | value;
}
#define SET_2M set_2m
@@ -772,7 +772,7 @@ static __inline__ void set_ssize(struct floppy_struct *floppy, int value)
{
value = (( (value & 7) + 6 ) % 8) << 3;
- floppy->rate = (floppy->rate & ~0x38) | value;
+ floppy->rate = (floppy->rate & ~0x38) | value;
}
#define SET_SSIZE set_ssize
@@ -1099,11 +1099,11 @@ int init_geom(int fd, struct device *dev, struct device *orig_dev,
#endif
#ifdef predefined_devices
-const int nr_const_devices = sizeof(const_devices) / sizeof(*const_devices);
+const unsigned int nr_const_devices = sizeof(const_devices) / sizeof(*const_devices);
#else
struct device devices[]={
{"/dev/fd0", 'A', 0, O_EXCL, 0,0, 0,0, MDEF_ARG},
/* to shut up Ultrix's native compiler, we can't make this empty :( */
};
-const int nr_const_devices = 0;
+const unsigned int nr_const_devices = 0;
#endif
diff --git a/dirCache.c b/dirCache.c
index e1dad23..00a3d39 100644
--- a/dirCache.c
+++ b/dirCache.c
@@ -24,16 +24,16 @@
#define BITS_PER_INT (sizeof(unsigned int) * 8)
-static __inline__ unsigned int rol(unsigned int arg, int shift)
+static __inline__ uint32_t rol(uint32_t arg, int shift)
{
arg &= 0xffffffff; /* for 64 bit machines */
return (arg << shift) | (arg >> (32 - shift));
}
-static int calcHash(wchar_t *name)
+static uint32_t calcHash(wchar_t *name)
{
- unsigned long hash;
+ uint32_t hash;
int i;
wchar_t c;
@@ -46,7 +46,7 @@ static int calcHash(wchar_t *name)
* prime with 32, which makes sure that
* successive letters cannot cover each
* other easily */
- c = towupper(*name);
+ c = (wchar_t)towupper((wint_t)*name);
hash ^= (c * (c+2)) ^ (i * (i+2));
hash &= 0xffffffff;
i++, name++;
@@ -59,11 +59,13 @@ static int calcHash(wchar_t *name)
return hash;
}
-static int addBit(unsigned int *bitmap, int hash, int checkOnly)
+static unsigned int addBit(unsigned int *bitmap,
+ unsigned int hash, int checkOnly)
{
- int bit, entry;
+ unsigned int bit;
+ int entry;
- bit = 1 << (hash % BITS_PER_INT);
+ bit = 1u << (hash % BITS_PER_INT);
entry = (hash / BITS_PER_INT) % DC_BITMAP_SIZE;
if(checkOnly)
@@ -106,15 +108,15 @@ int isHashed(dirCache_t *cache, wchar_t *name)
return ret;
}
-int growDirCache(dirCache_t *cache, int slot)
+int growDirCache(dirCache_t *cache, unsigned int slot)
{
- if(slot < 0) {
+ if((int) slot < 0) {
fprintf(stderr, "Bad slot %d\n", slot);
exit(1);
}
if( cache->nr_entries <= slot) {
- int i;
+ unsigned int i;
cache->entries = realloc(cache->entries,
(slot+1) * 2 *
@@ -129,11 +131,11 @@ int growDirCache(dirCache_t *cache, int slot)
return 0;
}
-dirCache_t *allocDirCache(Stream_t *Stream, int slot)
+dirCache_t *allocDirCache(Stream_t *Stream, unsigned int slot)
{
dirCache_t **dcp;
- if(slot < 0) {
+ if((int)slot < 0) {
fprintf(stderr, "Bad slot %d\n", slot);
exit(1);
}
@@ -206,7 +208,7 @@ static int freeDirCacheRange(dirCache_t *cache,
if(entry->beginSlot == entry->endSlot) {
int needWriteEnd = 0;
if(entry->endMarkPos != -1 &&
- entry->endMarkPos < beginSlot)
+ entry->endMarkPos < (int) beginSlot)
needWriteEnd = 1;
if(entry->longName)
@@ -224,12 +226,13 @@ static int freeDirCacheRange(dirCache_t *cache,
return -1;
}
-static dirCacheEntry_t *allocDirCacheEntry(dirCache_t *cache, int beginSlot,
- int endSlot,
+static dirCacheEntry_t *allocDirCacheEntry(dirCache_t *cache,
+ int beginSlot,
+ unsigned int endSlot,
dirCacheEntryType_t type)
{
dirCacheEntry_t *entry;
- int i;
+ unsigned int i;
if(growDirCache(cache, endSlot) < 0)
return 0;
@@ -251,7 +254,9 @@ static dirCacheEntry_t *allocDirCacheEntry(dirCache_t *cache, int beginSlot,
return entry;
}
-dirCacheEntry_t *addUsedEntry(dirCache_t *cache, int beginSlot, int endSlot,
+dirCacheEntry_t *addUsedEntry(dirCache_t *cache,
+ unsigned int beginSlot,
+ unsigned int endSlot,
wchar_t *longName, wchar_t *shortName,
struct directory *dir)
{
@@ -284,7 +289,7 @@ dirCacheEntry_t *addUsedEntry(dirCache_t *cache, int beginSlot, int endSlot,
* to be previous)
* Only does something if both of these slots are actually free
*/
-static void mergeFreeSlots(dirCache_t *cache, int slot)
+static void mergeFreeSlots(dirCache_t *cache, unsigned int slot)
{
dirCacheEntry_t *previous, *next;
unsigned int i;
@@ -338,12 +343,12 @@ dirCacheEntry_t *addFreeEntry(dirCache_t *cache,
return addFreeEndEntry(cache, beginSlot, endSlot, 0);
}
-dirCacheEntry_t *addEndEntry(dirCache_t *cache, int pos)
+dirCacheEntry_t *addEndEntry(dirCache_t *cache, unsigned int pos)
{
- return allocDirCacheEntry(cache, pos, pos+1, DCET_END);
+ return allocDirCacheEntry(cache, pos, pos+1u, DCET_END);
}
-dirCacheEntry_t *lookupInDircache(dirCache_t *cache, int pos)
+dirCacheEntry_t *lookupInDircache(dirCache_t *cache, unsigned int pos)
{
if(growDirCache(cache, pos+1) < 0)
return 0;
diff --git a/dirCache.h b/dirCache.h
index bd9637b..04f9f3e 100644
--- a/dirCache.h
+++ b/dirCache.h
@@ -29,7 +29,7 @@ typedef struct dirCacheEntry_t dirCacheEntry_t;
typedef struct dirCache_t {
struct dirCacheEntry_t **entries;
- int nr_entries;
+ unsigned int nr_entries;
unsigned int nrHashed;
unsigned int bm0[DC_BITMAP_SIZE];
unsigned int bm1[DC_BITMAP_SIZE];
@@ -37,9 +37,11 @@ typedef struct dirCache_t {
} dirCache_t;
int isHashed(dirCache_t *cache, wchar_t *name);
-int growDirCache(dirCache_t *cache, int slot);
-dirCache_t *allocDirCache(Stream_t *Stream, int slot);
-dirCacheEntry_t *addUsedEntry(dirCache_t *Stream, int begin, int end,
+int growDirCache(dirCache_t *cache, unsigned int slot);
+dirCache_t *allocDirCache(Stream_t *Stream, unsigned int slot);
+dirCacheEntry_t *addUsedEntry(dirCache_t *Stream,
+ unsigned int begin,
+ unsigned int end,
wchar_t *longName, wchar_t *shortName,
struct directory *dir);
void freeDirCache(Stream_t *Stream);
@@ -48,6 +50,6 @@ dirCacheEntry_t *addFreeEntry(dirCache_t *Stream,
dirCacheEntry_t *addFreeEndEntry(dirCache_t *Stream,
unsigned int begin, unsigned int end,
int isAtEnd);
-dirCacheEntry_t *addEndEntry(dirCache_t *Stream, int pos);
-dirCacheEntry_t *lookupInDircache(dirCache_t *Stream, int pos);
+dirCacheEntry_t *addEndEntry(dirCache_t *Stream, unsigned int pos);
+dirCacheEntry_t *lookupInDircache(dirCache_t *Stream, unsigned int pos);
#endif
diff --git a/directory.c b/directory.c
index 12c3ec0..6a17aa0 100644
--- a/directory.c
+++ b/directory.c
@@ -54,7 +54,7 @@ int dir_grow(Stream_t *Dir, int size)
Stream_t *Stream = GetFs(Dir);
DeclareThis(FsPublic_t);
int ret;
- int buflen;
+ unsigned int buflen;
char *buffer;
if (!getfreeMinClusters(Dir, 1))
@@ -70,7 +70,7 @@ int dir_grow(Stream_t *Dir, int size)
memset((char *) buffer, '\0', buflen);
ret = force_write(Dir, buffer, (mt_off_t) size * MDIR_SIZE, buflen);
free(buffer);
- if(ret < buflen)
+ if(ret < (int) buflen)
return -1;
return 0;
}
@@ -95,7 +95,7 @@ void low_level_dir_write_end(Stream_t *Dir, int entry)
* to a static directory structure.
*/
-struct directory *mk_entry(const dos_name_t *dn, char attr,
+struct directory *mk_entry(const dos_name_t *dn, unsigned char attr,
unsigned int fat, size_t size, time_t date,
struct directory *ndir)
{
@@ -132,7 +132,7 @@ struct directory *mk_entry(const dos_name_t *dn, char attr,
* from places such as mmd for making special entries (".", "..", "/", ...)
* Thus it doesn't bother with character set conversions
*/
-struct directory *mk_entry_from_base(const char *base, char attr,
+struct directory *mk_entry_from_base(const char *base, unsigned char attr,
unsigned int fat, size_t size, time_t date,
struct directory *ndir)
{
diff --git a/direntry.c b/direntry.c
index 8eec781..4723b33 100644
--- a/direntry.c
+++ b/direntry.c
@@ -145,7 +145,7 @@ char *getPwd(direntry_t *entry)
char *end;
size = getPathLen(entry);
- ret = malloc(size+1);
+ ret = malloc(size*4+1);
if(!ret)
return 0;
end = sprintPwd(entry, ret);
diff --git a/expand.c b/expand.c
index 6b11f09..fc3a08d 100644
--- a/expand.c
+++ b/expand.c
@@ -18,8 +18,6 @@
* Do filename expansion with the shell.
*/
-#define EXPAND_BUF 2048
-
#include "sysincludes.h"
#include "mtools.h"
diff --git a/fat.c b/fat.c
index 24e3e79..2923f0e 100644
--- a/fat.c
+++ b/fat.c
@@ -63,7 +63,8 @@ static __inline__ int forceWriteSector(Fs_t *This, char *buf, unsigned int off,
static FatMap_t *GetFatMap(Fs_t *Stream)
{
- int nr_entries,i;
+ size_t nr_entries;
+ size_t i;
FatMap_t *map;
Stream->fat_error = 0;
@@ -665,7 +666,7 @@ static int check_media_type(Fs_t *This, union bootsector *boot,
static int fat_32_read(Fs_t *This, union bootsector *boot,
unsigned int tot_sectors)
{
- int size;
+ size_t size;
This->fat_len = DWORD(ext.fat32.bigFat);
This->writeAllFats = !(boot->boot.ext.fat32.extFlags[0] & 0x80);
diff --git a/file.c b/file.c
index 2915a82..8ed9350 100644
--- a/file.c
+++ b/file.c
@@ -54,7 +54,7 @@ typedef struct File_t {
} File_t;
static Class_t FileClass;
-T_HashTable *filehash;
+static T_HashTable *filehash;
static File_t *getUnbufferedFile(Stream_t *Stream)
{
@@ -364,7 +364,7 @@ static int root_map(File_t *This, off_t where, size_t *len, int mode UNUSEDP,
return -2;
}
- smaximize(*len, Fs->dir_len * Fs->sector_size - where);
+ sizemaximize(*len, Fs->dir_len * Fs->sector_size - where);
if (*len == 0)
return 0;
diff --git a/file_name.c b/file_name.c
index 3930226..cad4381 100644
--- a/file_name.c
+++ b/file_name.c
@@ -103,7 +103,7 @@ void dos_name(doscp_t *toDos, const char *name, int verbose UNUSEDP,
{
char *s, *ext;
register int i;
- Case_t BaseCase, ExtCase;
+ Case_t BaseCase, ExtCase = UPPER;
*mangled = 0;
diff --git a/floppyd.1 b/floppyd.1
index 9fa5dab..9576772 100644
--- a/floppyd.1
+++ b/floppyd.1
@@ -1,5 +1,5 @@
'\" t
-.TH floppyd 1 "11Nov18" mtools-pre-4.0.20
+.TH floppyd 1 "24Nov18" mtools-4.0.21
.SH Name
floppyd - floppy daemon for remote access to floppy drive
'\" t
diff --git a/floppyd.c b/floppyd.c
index 618e2dc..26a380e 100644
--- a/floppyd.c
+++ b/floppyd.c
@@ -37,7 +37,6 @@
#ifdef USE_FLOPPYD
#define USE_FLOPPYD_BUFFERED_IO 1
-#define FLOPPYD_DEFAULT_PORT 5703
#include "sysincludes.h"
#include "grp.h"
@@ -120,7 +119,7 @@ typedef struct io_buffer {
Byte out_buffer[BUFFERED_IO_SIZE];
Byte in_buffer[BUFFERED_IO_SIZE];
- long in_valid;
+ unsigned long in_valid;
long in_start;
long out_valid;
@@ -178,7 +177,7 @@ static size_t buf_read (io_buffer buf, Byte* buffer, size_t nbytes) {
rval = read(buf->handle, buf->in_buffer,
BUFFERED_IO_SIZE);
if (rval >= 0) {
- if (rval < nbytes) {
+ if (rval < (ssize_t) nbytes) {
memcpy(buffer, buf->in_buffer, rval);
rval += buf->in_valid;
buf->in_valid = buf->in_start = 0;
@@ -726,6 +725,7 @@ static int sockethandle_now = -1;
/*
* Catch alarm signals and exit.
*/
+static void alarm_signal(int a UNUSEDP) NORETURN;
static void alarm_signal(int a UNUSEDP)
{
if (sockethandle_now != -1) {
@@ -740,6 +740,7 @@ static void alarm_signal(int a UNUSEDP)
/*
* This is the main loop when running as a server.
*/
+static void server_main_loop(int sock, char **device_name, int n_dev) NORETURN;
static void server_main_loop(int sock, char **device_name, int n_dev)
{
struct sockaddr_in addr;
@@ -790,6 +791,7 @@ static void server_main_loop(int sock, char **device_name, int n_dev)
/*
* Print some basic help information.
*/
+static void usage(char *prog, const char *opt, int ret) NORETURN;
static void usage(char *prog, const char *opt, int ret)
{
if (opt)
@@ -864,10 +866,8 @@ int main (int argc, char** argv)
case 'h':
usage(argv[0], NULL, 0);
- break;
case '?':
usage(argv[0], NULL, 1);
- break;
}
}
@@ -980,11 +980,6 @@ int main (int argc, char** argv)
* Handle the server main loop.
*/
server_main_loop(sock, device_name, n_dev);
-
- /*
- * Should never exit.
- */
- exit(1);
}
/*
@@ -1038,6 +1033,7 @@ static void send_reply64(int rval, io_buffer sock, mt_off_t len) {
destroyPacket(reply);
}
+static void cleanup(int x UNUSEDP) NORETURN;
static void cleanup(int x UNUSEDP) {
unlink(XauFileName());
exit(-1);
diff --git a/floppyd_installtest.1 b/floppyd_installtest.1
index 7a14ab6..9f3faa1 100644
--- a/floppyd_installtest.1
+++ b/floppyd_installtest.1
@@ -1,5 +1,5 @@
'\" t
-.TH floppyd_installtest 1 "11Nov18" mtools-pre-4.0.20
+.TH floppyd_installtest 1 "24Nov18" mtools-4.0.21
.SH Name
floppyd_installtest - tests whether floppyd is installed and running
'\" t
diff --git a/floppyd_installtest.c b/floppyd_installtest.c
index 92ed54f..ec84b48 100644
--- a/floppyd_installtest.c
+++ b/floppyd_installtest.c
@@ -45,7 +45,7 @@ typedef unsigned char Byte;
typedef unsigned long Dword;
typedef mt_off_t Qword;
-const char* AuthErrors[] = {
+static const char* AuthErrors[] = {
"Auth success!",
"Auth failed: Packet oversized!",
"Auth failed: X-Cookie doesn't match!",
diff --git a/floppyd_io.c b/floppyd_io.c
index b5fc549..25bdaea 100644
--- a/floppyd_io.c
+++ b/floppyd_io.c
@@ -42,7 +42,7 @@ typedef unsigned char Byte;
typedef unsigned long Dword;
typedef mt_off_t Qword;
-const char* AuthErrors[] = {
+static const char* AuthErrors[] = {
"Auth success",
"Auth failed: Packet oversized",
"Auth failed: X-Cookie doesn't match",
@@ -133,7 +133,6 @@ static int floppyd_reader(int fd, char* buffer, int len)
Dword errcode;
Dword gotlen;
int l;
- int start;
Byte buf[16];
dword2byte(1, buf);
@@ -151,7 +150,8 @@ static int floppyd_reader(int fd, char* buffer, int len)
gotlen = read_dword(fd);
errcode = read_dword(fd);
- if (gotlen != -1) {
+ if (gotlen != (Dword) -1) {
+ unsigned int start;
if (read_dword(fd) != gotlen) {
errno = EIO;
return -1;
diff --git a/fs.h b/fs.h
index 65cf466..7708c06 100644
--- a/fs.h
+++ b/fs.h
@@ -29,7 +29,7 @@ typedef struct FsPublic_t {
int serialized;
unsigned long serial_number;
- int cluster_size;
+ unsigned int cluster_size;
unsigned int sector_size;
} FsPublic_t;
diff --git a/hash.c b/hash.c
index ba56287..36fb591 100644
--- a/hash.c
+++ b/hash.c
@@ -212,7 +212,6 @@ int hash_remove(T_HashTable *H,T_HashTableEl *E, int hint)
if(_hash_lookup(H, E, &E2, &hint, 1)) {
fprintf(stderr, "Removing non-existent entry\n");
exit(1);
- return -1;
}
H->inuse--;
H->entries[hint] = &deleted;
diff --git a/init.c b/init.c
index aa9b9a3..62574f9 100644
--- a/init.c
+++ b/init.c
@@ -33,15 +33,12 @@
#define FULL_CYL
-unsigned int num_clus; /* total number of cluster */
-
-
/*
* Read the boot sector. We glean the disk parameters from this sector.
*/
static int read_boot(Stream_t *Stream, union bootsector * boot, int size)
{
- short boot_sector_size; /* sector size, as stored in boot sector */
+ size_t boot_sector_size; /* sector size, as stored in boot sector */
/* read the first sector, or part of it */
if(!size)
@@ -53,8 +50,7 @@ static int read_boot(Stream_t *Stream, union bootsector * boot, int size)
return -1;
boot_sector_size = WORD(secsiz);
- if(boot_sector_size >= 0 &&
- boot_sector_size < sizeof(boot->bytes)) {
+ if(boot_sector_size < sizeof(boot->bytes)) {
/* zero rest of in-memory boot sector */
memset(boot->bytes+boot_sector_size, 0,
sizeof(boot->bytes) - boot_sector_size);
diff --git a/llong.c b/llong.c
index a1eaeec..95383f7 100644
--- a/llong.c
+++ b/llong.c
@@ -23,7 +23,7 @@
#if 1
const mt_off_t max_off_t_31 = MAX_OFF_T_B(31); /* Floppyd */
-const mt_off_t max_off_t_32 = MAX_OFF_T_B(32); /* Directory */
+static const mt_off_t max_off_t_32 = MAX_OFF_T_B(32); /* Directory */
const mt_off_t max_off_t_41 = MAX_OFF_T_B(41); /* SCSI */
const mt_off_t max_off_t_seek = MAX_OFF_T_B(SEEK_BITS); /* SCSI */
#else
diff --git a/lockdev.c b/lockdev.c
index b07db60..3a6eab9 100644
--- a/lockdev.c
+++ b/lockdev.c
@@ -23,7 +23,7 @@
#include "mtools.h"
#include "lockdev.h"
-#ifdef HAVE_SIGACTION
+#if (defined HAVE_SIGACTION && defined HAVE_ALARM)
# define ALRM
#endif
@@ -62,11 +62,6 @@
#endif /* LOCKF */
#endif /* FLOCK */
-
-#undef USE_FLOCK_W
-
-#define USE_SETLK_W
-
#if defined(USE_FLOCK_W) || defined(USE_LOCKF_W) || defined (USE_SETLK_W)
static void alrm(int a UNUSEDP) {
}
@@ -74,7 +69,7 @@ static void alrm(int a UNUSEDP) {
int lock_dev(int fd, int mode, struct device *dev)
{
- int retries = 0;
+ unsigned int retries = 0;
if(IS_NOLOCK(dev))
return 0;
diff --git a/man/floppyd.1 b/man/floppyd.1
deleted file mode 100644
index 070f3c5..0000000
--- a/man/floppyd.1
+++ /dev/null
@@ -1,257 +0,0 @@
-.TH floppyd 1 "21Feb10" mtools-4.0.12
-.SH Name
-floppyd - floppy daemon for remote access to floppy drive
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p floppyd"
-.iX "c X terminal"
-.iX "c remote floppy access"
-.PP
-\&\fR\&\f(CWFloppyd\fR is used as a server to grant access to the floppy drive
-to clients running on a remote machine, just as an X server grants
-access to the display to remote clients. It has the following syntax:
-.PP
-\&\fR\&\f(CWfloppyd\fR [\fR\&\f(CW-d\fR] [\fR\&\f(CW-l\fR] [\fR\&\f(CW-s\fR \fIport\fR] [\fR\&\f(CW-r\fR
-\&\fIuser\fR] [\fR\&\f(CW-b\fR \fIipaddr\fR] [\fR\&\f(CW-x\fR \fIdisplay\fR] \fIdevicenames\fR
-.PP
-\&\fR\&\f(CWfloppyd\fR is always associated with an X server. It runs on the
-same machine as its X server, and listens on port 5703 and above.
-.PP
-.SH Authentication
-.PP
-\&\fR\&\f(CWfloppyd\fR authenticates remote clients using the \fR\&\f(CWXauthority\fR
-protocol. Xhost authentication is not supported. Each floppyd is
-associated with an X server. When a remote client attempts to connect
-to floppyd, it sends floppyd the X authority record corresponding to
-floppyd's X server. Floppyd in turn then tries to open up a connection
-to the X server in order to verify the authenticity of the xauth record.
-If the connection to the X server succeeds, the client is granted
-access.
-\&\fR\&\f(CWDISPLAY\fR.
-.PP
-\&\fBCaution\fR: In order to make authentication work correctly, the
-local host should \fBnot\fR be listed in the \fR\&\f(CWxhost\fR list of
-allowed hosts.
- Indeed, hosts listed in \fR\&\f(CWxhost\fR do not need a correct
-\&\fR\&\f(CWXauthority\fR cookie to connect to the X server. As \fR\&\f(CWfloppyd\fR
-runs on the same host as the X server, all its probe connection would
-succeed even for clients who supplied a bad cookie. This means that
-your floppy drive would be open to the world, i.e. a huge security hole.
- If your X server does not allow you to remove \fR\&\f(CWlocalhost:0\fR and
-\&\fR\&\f(CW:0\fR from the \fR\&\f(CWxhost\fR list, you can prevent floppyd from
-probing those display names with the \fR\&\f(CW-l\fR option.
-.PP
-.SH Command\ line\ options
-.TP
-\&\fR\&\f(CWd\fR\
-Daemon mode. Floppyd runs its own server loop. Do not supply this if
-you start floppyd from \fR\&\f(CWinetd.conf\fR
-.TP
-\&\fR\&\f(CWs\ \ \fIport\fR\&\f(CW\fR\
-Port number for daemon mode. Default is 5703 + \fIdisplaynumber\fR.
-This flag implies daemon mode. For example, for display
-\&\fR\&\f(CWhitchhiker:5\fR, the port would be 5708.
-.TP
-\&\fR\&\f(CWb\ \ \fIipaddr\fR\&\f(CW\fR\
-Bind address (for multi homed hosts). This flag implies daemon mode
-.TP
-\&\fR\&\f(CWr\ \fIuser\fR\&\f(CW\fR\
-Run the server under as the given user
-.TP
-\&\fR\&\f(CWx\ \fIdisplay\fR\&\f(CW\fR\
-X display to use for authentication. By default, this is taken from the
-\&\fR\&\f(CWDISPLAY\fR variable. If neither the \fR\&\f(CWx\fR attribute is present
-nor \fR\&\f(CWDISPLAY\fR is set, floppyd uses \fR\&\f(CW:0.0\fR.
-.PP
-\&\fIdevicenames\fR is a list of device nodes to be opened. Default
-is \fR\&\f(CW/dev/fd0\fR. Multiple devices are only supported on mtools
-versions newer than 3.9.11.
-.PP
-.SH Connecting\ to\ floppyd
-.PP
- In order to use floppyd, add the flag \fR\&\f(CWremote\fR to the device
-description in your \fR\&\f(CW\(if~/.mtoolsrc\(is\fR file. If the flag \fR\&\f(CWremote\fR
-is given, the \fR\&\f(CWfile\fR parameter of the device description is taken
-to be a remote address. It's format is the following:
-\&\fIhostname\fR\fR\&\f(CW:\fR\fIdisplaynumber\fR[\fR\&\f(CW/\fR[\fIbaseport\fR][\fR\&\f(CW/\fR\fIdrive\fR]]. When
-using this entry, mtools connects to port
-\&\fIbaseport\fR+\fIdisplaynumber\fR at \fIhostname\fR. By default
-\&\fIbaseport\fR is 5703. The drive parameter is to distinguish among
-multiple drives associated with a single display (only mtools versions
-more recent than 3.9.11)
-.PP
-.SH Examples:
-.PP
- The following starts a floppy daemon giving access to \fR\&\f(CW\(if/dev/fd0\(is\fR,
-listening on the default port 5703, tied to the default X servers:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-floppyd -d /dev/fd0
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
- Each of the following starts a floppy daemon giving access to
-\&\fR\&\f(CW\(if/dev/fd1\(is\fR, tied to the :1 local X servers, and listening on port
-5704. We assume that the local host is named \fR\&\f(CWhitchhiker\fR.
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-floppyd -d /dev/fd0
-floppyd -d -x :1 -p 5704 /dev/fd0
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
- If you want to start floppyd by \fR\&\f(CWinetd\fR instead of running it as a
-daemon, insert the following lines into \fR\&\f(CW\(if/etc/services\(is\fR:
-
-.nf
-.ft 3
-.in +0.3i
-# floppy daemon
-floppyd-0 5703/tcp # floppy daemon for X server :0
-floppyd-1 5704/tcp # floppy daemon for X server :1
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
- And insert the following into \fR\&\f(CW\(if/etc/inetd.conf\(is\fR (assuming that you
-have defined a user named floppy in your \fR\&\f(CW\(if/etc/passwd\(is\fR):
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-# floppy daemon
-floppyd-0 stream tcp wait floppy /usr/sbin/floppyd floppyd /dev/fd0
-floppyd-1 stream tcp wait floppy /usr/sbin/floppyd floppyd -x :1 /dev/fd0
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
- Note that you need to supply the X display names for the second
-floppyd. This is because the port is opened by inetd.conf, and hence
-floppyd cannot know its number to interfere the display number.
-.PP
-On the client side, insert the following into your \fR\&\f(CW\(if~/.mtoolsrc\(is\fR
-to define a drive letter accessing floppy drive in your X terminal:
-
-.nf
-.ft 3
-.in +0.3i
-drive x: file="$DISPLAY" remote
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-If your X terminal has more than one drive, you may access the
-additional drives as follows:
-
-.nf
-.ft 3
-.in +0.3i
-drive y: file="$DISPLAY//1" remote
-drive z: file="$DISPLAY//2" remote
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/floppyd_installtest.1 b/man/floppyd_installtest.1
deleted file mode 100644
index 8f6751c..0000000
--- a/man/floppyd_installtest.1
+++ /dev/null
@@ -1,96 +0,0 @@
-.TH floppyd_installtest 1 "21Feb10" mtools-4.0.12
-.SH Name
-floppyd_installtest - tests whether floppyd is installed and running
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p floppyd_installtest"
-.iX "c X terminal"
-.iX "c remote floppy access"
-.PP
-\&\fR\&\f(CWFloppyd_installtest\fR is used to check for the presence of a running
-floppyd daemon. This is useful, if you have a small front-end script to
-mtools, which decides whether to use floppyd or not.
-.PP
-\&\fR\&\f(CWfloppyd_installtest\fR [\fR\&\f(CW-f\fR] Connect-String
-.PP
-If the \fR\&\f(CW-f\fR option is specified, \fR\&\f(CWfloppyd_installtest\fR does a
-full X-Cookie authentication and complains if this does not work.
-.PP
-The connect-String has the format described in the floppyd-section:
-\&\fIhostname\fR\fR\&\f(CW:\fR\fIdisplaynumber\fR[\fR\&\f(CW/\fR\fIbaseport\fR]
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mattrib.1 b/man/mattrib.1
deleted file mode 100644
index 3d54b29..0000000
--- a/man/mattrib.1
+++ /dev/null
@@ -1,133 +0,0 @@
-.TH mattrib 1 "21Feb10" mtools-4.0.12
-.SH Name
-mattrib - change MSDOS file attribute flags
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mattrib"
-.iX "c Changing file attributes"
-.iX "c Hidden files"
-.iX "c Read-only files (changing the attribute)"
-.iX "c System files"
-.iX "c Archive bit"
-.PP
-\&\fR\&\f(CWMattrib\fR is used to change MS-DOS file attribute flags. It has the
-following syntax:
-.PP
-\&\fR\&\f(CWmattrib\fR [\fR\&\f(CW-a|+a\fR] [\fR\&\f(CW-h|+h\fR] [\fR\&\f(CW-r|+r\fR]
-[\fR\&\f(CW-s|+s\fR] [\fR\&\f(CW-/\fR] [\fR\&\f(CW-p\fR] [\fR\&\f(CW-X\fR] \fImsdosfile\fR [ \fImsdosfiles\fR \&... ]
-.PP
-\&\fR\&\f(CWMattrib\fR adds attribute flags to an MS-DOS file (with the
-`\fR\&\f(CW+\fR' operator) or remove attribute flags (with the `\fR\&\f(CW-\fR'
-operator).
-.PP
-\&\fR\&\f(CWMattrib\fR supports the following attribute bits:
-.TP
-\&\fR\&\f(CWa\fR\
-Archive bit. Used by some backup programs to indicate a new file.
-.TP
-\&\fR\&\f(CWr\fR\
-Read-only bit. Used to indicate a read-only file. Files with this bit
-set cannot be erased by \fR\&\f(CWDEL\fR nor modified.
-.TP
-\&\fR\&\f(CWs\fR\
-System bit. Used by MS-DOS to indicate a operating system file.
-.TP
-\&\fR\&\f(CWh\fR\
-Hidden bit. Used to make files hidden from \fR\&\f(CWDIR\fR.
-.PP
-\&\fR\&\f(CWMattrib\fR supports the following command line flags:
-.TP
-\&\fR\&\f(CW/\fR\
-Recursive. Recursively list the attributes of the files in the subdirectories.
-.TP
-\&\fR\&\f(CWX\fR\
-Concise. Prints the attributes without any whitespace padding. If
-neither the "/" option is given, nor the \fImsdosfile\fR contains a
-wildcard, and there is only one MS-DOS file parameter on the command
-line, only the attribute is printed, and not the filename. This option
-is convenient for scripts
-.TP
-\&\fR\&\f(CWp\fR\
-Replay mode. Outputs a series of mformat commands that will reproduce
-the current situation, starting from a situation as left by untarring
-the MS-DOS file system. Commands are only output for attribute settings
-that differ from the default (archive bit set for files, unset for
-directories). This option is intended to be used in addition to
-tar. The \fR\&\f(CWreadonly\fR attribute is not taken into account, as tar can
-set that one itself.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mbadblocks.1 b/man/mbadblocks.1
deleted file mode 100644
index ad94ca6..0000000
--- a/man/mbadblocks.1
+++ /dev/null
@@ -1,98 +0,0 @@
-.TH mbadblocks 1 "21Feb10" mtools-4.0.12
-.SH Name
-mbadblocks - tests a floppy disk, and marks the bad blocks in the FAT
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.PP
-The \fR\&\f(CWmbadblocks\fR command is used to scan an MS-DOS floppy and mark
-its unused bad blocks as bad. It uses the following syntax:
-.PP
-\&\fR\&\f(CWmbadblocks\fR \fIdrive\fR\fR\&\f(CW:\fR
-.iX "p mbadblocks"
-.iX "c Marking blocks as bad"
-.iX "c Bad blocks"
-.iX "c Read errors"
-.PP
-\&\fR\&\f(CWMbadblocks\fR scans an MS-DOS floppy for bad blocks. All unused bad
-blocks are marked as such in the FAT. This is intended to be used right
-after \fR\&\f(CWmformat\fR. It is not intended to salvage bad disks.
-.SH Bugs
-\&\fR\&\f(CWMbadblocks\fR should (but doesn't yet :-( ) also try to salvage bad
-blocks which are in use by reading them repeatedly, and then mark them
-bad.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mcat.1 b/man/mcat.1
deleted file mode 100644
index 903acf7..0000000
--- a/man/mcat.1
+++ /dev/null
@@ -1,103 +0,0 @@
-.TH mcat 1 "21Feb10" mtools-4.0.12
-.SH Name
-mcat - dump raw disk image
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.PP
-The \fR\&\f(CWmcat\fR command is used to copy an entire disk image from or
-to the floppy device. It uses the following syntax:
-.PP
-\&\fR\&\f(CWmcat\fR [\fR\&\f(CW-w\fR] \fIdrive\fR\fR\&\f(CW:\fR
-.iX "p mcat"
-.iX "c Copying an entire disk image"
-.iX "c Disk image"
-.iX "c Floppyd cat"
-.PP
-\&\fR\&\f(CWMcat\fR performs the same task as the Unix \fR\&\f(CWcat\fR command. It
-is included into the mtools package, since \fR\&\f(CWcat\fR cannot access
-remote floppy devices offered by the mtools floppy daemon.
-Now it is possible to create boot floppies remotely.
-.PP
-The default operation is reading. The output is written to stdout.
-.PP
-If the \fR\&\f(CW-w\fR option is specified, mcat reads a disk-image from
-stdin and writes it to the given device.
-\&\fBUse this carefully!\fR Because of the low-level nature of this
-command, it will happily destroy any data written before on the
-disk without warning!
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mcd.1 b/man/mcd.1
deleted file mode 100644
index f455c7e..0000000
--- a/man/mcd.1
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH mcd 1 "21Feb10" mtools-4.0.12
-.SH Name
-mcd - change MSDOS directory
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mcd"
-.iX "c Directory (changing)"
-.iX "c Working directory"
-.iX "c Current working directory (changing the)"
-.iX "c Default directory (changing the)"
-.iX "c Mcwd file"
-.PP
-The \fR\&\f(CWmcd\fR command is used to change the mtools working directory
-on the MS-DOS disk. It uses the following syntax:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-\&\fR\&\f(CWmcd [\fImsdosdirectory\fR\&\f(CW]
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-Without arguments, \fR\&\f(CWmcd\fR reports the current device and working
-directory. Otherwise, \fR\&\f(CWmcd\fR changes the current device and current
-working directory relative to an MS-DOS file system.
-.PP
-The environmental variable \fR\&\f(CWMCWD\fR may be used to locate the file
-where the device and current working directory information is stored.
-The default is \fR\&\f(CW\(if$HOME/.mcwd\(is\fR. Information in this file is ignored
-if the file is more than 6 hours old.
-.PP
-\&\fR\&\f(CWMcd\fR returns 0 on success or 1 on failure.
-.PP
-Unlike MS-DOS versions of \fR\&\f(CWCD\fR, \fR\&\f(CWmcd\fR can be used to change to
-another device. It may be wise to remove old \fR\&\f(CW\(if.mcwd\(is\fR files at logout.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mclasserase.1 b/man/mclasserase.1
deleted file mode 100644
index 8151b96..0000000
--- a/man/mclasserase.1
+++ /dev/null
@@ -1,115 +0,0 @@
-.TH mclasserase 1 "21Feb10" mtools-4.0.12
-.SH Name
-mclasserase - erase memory cards
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mclasserase"
-.iX "c Memory Card"
-.iX "c Physically erase"
-.PP
-The \fR\&\f(CWmclasserase\fR command is used to wipe memory cards by
-overwriting it three times: first with \fR\&\f(CW0xff\fR, then with
-\&\fR\&\f(CW0x00\fR, then with \fR\&\f(CW0xff\fR again. The command uses the following
-syntax:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-\&\fR\&\f(CWmclasserase [\fR\&\f(CW-d] \fImsdosdrive\fR\&\f(CW
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-MS-DOS drive is optional, if none is specified, use \fR\&\f(CWA:\fR. If more than
-one drive are specified, all but the last are ignored.
-.PP
-\&\fR\&\f(CWMclasserase\fR accepts the following command line options:
-.TP
-\&\fR\&\f(CWd\fR\
-Stop after each erase cycle, for testing purposes
-.TP
-\&\fR\&\f(CWp\fR\
-Not yet implemented
-.PP
-\&\fR\&\f(CWMclasserase\fR returns 0 on success or -1 on failure.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
-mclasserase
diff --git a/man/mcopy.1 b/man/mcopy.1
deleted file mode 100644
index 5fc9323..0000000
--- a/man/mcopy.1
+++ /dev/null
@@ -1,183 +0,0 @@
-.TH mcopy 1 "21Feb10" mtools-4.0.12
-.SH Name
-mcopy - copy MSDOS files to/from Unix
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mcopy"
-.iX "c Reading MS-DOS files"
-.iX "c Writing MS-DOS files"
-.iX "c Copying MS-DOS files"
-.iX "c Concatenating MS-DOS files"
-.iX "c Text files"
-.iX "c CR/LF conversions"
-.PP
-The \fR\&\f(CWmcopy\fR command is used to copy MS-DOS files to and from
-Unix. It uses the following syntax:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-\&\fR\&\f(CWmcopy [\fR\&\f(CW-bspanvmQT] [\fR\&\f(CW-D \fIclash_option\fR\&\f(CW] \fIsourcefile\fR\&\f(CW \fItargetfile\fR\&\f(CW
-\&\fR\&\f(CWmcopy [\fR\&\f(CW-bspanvmQT] [\fR\&\f(CW-D \fIclash_option\fR\&\f(CW] \fIsourcefile\fR\&\f(CW [ \fIsourcefiles\fR\&\f(CW\&... ] \fItargetdirectory\fR\&\f(CW
-\&\fR\&\f(CWmcopy [\fR\&\f(CW-tnvm] \fIMSDOSsourcefile\fR\&\f(CW
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-\&\fR\&\f(CWMcopy\fR copies the specified file to the named file, or copies
-multiple files to the named directory. The source and target can be
-either MS-DOS or Unix files.
-.PP
-The use of a drive letter designation on the MS-DOS files, 'a:' for
-example, determines the direction of the transfer. A missing drive
-designation implies a Unix file whose path starts in the current
-directory. If a source drive letter is specified with no attached file
-name (e.g. \fR\&\f(CWmcopy a: .\fR), all files are copied from that drive.
-.PP
-If only a single, MS-DOS source parameter is provided (e.g. "mcopy
-a:foo.exe"), an implied destination of the current directory
-(`\fR\&\f(CW.\fR') is assumed.
-.PP
-A filename of `\fR\&\f(CW-\fR' means standard input or standard output, depending
-on its position on the command line.
-.PP
-\&\fR\&\f(CWMcopy\fR accepts the following command line options:
-.TP
-\&\fR\&\f(CWt\fR\
-Text file transfer. Mcopy translates incoming carriage return/line
-feeds to line feeds when copying from MS-DOS to Unix, and vice-versa when
-copying from Unix to MS-DOS.
-.TP
-\&\fR\&\f(CWb\fR\
-Batch mode. Optimized for huge recursive copies, but less secure if a
-crash happens during the copy.
-.TP
-\&\fR\&\f(CWs\fR\
-Recursive copy. Also copies directories and their contents
-.TP
-\&\fR\&\f(CWp\fR\
-Preserves the attributes of the copied files
-.TP
-\&\fR\&\f(CWQ\fR\
-When mcopying multiple files, quits as soon as one copy fails (for
-example due to lacking storage space on the target disk)
-.TP
-\&\fR\&\f(CWa\fR\
-Text (ASCII) file transfer. \fR\&\f(CWASCII\fR translates incoming carriage
-return/line feeds to line feeds.
-.TP
-\&\fR\&\f(CWT\fR\
-Text (ASCII) file transfer with character set conversion. Differs from
-\&\fR\&\f(CW-a\fR in the \fR\&\f(CWASCII\fR also translates incoming PC-8 characters
-to ISO-8859-1 equivalents as far as possible. When reading DOS files,
-untranslatable characters are replaced by '\fR\&\f(CW#\fR'; when writing DOS files,
-untranslatable characters are replaced by '\fR\&\f(CW.\fR'.
-.TP
-\&\fR\&\f(CWn\fR\
-No confirmation when overwriting Unix files. \fR\&\f(CWASCII\fR doesn't warn
-the user when overwriting an existing Unix file. If the target file already exists,
-and the \fR\&\f(CW-n\fR option is not in effect, \fR\&\f(CWmcopy\fR asks whether to
-overwrite the file or to rename the new file (\(ifname clashes\(is) for
-details). In order to switch off confirmation for DOS files, use \fR\&\f(CW-o\fR.
-.TP
-\&\fR\&\f(CWm\fR\
-Preserve the file modification time.
-.TP
-\&\fR\&\f(CWv\fR\
-Verbose. Displays the name of each file as it is copied.
-.PP
-.SH Bugs
-Unlike MS-DOS, the '+' operator (append) from MS-DOS is not
-supported. However, you may use \fR\&\f(CWmtype\fR to produce the same effect:
-
-.nf
-.ft 3
-.in +0.3i
-mtype a:file1 a:file2 a:file3 >unixfile
-mtype a:file1 a:file2 a:file3 | mcopy - a:msdosfile
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mdel.1 b/man/mdel.1
deleted file mode 100644
index 96e945f..0000000
--- a/man/mdel.1
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH mdel 1 "21Feb10" mtools-4.0.12
-.SH Name
-mdel - delete an MSDOS file
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mdel"
-.iX "c removing MS-DOS files"
-.iX "c erasing MS-DOS files"
-.iX "c deleting MS-DOS files"
-.PP
-The \fR\&\f(CWmdel\fR command is used to delete an MS-DOS file. Its syntax
-is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmdel\fR [\fR\&\f(CW-v\fR] \fImsdosfile\fR [ \fImsdosfiles\fR \&... ]
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMdel\fR deletes files on an MS-DOS file system.
-.PP
-\&\fR\&\f(CWMdel\fR asks for verification prior to removing a read-only file.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mdeltree.1 b/man/mdeltree.1
deleted file mode 100644
index 017b3be..0000000
--- a/man/mdeltree.1
+++ /dev/null
@@ -1,100 +0,0 @@
-.TH mdeltree 1 "21Feb10" mtools-4.0.12
-.SH Name
-mdeltree - recursively delete an MSDOS directory and its contents
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mdeltree"
-.iX "c removing an MS-DOS directory recursively"
-.iX "c erasing an MS-DOS directory recursively"
-.iX "c deleting an MS-DOS directory recursively"
-.iX "c recursively removing an MS-DOS directory"
-.PP
-The \fR\&\f(CWmdeltree\fR command is used to delete an MS-DOS file. Its syntax
-is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmdeltree\fR [\fR\&\f(CW-v\fR] \fImsdosdirectory\fR [\fImsdosdirectories\fR\&...]
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMdeltree\fR removes a directory and all the files and subdirectories
-it contains from an MS-DOS file system. An error occurs if the directory
-to be removed does not exist.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mdir.1 b/man/mdir.1
deleted file mode 100644
index e752d57..0000000
--- a/man/mdir.1
+++ /dev/null
@@ -1,121 +0,0 @@
-.TH mdir 1 "21Feb10" mtools-4.0.12
-.SH Name
-mdir - display an MSDOS directory
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mdir"
-.iX "c Read-only files (listing them)"
-.iX "c Listing a directory"
-.iX "c Directory listing"
-.PP
-The \fR\&\f(CWmdir\fR command is used to display an MS-DOS directory. Its
-syntax is:
-.PP
-\&\fR\&\f(CWmdir\fR [\fR\&\f(CW-/\fR] [\fR\&\f(CW-f\fR] [\fR\&\f(CW-w\fR] [\fR\&\f(CW-a\fR] [\fR\&\f(CW-b\fR] \fImsdosfile\fR [ \fImsdosfiles\fR\&...]
-.PP
-\&\fR\&\f(CWMdir\fR
-displays the contents of MS-DOS directories, or the entries for some
-MS-DOS files.
-.PP
-\&\fR\&\f(CWMdir\fR supports the following command line options:
-.TP
-\&\fR\&\f(CW/\fR\
-Recursive output, just like MS-DOS' \fR\&\f(CW-s\fR option
-.TP
-\&\fR\&\f(CWw\fR\
-Wide output. With this option, \fR\&\f(CWmdir\fR prints the filenames across
-the page without displaying the file size or creation date.
-.TP
-\&\fR\&\f(CWa\fR\
-Also list hidden files.
-.TP
-\&\fR\&\f(CWf\fR\
-Fast. Do not try to find out free space. On larger disks, finding out
-the amount of free space takes up some non trivial amount of time, as
-the whole FAT must be read in and scanned. The \fR\&\f(CW-f\fR flag bypasses
-this step. This flag is not needed on FAT32 file systems, which store
-the size explicitly.
-.TP
-\&\fR\&\f(CWb\fR\
-Concise listing. Lists each directory name or filename, one per line
-(including the filename extension). This switch displays no heading
-information and no summary. Only a newline separated list of pathnames
-is displayed.
-.PP
-An error occurs if a component of the path is not a directory.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mdu.1 b/man/mdu.1
deleted file mode 100644
index c5ebc9a..0000000
--- a/man/mdu.1
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH mdu 1 "21Feb10" mtools-4.0.12
-.SH Name
-mdu - display the amount of space occupied by an MSDOS directory
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mdu"
-.iX "c Space occupied by directories and files"
-.iX "c du"
-.iX "c Listing space occupied by directories and files"
-.iX "c Occupation of space by directories and files"
-.PP
-\&\fR\&\f(CWMdu\fR is used to list the space occupied by a directory, its
-subdirectories and its files. It is similar to the \fR\&\f(CWdu\fR command on
-Unix. The unit used are clusters. Use the minfo command to find out
-the cluster size.
-.PP
-\&\fR\&\f(CWmdu\fR [\fR\&\f(CW-a\fR] [ \fImsdosfiles\fR \&... ]
-.TP
-\&\fR\&\f(CWa\fR\
-All files. List also the space occupied for individual files.
-.TP
-\&\fR\&\f(CWs\fR\
-Only list the total space, don't give details for each subdirectory.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mformat.1 b/man/mformat.1
deleted file mode 100644
index b20375f..0000000
--- a/man/mformat.1
+++ /dev/null
@@ -1,282 +0,0 @@
-.TH mformat 1 "21Feb10" mtools-4.0.12
-.SH Name
-mformat - add an MSDOS filesystem to a low-level formatted floppy disk
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mformat"
-.iX "c Initializing disks"
-.iX "c Formatting disks"
-.iX "c File system creation"
-.PP
-The \fR\&\f(CWmformat\fR command is used to add an MS-DOS file system to a
-low-level formatted diskette. Its syntax is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmformat\fR [\fR\&\f(CW-t\fR \fIcylinders\fR] [\fR\&\f(CW-h\fR \fIheads\fR] [\fR\&\f(CW-s\fR \fIsectors\fR]
- [\fR\&\f(CW-f\fR \fIsize\fR] [\fR\&\f(CW-1\fR] [\fR\&\f(CW-4\fR] [\fR\&\f(CW-8\fR]
- [\fR\&\f(CW-v\fR \fIvolume_label\fR]
- [\fR\&\f(CW-F\fR] [\fR\&\f(CW-S\fR \fIsizecode\fR] [\fR\&\f(CW-X\fR]
- [\fR\&\f(CW-2\fR \fIsectors_on_track_0\fR] [\fR\&\f(CW-3\fR]
- [\fR\&\f(CW-0\fR \fIrate_on_track_0\fR] [\fR\&\f(CW-A\fR \fIrate_on_other_tracks\fR]
- [\fR\&\f(CW-M\fR \fIsoftware_sector_size\fR]
- [\fR\&\f(CW-N\fR \fIserial_number\fR] [\fR\&\f(CW-a\fR]
- [\fR\&\f(CW-C\fR] [\fR\&\f(CW-H\fR \fIhidden_sectors\fR] [\fR\&\f(CW-I\fR \fIfsVersion\fR]
- [\fR\&\f(CW-r\fR \fIroot_sectors\fR] [\fR\&\f(CW-L\fR \fIfat_len\fR]
- [\fR\&\f(CW-B\fR \fIboot_sector\fR] [\fR\&\f(CW-k\fR]
- [\fR\&\f(CW-m\fR \fImedia_descriptor\fR]
- \fIdrive:\fR
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMformat\fR adds a minimal MS-DOS file system (boot sector, FAT, and
-root directory) to a diskette that has already been formatted by a Unix
-low-level format.
-.PP
-The following options are supported: (The S, 2, 1 and M options may not
-exist if this copy of mtools has been compiled without the USE_2M
-option)
-.PP
-The following options are the same as for MS-DOS's format command:
-.PP
-.SH Options
-.TP
-\&\fR\&\f(CWv\fR\
-Specifies the volume label. A volume label identifies the disk and can
-be a maximum of 11 characters. If you omit the -v switch, mlabel will
-assign no label to the disk.
-.TP
-\&\fR\&\f(CWf\fR\
-Specifies the size of the DOS file system to format. Only a certain
-number of predefined sizes are supported by this flag; for others use
-the -h/-t/-s flags. The following sizes are supported:
-.RS
-.TP
-160\
-160K, single-sided, 8 sectors per track, 40 cylinders (for 5 1/4 DD)
-.TP
-180\
-160K, single-sided, 9 sectors per track, 40 cylinders (for 5 1/4 DD)
-.TP
-320\
-320K, double-sided, 8 sectors per track, 40 cylinders (for 5 1/4 DD)
-.TP
-360\
-360K, double-sided, 9 sectors per track, 40 cylinders (for 5 1/4 DD)
-.TP
-720\
-720K, double-sided, 9 sectors per track, 80 cylinders (for 3 1/2 DD)
-.TP
-1200\
-1200K, double-sided, 15 sectors per track, 80 cylinders (for 5 1/4 HD)
-.TP
-1440\
-1440K, double-sided, 18 sectors per track, 80 cylinders (for 3 1/2 HD)
-.TP
-2880\
-2880K, double-sided, 36 sectors per track, 80 cylinders (for 3 1/2 ED)
-.RE
-.TP
-\&\fR\&\f(CWt\fR\
-Specifies the number of tracks on the disk.
-.TP
-\&\fR\&\f(CWh\fR\
-The number of heads (sides).
-.TP
-\&\fR\&\f(CWn\fR\
-Specifies the number of sectors per track. If the 2m option is given,
-number of 512-byte sector equivalents on generic tracks (i.e. not head 0
-track 0). If the 2m option is not given, number of physical sectors per
-track (which may be bigger than 512 bytes).
-.TP
-\&\fR\&\f(CW1\fR\
-Formats a single side (equivalent to -h 1)
-.TP
-\&\fR\&\f(CW4\fR\
-Formats a 360K double-sided disk (equivalent to -f 360). When used
-together with -the 1 switch, this switch formats a 180K disk
-.TP
-\&\fR\&\f(CW8\fR\
-Formats a disk with 8 sectors per track.
-.PP
-MS-DOS format's \fR\&\f(CWq\fR, \fR\&\f(CWu\fR and \fR\&\f(CWb\fR options are not
-supported, and \fR\&\f(CWs\fR has a different meaning.
-.PP
-The following options are specific to mtools:
-.IP
-.TP
-\&\fR\&\f(CWF\fR\
-Format the partition as FAT32.
-.TP
-\&\fR\&\f(CWS\fR\
-The size code. The size of the sector is 2 ^ (sizecode + 7).
-.TP
-\&\fR\&\f(CWX\fR\
-formats the disk as an XDF disk. See section XDF, for more details. The disk
-has first to be low-level formatted using the xdfcopy utility included
-in the fdutils package. XDF disks are used for instance for OS/2 install
-disks.
-.TP
-\&\fR\&\f(CW2\fR\
-2m format. The parameter to this option describes the number of
-sectors on track 0, head 0. This option is recommended for sectors
-bigger than normal.
-.TP
-\&\fR\&\f(CW3\fR\
-don't use a 2m format, even if the current geometry of the disk is a 2m
-geometry.
-.TP
-\&\fR\&\f(CW0\fR\
-Data transfer rate on track 0
-.TP
-\&\fR\&\f(CWA\fR\
-Data transfer rate on tracks other than 0
-.TP
-\&\fR\&\f(CWM\fR\
-software sector size. This parameter describes the sector size in bytes used
-by the MS-DOS file system. By default it is the physical sector size.
-.TP
-\&\fR\&\f(CWN\fR\
-Uses the requested serial number, instead of generating one
-automatically
-.TP
-\&\fR\&\f(CWa\fR\
-If this option is given, an Atari style serial number is generated.
-Ataris store their serial number in the OEM label.
-.TP
-\&\fR\&\f(CWC\fR\
-creates the disk image file to install the MS-DOS file system on
-it. Obviously, this is useless on physical devices such as floppies
-and hard disk partitions, but is interesting for image files.
-.TP
-\&\fR\&\f(CWH\fR\
-number of hidden sectors. This parameter is useful for formatting hard
-disk partition, which are not aligned on track boundaries (i.e. first
-head of first track doesn't belong to the partition, but contains a
-partition table). In that case the number of hidden sectors is in
-general the number of sectors per cylinder. This is untested.
-.TP
-\&\fR\&\f(CWI\fR\
-Sets the fsVersion id when formatting a FAT32 drive. In order to find
-this out, run minfo on an existing FAT32 drive, and mail me about it, so
-I can include the correct value in future versions of mtools.
-.TP
-\&\fR\&\f(CWc\fR\
-Sets the size of a cluster (in sectors). If this cluster size would
-generate a FAT that too big for its number of bits, mtools automatically
-increases the cluster size, until the FAT is small enough.
-.TP
-\&\fR\&\f(CWd\fR\
-Sets the number of FAT copies. Default is 2. This setting can also be
-specified using the \fR\&\f(CWMTOOLS_NFATS\fR environment variable.
-.TP
-\&\fR\&\f(CWr\fR\
-Sets the size of the root directory (in sectors). Only applicable to 12
-and 16 bit FATs. This setting can also be specified using the
-\&\fR\&\f(CWMTOOLS_DIR_LEN\fR environment variable.
-.TP
-\&\fR\&\f(CWL\fR\
-Sets the length of the FAT.
-.TP
-\&\fR\&\f(CWB\fR\
-Use the boot sector stored in the given file or device, instead of using
-its own. Only the geometry fields are updated to match the target disks
-parameters.
-.TP
-\&\fR\&\f(CWk\fR\
-Keep the existing boot sector as much as possible. Only the geometry
-fields and other similar file system data are updated to match the target
-disks parameters.
-.TP
-\&\fR\&\f(CWm\fR\
-Use a non-standard media descriptor byte for this disk. The media
-descriptor is stored at position 21 of the boot sector, and as first
-byte in each FAT copy. Using this option may confuse DOS or older mtools
-version, and may make the disk unreadable. Only use if you know what you
-are doing.
-.PP
-To format a diskette at a density other than the default, you must supply
-(at least) those command line parameters that are different from the
-default.
-.PP
-\&\fR\&\f(CWMformat\fR returns 0 on success or 1 on failure.
-.PP
-It doesn't record bad block information to the Fat, use
-\&\fR\&\f(CWmbadblocks\fR for that.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/minfo.1 b/man/minfo.1
deleted file mode 100644
index fb7686b..0000000
--- a/man/minfo.1
+++ /dev/null
@@ -1,101 +0,0 @@
-.TH minfo 1 "21Feb10" mtools-4.0.12
-.SH Name
-minfo - print the parameters of a MSDOS filesystem
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p minfo"
-.iX "c mformat parameters"
-.iX "c getting parameters of a MS-DOS file system"
-.PP
-The \fR\&\f(CWminfo\fR command prints the parameters of a MS-DOS file system, such
-as number of sectors, heads and cylinders. It also prints an mformat
-command line which can be used to create a similar MS-DOS file system on
-another media. However, this doesn't work with 2m or XDF media, and
-with MS-DOS 1.0 file systems
-.ft I
-.nf
-\&\fR\&\f(CWminfo\fR \fIdrive\fR:
-.fi
-.ft R
-
-.PP
-Mlabel supports the following option:
-.TP
-\&\fR\&\f(CWv\fR\
-Prints a hexdump of the boot sector, in addition to the other information
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mkmanifest.1 b/man/mkmanifest.1
deleted file mode 100644
index a2df254..0000000
--- a/man/mkmanifest.1
+++ /dev/null
@@ -1,181 +0,0 @@
-.TH mkmanifest 1 "21Feb10" mtools-4.0.12
-.SH Name
-mkmanifest - makes list of file names and their DOS 8+3 equivalent
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mkmanifest"
-.iX "c packing list"
-.PP
-The \fR\&\f(CWmkmanifest\fR command is used to create a shell script (packing
-list) to restore Unix filenames. Its syntax is:
-.PP
-\&\fR\&\f(CWmkmanifest\fR [ \fIfiles\fR ]
-.PP
-\&\fR\&\f(CWMkmanifest\fR creates a shell script that aids in the restoration of
-Unix filenames that got clobbered by the MS-DOS filename restrictions.
-MS-DOS filenames are restricted to 8 character names, 3 character
-extensions, upper case only, no device names, and no illegal characters.
-.PP
-The mkmanifest program is compatible with the methods used in
-\&\fR\&\f(CWpcomm, arc,\fR and \fR\&\f(CWmtools\fR to change perfectly good Unix
-filenames to fit the MS-DOS restrictions. This command is only useful if
-the target system which will read the diskette cannot handle VFAT long
-names.
-.PP
-.SH Example
-You want to copy the following Unix files to a MS-DOS diskette (using the
-\&\fR\&\f(CWmcopy\fR command).
-.PP
-
-.nf
-.ft 3
-.in +0.3i
- very_long_name
- 2.many.dots
- illegal:
- good.c
- prn.dev
- Capital
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-\&\fR\&\f(CWASCII\fR
-converts the names to:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
- very_lon
- 2xmany.dot
- illegalx
- good.c
- xprn.dev
- capital
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The command:
-
-.nf
-.ft 3
-.in +0.3i
-mkmanifest very_long_name 2.many.dots illegal: good.c prn.dev Capital >manifest
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRwould produce the following:
-
-.nf
-.ft 3
-.in +0.3i
- mv very_lon very_long_name
- mv 2xmany.dot 2.many.dots
- mv illegalx illegal:
- mv xprn.dev prn.dev
- mv capital Capital
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-Notice that "good.c" did not require any conversion, so it did not
-appear in the output.
-.PP
-Suppose I've copied these files from the diskette to another Unix
-system, and I now want the files back to their original names. If the
-file "manifest" (the output captured above) was sent along with those
-files, it could be used to convert the filenames.
-.PP
-.SH Bugs
-.PP
-The short names generated by \fR\&\f(CWmkmanifest\fR follow the old convention
-(from mtools-2.0.7) and not the one from Windows 95 and mtools-3.0.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mlabel.1 b/man/mlabel.1
deleted file mode 100644
index 6e2ec17..0000000
--- a/man/mlabel.1
+++ /dev/null
@@ -1,117 +0,0 @@
-.TH mlabel 1 "21Feb10" mtools-4.0.12
-.SH Name
-mlabel - make an MSDOS volume label
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mlabel"
-.iX "c Labeling a disk"
-.iX "c Disk label"
-.PP
-The \fR\&\f(CWmlabel\fR command adds a volume label to a disk. Its syntax is:
-.ft I
-.nf
-\&\fR\&\f(CWmlabel\fR [\fR\&\f(CW-vcsn\fR] [\fR\&\f(CW-N\fR \fIserial\fR] \fIdrive\fR:[\fInew_label\fR]
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMlabel\fR displays the current volume label, if present. If
-\&\fInew_label\fR is not given, and if neither the \fR\&\f(CWc\fR nor the
-\&\fR\&\f(CWs\fR options are set, it prompts the user for a new volume label.
-To delete an existing volume label, press return at the prompt.
-.PP
-Reasonable care is taken to create a valid MS-DOS volume label. If an
-invalid label is specified, \fR\&\f(CWmlabel\fR changes the label (and
-displays the new label if the verbose mode is set). \fR\&\f(CWMlabel\fR
-returns 0 on success or 1 on failure.
-.PP
-Mlabel supports the following options:
-.TP
-\&\fR\&\f(CWc\fR\
-Clears an existing label, without prompting the user
-.TP
-\&\fR\&\f(CWs\fR\
-Shows the existing label, without prompting the user.
-.TP
-\&\fR\&\f(CWn\ \fR\
-Assigns a new (random) serial number to the disk
-.TP
-\&\fR\&\f(CWN\ \fIserial\fR\&\f(CW\fR\
-Sets the supplied serial number. The serial number should be supplied as
-an 8 digit hexadecimal number, without spaces
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mmd.1 b/man/mmd.1
deleted file mode 100644
index a5c2f06..0000000
--- a/man/mmd.1
+++ /dev/null
@@ -1,95 +0,0 @@
-.TH mmd 1 "21Feb10" mtools-4.0.12
-.SH Name
-mmd - make an MSDOS subdirectory
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mmd"
-.iX "c Making a directory"
-.iX "c Creating a directory"
-.iX "c Directory creation"
-.iX "c Subdirectory creation"
-.PP
-The \fR\&\f(CWmmd\fR command is used to make an MS-DOS subdirectory. Its
-syntax is:
-.PP
-\&\fR\&\f(CWmmd\fR [\fR\&\f(CW-D\fR \fIclash_option\fR] \fImsdosdirectory\fR [
-\&\fImsdosdirectories\fR\&... ]
-.PP
-\&\fR\&\f(CWMmd\fR makes a new directory on an MS-DOS file system. An error occurs
-if the directory already exists.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mmount.1 b/man/mmount.1
deleted file mode 100644
index e0afa64..0000000
--- a/man/mmount.1
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH mmount 1 "21Feb10" mtools-4.0.12
-.SH Name
-mmount - mount an MSDOS disk
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mmount"
-.iX "c Linux enhancements (mmount)"
-.iX "c Mounting a disk"
-.iX "c High capacity formats, mounting"
-.PP
-The \fR\&\f(CWmmount\fR command is used to mount an MS-DOS disk. It is only
-available on Linux, as it is only useful if the OS kernel allows to
-configure the disk geometry. Its syntax is:
-.PP
-\&\fR\&\f(CWmmount\fR \fImsdosdrive\fR [\fImountargs\fR]
-.PP
-\&\fR\&\f(CWMmount\fR
-reads the boot sector of an MS-DOS disk, configures the drive geometry,
-and finally mounts it passing
-\&\fR\&\f(CWmountargs\fR to \fR\&\f(CWmount. \fR
-If no mount arguments are specified, the name of the device is
-used. If the disk is write protected, it is automatically mounted read
-only.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mmove.1 b/man/mmove.1
deleted file mode 100644
index 775ead0..0000000
--- a/man/mmove.1
+++ /dev/null
@@ -1,101 +0,0 @@
-.TH mmove 1 "21Feb10" mtools-4.0.12
-.SH Name
-mmove - move or rename an MSDOS file or subdirectory
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mmove"
-.iX "c Moving files (mmove)"
-.iX "c Renaming files (mmove)"
-.PP
-The \fR\&\f(CWmmove\fR command is used to moves or renames an existing MS-DOS
-file or subdirectory.
-.ft I
-.nf
-\&\fR\&\f(CWmmove\fR [\fR\&\f(CW-v\fR] [\fR\&\f(CW-D\fR \fIclash_option\fR] \fIsourcefile\fR \fItargetfile\fR
-\&\fR\&\f(CWmmove\fR [\fR\&\f(CW-v\fR] [\fR\&\f(CW-D\fR \fIclash_option\fR] \fIsourcefile\fR [ \fIsourcefiles\fR\&... ] \fItargetdirectory\fR
-.fi
-.ft R
-
-\&\fR\&\f(CWMmove\fR moves or renames an existing MS-DOS file or
-subdirectory. Unlike the MS-DOS version of \fR\&\f(CWMOVE\fR, \fR\&\f(CWmmove\fR is
-able to move subdirectories. Files or directories can only be moved
-within one file system. Data cannot be moved from MS-DOS to Unix or
-vice-versa. If you omit the drive letter from the target file or
-directory, the same letter as for the source is assumed. If you omit
-the drive letter from all parameters, drive a: is assumed by default.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mpartition.1 b/man/mpartition.1
deleted file mode 100644
index faacd67..0000000
--- a/man/mpartition.1
+++ /dev/null
@@ -1,187 +0,0 @@
-.TH mpartition 1 "21Feb10" mtools-4.0.12
-.SH Name
-mpartition - partition an MSDOS hard disk
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mpartition"
-.iX "c partitions (creating)"
-.iX "c Zip disks (partitioning them)"
-.iX "c Jaz disks (partitioning them)"
-.PP
-The \fR\&\f(CWmpartition\fR command is used to create MS-DOS file systems as
-partitions. This is intended to be used on non-Linux systems,
-i.e. systems where fdisk and easy access to SCSI devices are not
-available. This command only works on drives whose partition variable
-is set.
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmpartition\fR \fR\&\f(CW-p\fR \fIdrive\fR
-\&\fR\&\f(CWmpartition\fR \fR\&\f(CW-r\fR \fIdrive\fR
-\&\fR\&\f(CWmpartition\fR \fR\&\f(CW-I\fR [\fR\&\f(CW-B\fR \fIbootSector\fR] \fIdrive\fR
-\&\fR\&\f(CWmpartition\fR \fR\&\f(CW-a\fR \fIdrive\fR
-\&\fR\&\f(CWmpartition\fR \fR\&\f(CW-d\fR \fIdrive\fR
-\&\fR\&\f(CWmpartition\fR \fR\&\f(CW-c\fR [\fR\&\f(CW-s\fR \fIsectors\fR] [\fR\&\f(CW-h\fR \fIheads\fR]
-[\fR\&\f(CW-t\fR \fIcylinders\fR] [\fR\&\f(CW-v\fR [\fR\&\f(CW-T\fR \fItype\fR] [\fR\&\f(CW-b\fR
-\&\fIbegin\fR] [\fR\&\f(CW-l\fR length] [\fR\&\f(CW-f\fR]
-\&\&
-.fi
-.ft R
-
-.PP
-Mpartition supports the following operations:
-.TP
-\&\fR\&\f(CWp\fR\
-Prints a command line to recreate the partition for the drive. Nothing
-is printed if the partition for the drive is not defined, or an
-inconsistency has been detected. If verbose (\fR\&\f(CW-v\fR) is also set,
-prints the current partition table.
-.TP
-\&\fR\&\f(CWr\fR\
-Removes the partition described by \fIdrive\fR.
-.TP
-\&\fR\&\f(CWI\fR\
-Initializes the partition table, and removes all partitions.
-.TP
-\&\fR\&\f(CWc\fR\
-Creates the partition described by \fIdrive\fR.
-.TP
-\&\fR\&\f(CWa\fR\
-"Activates" the partition, i.e. makes it bootable. Only one partition
-can be bootable at a time.
-.TP
-\&\fR\&\f(CWd\fR\
-"Deactivates" the partition, i.e. makes it unbootable.
-.PP
-If no operation is given, the current settings are printed.
-.PP
-For partition creations, the following options are available:
-.TP
-\&\fR\&\f(CWs\ \fIsectors\fR\&\f(CW\fR\
-The number of sectors per track of the partition (which is also the
-number of sectors per track for the whole drive).
-.TP
-\&\fR\&\f(CWh\ \fIheads\fR\&\f(CW\fR\
-The number of heads of the partition (which is also the number of heads
-for the whole drive). By default, the geometry information (number of
-sectors and heads) is figured out from neighboring partition table
-entries, or guessed from the size.
-.TP
-\&\fR\&\f(CWt\ \fIcylinders\fR\&\f(CW\fR\
-The number of cylinders of the partition (not the number of cylinders of
-the whole drive.
-.TP
-\&\fR\&\f(CWb\ \fIbegin\fR\&\f(CW\fR\
-The starting offset of the partition, expressed in sectors. If begin is
-not given, mpartition lets the partition begin at the start of the disk
-(partition number 1), or immediately after the end of the previous
-partition.
-.TP
-\&\fR\&\f(CWl\ \fIlength\fR\&\f(CW\fR\
-The size (length) of the partition, expressed in sectors. If end is not
-given, mpartition figures out the size from the number of sectors, heads
-and cylinders. If these are not given either, it gives the partition
-the biggest possible size, considering disk size and start of the next
-partition.
-.PP
-The following option is available for all operation which modify the
-partition table:
-.TP
-\&\fR\&\f(CWf\fR\
-Usually, before writing back any changes to the partition, mpartition
-performs certain consistency checks, such as checking for overlaps and
-proper alignment of the partitions. If any of these checks fails, the
-partition table is not changes. The \fR\&\f(CW-f\fR allows you to override
-these safeguards.
-.PP
-The following options are available for all operations:
-.TP
-\&\fR\&\f(CWv\fR\
-Together with \fR\&\f(CW-p\fR prints the partition table as it is now (no
-change operation), or as it is after it is modified.
-.TP
-\&\fR\&\f(CWvv\fR\
-If the verbosity flag is given twice, mpartition will print out a
-hexdump of the partition table when reading it from and writing it to
-the device.
-.PP
-The following option is available for partition table initialization:
-.TP
-\&\fR\&\f(CWB\ \fIbootSector\fR\&\f(CW\fR\
-Reads the template master boot record from file \fIbootSector\fR.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mrd.1 b/man/mrd.1
deleted file mode 100644
index 98fe178..0000000
--- a/man/mrd.1
+++ /dev/null
@@ -1,100 +0,0 @@
-.TH mrd 1 "21Feb10" mtools-4.0.12
-.SH Name
-mrd - remove an MSDOS subdirectory
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mrd"
-.iX "c Removing a directory"
-.iX "c Erasing a directory"
-.iX "c Deleting a directory"
-.iX "c Directory removing"
-.iX "c Subdirectory removing"
-.PP
-The \fR\&\f(CWmrd\fR command is used to remove an MS-DOS subdirectory. Its
-syntax is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmrd\fR [\fR\&\f(CW-v\fR] \fImsdosdirectory\fR [ \fImsdosdirectories\fR\&... ]
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMrd\fR removes a directory from an MS-DOS file system. An error occurs
-if the directory does not exist or is not empty.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mren.1 b/man/mren.1
deleted file mode 100644
index 5c7e73c..0000000
--- a/man/mren.1
+++ /dev/null
@@ -1,107 +0,0 @@
-.TH mren 1 "21Feb10" mtools-4.0.12
-.SH Name
-mren - rename an existing MSDOS file
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mren"
-.iX "c Renaming files (mren)"
-.iX "c Moving files (mren)"
-.PP
-The \fR\&\f(CWmren\fR command is used to rename or move an existing MS-DOS
-file or subdirectory. Its syntax is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmren\fR [\fR\&\f(CW-voOsSrRA\fR] \fIsourcefile\fR \fItargetfile\fR
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMren\fR
-renames an existing file on an MS-DOS file system.
-.PP
-In verbose mode, \fR\&\f(CWMren\fR displays the new filename if the name
-supplied is invalid.
-.PP
-If the first syntax is used (only one source file), and if the target
-name doesn't contain any slashes or colons, the file (or subdirectory)
-is renamed in the same directory, instead of being moved to the current
-\&\fR\&\f(CWmcd\fR directory as would be the case with \fR\&\f(CWmmove\fR. Unlike the
-MS-DOS version of \fR\&\f(CWREN\fR, \fR\&\f(CWmren\fR can be used to rename
-directories.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mshowfat.1 b/man/mshowfat.1
deleted file mode 100644
index 9a989b8..0000000
--- a/man/mshowfat.1
+++ /dev/null
@@ -1,94 +0,0 @@
-.TH mshowfat 1 "21Feb10" mtools-4.0.12
-.SH Name
-mshowfat - shows FAT clusters allocated to file
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mshowfat"
-.iX "c Clusters of a file"
-.iX "c Fat"
-.PP
-The \fR\&\f(CWmshowfat\fR command is used to display the FAT entries for a
-file. Syntax:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CW$ mshowfat files\fR
-.fi
-.ft R
-
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mtools.1 b/man/mtools.1
deleted file mode 100644
index c735082..0000000
--- a/man/mtools.1
+++ /dev/null
@@ -1,555 +0,0 @@
-'\" t
-.TH mtools 1 "21Feb10" mtools-4.0.12
-.SH Name
-mtools - utilities to access DOS disks in Unix.
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.PP
-.SH Introduction
-Mtools is a collection of tools to allow Unix systems to manipulate
-MS-DOS files: read, write, and move around files on an MS-DOS
-file system (typically a floppy disk). Where reasonable, each program
-attempts to emulate the MS-DOS equivalent command. However,
-unnecessary restrictions and oddities of DOS are not emulated. For
-instance, it is possible to move subdirectories from one subdirectory
-to another.
-.PP
-Mtools is sufficient to give access to MS-DOS file systems. For
-instance, commands such as \fR\&\f(CWmdir a:\fR work on the \fR\&\f(CWa:\fR floppy
-without any preliminary mounting or initialization (assuming the default
-\&\fR\&\f(CW\(if/etc/mtools.conf\(is\fR works on your machine). With mtools, one can
-change floppies too without unmounting and mounting.
-.PP
-.SH Where\ to\ get\ mtools
-.iX "c bugs"
-.iX "c ALPHA patches"
-.iX "c patches"
-.iX "c diffs"
-.iX "c mailing list"
-.PP
-Mtools can be found at the following places (and their mirrors):
-
-.nf
-.ft 3
-.in +0.3i
-http://ftp.gnu.org/gnu/mtools/mtools-4.0.12.tar.gz
-http://mtools.linux.lu/mtools-4.0.12.tar.gz
-ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.12.tar.gz
-ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.12.tar.gz
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-Before reporting a bug, make sure that it has not yet been fixed in the
-Alpha patches which can be found at:
-
-.nf
-.ft 3
-.in +0.3i
-http://ftp.gnu.org/gnu/mtools/
-http://mtools.linux.lu/
-ftp://www.tux.org/pub/knaff/mtools
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-These patches are named
-\&\fR\&\f(CWmtools-\fR\fIversion\fR\fR\&\f(CW-\fR\fIddmm\fR\fR\&\f(CW.taz\fR, where version
-stands for the base version, \fIdd\fR for the day and \fImm\fR for the
-month. Due to a lack of space, I usually leave only the most recent
-patch.
-.PP
-There is an mtools mailing list at mtools @ tux.org . Please
-send all bug reports to this list. You may subscribe to the list by
-sending a message with 'subscribe mtools @ tux.org' in its
-body to majordomo @ tux.org . (N.B. Please remove the spaces
-around the "@" both times. I left them there in order to fool
-spambots.) Announcements of new mtools versions will also be sent to
-the list, in addition to the Linux announce newsgroups. The mailing
-list is archived at http://lists.gnu.org/pipermail/info-mtools/
-.PP
-.SH Common\ features\ of\ all\ mtools\ commands
-.PP
-.SS Options\ and\ filenames
-.iX "c Filenames"
-.iX "c Options"
-MS-DOS filenames are composed of a drive letter followed by a colon, a
-subdirectory, and a filename. Only the filename part is mandatory, the
-drive letter and the subdirectory are optional. Filenames without a
-drive letter refer to Unix files. Subdirectory names can use either the
-\&'\fR\&\f(CW/\fR' or '\fR\&\f(CW\e\fR' separator. The use of the '\fR\&\f(CW\e\fR' separator
-or wildcards requires the names to be enclosed in quotes to protect them
-from the shell. However, wildcards in Unix filenames should not be
-enclosed in quotes, because here we \fBwant\fR the shell to expand
-them.
-.PP
-The regular expression "pattern matching" routines follow the Unix-style
-rules. For example, `\fR\&\f(CW*\fR' matches all MS-DOS files in lieu of
-`\fR\&\f(CW*.*\fR'. The archive, hidden, read-only and system attribute bits
-are ignored during pattern matching.
-.PP
-All options use the \fR\&\f(CW-\fR (minus) as their first character, not
-\&\fR\&\f(CW/\fR as you'd expect in MS-DOS.
-.PP
-Most mtools commands allow multiple filename parameters, which
-doesn't follow MS-DOS conventions, but which is more user-friendly.
-.PP
-Most mtools commands allow options that instruct them how to handle file
-name clashes. See section name clashes, for more details on these. All
-commands accept the \fR\&\f(CW-V\fR flags which prints the version, and most
-accept the \fR\&\f(CW-v\fR flag, which switches on verbose mode. In verbose
-mode, these commands print out the name of the MS-DOS files upon which
-they act, unless stated otherwise. See section Commands, for a description of
-the options which are specific to each command.
-.PP
-.SS Drive\ letters
-.PP
-The meaning of the drive letters depends on the target architectures.
-However, on most target architectures, drive A is the first floppy
-drive, drive B is the second floppy drive (if available), drive J is a
-Jaz drive (if available), and drive Z is a Zip drive (if available). On
-those systems where the device name is derived from the SCSI id, the Jaz
-drive is assumed to be at SCSI target 4, and the Zip at SCSI target 5
-(factory default settings). On Linux, both drives are assumed to be the
-second drive on the SCSI bus (/dev/sdb). The default settings can be
-changes using a configuration file (see section Configuration).
-.PP
-The drive letter : (colon) has a special meaning. It is used to access
-image files which are directly specified on the command line using the
-\&\fR\&\f(CW-i\fR options.
-.PP
-Example:
-
-.nf
-.ft 3
-.in +0.3i
- mcopy -i my-image-file.bin ::file1 ::file2 .
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-This copies \fR\&\f(CWfile1\fR and \fR\&\f(CWfile2\fR from the image file
-(\fR\&\f(CWmy-image-file.bin\fR) to the \fR\&\f(CW/tmp\fR directory.
-.PP
-You can also supply an offset within the image file by including
-\&\fR\&\f(CW@@\fR\fIoffset\fR into the file name.
-.PP
-Example:
-
-.nf
-.ft 3
-.in +0.3i
- mcopy -i my-image-file.bin@@1M ::file1 ::file2 .
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-This looks for the image at the offset of 1M in the file, rather than
-at its beginning.
-.PP
-.SS Current\ working\ directory
-.iX "p mcd (introduction)"
-.iX "c Directory"
-.iX "c Working directory"
-.iX "c Current working directory"
-.iX "c Default directory"
-.PP
-The \fR\&\f(CWmcd\fR command (\(ifmcd\(is) is used to establish the device and
-the current working directory (relative to the MS-DOS file system),
-otherwise the default is assumed to be \fR\&\f(CWA:/\fR. However, unlike
-MS-DOS, there is only one working directory for all drives, and not one
-per drive.
-.PP
-.SS VFAT-style\ long\ file\ names
-.iX "c Long file name"
-.iX "c Windows 95-style file names"
-.iX "c VFAT-style file names"
-.iX "c Primary file name (long names)"
-.iX "c Secondary file name (long names)"
-.PP
-This version of mtools supports VFAT style long filenames. If a Unix
-filename is too long to fit in a short DOS name, it is stored as a
-VFAT long name, and a companion short name is generated. This short
-name is what you see when you examine the disk with a pre-7.0 version
-of DOS.
- The following table shows some examples of short names:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-Long name MS-DOS name Reason for the change
---------- ---------- ---------------------
-thisisatest THISIS~1 filename too long
-alain.knaff ALAIN~1.KNA extension too long
-prn.txt PRN~1.TXT PRN is a device name
-\&\&.abc ABC~1 null filename
-hot+cold HOT_CO~1 illegal character
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
- As you see, the following transformations happen to derive a short
-name:
-.TP
-* \ \
-Illegal characters are replaced by underscores. The illegal characters
-are \fR\&\f(CW;+=[]',\e"*\e\e<>/?:|\fR.
-.TP
-* \ \
-Extra dots, which cannot be interpreted as a main name/extension
-separator are removed
-.TP
-* \ \
-A \fR\&\f(CW~\fR\fIn\fR number is generated,
-.TP
-* \ \
-The name is shortened so as to fit in the 8+3 limitation
-.PP
- The initial Unix-style file name (whether long or short) is also called
-the \fIprimary\fR name, and the derived short name is also called the
-\&\fIsecondary\fR name.
-.PP
- Example:
-
-.nf
-.ft 3
-.in +0.3i
- mcopy /etc/motd a:Reallylongname
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR Mtools creates a VFAT entry for Reallylongname, and uses REALLYLO as
-a short name. Reallylongname is the primary name, and REALLYLO is the
-secondary name.
-
-.nf
-.ft 3
-.in +0.3i
- mcopy /etc/motd a:motd
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR Motd fits into the DOS filename limits. Mtools doesn't need to
-derivate another name. Motd is the primary name, and there is no
-secondary name.
-.PP
- In a nutshell: The primary name is the long name, if one exists, or
-the short name if there is no long name.
-.PP
- Although VFAT is much more flexible than FAT, there are still names
-that are not acceptable, even in VFAT. There are still some illegal
-characters left (\fR\&\f(CW\e"*\e\e<>/?:|\fR), and device names are still
-reserved.
-.PP
-
-.nf
-.ft 3
-.in +0.3i
-Unix name Long name Reason for the change
---------- ---------- ---------------------
-prn prn-1 PRN is a device name
-ab:c ab_c-1 illegal character
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
- As you see, the following transformations happen if a long name is
-illegal:
-.TP
-* \ \
-Illegal characters are replaces by underscores,
-.TP
-* \ \
-A \fR\&\f(CW-\fR\fIn\fR number is generated,
-.PP
-.SS Name\ clashes
-.iX "c Name clashes"
-.iX "c Duplicate file names"
-.iX "c Overwriting files"
-.iX "c Primary file name (name clashes)"
-.iX "c Secondary file name (name clashes)"
-.PP
-When writing a file to disk, its long name or short name may collide
-with an already existing file or directory. This may happen for all
-commands which create new directory entries, such as \fR\&\f(CWmcopy\fR,
-\&\fR\&\f(CWmmd\fR, \fR\&\f(CWmren\fR, \fR\&\f(CWmmove\fR. When a name clash happens, mtools
-asks you what it should do. It offers several choices:
-.TP
-\&\fR\&\f(CWoverwrite\fR\
-Overwrites the existing file. It is not possible to overwrite a
-directory with a file.
-.TP
-\&\fR\&\f(CWrename\fR\
-Renames the newly created file. Mtools prompts for the new filename
-.TP
-\&\fR\&\f(CWautorename\fR\
-Renames the newly created file. Mtools chooses a name by itself, without
-prompting
-.TP
-\&\fR\&\f(CWskip\fR\
-Gives up on this file, and moves on to the next (if any)
-.PP
-To chose one of these actions, type its first letter at the prompt. If
-you use a lower case letter, the action only applies for this file only,
-if you use an upper case letter, the action applies to all files, and
-you won't be prompted again.
-.PP
-You may also chose actions (for all files) on the command line, when
-invoking mtools:
-.TP
-\&\fR\&\f(CW-D\ o\fR\
-Overwrites primary names by default.
-.TP
-\&\fR\&\f(CW-D\ O\fR\
-Overwrites secondary names by default.
-.TP
-\&\fR\&\f(CW-D\ r\fR\
-Renames primary name by default.
-.TP
-\&\fR\&\f(CW-D\ R\fR\
-Renames secondary name by default.
-.TP
-\&\fR\&\f(CW-D\ a\fR\
-Autorenames primary name by default.
-.TP
-\&\fR\&\f(CW-D\ A\fR\
-Autorenames secondary name by default.
-.TP
-\&\fR\&\f(CW-D\ s\fR\
-Skip primary name by default.
-.TP
-\&\fR\&\f(CW-D\ S\fR\
-Skip secondary name by default.
-.TP
-\&\fR\&\f(CW-D\ m\fR\
-Ask user what to do with primary name.
-.TP
-\&\fR\&\f(CW-D\ M\fR\
-Ask user what to do with secondary name.
-.PP
-Note that for command line switches lower/upper differentiates between
-primary/secondary name whereas for interactive choices, lower/upper
-differentiates between just-this-time/always.
-.PP
-The primary name is the name as displayed in Windows 95 or Windows NT:
-i.e. the long name if it exists, and the short name otherwise. The
-secondary name is the "hidden" name, i.e. the short name if a long name
-exists.
-.PP
-By default, the user is prompted if the primary name clashes, and the
-secondary name is autorenamed.
-.PP
-If a name clash occurs in a Unix directory, mtools only asks whether
-to overwrite the file, or to skip it.
-.PP
-.SS Case\ sensitivity\ of\ the\ VFAT\ file\ system
-.iX "c Case sensitivity"
-.PP
-The VFAT file system is able to remember the case of the
-filenames. However, filenames which differ only in case are not allowed
-to coexist in the same directory. For example if you store a file called
-LongFileName on a VFAT file system, mdir shows this file as LongFileName,
-and not as Longfilename. However, if you then try to add LongFilename to
-the same directory, it is refused, because case is ignored for clash
-checks.
-.PP
-The VFAT file system allows to store the case of a filename in the
-attribute byte, if all letters of the filename are the same case, and if
-all letters of the extension are the same case too. Mtools uses this
-information when displaying the files, and also to generate the Unix
-filename when mcopying to a Unix directory. This may have unexpected
-results when applied to files written using an pre-7.0 version of DOS:
-Indeed, the old style filenames map to all upper case. This is different
-from the behavior of the old version of mtools which used to generate
-lower case Unix filenames.
-.PP
-.SS high\ capacity\ formats
-.iX "c Special formats"
-.iX "c High capacity formats"
-.iX "c Odd formats"
-.iX "c Weird formats"
-.iX "c Formats, high capacity"
-.iX "c Linux enhancements (High Capacity Formats)"
-.PP
-Mtools supports a number of formats which allow to store more data on
-disk as usual. Due to different operating system abilities, these
-formats are not supported on all operating systems. Mtools recognizes
-these formats transparently where supported.
-.PP
-In order to format these disks, you need to use an operating system
-specific tool. For Linux, suitable floppy tools can be found in the
-\&\fR\&\f(CWfdutils\fR package at the following locations~:
-
-.nf
-.ft 3
-.in +0.3i
-\&\fR\&\f(CWftp://www.tux.org/pub/knaff/fdutils/.
-\&\fR\&\f(CWftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/fdutils-*
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-See the manual pages included in that package for further detail: Use
-\&\fR\&\f(CWsuperformat\fR to format all formats except XDF, and use
-\&\fR\&\f(CWxdfcopy\fR to format XDF.
-.PP
-.SS \ \ More\ sectors
-.iX "c fdformat"
-.iX "c vgacopy"
-.iX "c DMF disks"
-.iX "c Windows 95 (DMF disks)"
-.PP
-The oldest method of fitting more data on a disk is to use more sectors
-and more cylinders. Although the standard format uses 80 cylinders and
-18 sectors (on a 3 1/2 high density disk), it is possible to use up to
-83 cylinders (on most drives) and up to 21 sectors. This method allows
-to store up to 1743K on a 3 1/2 HD disk. However, 21 sector disks are
-twice as slow as the standard 18 sector disks because the sectors are
-packed so close together that we need to interleave them. This problem
-doesn't exist for 20 sector formats.
-.PP
-These formats are supported by numerous DOS shareware utilities such as
-\&\fR\&\f(CWfdformat\fR and \fR\&\f(CWvgacopy\fR. In his infinite hubris, Bill Gate$
-believed that he invented this, and called it \fR\&\f(CW\(ifDMF disks\(is\fR, or
-\&\fR\&\f(CW\(ifWindows formatted disks\(is\fR. But in reality, it has already existed
-years before! Mtools supports these formats on Linux, on SunOS and on
-the DELL Unix PC.
-.PP
-.SS \ \ Bigger\ sectors
-.iX "c bigger sectors"
-By using bigger sectors it is possible to go beyond the capacity which
-can be obtained by the standard 512-byte sectors. This is because of the
-sector header. The sector header has the same size, regardless of how
-many data bytes are in the sector. Thus, we save some space by using
-\&\fIfewer\fR, but bigger sectors. For example, 1 sector of 4K only takes
-up header space once, whereas 8 sectors of 512 bytes have also 8
-headers, for the same amount of useful data.
-.PP
-This method allows to store up to 1992K on a 3 1/2 HD disk.
-.PP
-Mtools supports these formats only on Linux.
-.PP
-.SS \ \ 2m
-.iX "c 2m"
-.PP
-The 2m format was originally invented by Ciriaco Garcia de Celis. It
-also uses bigger sectors than usual in order to fit more data on the
-disk. However, it uses the standard format (18 sectors of 512 bytes
-each) on the first cylinder, in order to make these disks easier to
-handle by DOS. Indeed this method allows to have a standard sized
-boot sector, which contains a description of how the rest of the disk
-should be read.
-.PP
-However, the drawback of this is that the first cylinder can hold less
-data than the others. Unfortunately, DOS can only handle disks where
-each track contains the same amount of data. Thus 2m hides the fact that
-the first track contains less data by using a \fIshadow
-FAT\fR. (Usually, DOS stores the FAT in two identical copies, for
-additional safety. XDF stores only one copy, and it tells DOS that it
-stores two. Thus the same that would be taken up by the second FAT copy
-is saved.) This also means that your should \fBnever use a 2m disk
-to store anything else than a DOS file system\fR.
-.PP
-Mtools supports these format only on Linux.
-.PP
-.SS \ \ XDF
-.iX "c XDF disks"
-.iX "c OS/2 (XDF disks)"
-.PP
-XDF is a high capacity format used by OS/2. It can hold 1840 K per
-disk. That's lower than the best 2m formats, but its main advantage is
-that it is fast: 600 milliseconds per track. That's faster than the 21
-sector format, and almost as fast as the standard 18 sector format. In
-order to access these disks, make sure mtools has been compiled with XDF
-support, and set the \fR\&\f(CWuse_xdf\fR variable for the drive in the
-configuration file. See section Compiling mtools, and \(ifmiscellaneous variables\(is,
-for details on how to do this. Fast XDF access is only available for
-Linux kernels which are more recent than 1.1.34.
-.PP
-Mtools supports this format only on Linux.
-.PP
-\&\fBCaution / Attention distributors\fR: If mtools is compiled on a
-Linux kernel more recent than 1.3.34, it won't run on an older
-kernel. However, if it has been compiled on an older kernel, it still
-runs on a newer kernel, except that XDF access is slower. It is
-recommended that distribution authors only include mtools binaries
-compiled on kernels older than 1.3.34 until 2.0 comes out. When 2.0 will
-be out, mtools binaries compiled on newer kernels may (and should) be
-distributed. Mtools binaries compiled on kernels older than 1.3.34 won't
-run on any 2.1 kernel or later.
-.PP
-.SS Exit\ codes
-All the Mtools commands return 0 on success, 1 on utter failure, or 2
-on partial failure. All the Mtools commands perform a few sanity
-checks before going ahead, to make sure that the disk is indeed an
-MS-DOS disk (as opposed to, say an ext2 or MINIX disk). These checks
-may reject partially corrupted disks, which might otherwise still be
-readable. To avoid these checks, set the MTOOLS_SKIP_CHECK
-environmental variable or the corresponding configuration file variable
-(see section global variables)
-.SS Bugs
-An unfortunate side effect of not guessing the proper device (when
-multiple disk capacities are supported) is an occasional error message
-from the device driver. These can be safely ignored.
-.PP
-The fat checking code chokes on 1.72 Mb disks mformatted with pre-2.0.7
-mtools. Set the environmental variable MTOOLS_FAT_COMPATIBILITY (or the
-corresponding configuration file variable, \(ifglobal variables\(is) to
-bypass the fat checking.
-.PP
-.SH See also
-floppyd_installtest
-mattrib
-mbadblocks
-mcd
-mcopy
-mdel
-mdeltree
-mdir
-mdu
-mformat
-minfo
-mkmanifest
-mlabel
-mmd
-mmount
-mmove
-mrd
-mren
-mtoolstest
-mtype
diff --git a/man/mtools.5 b/man/mtools.5
deleted file mode 100644
index 211c707..0000000
--- a/man/mtools.5
+++ /dev/null
@@ -1,633 +0,0 @@
-'\" t
-.TH mtools 5 "21Feb10" MTOOLS MTOOLS
-.SH Name
-mtools.conf - mtools configuration files
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.ds St Mtools\ 4.0.12
-.oh '\\*(St''%'
-.eh '%''\\*(St'
-.PP
-.SH Description
-.PP
-This manual page describes the configuration files for mtools. They
-are called \fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR and \fR\&\f(CW\(if~/.mtoolsrc\(is\fR. If
-the environmental variable \fR\&\f(CWMTOOLSRC\fR is set, its contents is used
-as the filename for a third configuration file. These configuration
-files describe the following items:
-.TP
-* \ Global\ configuration\ flags\ and\ variables\
-.TP
-* \ Per\ drive\ flags\ and\ variables\
-.PP
-.SS Location\ of\ the\ configuration\ files
-.PP
-.iX "c Configuration file name"
-.iX "c Name of configuration files"
-.iX "c Location of configuration files"
-.PP
-\&\fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR is the system-wide configuration file,
-and \fR\&\f(CW\(if~/.mtoolsrc\(is\fR is the user's private configuration file.
-.PP
-On some systems, the system-wide configuration file is called
-\&\fR\&\f(CW\(if/etc/default/mtools.conf\(is\fR instead.
-.PP
-.SS \ \ General\ configuration\ file\ syntax
-.iX "c Syntax of the configuration file"
-.iX "c Configuration file syntax"
-.PP
-The configuration files is made up of sections. Each section starts
-with a keyword identifying the section followed by a colon.
-Then follow variable assignments and flags. Variable assignments take
-the following form:
-.ft I
-.nf
-name=value
-.fi
-.ft R
-
-Flags are lone keywords without an equal sign and value following
-them. A section either ends at the end of the file or where the next
-section begins.
-.PP
-Lines starting with a hash (\fR\&\f(CW#\fR) are comments. Newline characters
-are equivalent to whitespace (except where ending a comment). The
-configuration file is case insensitive, except for item enclosed in
-quotes (such as filenames).
-.PP
-.SS Default\ values
-.iX "c Default values"
-.iX "c Default configuration"
-.iX "c Configuration file"
-For most platforms, mtools contains reasonable compiled-in defaults for
-physical floppy drives. Thus, you usually don't need to bother with the
-configuration file, if all you want to do with mtools is to access your
-floppy drives. On the other hand, the configuration file is needed if
-you also want to use mtools to access your hard disk partitions and
-DOSEMU image files.
-.PP
-.SS Global\ variables
-.iX "c Global configuration variables"
-.iX "c Drive independent configuration variables"
-.iX "c Environmental variables"
-.iX "v MTOOLS_SKIP_CHECK"
-.iX "v MTOOLS_FAT_COMPATIBILITY"
-.iX "v MTOOLS_LOWER_CASE"
-.iX "v MTOOLS_NO_VFAT"
-.iX "c FreeDOS"
-.PP
-Global flags may be set to 1 or to 0.
-.PP
-The following global flags are recognized:
-.TP
-\&\fR\&\f(CWMTOOLS_SKIP_CHECK\fR\
-If this is set to 1, mtools skips most of its sanity checks. This is
-needed to read some Atari disks which have been made with the earlier
-ROMs, and which would not be recognized otherwise.
-.TP
-\&\fR\&\f(CWMTOOLS_FAT_COMPATIBILITY\fR\
-If this is set to 1, mtools skips the fat size checks. Some disks have
-a bigger FAT than they really need to. These are rejected if this
-option is not set.
-.TP
-\&\fR\&\f(CWMTOOLS_LOWER_CASE\fR\
-If this is set to 1, mtools displays all-upper-case short filenames as
-lowercase. This has been done to allow a behavior which is consistent
-with older versions of mtools which didn't know about the case bits.
-.TP
-\&\fR\&\f(CWMTOOLS_NO_VFAT\fR\
-If this is set to 1, mtools won't generate VFAT entries for filenames
-which are mixed-case, but otherwise legal dos filenames. This is useful
-when working with DOS versions which can't grok VFAT long names, such as
-FreeDOS.
-.TP
-\&\fR\&\f(CWMTOOLS_DOTTED_DIR\fR\
-In a wide directory, prints the short name with a dot instead of spaces
-separating the basename and the extension.
-.TP
-\&\fR\&\f(CWMTOOLS_NAME_NUMERIC_TAIL\fR\
-If this is set to one (default), generate numeric tails for all long
-names (~1). If set to zero, only generate numeric tails if otherwise a
-clash would have happened.
-.TP
-\&\fR\&\f(CWMTOOLS_TWENTY_FOUR_HOUR_CLOCK\fR\
-If 1, uses the European notation for times (twenty four hour clock),
-else uses the UK/US notation (am/pm)
-.PP
-Example:
-Inserting the following line into your configuration file instructs
-mtools to skip the sanity checks:
-
-.nf
-.ft 3
-.in +0.3i
- MTOOLS_SKIP_CHECK=1
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-Global variables may also be set via the environment:
-
-.nf
-.ft 3
-.in +0.3i
- export MTOOLS_SKIP_CHECK=1
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-Global string variables may be set to any value:
-.TP
-\&\fR\&\f(CWMTOOLS_DATE_STRING\fR\
-The format used for printing dates of files. By default, is dd-mm-yyyy.
-.PP
-.SS Per\ drive\ flags\ and\ variables
-.iX "c Drive description"
-.iX "c Drive configuration"
-.PP
-.SS \ \ General\ information
-.iX "c Drive description, example"
-.iX "c Drive configuration, example"
-.iX "v drive"
-.PP
-Per drive flags and values may be described in a drive section. A
-drive section starts with
-\&\fR\&\f(CWdrive\fR "\fIdriveletter\fR" :
-.PP
-Then follow variable-value pairs and flags.
-.PP
-This is a sample drive description:
-
-.nf
-.ft 3
-.in +0.3i
- drive a:
- file="/dev/fd0" use_xdf=1
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-.SS \ \ Location\ information
-.iX "c Hdimage"
-.PP
-For each drive, you need to describe where its data is physically
-stored (image file, physical device, partition, offset).
-.TP
-\&\fR\&\f(CWfile\fR\
-.iX "c Image file"
-.iX "c Name of device node"
-.iX "c File name of device node"
-.iX "v file"
-The name of the file or device holding the disk image. This is
-mandatory. The file name should be enclosed in quotes.
-.TP
-\&\fR\&\f(CWpartition\fR\
-.iX "c DOSEMU hard disk image"
-.iX "c Zip disks (partitions)"
-.iX "c Jaz disks (partitions)"
-.iX "c Syquest disks"
-.iX "c Magneto-optical disks"
-.iX "c OS/2 (layout of removable media)"
-.iX "c Windows NT (layout of removable media)"
-.iX "c Removable media"
-.iX "c Partitioned image file"
-Tells mtools to treat the drive as a partitioned device, and to use the
-given partition. Only primary partitions are accessible using this
-method, and they are numbered from 1 to 4. For logical partitions, use
-the more general \fR\&\f(CWoffset\fR variable. The \fR\&\f(CWpartition\fR variable
-is intended for removable media such as Syquest disks, ZIP drives, and
-magneto-optical disks. Although traditional DOS sees Syquest disks and
-magneto-optical disks as \fR\&\f(CW\(ifgiant floppy disks\(is\fR which are
-unpartitioned, OS/2 and Windows NT treat them like hard disks,
-i.e. partitioned devices. The \fR\&\f(CWpartition\fR flag is also useful DOSEMU
-hdimages. It is not recommended for hard disks for which direct access
-to partitions is available through mounting.
-.TP
-\&\fR\&\f(CWoffset\fR\
-.iX "c Ram disk"
-.iX "c Atari Ram disk"
-Describes where in the file the MS-DOS file system starts. This is useful
-for logical partitions in DOSEMU hdimages, and for ATARI ram disks. By
-default, this is zero, meaning that the file system starts right at the
-beginning of the device or file.
-.PP
-.SS \ \ Disk\ Geometry\ Configuration
-.iX "c Disk Geometry"
-.iX "c Configuration of disk geometry"
-.iX "c Description of disk geometry"
-.iX "c Format of disk"
-.iX "c High density disk"
-.iX "c Low density disk"
-.iX "p mformat (geometry used for)"
-.PP
-Geometry information describes the physical characteristics about the
-disk. Its has three purposes:
-.TP
-formatting\
-The geometry information is written into the boot sector of the newly
-made disk. However, you may also describe the geometry information on
-the command line. See section mformat, for details.
-.TP
-filtering\
-On some Unixes there are device nodes which only support one physical
-geometry. For instance, you might need a different node to access a disk
-as high density or as low density. The geometry is compared to the
-actual geometry stored on the boot sector to make sure that this device
-node is able to correctly read the disk. If the geometry doesn't match,
-this drive entry fails, and the next drive entry bearing the same drive
-letter is tried. See section multiple descriptions, for more details on
-supplying several descriptions for one drive letter.
-.IP
-If no geometry information is supplied in the configuration file, all
-disks are accepted. On Linux (and on SPARC) there exist device nodes
-with configurable geometry (\fR\&\f(CW\(if/dev/fd0\(is\fR, \fR\&\f(CW\(if/dev/fd1\(is\fR etc),
-and thus filtering is not needed (and ignored) for disk drives. (Mtools
-still does do filtering on plain files (disk images) in Linux: this is
-mainly intended for test purposes, as I don't have access to a Unix
-which would actually need filtering).
-.IP
-If you do not need filtering, but want still a default geometry for
-mformatting, you may switch off filtering using the \fR\&\f(CWmformat_only\fR
-flag.
-.IP
-If you want filtering, you should supply the \fR\&\f(CWfilter\fR flag. If you
-supply a geometry, you must supply one of both flags.
-.TP
-initial\ geometry\
-On devices that support it (usually floppy devices), the geometry
-information is also used to set the initial geometry. This initial
-geometry is applied while reading the boot sector, which contains the
-real geometry. If no geometry information is supplied in the
-configuration file, or if the \fR\&\f(CWmformat_only\fR flag is supplied, no
-initial configuration is done.
-.IP
-On Linux, initial geometry is not really needed, as the configurable
-devices are able to auto-detect the disk type accurately enough (for
-most common formats) to read the boot sector.
-.PP
-Wrong geometry information may lead to very bizarre errors. That's why I
-strongly recommend that you add the \fR\&\f(CWmformat_only\fR flag to your
-drive description, unless you really need filtering or initial geometry.
-.PP
-The following geometry related variables are available:
-.TP
-\&\fR\&\f(CWcylinders\fR\
-.TQ
-\&\fR\&\f(CWtracks\fR
-.iX "v cylinders"
-.iX "v tracks"
-The number of cylinders. (\fR\&\f(CWcylinders\fR is the preferred form,
-\&\fR\&\f(CWtracks\fR is considered obsolete)
-.TP
-\&\fR\&\f(CWheads\fR\
-.iX "v heads"
-The number of heads (sides).
-.TP
-\&\fR\&\f(CWsectors\fR\
-.iX "v sectors"
-The number of sectors per track.
-.PP
-Example: the following drive section describes a 1.44M drive:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
- drive a:
- file="/dev/fd0H1440"
- fat_bits=12
- cylinders=80 heads=2 sectors=18
- mformat_only
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The following shorthand geometry descriptions are available:
-.TP
-\&\fR\&\f(CW1.44m\fR\
-high density 3 1/2 disk. Equivalent to:
-\&\fR\&\f(CWfat_bits=12 cylinders=80 heads=2 sectors=18\fR
-.TP
-\&\fR\&\f(CW1.2m\fR\
-high density 5 1/4 disk. Equivalent to:
-\&\fR\&\f(CWfat_bits=12 cylinders=80 heads=2 sectors=15\fR
-.TP
-\&\fR\&\f(CW720k\fR\
-double density 3 1/2 disk. Equivalent to:
-\&\fR\&\f(CWfat_bits=12 cylinders=80 heads=2 sectors=9\fR
-.TP
-\&\fR\&\f(CW360k\fR\
-double density 5 1/4 disk. Equivalent to:
-\&\fR\&\f(CWfat_bits=12 cylinders=40 heads=2 sectors=9\fR
-.PP
-The shorthand format descriptions may be amended. For example,
-\&\fR\&\f(CW360k sectors=8\fR
-describes a 320k disk and is equivalent to:
-\&\fR\&\f(CWfat_bits=12 cylinders=40 heads=2 sectors=8\fR
-.PP
-.SS \ \ Open\ Flags
-.iX "v sync"
-.iX "v nodelay"
-.iX "v exclusive"
-.iX "c open flags"
-.iX "c synchronous writing"
-.iX "c exclusive access to a drive"
-.PP
-Moreover, the following flags are available:
-.TP
-\&\fR\&\f(CWsync\fR\
-All i/o operations are done synchronously
-.TP
-\&\fR\&\f(CWnodelay\fR\
-The device or file is opened with the O_NDELAY flag. This is needed on
-some non-Linux architectures.
-.TP
-\&\fR\&\f(CWexclusive\fR\
-The device or file is opened with the O_EXCL flag. On Linux, this
-ensures exclusive access to the floppy drive. On most other
-architectures, and for plain files it has no effect at all.
-.PP
-.SS \ \ General\ Purpose\ Drive\ Variables
-.PP
-The following general purpose drive variables are available. Depending
-to their type, these variables can be set to a string (precmd) or
-an integer (all others)
-.TP
-\&\fR\&\f(CWfat_bits\fR\
-.iX "v fat_bits"
-The number of FAT bits. This may be 12 or 16. This is very rarely
-needed, as it can almost always be deduced from information in the
-boot sector. On the contrary, describing the number of fat bits may
-actually be harmful if you get it wrong. You should only use it if
-mtools gets the auto-detected number of fat bits wrong, or if you want
-to mformat a disk with a weird number of fat bits.
-.TP
-\&\fR\&\f(CWcodepage\fR\
-Describes the DOS code page used for short filenames. This is a number
-between 1 and 999. By default, code page 850 is used. The reason for
-this is because this code page contains most of the characters that are
-also available in ISO-Latin-1. You may also specify a global code page
-for all drives by using the global \fR\&\f(CWdefault_codepage\fR parameter
-(outside of any drive description). This parameters exists starting at
-version 4.0.0
-.TP
-\&\fR\&\f(CWprecmd\fR\
-.iX "c Solaris (volcheck)"
-.iX "c Executing commands before opening the device"
-On some variants of Solaris, it is necessary to call 'volcheck -v'
-before opening a floppy device, in order for the system to notice that
-there is indeed a disk in the drive. \fR\&\f(CWprecmd="volcheck -v"\fR in the
-drive clause establishes the desired behavior.
-.TP
-\&\fR\&\f(CWblocksize\fR\
-.iX "c raw device"
-.iX "c character devices"
-.iX "c blocksize"
-This parameter represents a default block size to be always used on this
-device. All I/O is done with multiples of this block size,
-independently of the sector size registered in the file system's boot
-sector. This is useful for character devices whose sector size is not
-512, such as for example CD-ROM drives on Solaris.
-.PP
-Only the \fR\&\f(CWfile\fR variable is mandatory. The other parameters may
-be left out. In that case a default value or an auto-detected value is
-used.
-.PP
-.SS \ \ General\ Purpose\ Drive\ Flags
-.PP
-A flag can either be set to 1 (enabled) or 0 (disabled). If the value is
-omitted, it is enabled. For example, \fR\&\f(CWscsi\fR is equivalent to
-\&\fR\&\f(CWscsi=1\fR
-.TP
-\&\fR\&\f(CWnolock\fR\
-.iX "c disable locking"
-.iX "c locking (disabling it)"
-.iX "c plain floppy: device xxx busy"
-Instruct mtools to not use locking on this drive. This is needed on
-systems with buggy locking semantics. However, enabling this makes
-operation less safe in cases where several users may access the same
-drive at the same time.
-.TP
-\&\fR\&\f(CWscsi\fR\
-.iX "c setuid installation (needed for raw SCSI I/O)"
-.iX "c Solaris (Raw access to SCSI devices such as Zip & Jaz)"
-.iX "c SunOS (Raw access to SCSI devices such as Zip & Jaz)"
-.iX "c Zip disks (raw SCSI access)"
-.iX "c Jaz disks (raw SCSI access)"
-.iX "c Syquest disks (raw SCSI access)"
-.iX "c SCSI devices"
-When set to 1, this option tells mtools to use raw SCSI I/O instead of
-the standard read/write calls to access the device. Currently, this is
-supported on HP-UX, Solaris and SunOS. This is needed because on some
-architectures, such as SunOS or Solaris, PC media can't be accessed
-using the \fR\&\f(CWread\fR and \fR\&\f(CWwrite\fR system calls, because the OS expects
-them to contain a Sun specific "disk label".
-.IP
-As raw SCSI access always uses the whole device, you need to specify the
-"partition" flag in addition
-.IP
-On some architectures, such as Solaris, mtools needs root privileges to
-be able to use the \fR\&\f(CWscsi\fR option. Thus mtools should be installed
-setuid root on Solaris if you want to access Zip/Jaz drives. Thus, if
-the \fR\&\f(CWscsi\fR flag is given, \fR\&\f(CWprivileged\fR is automatically
-implied, unless explicitly disabled by \fR\&\f(CWprivileged=0\fR
-.IP
-Mtools uses its root privileges to open the device, and to issue the
-actual SCSI I/O calls. Moreover, root privileges are only used for
-drives described in a system-wide configuration file such as
-\&\fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR, and not for those described in
-\&\fR\&\f(CW\(if~/.mtoolsrc\(is\fR or \fR\&\f(CW\(if$MTOOLSRC\(is\fR.
-.TP
-\&\fR\&\f(CWprivileged\fR\
-.iX "c setuid installation"
-.iX "c setgid installation"
-When set to 1, this instructs mtools to use its setuid and setgid
-privileges for opening the given drive. This option is only valid for
-drives described in the system-wide configuration files (such as
-\&\fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR, not \fR\&\f(CW\(if~/.mtoolsrc\(is\fR or
-\&\fR\&\f(CW\(if$MTOOLSRC\(is\fR). Obviously, this option is also a no op if mtools is
-not installed setuid or setgid. This option is implied by 'scsi=1', but
-again only for drives defined in system-wide configuration files.
-Privileged may also be set explicitly to 0, in order to tell mtools not
-to use its privileges for a given drive even if \fR\&\f(CWscsi=1\fR is set.
-.IP
-Mtools only needs to be installed setuid if you use the
-\&\fR\&\f(CWprivileged\fR or \fR\&\f(CWscsi\fR drive variables. If you do not use
-these options, mtools works perfectly well even when not installed
-setuid root.
-.TP
-\&\fR\&\f(CWvold\fR\
-.iX "c Solaris (vold)"
-.iX "c Vold (mediamgr)"
-.IP
-Instructs mtools to interpret the device name as a vold identifier
-rather than as a filename. The vold identifier is translated into a
-real filename using the \fR\&\f(CWmedia_findname()\fR and
-\&\fR\&\f(CWmedia_oldaliases()\fR functions of the \fR\&\f(CWvolmgt\fR library. This
-flag is only available if you configured mtools with the
-\&\fR\&\f(CW--enable-new-vold\fR option before compilation.
-.TP
-\&\fR\&\f(CWswap\fR\
-.iX "c Atari"
-.iX "c Wordswapped"
-.IP
-Consider the media as a word-swapped Atari disk.
-.TP
-\&\fR\&\f(CWuse_xdf\fR\
-.iX "c XDF disks (how to configure)"
-.iX "v use_xdf"
-If this is set to a non-zero value, mtools also tries to access this
-disk as an XDF disk. XDF is a high capacity format used by OS/2. This
-is off by default. See section XDF, for more details.
-.TP
-\&\fR\&\f(CWmformat_only\fR\
-.iX "v mformat_only"
-Tells mtools to use the geometry for this drive only for mformatting and
-not for filtering.
-.TP
-\&\fR\&\f(CWfilter\fR\
-.iX "v filter"
-Tells mtools to use the geometry for this drive both for mformatting and
-filtering.
-.TP
-\&\fR\&\f(CWremote\fR\
-Tells mtools to connect to floppyd (see section floppyd).
-.PP
-.SS \ \ Supplying\ multiple\ descriptions\ for\ a\ drive
-.PP
-It is possible to supply multiple descriptions for a drive. In that
-case, the descriptions are tried in order until one is found that
-fits. Descriptions may fail for several reasons:
-.TP
-1.\
-because the geometry is not appropriate,
-.TP
-2.\
-because there is no disk in the drive,
-.TP
-3.\
-or because of other problems.
-.PP
-Multiple definitions are useful when using physical devices which are
-only able to support one single disk geometry.
-Example:
-
-.nf
-.ft 3
-.in +0.3i
- drive a: file="/dev/fd0H1440" 1.44m
- drive a: file="/dev/fd0H720" 720k
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-This instructs mtools to use /dev/fd0H1440 for 1.44m (high density)
-disks and /dev/fd0H720 for 720k (double density) disks. On Linux, this
-feature is not really needed, as the /dev/fd0 device is able to handle
-any geometry.
-.PP
-You may also use multiple drive descriptions to access both of your
-physical drives through one drive letter:
-.PP
-
-.nf
-.ft 3
-.in +0.3i
- drive z: file="/dev/fd0"
- drive z: file="/dev/fd1"
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-With this description, \fR\&\f(CWmdir z:\fR accesses your first physical
-drive if it contains a disk. If the first drive doesn't contain a disk,
-mtools checks the second drive.
-.PP
-When using multiple configuration files, drive descriptions in the files
-parsed last override descriptions for the same drive in earlier
-files. In order to avoid this, use the \fR\&\f(CWdrive+\fR or \fR\&\f(CW+drive\fR
-keywords instead of \fR\&\f(CWdrive\fR. The first adds a description to the
-end of the list (i.e. it will be tried last), and the first adds it to
-the start of the list.
-.PP
-.SS Location\ of\ configuration\ files\ and\ parsing\ order
-.iX "c Parsing order"
-.iX "c Configuration file parsing order"
-.iX "c Configuration file name (parsing order)"
-.iX "c Name of configuration files (parsing order)"
-.iX "c Location of configuration files (parsing order)"
-.PP
-The configuration files are parsed in the following order:
-.TP
-1.\
-compiled-in defaults
-.TP
-2.\
-\&\fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR
-.TP
-3.\
-\&\fR\&\f(CW\(if/etc/mtools\(is\fR
-This is for backwards compatibility only, and is only parsed if
-\&\fR\&\f(CW\(ifmtools.conf\(is\fR
-doesn't exist.
-.TP
-4.\
-\&\fR\&\f(CW\(if~/.mtoolsrc\(is\fR.
-.TP
-5.\
-\&\fR\&\f(CW\(if$MTOOLSRC\(is\fR (file pointed by the \fR\&\f(CWMTOOLSRC\fR environmental
-variable)
-.PP
-Options described in the later files override those described in the
-earlier files. Drives defined in earlier files persist if they are not
-overridden in the later files. For instance, drives A and B may be
-defined in \fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR and drives C and D may be
-defined in \fR\&\f(CW\(if~/.mtoolsrc\(is\fR However, if \fR\&\f(CW\(if~/.mtoolsrc\(is\fR also
-defines drive A, this new description would override the description of
-drive A in \fR\&\f(CW\(if/usr/local/etc/mtools.conf\(is\fR instead of adding to it. If
-you want to add a new description to a drive already described in an
-earlier file, you need to use either the \fR\&\f(CW+drive\fR or \fR\&\f(CWdrive+\fR
-keyword.
-.PP
-.SS Backwards\ compatibility\ with\ old\ configuration\ file\ syntax
-.iX "c Backwards compatibility"
-.iX "c Old configuration file syntax"
-.iX "c Configuration file, old syntax"
-.PP
-The syntax described herein is new for version \fR\&\f(CWmtools-3.0\fR. The
-old line-oriented syntax is still supported. Each line beginning with a
-single letter is considered to be a drive description using the old
-syntax. Old style and new style drive sections may be mixed within the
-same configuration file, in order to make upgrading easier. Support for
-the old syntax will be phased out eventually, and in order to discourage
-its use, I purposefully omit its description here.
-.PP
-.SH See also
-mtools
diff --git a/man/mtoolstest.1 b/man/mtoolstest.1
deleted file mode 100644
index 329ab3b..0000000
--- a/man/mtoolstest.1
+++ /dev/null
@@ -1,93 +0,0 @@
-.TH mtoolstest 1 "21Feb10" mtools-4.0.12
-.SH Name
-mtoolstest - tests and displays the configuration
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "p mtoolstest"
-.iX "c Testing configuration file for correctness"
-.iX "c Checking configuration file"
-.iX "c Verifying configuration file"
-.PP
-The \fR\&\f(CWmtoolstest\fR command is used to tests the mtools configuration
-files. To invoke it, just type \fR\&\f(CWmtoolstest\fR without any arguments.
-\&\fR\&\f(CWMtoolstest\fR reads the mtools configuration files, and prints the
-cumulative configuration to \fR\&\f(CWstdout\fR. The output can be used as a
-configuration file itself (although you might want to remove redundant
-clauses). You may use this program to convert old-style configuration
-files into new style configuration files.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mtype.1 b/man/mtype.1
deleted file mode 100644
index 9aad7eb..0000000
--- a/man/mtype.1
+++ /dev/null
@@ -1,113 +0,0 @@
-.TH mtype 1 "21Feb10" mtools-4.0.12
-.SH Name
-mtype - display contents of an MSDOS file
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.PP
-The \fR\&\f(CWmtype\fR command is used to display contents of an MS-DOS
-file. Its syntax is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmtype\fR [\fR\&\f(CW-ts\fR] \fImsdosfile\fR [ \fImsdosfiles\fR\&... ]
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMtype\fR displays the specified MS-DOS file on the screen.
-.PP
-In addition to the standard options, \fR\&\f(CWMtype\fR allows the following
-command line options:
-.TP
-\&\fR\&\f(CWt\fR\
-Text file viewing. \fR\&\f(CWMtype\fR translates incoming carriage
-return/line feeds to line feeds.
-.TP
-\&\fR\&\f(CWs\fR\
-\&\fR\&\f(CWMtype\fR strips the high bit from the data.
-.PP
-The \fR\&\f(CWmcd\fR command may be used to establish the device and the
-current working directory (relative to MS-DOS), otherwise the default is
-\&\fR\&\f(CWA:/\fR.
-.PP
-\&\fR\&\f(CWMtype\fR returns 0 on success, 1 on utter failure, or 2 on partial
-failure.
-.PP
-Unlike the MS-DOS version of \fR\&\f(CWTYPE\fR, \fR\&\f(CWmtype\fR allows multiple
-arguments.
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.lp
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/man/mzip.1 b/man/mzip.1
deleted file mode 100644
index ff28795..0000000
--- a/man/mzip.1
+++ /dev/null
@@ -1,155 +0,0 @@
-.TH mzip 1 "21Feb10" mtools-4.0.12
-.SH Name
-mzip - change protection mode and eject disk on Zip/Jaz drive
-'\" t
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-
-.tr \(is'
-.tr \(if`
-.tr \(pd"
-
-.SH Note\ of\ warning
-This manpage has been automatically generated from mtools's texinfo
-documentation, and may not be entirely accurate or complete. See the
-end of this man page for details.
-.PP
-.SH Description
-.iX "c Zip disk (utilities)"
-.iX "c Jaz disk (utilities)"
-.iX "c Ejecting a Zip/Jaz disk"
-.iX "c Write protecting a Zip/Jaz disk"
-.iX "p mzip"
-.iX "c ZipTools disk"
-.iX "c Tools disk (Zip and Jaz drives)"
-.iX "c APlaceForYourStuff"
-.iX "c password protected Zip disks"
-.PP
-The \fR\&\f(CWmzip\fR command is used to issue ZIP disk specific commands on
-Linux, Solaris or HP-UX. Its syntax is:
-.PP
-.ft I
-.nf
-\&\fR\&\f(CWmzip\fR [\fR\&\f(CW-epqrwx\fR]
-.fi
-.ft R
-
-.PP
-\&\fR\&\f(CWMzip\fR allows the following
-command line options:
-.TP
-\&\fR\&\f(CWe\fR\
-Ejects the disk.
-.TP
-\&\fR\&\f(CWf\fR\
-Force eject even if the disk is mounted (must be given in addition to
-\&\fR\&\f(CW-e\fR).
-.TP
-\&\fR\&\f(CWr\fR\
-Write protect the disk.
-.TP
-\&\fR\&\f(CWw\fR\
-Remove write protection.
-.TP
-\&\fR\&\f(CWp\fR\
-Password write protect.
-.TP
-\&\fR\&\f(CWx\fR\
-Password protect
-.TP
-\&\fR\&\f(CWu\fR\
-Temporarily unprotect the disk until it is ejected. The disk becomes
-writable, and reverts back to its old state when ejected.
-.TP
-\&\fR\&\f(CWq\fR\
-Queries the status
-.PP
-To remove the password, set it to one of the password-less modes
-\&\fR\&\f(CW-r\fR or \fR\&\f(CW-w\fR: mzip will then ask you for the password, and
-unlock the disk. If you have forgotten the password, you can get rid of
-it by low-level formatting the disk (using your SCSI adapter's BIOS
-setup).
-.PP
-The ZipTools disk shipped with the drive is also password protected. On
-MS-DOS or on a Mac, this password is automatically removed once the
-ZipTools have been installed. From various articles posted to Usenet, I
-learned that the password for the tools disk is
-\&\fR\&\f(CWAPlaceForYourStuff\fR\fR. Mzip knows about this
-password, and tries it first, before prompting you for a password. Thus
-\&\fR\&\f(CWmzip -w z:\fR unlocks the tools disk. The tools disk is
-formatted in a special way so as to be usable both in a PC and in a Mac.
-On a PC, the Mac file system appears as a hidden file named
-\&\fR\&\f(CW\(ifpartishn.mac\(is\fR. You may erase it to reclaim the 50 Megs of space
-taken up by the Mac file system.
-.PP
-.SH Bugs
-.PP
-This command is a big kludge. A proper implementation would take a
-rework of significant parts of mtools, but unfortunately I don't have
-the time for this right now. The main downside of this implementation is
-that it is inefficient on some architectures (several successive calls
-to mtools, which defeats mtools' caching).
-.PP
-.SH See\ Also
-Mtools' texinfo doc
-.SH Viewing\ the\ texi\ doc
-This manpage has been automatically generated from mtools's texinfo
-documentation. However, this process is only approximative, and some
-items, such as crossreferences, footnotes and indices are lost in this
-translation process. Indeed, these items have no appropriate
-representation in the manpage format. Moreover, not all information has
-been translated into the manpage version. Thus I strongly advise you to
-use the original texinfo doc. See the end of this manpage for
-instructions how to view the texinfo doc.
-.TP
-* \ \
-To generate a printable copy from the texinfo doc, run the following
-commands:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make dvi; dvips mtools.dvi
-.fi
-.in -0.3i
-.ft R
-.PP
-
-\&\fR
-.TP
-* \ \
-To generate a html copy, run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make html
-.fi
-.in -0.3i
-.ft R
-.PP
-
-\&\fRA premade html can be found at
-\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
-.TP
-* \ \
-To generate an info copy (browsable using emacs' info mode), run:
-
-.nf
-.ft 3
-.in +0.3i
- ./configure; make info
-.fi
-.in -0.3i
-.ft R
-.PP
-
-\&\fR
-.PP
-The texinfo doc looks most pretty when printed or as html. Indeed, in
-the info version certain examples are difficult to read due to the
-quoting conventions used in info.
-.PP
diff --git a/match.c b/match.c
index da3a497..93a6c8d 100644
--- a/match.c
+++ b/match.c
@@ -34,48 +34,57 @@ static int exactcmp(wchar_t a,wchar_t b)
}
-static int parse_range(const wchar_t **p, const wchar_t *s, wchar_t *out,
- int (*compfn)(wchar_t a, wchar_t b))
-{
- wchar_t table[256];
- int reverse;
- int i;
- short first, last;
-
+static int is_in_range(wchar_t ch, const wchar_t **p, int *reverse) {
+ wchar_t first, last;
+ int found=0;
if (**p == '^') {
- reverse = 1;
+ *reverse = 1;
(*p)++;
} else
- reverse=0;
- for(i=0; i<256; i++)
- table[i]=0;
- while(**p != ']') {
- if(!**p)
+ *reverse=0;
+ while( (first = **p) != ']') {
+ if(!first)
+ /* Malformed pattern, range not closed */
return 0;
- if((*p)[1] == '-') {
- first = **p;
- (*p)+=2;
- if(**p == ']')
- last = 256;
- else
- last = *((*p)++);
- for(i=first; i<=last; i++)
- table[i] = 1;
+ if(*(++(*p)) == '-') {
+ last = *(++(*p));
+ if(last==']') {
+ /* Last "-" in range designates itself */
+ if(ch == first || ch == '-')
+ found = 1;
+ break;
+ }
+ (*p)++;
+
+ /* a proper range */
+ if(ch >= first && ch <= last)
+ found = 1;
} else
- table[(int) *((*p)++)] = 1;
+ /* a Just one character */
+ if(ch == first)
+ found = 1;
}
+ return found;
+}
+
+static int parse_range(const wchar_t **p, const wchar_t *s, wchar_t *out,
+ int (*compfn)(wchar_t a, wchar_t b))
+{
+ int reverse;
+ const wchar_t *p0 = *p;
+ const wchar_t *p1 = *p;
if(out)
*out = *s;
- if(table[(int) *s])
+ if(is_in_range(*s, p, &reverse))
return 1 ^ reverse;
if(compfn == exactcmp)
return reverse;
- if(table[tolower(*s)]) {
+ if(is_in_range((wchar_t)towlower((wint_t)*s), &p0, &reverse)) {
if(out)
*out = tolower(*s);
return 1 ^ reverse;
}
- if(table[toupper(*s)]) {
+ if(is_in_range((wchar_t)towupper((wint_t)*s), &p1, &reverse)) {
if(out)
*out = toupper(*s);
return 1 ^ reverse;
diff --git a/mattrib.1 b/mattrib.1
index abb3496..f8d4a5f 100644
--- a/mattrib.1
+++ b/mattrib.1
@@ -1,5 +1,5 @@
'\" t
-.TH mattrib 1 "11Nov18" mtools-pre-4.0.20
+.TH mattrib 1 "24Nov18" mtools-4.0.21
.SH Name
mattrib - change MSDOS file attribute flags
'\" t
diff --git a/mattrib.c b/mattrib.c
index 89bdc94..1fd0eb2 100644
--- a/mattrib.c
+++ b/mattrib.c
@@ -159,7 +159,7 @@ static int letterToCode(int letter)
}
}
-
+void mattrib(int argc, char **argv, int type UNUSEDP) NORETURN;
void mattrib(int argc, char **argv, int type UNUSEDP)
{
Arg_t arg;
diff --git a/mbadblocks.1 b/mbadblocks.1
index 1413239..b573c61 100644
--- a/mbadblocks.1
+++ b/mbadblocks.1
@@ -1,5 +1,5 @@
'\" t
-.TH mbadblocks 1 "11Nov18" mtools-pre-4.0.20
+.TH mbadblocks 1 "24Nov18" mtools-4.0.21
.SH Name
mbadblocks - tests a floppy disk, and marks the bad blocks in the FAT
'\" t
diff --git a/mbadblocks.c b/mbadblocks.c
index a8fd6d0..6d2cf3b 100644
--- a/mbadblocks.c
+++ b/mbadblocks.c
@@ -62,7 +62,7 @@ static void mark(Fs_t *Fs, long offset, unsigned int badClus) {
static char *in_buf;
static char *pat_buf;
-static int in_len;
+static size_t in_len;
static void progress(unsigned int i, unsigned int total) {
@@ -85,14 +85,14 @@ static int scan(Fs_t *Fs, Stream_t *dev,
pos = sectorsToBytes((Stream_t*)Fs, start);
if(doWrite) {
ret = force_write(dev, buffer, pos, in_len);
- if(ret < in_len )
+ if(ret < (off_t) in_len )
bad = 1;
} else {
ret = force_read(dev, in_buf, pos, in_len);
- if(ret < in_len )
+ if(ret < (off_t) in_len )
bad = 1;
else if(buffer) {
- int i;
+ size_t i;
for(i=0; i<in_len; i++)
if(in_buf[i] != buffer[i]) {
bad = 1;
@@ -109,6 +109,7 @@ static int scan(Fs_t *Fs, Stream_t *dev,
return 0;
}
+void mbadblocks(int argc, char **argv, int type UNUSEDP) NORETURN;
void mbadblocks(int argc, char **argv, int type UNUSEDP)
{
unsigned int i;
diff --git a/mcat.1 b/mcat.1
index 7a0946d..151e76d 100644
--- a/mcat.1
+++ b/mcat.1
@@ -1,5 +1,5 @@
'\" t
-.TH mcat 1 "11Nov18" mtools-pre-4.0.20
+.TH mcat 1 "24Nov18" mtools-4.0.21
.SH Name
mcat - dump raw disk image
'\" t
diff --git a/mcat.c b/mcat.c
index 8899529..d4aeaff 100644
--- a/mcat.c
+++ b/mcat.c
@@ -28,6 +28,7 @@
#include "floppyd_io.h"
#include "plain_io.h"
+static void usage(void) NORETURN;
static void usage(void)
{
fprintf(stderr, "Mtools version %s, dated %s\n",
@@ -38,9 +39,9 @@ static void usage(void)
}
#ifdef __CYGWIN__
-#define BUF_SIZE 512
+#define BUF_SIZE 512u
#else
-#define BUF_SIZE 16000
+#define BUF_SIZE 16000u
#endif
static size_t bufLen(size_t blocksize, mt_size_t totalSize, mt_off_t address)
@@ -52,6 +53,7 @@ static size_t bufLen(size_t blocksize, mt_size_t totalSize, mt_off_t address)
return blocksize;
}
+void mcat(int argc, char **argv, int type UNUSEDP) NORETURN;
void mcat(int argc, char **argv, int type UNUSEDP)
{
struct device *dev;
diff --git a/mcd.1 b/mcd.1
index 6e1cdf1..d6483fc 100644
--- a/mcd.1
+++ b/mcd.1
@@ -1,5 +1,5 @@
'\" t
-.TH mcd 1 "11Nov18" mtools-pre-4.0.20
+.TH mcd 1 "24Nov18" mtools-4.0.21
.SH Name
mcd - change MSDOS directory
'\" t
diff --git a/mcd.c b/mcd.c
index 689fcef..a11909b 100644
--- a/mcd.c
+++ b/mcd.c
@@ -40,6 +40,7 @@ static int mcd_callback(direntry_t *entry, MainParam_t *mp UNUSEDP)
}
+void mcd(int argc, char **argv, int type UNUSEDP) NORETURN;
void mcd(int argc, char **argv, int type UNUSEDP)
{
struct MainParam_t mp;
diff --git a/mclasserase.1 b/mclasserase.1
index c684cfd..7ea5daa 100644
--- a/mclasserase.1
+++ b/mclasserase.1
@@ -1,5 +1,5 @@
'\" t
-.TH mclasserase 1 "11Nov18" mtools-pre-4.0.20
+.TH mclasserase 1 "24Nov18" mtools-4.0.21
.SH Name
mclasserase - erase memory cards
'\" t
diff --git a/mclasserase.c b/mclasserase.c
index 5d03516..59937d1 100644
--- a/mclasserase.c
+++ b/mclasserase.c
@@ -76,6 +76,7 @@ static void usage(int ret)
* @returns n.a.
*
*/
+static void do_mclasserase(char drive,int debug) NORETURN;
static void do_mclasserase(char drive,int debug)
{
struct device dev; /* Device information structure */
@@ -101,8 +102,9 @@ static void do_mclasserase(char drive,int debug)
int icount=0;
int iTotalErase = 0;
- const int cycles = 3; /* How many times we'll overwrite the media */
- char odat[cycles]; /* Data for each overwrite procedure */
+/* How many times we'll overwrite the media: */
+#define CYCLES 3
+ unsigned char odat[CYCLES]; /* Data for each overwrite procedure */
/* Creating values for overwrite */
odat[0]=0xff;
@@ -111,7 +113,7 @@ static void do_mclasserase(char drive,int debug)
if (debug == 1)
- printf("cycles: %i, odats: %i,%i,%i\n",cycles,odat[0],odat[1],odat[2]);
+ printf("cycles: %i, odats: %i,%i,%i\n",CYCLES,odat[0],odat[1],odat[2]);
@@ -159,7 +161,7 @@ static void do_mclasserase(char drive,int debug)
/*
* Overwrite device
*/
- for( i=0; i < cycles; i++){
+ for( i=0; i < CYCLES; i++){
if (debug==1)
{
@@ -276,6 +278,7 @@ static void do_mclasserase(char drive,int debug)
*
*
*/
+void mclasserase(int argc, char **argv, int type UNUSEDP) NORETURN;
void mclasserase(int argc, char **argv, int type UNUSEDP)
{
/* declaration of all variables */
@@ -346,6 +349,4 @@ void mclasserase(int argc, char **argv, int type UNUSEDP)
* not exist */
do_mclasserase(drive,debug);
-
- exit (0);
}
diff --git a/mcopy.1 b/mcopy.1
index fd5da8e..f70fea5 100644
--- a/mcopy.1
+++ b/mcopy.1
@@ -1,5 +1,5 @@
'\" t
-.TH mcopy 1 "11Nov18" mtools-pre-4.0.20
+.TH mcopy 1 "24Nov18" mtools-4.0.21
.SH Name
mcopy - copy MSDOS files to/from Unix
'\" t
diff --git a/mcopy.c b/mcopy.c
index b282394..c25132f 100644
--- a/mcopy.c
+++ b/mcopy.c
@@ -21,8 +21,6 @@
*/
-#define LOWERCASE
-
#include "sysincludes.h"
#include "msdos.h"
#include "mtools.h"
@@ -502,6 +500,7 @@ static void usage(int ret)
exit(ret);
}
+void mcopy(int argc, char **argv, int mtype) NORETURN;
void mcopy(int argc, char **argv, int mtype)
{
Arg_t arg;
diff --git a/mdel.1 b/mdel.1
index 4182d59..058801c 100644
--- a/mdel.1
+++ b/mdel.1
@@ -1,5 +1,5 @@
'\" t
-.TH mdel 1 "11Nov18" mtools-pre-4.0.20
+.TH mdel 1 "24Nov18" mtools-4.0.21
.SH Name
mdel - delete an MSDOS file
'\" t
diff --git a/mdel.c b/mdel.c
index 0b8a4bb..82ef2cb 100644
--- a/mdel.c
+++ b/mdel.c
@@ -149,6 +149,7 @@ static void usage(int ret)
exit(ret);
}
+void mdel(int argc, char **argv, int deltype) NORETURN;
void mdel(int argc, char **argv, int deltype)
{
Arg_t arg;
@@ -194,7 +195,8 @@ void mdel(int argc, char **argv, int deltype)
}
mp.lookupflags |= NO_DOTS;
for(i=optind;i<argc;i++) {
- int b,l;
+ int b;
+ size_t l;
if(argv[i][0] && argv[i][1] == ':')
b = 2;
else
diff --git a/mdeltree.1 b/mdeltree.1
index dc02602..eb265a1 100644
--- a/mdeltree.1
+++ b/mdeltree.1
@@ -1,5 +1,5 @@
'\" t
-.TH mdeltree 1 "11Nov18" mtools-pre-4.0.20
+.TH mdeltree 1 "24Nov18" mtools-4.0.21
.SH Name
mdeltree - recursively delete an MSDOS directory and its contents
'\" t
diff --git a/mdir.1 b/mdir.1
index 89dd5e2..49c030a 100644
--- a/mdir.1
+++ b/mdir.1
@@ -1,5 +1,5 @@
'\" t
-.TH mdir 1 "11Nov18" mtools-pre-4.0.20
+.TH mdir 1 "24Nov18" mtools-4.0.21
.SH Name
mdir - display an MSDOS directory
'\" t
diff --git a/mdir.c b/mdir.c
index 917ba94..8190dfa 100644
--- a/mdir.c
+++ b/mdir.c
@@ -58,8 +58,8 @@ static mt_size_t bytesOnDrive;
static Stream_t *RootDir;
-static char global_shortname[13];
-static char global_longname[VBUFSIZE];
+static char global_shortname[4*12+1];
+static char global_longname[4*MAX_VNAMELEN+1];
/*
@@ -123,7 +123,7 @@ static __inline__ void print_time(struct directory *dir)
*/
static const char *dotted_num(mt_size_t num, int width, char **buf)
{
- int len;
+ size_t len;
register char *srcp, *dstp;
int size;
@@ -412,7 +412,7 @@ static int list_file(direntry_t *entry, MainParam_t *mp UNUSEDP)
printf("%-15s", global_shortname);
} else if(!concise) {
char tmpBasename[4*8+1];
- char tmpExt[4*8+1];
+ char tmpExt[4*3+1];
wchar_to_native(name,tmpBasename,8);
wchar_to_native(ext,tmpExt,3);
@@ -530,7 +530,7 @@ static void usage(int ret)
exit(ret);
}
-
+void mdir(int argc, char **argv, int type UNUSEDP) NORETURN;
void mdir(int argc, char **argv, int type UNUSEDP)
{
int ret;
diff --git a/mdoctorfat.c b/mdoctorfat.c
index 668fc19..174c3b9 100644
--- a/mdoctorfat.c
+++ b/mdoctorfat.c
@@ -18,8 +18,6 @@
*/
-#define LOWERCASE
-
#include "sysincludes.h"
#include "msdos.h"
#include "mtools.h"
@@ -76,6 +74,7 @@ static void usage(int ret)
exit(ret);
}
+void mdoctorfat(int argc, char **argv, int mtype UNUSEDP) NORETURN;
void mdoctorfat(int argc, char **argv, int mtype UNUSEDP)
{
Arg_t arg;
@@ -116,7 +115,6 @@ void mdoctorfat(int argc, char **argv, int mtype UNUSEDP)
usage(0);
case '?':
usage(1);
- break;
}
}
diff --git a/mdu.1 b/mdu.1
index 772666f..a53ae04 100644
--- a/mdu.1
+++ b/mdu.1
@@ -1,5 +1,5 @@
'\" t
-.TH mdu 1 "11Nov18" mtools-pre-4.0.20
+.TH mdu 1 "24Nov18" mtools-4.0.21
.SH Name
mdu - display the amount of space occupied by an MSDOS directory
'\" t
diff --git a/mdu.c b/mdu.c
index 1073271..b6a7523 100644
--- a/mdu.c
+++ b/mdu.c
@@ -93,6 +93,7 @@ static int dir_mdu(direntry_t *entry, MainParam_t *mp)
return ret;
}
+void mdu(int argc, char **argv, int type UNUSEDP) NORETURN;
void mdu(int argc, char **argv, int type UNUSEDP)
{
Arg_t arg;
diff --git a/mformat.1 b/mformat.1
index e7058c3..021cc0f 100644
--- a/mformat.1
+++ b/mformat.1
@@ -1,5 +1,5 @@
'\" t
-.TH mformat 1 "11Nov18" mtools-pre-4.0.20
+.TH mformat 1 "24Nov18" mtools-4.0.21
.SH Name
mformat - add an MSDOS filesystem to a low-level formatted floppy disk
'\" t
diff --git a/mformat.c b/mformat.c
index 0185f30..aa126a6 100644
--- a/mformat.c
+++ b/mformat.c
@@ -686,6 +686,7 @@ static void calc_fs_parameters_32(unsigned long tot_sectors,
+static void usage(int ret) NORETURN;
static void usage(int ret)
{
fprintf(stderr,
@@ -860,6 +861,7 @@ static int get_lba_geom(Stream_t *Direct, unsigned long tot_sectors, struct devi
return 0;
}
+void mformat(int argc, char **argv, int dummy UNUSEDP) NORETURN;
void mformat(int argc, char **argv, int dummy UNUSEDP)
{
int r; /* generic return value */
@@ -907,10 +909,10 @@ void mformat(int argc, char **argv, int dummy UNUSEDP)
int Atari = 0; /* should we add an Atari-style serial number ? */
- int backupBoot = 6;
+ unsigned int backupBoot = 6;
int backupBootSet = 0;
- int resvSects = 0;
+ unsigned int resvSects = 0;
char *endptr;
@@ -1439,7 +1441,7 @@ void mformat(int argc, char **argv, int dummy UNUSEDP)
labelBlock->dos4 = 0x29;
if (!serial_set || Atari)
- srandom((long)time (0));
+ srandom(time (0));
if (!serial_set)
serial=random();
set_dword(labelBlock->serial, serial);
diff --git a/minfo.1 b/minfo.1
index 2c7d77c..204ab70 100644
--- a/minfo.1
+++ b/minfo.1
@@ -1,5 +1,5 @@
'\" t
-.TH minfo 1 "11Nov18" mtools-pre-4.0.20
+.TH minfo 1 "24Nov18" mtools-4.0.21
.SH Name
minfo - print the parameters of a MSDOS filesystem
'\" t
diff --git a/minfo.c b/minfo.c
index 67352f2..c6847a6 100644
--- a/minfo.c
+++ b/minfo.c
@@ -116,6 +116,7 @@ static void displayBPB(Stream_t *Stream, union bootsector *boot) {
}
}
+void minfo(int argc, char **argv, int type UNUSEDP) NORETURN;
void minfo(int argc, char **argv, int type UNUSEDP)
{
union bootsector boot;
diff --git a/misc.c b/misc.c
index d181ff2..9f83649 100644
--- a/misc.c
+++ b/misc.c
@@ -156,6 +156,11 @@ void print_sector(const char *message, unsigned char *data, int size)
}
}
+#if (SIZEOF_TIME_T > SIZEOF_LONG) && defined (HAVE_STRTOLL)
+# define STRTOTIME strtoll
+#else
+# define STRTOTIME strtol
+#endif
time_t getTimeNow(time_t *now)
{
@@ -166,24 +171,22 @@ time_t getTimeNow(time_t *now)
const char *source_date_epoch = getenv("SOURCE_DATE_EPOCH");
if (source_date_epoch) {
char *endptr;
- unsigned long long epoch =
- strtoll(source_date_epoch, &endptr, 10);
+ errno = 0;
+ time_t epoch =
+ STRTOTIME(source_date_epoch, &endptr, 10);
if (endptr == source_date_epoch)
- fprintf(stderr, "SOURCE_DATE_EPOCH invalid\n");
- else if ((errno == ERANGE &&
- (epoch == ULLONG_MAX || epoch == 0))
- || (errno != 0 && epoch == 0))
fprintf(stderr,
- "SOURCE_DATE_EPOCH: strtoll: %s: %llu\n",
- strerror(errno), epoch);
- else if (*endptr != '\0')
+ "SOURCE_DATE_EPOCH \"%s\" invalid\n",
+ source_date_epoch);
+ else if (errno != 0)
fprintf(stderr,
- "SOURCE_DATE_EPOCH has trailing garbage\n");
- else if (epoch > ULONG_MAX)
+ "SOURCE_DATE_EPOCH: strtoll: %s: %s\n",
+ strerror(errno), source_date_epoch);
+ else if (*endptr != '\0')
fprintf(stderr,
- "SOURCE_DATE_EPOCH must be <= %lu but saw: %llu\n",
- ULONG_MAX, epoch);
+ "SOURCE_DATE_EPOCH has trailing garbage \"%s\"\n",
+ endptr);
else {
sharedNow = epoch;
haveTime = 1;
diff --git a/mk_direntry.c b/mk_direntry.c
index ccb39c5..79a3921 100644
--- a/mk_direntry.c
+++ b/mk_direntry.c
@@ -80,9 +80,6 @@ static __inline__ int ask_rename(doscp_t *cp, ClashHandling_t *ch,
if(!opentty(0))
return 0;
-#define maxsize (isprimary ? MAX_VNAMELEN+1 : 11+1)
-#define name (isprimary ? argname : shortname)
-
mangled = 0;
do {
char tname[4*MAX_VNAMELEN+1];
@@ -99,8 +96,6 @@ static __inline__ int ask_rename(doscp_t *cp, ClashHandling_t *ch,
ch, tname, shortname);
} while (mangled & 1);
return 1;
-#undef maxsize
-#undef name
}
/**
diff --git a/mkmanifest.1 b/mkmanifest.1
index ef5504a..191e267 100644
--- a/mkmanifest.1
+++ b/mkmanifest.1
@@ -1,5 +1,5 @@
'\" t
-.TH mkmanifest 1 "11Nov18" mtools-pre-4.0.20
+.TH mkmanifest 1 "24Nov18" mtools-4.0.21
.SH Name
mkmanifest - makes list of file names and their DOS 8+3 equivalent
'\" t
diff --git a/mlabel.1 b/mlabel.1
index e460cb2..0160529 100644
--- a/mlabel.1
+++ b/mlabel.1
@@ -1,5 +1,5 @@
'\" t
-.TH mlabel 1 "11Nov18" mtools-pre-4.0.20
+.TH mlabel 1 "24Nov18" mtools-4.0.21
.SH Name
mlabel - make an MSDOS volume label
'\" t
diff --git a/mlabel.c b/mlabel.c
index 76d6db9..29a2c14 100644
--- a/mlabel.c
+++ b/mlabel.c
@@ -103,6 +103,7 @@ static void usage(int ret)
}
+void mlabel(int argc, char **argv, int type UNUSEDP) NORETURN;
void mlabel(int argc, char **argv, int type UNUSEDP)
{
@@ -157,7 +158,7 @@ void mlabel(int argc, char **argv, int type UNUSEDP)
break;
case 'n':
set_serial = SER_RANDOM;
- srandom((long)time (0));
+ srandom(time (0));
serial=random();
break;
case 'N':
diff --git a/mmd.1 b/mmd.1
index b43ee54..08af4ec 100644
--- a/mmd.1
+++ b/mmd.1
@@ -1,5 +1,5 @@
'\" t
-.TH mmd 1 "11Nov18" mtools-pre-4.0.20
+.TH mmd 1 "24Nov18" mtools-4.0.21
.SH Name
mmd - make an MSDOS subdirectory
'\" t
diff --git a/mmd.c b/mmd.c
index a76ad1b..a7cf916 100644
--- a/mmd.c
+++ b/mmd.c
@@ -20,8 +20,6 @@
*/
-#define LOWERCASE
-
#include "sysincludes.h"
#include "msdos.h"
#include "mtools.h"
@@ -153,6 +151,7 @@ static int createDirCallback(direntry_t *entry UNUSEDP, MainParam_t *mp)
}
+void mmd(int argc, char **argv, int type UNUSEDP) NORETURN;
void mmd(int argc, char **argv, int type UNUSEDP)
{
Arg_t arg;
@@ -183,7 +182,6 @@ void mmd(int argc, char **argv, int type UNUSEDP)
usage(0);
default:
usage(1);
- break;
}
}
diff --git a/mmount.1 b/mmount.1
index dbfe414..7888cad 100644
--- a/mmount.1
+++ b/mmount.1
@@ -1,5 +1,5 @@
'\" t
-.TH mmount 1 "11Nov18" mtools-pre-4.0.20
+.TH mmount 1 "24Nov18" mtools-4.0.21
.SH Name
mmount - mount an MSDOS disk
'\" t
diff --git a/mmount.c b/mmount.c
index 01ebde2..29c487e 100644
--- a/mmount.c
+++ b/mmount.c
@@ -32,6 +32,7 @@
#include "mainloop.h"
#include "fs.h"
+void mmount(int argc, char **argv, int type UNUSEDP) NORETURN;
void mmount(int argc, char **argv, int type UNUSEDP)
{
char drive;
diff --git a/mmove.1 b/mmove.1
index 6c16efc..2e9ba18 100644
--- a/mmove.1
+++ b/mmove.1
@@ -1,5 +1,5 @@
'\" t
-.TH mmove 1 "11Nov18" mtools-pre-4.0.20
+.TH mmove 1 "24Nov18" mtools-4.0.21
.SH Name
mmove - move or rename an MSDOS file or subdirectory
'\" t
diff --git a/mmove.c b/mmove.c
index c947297..0e3aa22 100644
--- a/mmove.c
+++ b/mmove.c
@@ -20,8 +20,6 @@
*/
-#define LOWERCASE
-
#include "sysincludes.h"
#include "msdos.h"
#include "mtools.h"
@@ -227,12 +225,13 @@ static void usage(int ret)
exit(ret);
}
+void mmove(int argc, char **argv, int oldsyntax) NORETURN;
void mmove(int argc, char **argv, int oldsyntax)
{
Arg_t arg;
int c;
- char shortname[13];
- char longname[VBUFSIZE];
+ char shortname[12*4+1];
+ char longname[4*MAX_VNAMELEN+1];
char def_drive;
int i;
diff --git a/mpartition.1 b/mpartition.1
index 325c46c..ac30ac9 100644
--- a/mpartition.1
+++ b/mpartition.1
@@ -1,5 +1,5 @@
'\" t
-.TH mpartition 1 "11Nov18" mtools-pre-4.0.20
+.TH mpartition 1 "24Nov18" mtools-4.0.21
.SH Name
mpartition - partition an MSDOS hard disk
'\" t
diff --git a/mpartition.c b/mpartition.c
index 8b42825..49c10a5 100644
--- a/mpartition.c
+++ b/mpartition.c
@@ -142,7 +142,7 @@ int consistencyCheck(struct partition *partTable, int doprint, int verbose,
unsigned int *j,
struct device *used_dev, int target_partition)
{
- unsigned int i;
+ int i;
unsigned int inconsistency;
*j = 0;
@@ -319,6 +319,7 @@ static void usage(int ret)
exit(ret);
}
+void mpartition(int argc, char **argv, int dummy UNUSEDP) NORETURN;
void mpartition(int argc, char **argv, int dummy UNUSEDP)
{
Stream_t *Stream;
diff --git a/mrd.1 b/mrd.1
index 1f116b6..890963f 100644
--- a/mrd.1
+++ b/mrd.1
@@ -1,5 +1,5 @@
'\" t
-.TH mrd 1 "11Nov18" mtools-pre-4.0.20
+.TH mrd 1 "24Nov18" mtools-4.0.21
.SH Name
mrd - remove an MSDOS subdirectory
'\" t
diff --git a/mren.1 b/mren.1
index d4d2676..7f60340 100644
--- a/mren.1
+++ b/mren.1
@@ -1,5 +1,5 @@
'\" t
-.TH mren 1 "11Nov18" mtools-pre-4.0.20
+.TH mren 1 "24Nov18" mtools-4.0.21
.SH Name
mren - rename an existing MSDOS file
'\" t
diff --git a/mshortname.1 b/mshortname.1
index 76164cb..bc7d01d 100644
--- a/mshortname.1
+++ b/mshortname.1
@@ -1,5 +1,5 @@
'\" t
-.TH mshortname 1 "11Nov18" mtools-pre-4.0.20
+.TH mshortname 1 "24Nov18" mtools-4.0.21
.SH Name
mshortname - shows short name of a file
'\" t
diff --git a/mshortname.c b/mshortname.c
index e7a7db5..495cef5 100644
--- a/mshortname.c
+++ b/mshortname.c
@@ -42,6 +42,7 @@ static void usage(int ret)
exit(ret);
}
+void mshortname(int argc, char **argv, int type UNUSEDP) NORETURN;
void mshortname(int argc, char **argv, int type UNUSEDP)
{
struct MainParam_t mp;
diff --git a/mshowfat.1 b/mshowfat.1
index 2a762dd..5b6e0aa 100644
--- a/mshowfat.1
+++ b/mshowfat.1
@@ -1,5 +1,5 @@
'\" t
-.TH mshowfat 1 "11Nov18" mtools-pre-4.0.20
+.TH mshowfat 1 "24Nov18" mtools-4.0.21
.SH Name
mshowfat - shows FAT clusters allocated to file
'\" t
diff --git a/mshowfat.c b/mshowfat.c
index eac1b35..b04c6e6 100644
--- a/mshowfat.c
+++ b/mshowfat.c
@@ -20,8 +20,6 @@
*/
-#define LOWERCASE
-
#include "sysincludes.h"
#include "msdos.h"
#include "mtools.h"
@@ -69,6 +67,7 @@ static void usage(int ret)
exit(ret);
}
+void mshowfat(int argc, char **argv, int mtype UNUSEDP) NORETURN;
void mshowfat(int argc, char **argv, int mtype UNUSEDP)
{
Arg_t arg;
@@ -90,7 +89,6 @@ void mshowfat(int argc, char **argv, int mtype UNUSEDP)
usage(0);
case '?':
usage(1);
- break;
}
}
diff --git a/mtools.1 b/mtools.1
index e93f876..a6a8517 100644
--- a/mtools.1
+++ b/mtools.1
@@ -1,5 +1,5 @@
'\" t
-.TH mtools 1 "11Nov18" mtools-pre-4.0.20
+.TH mtools 1 "24Nov18" mtools-4.0.21
.SH Name
mtools - utilities to access DOS disks in Unix.
'\" t
@@ -36,10 +36,10 @@ Mtools can be found at the following places (and their mirrors):
.nf
.ft 3
.in +0.3i
-http://ftp.gnu.org/gnu/mtools/mtools-4.0.20.tar.gz
-http://mtools.linux.lu/mtools-4.0.20.tar.gz
-ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.20.tar.gz
-ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.20.tar.gz
+http://ftp.gnu.org/gnu/mtools/mtools-4.0.21.tar.gz
+http://mtools.linux.lu/mtools-4.0.21.tar.gz
+ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.21.tar.gz
+ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.21.tar.gz
.fi
.in -0.3i
.ft R
diff --git a/mtools.5 b/mtools.5
index 85ac32b..73931f2 100644
--- a/mtools.5
+++ b/mtools.5
@@ -1,5 +1,5 @@
'\" t
-.TH mtools 5 "11Nov18" MTOOLS MTOOLS
+.TH mtools 5 "24Nov18" MTOOLS MTOOLS
.SH Name
mtools.conf - mtools configuration files
'\" t
@@ -13,7 +13,7 @@ mtools.conf - mtools configuration files
.tr \(if`
.tr \(pd"
-.ds St Mtools\ 4.0.20
+.ds St Mtools\ 4.0.21
.PP
.SH Description
.PP
diff --git a/mtools.h b/mtools.h
index 18bb2fa..86e475b 100644
--- a/mtools.h
+++ b/mtools.h
@@ -26,15 +26,15 @@ typedef struct dos_name_t dos_name_t;
extern int lockf(int, int, off_t); /* SCO has no proper include file for lockf */
#endif
-#define SCSI_FLAG 1
-#define PRIV_FLAG 2
-#define NOLOCK_FLAG 4
-#define USE_XDF_FLAG 8
-#define MFORMAT_ONLY_FLAG 16
-#define VOLD_FLAG 32
-#define FLOPPYD_FLAG 64
-#define FILTER_FLAG 128
-#define SWAP_FLAG 256
+#define SCSI_FLAG 0x001u
+#define PRIV_FLAG 0x002u
+#define NOLOCK_FLAG 0x004u
+#define USE_XDF_FLAG 0x008u
+#define MFORMAT_ONLY_FLAG 0x010u
+#define VOLD_FLAG 0x020u
+#define FLOPPYD_FLAG 0x040u
+#define FILTER_FLAG 0x080u
+#define SWAP_FLAG 0x100u
#define IS_SCSI(x) ((x) && ((x)->misc_flags & SCSI_FLAG))
#define IS_PRIVILEGED(x) ((x) && ((x)->misc_flags & PRIV_FLAG))
@@ -93,8 +93,11 @@ struct OldDos_t {
extern struct OldDos_t *getOldDosBySize(size_t size);
extern struct OldDos_t *getOldDosByMedia(int media);
-extern struct OldDos_t *getOldDosByParams(int tracks, int heads, int sectors,
- int dir_len, int cluster_size);
+extern struct OldDos_t *getOldDosByParams(unsigned int tracks,
+ unsigned int heads,
+ unsigned int sectors,
+ unsigned int dir_len,
+ unsigned int cluster_size);
int setDeviceFromOldDos(int media, struct device *dev);
@@ -126,6 +129,15 @@ extern const char *short_illegals, *long_illegals;
} \
} while(0)
+#define sizemaximize(target, max) do { \
+ if(max < 0) { \
+ if(target > 0) \
+ target = 0; \
+ } else if(target > (size_t) max) { \
+ target = max; \
+ } \
+} while(0)
+
#define minimize(target, min) do { \
if(target < min) \
target = min; \
@@ -149,11 +161,11 @@ int lock_dev(int fd, int mode, struct device *dev);
char *unix_normalize (doscp_t *cp, char *ans, struct dos_name_t *dn);
void dos_name(doscp_t *cp, const char *filename, int verbose, int *mangled,
struct dos_name_t *);
-struct directory *mk_entry(const dos_name_t *filename, char attr,
+struct directory *mk_entry(const dos_name_t *filename, unsigned char attr,
unsigned int fat, size_t size, time_t date,
struct directory *ndir);
-struct directory *mk_entry_from_base(const char *base, char attr,
+struct directory *mk_entry_from_base(const char *base, unsigned char attr,
unsigned int fat, size_t size, time_t date,
struct directory *ndir);
@@ -227,7 +239,7 @@ void read_config(void);
off_t str_to_offset(char *str);
extern struct device *devices;
extern struct device const_devices[];
-extern const int nr_const_devices;
+extern const unsigned int nr_const_devices;
#define New(type) ((type*)(calloc(1,sizeof(type))))
#define Grow(adr,n,type) ((type*)(realloc((char *)adr,n*sizeof(type))))
diff --git a/mtools.info b/mtools.info
index 5d0b24c..b620b8c 100644
--- a/mtools.info
+++ b/mtools.info
@@ -1,6 +1,6 @@
This is mtools.info, produced by makeinfo version 6.3 from mtools.texi.
-This manual is for Mtools (version 4.0.20, November 2018), which is a
+This manual is for Mtools (version 4.0.21, November 2018), which is a
collection of tools to allow Unix systems to manipulate MS-DOS files.
Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright
@@ -41,7 +41,7 @@ preliminary mounting or initialization (assuming the default
'/etc/mtools.conf' works on your machine). With mtools, one can change
floppies too without unmounting and mounting.
- This manual is for Mtools (version 4.0.20, November 2018), which is a
+ This manual is for Mtools (version 4.0.21, November 2018), which is a
collection of tools to allow Unix systems to manipulate MS-DOS files.
Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright
@@ -75,10 +75,10 @@ File: mtools.info, Node: Location, Next: Common features, Prev: Top, Up: Top
*********************
Mtools can be found at the following places (and their mirrors):
- http://ftp.gnu.org/gnu/mtools/mtools-4.0.20.tar.gz
- http://mtools.linux.lu/mtools-4.0.20.tar.gz
- ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.20.tar.gz
- ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.20.tar.gz
+ http://ftp.gnu.org/gnu/mtools/mtools-4.0.21.tar.gz
+ http://mtools.linux.lu/mtools-4.0.21.tar.gz
+ ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.21.tar.gz
+ ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.21.tar.gz
Before reporting a bug, make sure that it has not yet been fixed in
the Alpha patches which can be found at:
diff --git a/mtools.spec b/mtools.spec
index b655176..7b3e8c0 100644
--- a/mtools.spec
+++ b/mtools.spec
@@ -1,7 +1,7 @@
%define _binary_payload w9.gzdio
Name: mtools
Summary: mtools, read/write/list/format DOS disks under Unix
-Version: 4.0.20
+Version: 4.0.21
Release: 1
License: GPLv3+
Group: Utilities/System
@@ -135,6 +135,13 @@ if [ -f %{_bindir}/install-info ] ; then
fi
%changelog
+* Sat Nov 24 2018 Alain Knaff <alain@knaff.lu>
+- Fixed compilation for MingW
+- After MingW compilation, make sure executable has .exe extension
+- Addressed compiler warnings
+- Fixed length handling in character set conversion (Unicode file names)
+- Fixed matching of character range, when containing Unicode characters (mdir "c:test[α-ω].exe")
+- Fixed initialization of my_scsi_cmd constructor
* Sun Nov 11 2018 Alain Knaff <alain@knaff.lu>
- initialize directory entries to 0
- bad message "Too few sectors" replaced with "Too many sectors"
diff --git a/mtools.tmpl.1 b/mtools.tmpl.1
index f6d0e3d..397d58c 100644
--- a/mtools.tmpl.1
+++ b/mtools.tmpl.1
@@ -1,5 +1,5 @@
'\" t
-.TH mtools 1 "11Nov18" mtools-pre-4.0.20
+.TH mtools 1 "24Nov18" mtools-4.0.21
.SH Name
mtools - utilities to access DOS disks in Unix.
'\" t
@@ -36,10 +36,10 @@ Mtools can be found at the following places (and their mirrors):
.nf
.ft 3
.in +0.3i
-http://ftp.gnu.org/gnu/mtools/mtools-4.0.20.tar.gz
-http://mtools.linux.lu/mtools-4.0.20.tar.gz
-ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.20.tar.gz
-ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.20.tar.gz
+http://ftp.gnu.org/gnu/mtools/mtools-4.0.21.tar.gz
+http://mtools.linux.lu/mtools-4.0.21.tar.gz
+ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.21.tar.gz
+ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.21.tar.gz
.fi
.in -0.3i
.ft R
diff --git a/mtools.tmpl.5 b/mtools.tmpl.5
index 77d9996..3dc7eec 100644
--- a/mtools.tmpl.5
+++ b/mtools.tmpl.5
@@ -1,5 +1,5 @@
'\" t
-.TH mtools 5 "11Nov18" MTOOLS MTOOLS
+.TH mtools 5 "24Nov18" MTOOLS MTOOLS
.SH Name
mtools.conf - mtools configuration files
'\" t
@@ -13,7 +13,7 @@ mtools.conf - mtools configuration files
.tr \(if`
.tr \(pd"
-.ds St Mtools\ 4.0.20
+.ds St Mtools\ 4.0.21
.PP
.SH Description
.PP
diff --git a/mtoolstest.1 b/mtoolstest.1
index ca18eba..adee73e 100644
--- a/mtoolstest.1
+++ b/mtoolstest.1
@@ -1,5 +1,5 @@
'\" t
-.TH mtoolstest 1 "11Nov18" mtools-pre-4.0.20
+.TH mtoolstest 1 "24Nov18" mtools-4.0.21
.SH Name
mtoolstest - tests and displays the configuration
'\" t
diff --git a/mtype.1 b/mtype.1
index 75b821d..0f6a2b5 100644
--- a/mtype.1
+++ b/mtype.1
@@ -1,5 +1,5 @@
'\" t
-.TH mtype 1 "11Nov18" mtools-pre-4.0.20
+.TH mtype 1 "24Nov18" mtools-4.0.21
.SH Name
mtype - display contents of an MSDOS file
'\" t
diff --git a/mzip.1 b/mzip.1
index e5e975c..22359d2 100644
--- a/mzip.1
+++ b/mzip.1
@@ -1,5 +1,5 @@
'\" t
-.TH mzip 1 "11Nov18" mtools-pre-4.0.20
+.TH mzip 1 "24Nov18" mtools-4.0.21
.SH Name
mzip - change protection mode and eject disk on Zip/Jaz drive
'\" t
diff --git a/mzip.c b/mzip.c
index cf2b982..d0919c8 100644
--- a/mzip.c
+++ b/mzip.c
@@ -151,6 +151,7 @@ static int test_mounted ( char *dev )
}
+static void usage(int ret) NORETURN;
static void usage(int ret)
{
fprintf(stderr,
@@ -221,9 +222,10 @@ static int door_command(int priv, int fd, int cmd1, int cmd2,
return short_command(priv, fd, cmd1, 0, cmd2, 0, extra_data);
}
+void mzip(int argc, char **argv, int type UNUSEDP) NORETURN;
void mzip(int argc, char **argv, int type UNUSEDP)
{
- void *extra_data;
+ void *extra_data = NULL;
int c;
char drive;
device_t *dev;
diff --git a/old_dos.c b/old_dos.c
index 6ecf024..0d87a08 100644
--- a/old_dos.c
+++ b/old_dos.c
@@ -19,7 +19,7 @@ static struct OldDos_t old_dos[]={
};
struct OldDos_t *getOldDosBySize(size_t size) {
- int i;
+ size_t i;
for(i=0; i < sizeof(old_dos) / sizeof(old_dos[0]); i++){
if (old_dos[i].sectors *
old_dos[i].tracks *
@@ -30,7 +30,7 @@ struct OldDos_t *getOldDosBySize(size_t size) {
}
struct OldDos_t *getOldDosByMedia(int media) {
- int i;
+ size_t i;
for(i=0; i < sizeof(old_dos) / sizeof(old_dos[0]); i++){
if (old_dos[i].media == media)
return &old_dos[i];
@@ -39,9 +39,12 @@ struct OldDos_t *getOldDosByMedia(int media) {
return NULL;
}
-struct OldDos_t *getOldDosByParams(int tracks, int heads, int sectors,
- int dir_len, int cluster_size) {
- int i;
+struct OldDos_t *getOldDosByParams(unsigned int tracks,
+ unsigned int heads,
+ unsigned int sectors,
+ unsigned int dir_len,
+ unsigned int cluster_size) {
+ size_t i;
for(i=0; i < sizeof(old_dos) / sizeof(old_dos[0]); i++){
if (sectors == old_dos[i].sectors &&
tracks == old_dos[i].tracks &&
diff --git a/patchlevel.c b/patchlevel.c
index 51bd2ce..48f3c3d 100644
--- a/patchlevel.c
+++ b/patchlevel.c
@@ -15,10 +15,13 @@
* along with Mtools. If not, see <http://www.gnu.org/licenses/>.
*/
-const char *mversion="pre-4.0.20";
+#include "sysincludes.h"
+#include "msdos.h"
+
+const char *mversion="4.0.21";
/* Multiple releases on same day should be marked with (b), (cd), (d) after
* date string below */
-const char *mdate = "November 11th, 2018";
+const char *mdate = "November 24th, 2018";
-const char *mformat_banner = "MTOO4020";
+const char *mformat_banner = "MTOO4021";
diff --git a/plain_io.c b/plain_io.c
index 0582d0f..7554cd2 100644
--- a/plain_io.c
+++ b/plain_io.c
@@ -275,13 +275,15 @@ static int file_data(Stream_t *Stream, time_t *date, mt_size_t *size,
static int file_discard(Stream_t *Stream)
{
+#ifdef BLKFLSBUF
int ret;
DeclareThis(SimpleFile_t);
-#ifdef BLKFLSBUF
ret= ioctl(This->fd, BLKFLSBUF);
if(ret < 0)
perror("BLKFLSBUF");
return ret;
+#else
+ return 0;
#endif
}
@@ -302,8 +304,6 @@ static int file_discard(Stream_t *Stream)
group called, say, "ziprw" which has rw permission on /dev/rsd5c, is fine.
*/
-#define MAXBLKSPERCMD 255
-
static void scsi_init(SimpleFile_t *This)
{
int fd = This->fd;
@@ -668,7 +668,7 @@ APIRET rc;
} else {
*maxSize = max_off_t_seek;
}
- if(This->offset > *maxSize) {
+ if(This->offset > (mt_off_t) *maxSize) {
close(This->fd);
Free(This);
if(errmsg)
diff --git a/precmd.c b/precmd.c
index 8d1fc96..d31aa01 100644
--- a/precmd.c
+++ b/precmd.c
@@ -17,8 +17,6 @@
* Do filename expansion with the shell.
*/
-#define EXPAND_BUF 2048
-
#include "sysincludes.h"
#include "mtools.h"
@@ -35,7 +33,6 @@ void precmd(struct device *dev)
case -1:
perror("Could not fork");
exit(1);
- break;
case 0: /* the son */
execl("/bin/sh", "sh", "-c", dev->precmd, (char *)NULL);
break;
diff --git a/scsi.c b/scsi.c
index 477f22b..750e0cf 100644
--- a/scsi.c
+++ b/scsi.c
@@ -171,7 +171,7 @@ int scsi_cmd(int fd, unsigned char *cdb, int cmdlen, scsi_io_mode_t mode,
/*
** Init the command
*/
- memset(&scsi_cmd,0,sizeof(scsi_cmd));
+ memset(&my_scsi_cmd,0,sizeof(my_scsi_cmd));
my_scsi_cmd.interface_id = 'S';
my_scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(SG_DXFER_FROM_DEV):(SG_DXFER_TO_DEV);
my_scsi_cmd.cmd_len = cmdlen;
diff --git a/sysincludes.h b/sysincludes.h
index 2a0e528..d01c07d 100644
--- a/sysincludes.h
+++ b/sysincludes.h
@@ -135,6 +135,14 @@ typedef void *caddr_t;
#include <sys/types.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -279,6 +287,10 @@ typedef unsigned int uid_t;
# include <malloc.h>
#endif
+#ifdef HAVE_IO_H
+# include <io.h>
+#endif
+
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#else
@@ -400,6 +412,9 @@ typedef unsigned int uid_t;
extern char *strdup(const char *str);
#endif /* HAVE_STRDUP */
+#ifndef HAVE_STRNDUP
+extern char *strndup(const char *s, size_t n);
+#endif /* HAVE_STRDUP */
#ifndef HAVE_MEMCPY
extern char *memcpy(char *s1, const char *s2, size_t n);
diff --git a/tty.c b/tty.c
index 6c98e7a..77529f8 100644
--- a/tty.c
+++ b/tty.c
@@ -81,12 +81,15 @@ static int handlerIsSet = 0;
#define STDIN ttyfd
+#ifdef future
#define FAIL (-1)
+#endif
#define DONE 0
static Terminal in_orig;
/*--------------- Signal Handler routines -------------*/
+static void tty_time_out(int dummy UNUSEDP) NORETURN;
static void tty_time_out(int dummy UNUSEDP)
{
int exit_code;
diff --git a/version.texi b/version.texi
index cd0690a..7eeaef1 100644
--- a/version.texi
+++ b/version.texi
@@ -1,3 +1,3 @@
-@set EDITION 4.0.20
-@set VERSION 4.0.20
+@set EDITION 4.0.21
+@set VERSION 4.0.21
@set UPDATED November 2018
diff --git a/vfat.c b/vfat.c
index 36cfa82..d23ab6c 100644
--- a/vfat.c
+++ b/vfat.c
@@ -547,10 +547,12 @@ static result_t checkNameForMatch(struct direntry_t *direntry,
return RES_END;
case DCET_USED:
break;
+#ifdef DEBUG
default:
fprintf(stderr, "Unexpected entry type %d\n",
dce->type);
return RES_ERROR;
+#endif
}
direntry->dir = dce->dir;
diff --git a/xdf_io.c b/xdf_io.c
index d0572ef..411a843 100644
--- a/xdf_io.c
+++ b/xdf_io.c
@@ -39,7 +39,7 @@ typedef struct sector_map {
} sector_map_t;
-struct {
+static struct {
unsigned char track_size;
unsigned int track0_size:7;
unsigned int rootskip:1;
@@ -408,7 +408,7 @@ static void decompose(Xdf_t *This, int where, int len, off_t *begin,
*begin = where - track * This->track_size * 1024;
*end = where + len - track * This->track_size * 1024;
- smaximize(*end, This->track_size * 1024);
+ maximize(*end, This->track_size * 1024);
if(This->current_track == track && !boot)
/* already OK, return immediately */
@@ -501,7 +501,7 @@ static int xdf_write(Stream_t *Stream, char *buf, mt_off_t where, size_t len)
len2 = load_bounds(This, begin, end);
smaximize(end, (off_t)len2);
len2 -= begin;
- smaximize(len, (off_t)len2);
+ sizemaximize(len, (off_t)len2);
memcpy(This->buffer + begin, buf, len);
mark_dirty(This, begin, end);
return end - begin;