"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mzip.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.

mzip.c  (mtools-4.0.35.tar.bz2):mzip.c  (mtools-4.0.36.tar.bz2)
skipping to change at line 243 skipping to change at line 243
#define ZIP_FORCE (1 << 3) #define ZIP_FORCE (1 << 3)
int request = ZIP_NIX; int request = ZIP_NIX;
uint8_t newMode = ZIP_RW; uint8_t newMode = ZIP_RW;
uint8_t oldMode = ZIP_RW; uint8_t oldMode = ZIP_RW;
#define setMode(x) \ #define setMode(x) \
if(request & ZIP_MODE_CHANGE) usage(1); \ if(request & ZIP_MODE_CHANGE) usage(1); \
request |= ZIP_MODE_CHANGE; \ request |= ZIP_MODE_CHANGE; \
newMode = x; \ newMode = x; \
break; break
/* get command line options */ /* get command line options */
if(helpFlag(argc, argv)) if(helpFlag(argc, argv))
usage(0); usage(0);
while ((c = getopt(argc, argv, "i:efpqrwxuh")) != EOF) { while ((c = getopt(argc, argv, "i:efpqrwxuh")) != EOF) {
switch (c) { switch (c) {
case 'i': case 'i':
set_cmd_line_image(optarg); set_cmd_line_image(optarg);
break; break;
case 'f': case 'f':
skipping to change at line 277 skipping to change at line 277
case 'p': /* password read-only */ case 'p': /* password read-only */
setMode(ZIP_RO_PW); setMode(ZIP_RO_PW);
case 'r': /* read-only */ case 'r': /* read-only */
setMode(ZIP_RO); setMode(ZIP_RO);
case 'w': /* read-write */ case 'w': /* read-write */
setMode(ZIP_RW); setMode(ZIP_RW);
case 'x': /* password protected */ case 'x': /* password protected */
setMode(ZIP_PW); setMode(ZIP_PW);
case 'u': /* password protected */ case 'u': /* password protected */
setMode(ZIP_UNLOCK_TIL_EJECT) setMode(ZIP_UNLOCK_TIL_EJECT);
case 'h': case 'h':
usage(0); usage(0);
default: /* unrecognized */ default: /* unrecognized */
usage(1); usage(1);
} }
} }
if (request == ZIP_NIX) request = ZIP_STATUS; /* default action */ if (request == ZIP_NIX) request = ZIP_STATUS; /* default action */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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