diff -Nurd -x'*~' mtools-3.9.10.orig/Makefile.in mtools-3.9.10/Makefile.in --- mtools-3.9.10.orig/Makefile.in 2004-02-28 14:06:35.000000000 -0500 +++ mtools-3.9.10/Makefile.in 2005-11-02 01:25:17.000000000 -0500 @@ -130,7 +130,7 @@ CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS) LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@ ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS) -X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS) +X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11 $(LIBS) X_CCFLAGS = $(X_CFLAGS) $(CFLAGS) all: mtools $(LINKS) mkmanifest @FLOPPYD@ diff -Nurd -x'*~' mtools-3.9.10.orig/buffer.c mtools-3.9.10/buffer.c --- mtools-3.9.10.orig/buffer.c 2003-05-17 10:16:55.000000000 -0400 +++ mtools-3.9.10/buffer.c 2005-11-02 01:29:44.000000000 -0500 @@ -209,7 +209,7 @@ if ( ret < 0 ) return ret; if(ret % This->sectorSize) { - fprintf(stderr, "Weird: read size (%d) not a multiple of sector size (%d)\n", ret, This->sectorSize); + fprintf(stderr, "Weird: read size (%d) not a multiple of sector size (%zd)\n", ret, This->sectorSize); ret -= ret % This->sectorSize; if(ret == 0) { fprintf(stderr, "Nothing left\n"); @@ -271,7 +271,7 @@ if(This->dirty_end > This->cur_size) { fprintf(stderr, - "Internal error, dirty end too big dirty_end=%x cur_size=%x len=%x offset=%d sectorSize=%x\n", + "Internal error, dirty end too big dirty_end=%zx cur_size=%x len=%x offset=%d sectorSize=%x\n", This->dirty_end, (unsigned int) This->cur_size, (unsigned int) len, (int) offset, (int) This->sectorSize); fprintf(stderr, "offset + len + grain - 1 = %x\n", diff -Nurd -x'*~' mtools-3.9.10.orig/config.c mtools-3.9.10/config.c --- mtools-3.9.10.orig/config.c 2004-02-28 12:40:23.000000000 -0500 +++ mtools-3.9.10/config.c 2005-11-02 01:14:21.000000000 -0500 @@ -679,13 +679,7 @@ memcpy(devices, const_devices, nr_const_devices*sizeof(struct device)); - (void) ((parse(CONF_FILE,1) | - parse(LOCAL_CONF_FILE,1) | - parse(SYS_CONF_FILE,1)) || - (parse(OLD_CONF_FILE,1) | - parse(OLD_LOCAL_CONF_FILE,1))); - /* the old-name configuration files only get executed if none of the - * new-name config files were used */ + parse(SYS_CONF_FILE,1); homedir = get_homedir(); if ( homedir ){ diff -Nurd -x'*~' mtools-3.9.10.orig/mformat.c mtools-3.9.10/mformat.c --- mtools-3.9.10.orig/mformat.c 2004-05-04 14:18:31.000000000 -0400 +++ mtools-3.9.10/mformat.c 2005-11-02 01:14:21.000000000 -0500 @@ -420,7 +420,7 @@ if ( Fs->num_clus < FAT16 && Fs->fat_bits > 16 ){ fprintf(stderr,"Too few clusters for this fat size." - " Please choose a 16-bit fat in your /etc/mtools.conf" + " Please choose a 16-bit fat in your SYSCONFDIR/mtools.conf" " or .mtoolsrc file\n"); exit(1); } @@ -1028,7 +1028,7 @@ sprintf(errmsg, "Unknown geometry " "(You must tell the complete geometry " - "of the disk, \neither in /etc/mtools.conf or " + "of the disk, \neither in SYSCONFDIR/mtools.conf or " "on the command line) "); continue; } diff -Nurd -x'*~' mtools-3.9.10.orig/mtools.5 mtools-3.9.10/mtools.5 --- mtools-3.9.10.orig/mtools.5 2005-02-28 17:14:33.000000000 -0500 +++ mtools-3.9.10/mtools.5 2005-11-02 01:14:21.000000000 -0500 @@ -40,9 +40,6 @@ \&\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/defaults/mtools.conf\(is\fR instead. -.PP .SS \ \ General\ configuration\ file\ syntax .iX "c Syntax of the configuration file" .iX "c Configuration file syntax" @@ -754,15 +751,9 @@ \&\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.\ +4.\ \&\fR\&\f(CW\(if$MTOOLSRC\(is\fR (file pointed by the \fR\&\f(CWMTOOLSRC\fR environmental variable) .PP diff -Nurd -x'*~' mtools-3.9.10.orig/mtools.h mtools-3.9.10/mtools.h --- mtools-3.9.10.orig/mtools.h 2005-02-13 08:41:29.000000000 -0500 +++ mtools-3.9.10/mtools.h 2005-11-02 01:14:21.000000000 -0500 @@ -164,7 +164,9 @@ #define New(type) ((type*)(calloc(1,sizeof(type)))) #define Grow(adr,n,type) ((type*)(realloc((char *)adr,n*sizeof(type)))) +#ifndef Free #define Free(adr) (free((char *)adr)); +#endif #define NewArray(size,type) ((type*)(calloc((size),sizeof(type)))) void mattrib(int argc, char **argv, int type); diff -Nurd -x'*~' mtools-3.9.10.orig/mtools.texi mtools-3.9.10/mtools.texi --- mtools-3.9.10.orig/mtools.texi 2005-03-02 16:18:40.000000000 -0500 +++ mtools-3.9.10/mtools.texi 2005-11-02 01:14:21.000000000 -0500 @@ -113,7 +113,7 @@ Mtools is sufficient to give access to MS-DOS filesystems. For instance, commands such as @code{mdir a:} work on the @code{a:} floppy without any preliminary mounting or initialization (assuming the default -@file{/etc/mtools.conf} works on your machine). With mtools, one can +@file{/usr/local/etc/mtools.conf} works on your machine). With mtools, one can change floppies too without unmounting and mounting. @@ -659,9 +659,6 @@ @file{/usr/local/etc/mtools.conf} is the system-wide configuration file, and @file{~/.mtoolsrc} is the user's private configuration file. -On some systems, the system-wide configuration file is called -@file{/etc/defaults/mtools.conf} instead. - @node general syntax, default values, config file location, Configuration @subsection General configuration file syntax @@ -1350,11 +1347,6 @@ @item @file{/usr/local/etc/mtools.conf} @item -@file{/etc/mtools} -This is for backwards compatibility only, and is only parsed if -@file{mtools.conf} -doesn't exist. -@item @file{~/.mtoolsrc}. @item @file{$MTOOLSRC} (file pointed by the @code{MTOOLSRC} environmental diff -Nurd -x'*~' mtools-3.9.10.orig/mtoolsPaths.h mtools-3.9.10/mtoolsPaths.h --- mtools-3.9.10.orig/mtoolsPaths.h 2002-05-01 05:49:04.000000000 -0400 +++ mtools-3.9.10/mtoolsPaths.h 2005-11-02 01:14:21.000000000 -0500 @@ -6,23 +6,8 @@ * only a very low probability of conflicting. */ - -#define CONF_FILE "/etc/mtools.conf" - - -#define OLD_CONF_FILE "/etc/mtools" - - - -#define LOCAL_CONF_FILE "/etc/default/mtools.conf" -/* Use this if you like to keep the configuration file in a non-standard - * place such as /etc/default, /opt/etc, /usr/etc, /usr/local/etc ... - */ - #define SYS_CONF_FILE SYSCONFDIR "/mtools.conf" -#define OLD_LOCAL_CONF_FILE "/etc/default/mtools" - #define CFG_FILE1 "/.mtoolsrc"