Lines 304-314
Link Here
|
304 |
-2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ |
304 |
-2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ |
305 |
-v verbose, multi-page format\n"; |
305 |
-v verbose, multi-page format\n"; |
306 |
|
306 |
|
|
|
307 |
#ifndef UNIX |
307 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
308 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
308 |
-h print header line -t print totals for listed files or for all\n\ |
309 |
-h print header line -t print totals for listed files or for all\n\ |
309 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
310 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
310 |
\n %c-C%c be case-insensitive %s\ |
311 |
\n %c-C%c be case-insensitive %s\ |
311 |
-x exclude filenames that follow from listing\n"; |
312 |
-x exclude filenames that follow from listing\n"; |
|
|
313 |
#else /* UNIX */ |
314 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
315 |
-h print header line -t print totals for listed files or for all\n\ |
316 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
317 |
\n %c-C%c be case-insensitive %s\ |
318 |
-x exclude filenames that follow from listing\n\ |
319 |
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ |
320 |
-I CHARSET specify a character encoding for UNIX and other archives\n"; |
321 |
#endif /* !UNIX */ |
312 |
#ifdef MORE |
322 |
#ifdef MORE |
313 |
#ifdef VMS |
323 |
#ifdef VMS |
314 |
static ZCONST char Far ZipInfoUsageLine4[] = |
324 |
static ZCONST char Far ZipInfoUsageLine4[] = |
Lines 589-594
Link Here
|
589 |
#endif /* ?VM_CMS */ |
599 |
#endif /* ?VM_CMS */ |
590 |
#endif /* ?MACOS */ |
600 |
#endif /* ?MACOS */ |
591 |
|
601 |
|
|
|
602 |
#ifndef UNIX |
592 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
603 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
593 |
modifiers: -q quiet mode (-qq => quieter)\n\ |
604 |
modifiers: -q quiet mode (-qq => quieter)\n\ |
594 |
-n never overwrite existing files -a auto-convert any text files\n\ |
605 |
-n never overwrite existing files -a auto-convert any text files\n\ |
Lines 596-601
Link Here
|
596 |
-j junk paths (do not make directories) -v be verbose/print version info\n\ |
607 |
-j junk paths (do not make directories) -v be verbose/print version info\n\ |
597 |
%c-C%c match filenames case-insensitively %c-L%c make (some) names \ |
608 |
%c-C%c match filenames case-insensitively %c-L%c make (some) names \ |
598 |
lowercase\n %-42s %c-V%c retain VMS version numbers\n%s"; |
609 |
lowercase\n %-42s %c-V%c retain VMS version numbers\n%s"; |
|
|
610 |
#else /* UNIX */ |
611 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
612 |
modifiers: -q quiet mode (-qq => quieter)\n\ |
613 |
-n never overwrite existing files -a auto-convert any text files\n\ |
614 |
-o overwrite files WITHOUT prompting -aa treat ALL files as text\n \ |
615 |
-j junk paths (do not make directories) -v be verbose/print version info\n\ |
616 |
%c-C%c match filenames case-insensitively %c-L%c make (some) names \ |
617 |
lowercase\n %-42s %c-V%c retain VMS version numbers\n%s\n\ |
618 |
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ |
619 |
-I CHARSET specify a character encoding for UNIX and other archives\n\n"; |
620 |
#endif /* !UNIX */ |
599 |
|
621 |
|
600 |
static ZCONST char Far UnzipUsageLine5[] = "\ |
622 |
static ZCONST char Far UnzipUsageLine5[] = "\ |
601 |
Examples (see unzip.txt for more info):\n\ |
623 |
Examples (see unzip.txt for more info):\n\ |
Lines 1070-1075
Link Here
|
1070 |
argc = *pargc; |
1092 |
argc = *pargc; |
1071 |
argv = *pargv; |
1093 |
argv = *pargv; |
1072 |
|
1094 |
|
|
|
1095 |
#ifdef UNIX |
1096 |
extern char OEM_CP[MAX_CP_NAME]; |
1097 |
extern char ISO_CP[MAX_CP_NAME]; |
1098 |
#endif |
1099 |
|
1073 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1100 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1074 |
s = *argv + 1; |
1101 |
s = *argv + 1; |
1075 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
1102 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
Lines 1233-1238
Link Here
|
1233 |
} |
1260 |
} |
1234 |
break; |
1261 |
break; |
1235 |
#endif /* MACOS */ |
1262 |
#endif /* MACOS */ |
|
|
1263 |
#ifdef UNIX |
1264 |
case ('I'): |
1265 |
if (negative) { |
1266 |
Info(slide, 0x401, ((char *)slide, |
1267 |
"error: encodings can't be negated")); |
1268 |
return(PK_PARAM); |
1269 |
} else { |
1270 |
if(*s) { /* Handle the -Icharset case */ |
1271 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
1272 |
if(*s == '-') { |
1273 |
Info(slide, 0x401, ((char *)slide, |
1274 |
"error: a valid character encoding should follow the -I argument")); |
1275 |
return(PK_PARAM); |
1276 |
} |
1277 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
1278 |
} else { /* -I charset */ |
1279 |
++argv; |
1280 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
1281 |
Info(slide, 0x401, ((char *)slide, |
1282 |
"error: a valid character encoding should follow the -I argument")); |
1283 |
return(PK_PARAM); |
1284 |
} |
1285 |
s = *argv; |
1286 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
1287 |
} |
1288 |
while(*(++s)); /* No params straight after charset name */ |
1289 |
} |
1290 |
break; |
1291 |
#endif /* ?UNIX */ |
1236 |
case ('j'): /* junk pathnames/directory structure */ |
1292 |
case ('j'): /* junk pathnames/directory structure */ |
1237 |
if (negative) |
1293 |
if (negative) |
1238 |
uO.jflag = FALSE, negative = 0; |
1294 |
uO.jflag = FALSE, negative = 0; |
Lines 1299-1304
Link Here
|
1299 |
} else |
1355 |
} else |
1300 |
++uO.overwrite_all; |
1356 |
++uO.overwrite_all; |
1301 |
break; |
1357 |
break; |
|
|
1358 |
#ifdef UNIX |
1359 |
case ('O'): |
1360 |
if (negative) { |
1361 |
Info(slide, 0x401, ((char *)slide, |
1362 |
"error: encodings can't be negated")); |
1363 |
return(PK_PARAM); |
1364 |
} else { |
1365 |
if(*s) { /* Handle the -Ocharset case */ |
1366 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
1367 |
if(*s == '-') { |
1368 |
Info(slide, 0x401, ((char *)slide, |
1369 |
"error: a valid character encoding should follow the -I argument")); |
1370 |
return(PK_PARAM); |
1371 |
} |
1372 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
1373 |
} else { /* -O charset */ |
1374 |
++argv; |
1375 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
1376 |
Info(slide, 0x401, ((char *)slide, |
1377 |
"error: a valid character encoding should follow the -O argument")); |
1378 |
return(PK_PARAM); |
1379 |
} |
1380 |
s = *argv; |
1381 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
1382 |
} |
1383 |
while(*(++s)); /* No params straight after charset name */ |
1384 |
} |
1385 |
break; |
1386 |
#endif /* ?UNIX */ |
1302 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1387 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1303 |
if (negative) { |
1388 |
if (negative) { |
1304 |
uO.cflag = FALSE; |
1389 |
uO.cflag = FALSE; |