"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mdir.c" between
mtools-4.0.35.tar.bz2 and mtools-4.0.36.tar.bz2

About: Mtools is a collection of utilities to access MS-DOS disks from Unix without mounting them.

mdir.c  (mtools-4.0.35.tar.bz2):mdir.c  (mtools-4.0.36.tar.bz2)
skipping to change at line 185 skipping to change at line 185
dstp += 4; dstp += 4;
} }
return (*buf) + len-width; return (*buf) + len-width;
} }
static __inline__ int print_volume_label(Stream_t *Dir, char drive) static __inline__ int print_volume_label(Stream_t *Dir, char drive)
{ {
Stream_t *Stream = GetFs(Dir); Stream_t *Stream = GetFs(Dir);
direntry_t entry; direntry_t entry;
DeclareThis(FsPublic_t); DeclareThis(Fs_t);
char shortname[13]; char shortname[13];
char longname[VBUFSIZE]; char longname[VBUFSIZE];
int r; int r;
RootDir = OpenRoot(Stream); RootDir = OpenRoot(Stream);
if(concise) if(concise)
return 0; return 0;
/* find the volume label */ /* find the volume label */
skipping to change at line 211 skipping to change at line 211
/* I/O Error */ /* I/O Error */
return -1; return -1;
} }
printf(" Volume in drive %c has no label", drive); printf(" Volume in drive %c has no label", drive);
} else if (*longname) } else if (*longname)
printf(" Volume in drive %c is %s (abbr=%s)", printf(" Volume in drive %c is %s (abbr=%s)",
drive, longname, shortname); drive, longname, shortname);
else else
printf(" Volume in drive %c is %s", printf(" Volume in drive %c is %s",
drive, shortname); drive, shortname);
if(This->serialized) if(getSerialized(This)) {
unsigned long serial_number = getSerialNumber(This);
printf("\n Volume Serial Number is %04lX-%04lX", printf("\n Volume Serial Number is %04lX-%04lX",
(This->serial_number >> 16) & 0xffff, (serial_number >> 16) & 0xffff,
This->serial_number & 0xffff); serial_number & 0xffff);
}
return 0; return 0;
} }
static void printSummary(int files, mt_off_t bytes) static void printSummary(int files, mt_off_t bytes)
{ {
if(!filesInDir) if(!filesInDir)
printf("No files\n"); printf("No files\n");
else { else {
char *s1 = NULL; char *s1 = NULL;
printf(" %3d file", files); printf(" %3d file", files);
skipping to change at line 496 skipping to change at line 498
subMp = *mp; subMp = *mp;
subMp.lookupflags = ACCEPT_DIR | ACCEPT_PLAIN; subMp.lookupflags = ACCEPT_DIR | ACCEPT_PLAIN;
subMp.dirCallback = list_file; subMp.dirCallback = list_file;
subMp.callback = list_file; subMp.callback = list_file;
ret = mp->loop(mp->File, &subMp, "*"); ret = mp->loop(mp->File, &subMp, "*");
/* then list subdirectories */ /* then list subdirectories */
subMp = *mp; subMp = *mp;
subMp.lookupflags = ACCEPT_DIR | NO_DOTS | NO_MSG | DO_OPEN; subMp.lookupflags = ACCEPT_DIR | NO_DOTS | NO_MSG | DO_OPEN;
return ret | mp->loop(mp->File, &subMp, "*"); return ret | mp->loop(mp->File, &subMp, "*") | GOT_ONE;
} }
#if 0 #if 0
static int test_directory(direntry_t *entry, MainParam_t *mp) static int test_directory(direntry_t *entry, MainParam_t *mp)
{ {
Stream_t *File=mp->File; Stream_t *File=mp->File;
Stream_t *Target; Stream_t *Target;
char errmsg[80]; char errmsg[80];
if ((Target = SimpleFileOpen(0, 0, "-", if ((Target = SimpleFileOpen(0, 0, "-",
skipping to change at line 599 skipping to change at line 601
currentDrive = '\0'; currentDrive = '\0';
currentDir = 0; currentDir = 0;
RootDir = 0; RootDir = 0;
dirPath = 0; dirPath = 0;
#if 0 #if 0
if (testmode) { if (testmode) {
mp.lookupflags = ACCEPT_DIR | NO_DOTS; mp.lookupflags = ACCEPT_DIR | NO_DOTS;
mp.dirCallback = test_directory; mp.dirCallback = test_directory;
} else } else
#endif #endif
if(recursive) { if(recursive) {
mp.lookupflags = ACCEPT_DIR | DO_OPEN_DIRS | NO_DOTS; mp.lookupflags = ACCEPT_DIR | ACCEPT_PLAIN | DO_OPEN_DIRS | NO_DO
TS;
mp.dirCallback = list_recurs_directory; mp.dirCallback = list_recurs_directory;
mp.callback = list_file;
} else { } else {
mp.lookupflags = ACCEPT_DIR | ACCEPT_PLAIN | DO_OPEN_DIRS; mp.lookupflags = ACCEPT_DIR | ACCEPT_PLAIN | DO_OPEN_DIRS;
mp.dirCallback = list_non_recurs_directory; mp.dirCallback = list_non_recurs_directory;
mp.callback = list_file; mp.callback = list_file;
} }
mp.longname.data = mdir_longname; mp.longname.data = mdir_longname;
mp.longname.len = sizeof(mdir_longname); mp.longname.len = sizeof(mdir_longname);
mp.shortname.data = mdir_shortname; mp.shortname.data = mdir_shortname;
mp.shortname.len = sizeof(mdir_shortname); mp.shortname.len = sizeof(mdir_shortname);
ret=main_loop(&mp, argv + optind, argc - optind); ret=main_loop(&mp, argv + optind, argc - optind);
 End of changes. 6 change blocks. 
7 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)