"Fossies" - the Fresh Open Source Software Archive  

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

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

mcd.c  (mtools-4.0.36.tar.bz2):mcd.c  (mtools-4.0.37.tar.bz2)
skipping to change at line 41 skipping to change at line 41
fprintf(stderr,"mcd: Can't open mcwd .file for writing\n"); fprintf(stderr,"mcd: Can't open mcwd .file for writing\n");
return ERROR_ONE; return ERROR_ONE;
} }
fprintPwd(fp, entry,0); fprintPwd(fp, entry,0);
fprintf(fp, "\n"); fprintf(fp, "\n");
fclose(fp); fclose(fp);
return GOT_ONE | STOP_NOW; return GOT_ONE | STOP_NOW;
} }
static void usage(int ret) NORETURN;
static void usage(int ret)
{
fprintf(stderr, "Mtools version %s, dated %s\n",
mversion, mdate);
fprintf(stderr, "Usage: %s: [-V] [-i image] msdosdirectory\n",
progname);
exit(ret);
}
void mcd(int argc, char **argv, int type UNUSEDP) NORETURN; void mcd(int argc, char **argv, int type UNUSEDP) NORETURN;
void mcd(int argc, char **argv, int type UNUSEDP) void mcd(int argc, char **argv, int type UNUSEDP)
{ {
struct MainParam_t mp; struct MainParam_t mp;
int c;
if (argc > 2) { while ((c = getopt(argc, argv, "i:")) != EOF) {
fprintf(stderr, "Mtools version %s, dated %s\n", switch(c) {
mversion, mdate); case 'i':
fprintf(stderr, "Usage: %s: [-V] msdosdirectory\n", argv[0]); set_cmd_line_image(optarg);
exit(1); break;
case 'h':
usage(0);
default:
usage(1);
}
} }
if (argc > optind + 1)
usage(1);
init_mp(&mp); init_mp(&mp);
mp.lookupflags = ACCEPT_DIR | NO_DOTS; mp.lookupflags = ACCEPT_DIR | NO_DOTS;
mp.dirCallback = mcd_callback; mp.dirCallback = mcd_callback;
if (argc == 1) { if (argc == 1) {
printf("%s\n", mp.mcwd); printf("%s\n", mp.mcwd);
exit(0); exit(0);
} else } else
exit(main_loop(&mp, argv + 1, 1)); exit(main_loop(&mp, argv + optind, 1));
} }
 End of changes. 5 change blocks. 
6 lines changed or deleted 25 lines changed or added

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