|
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 656-661
Link Here
|
| 656 |
|
678 |
|
| 657 |
SETLOCALE(LC_CTYPE,""); |
679 |
SETLOCALE(LC_CTYPE,""); |
| 658 |
|
680 |
|
|
|
681 |
#ifdef UNIX |
| 682 |
init_conversion_charsets(); |
| 683 |
#endif |
| 684 |
|
| 659 |
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) |
685 |
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) |
| 660 |
extern void DebugMalloc(void); |
686 |
extern void DebugMalloc(void); |
| 661 |
|
687 |
|
|
Lines 1070-1075
Link Here
|
| 1070 |
argc = *pargc; |
1096 |
argc = *pargc; |
| 1071 |
argv = *pargv; |
1097 |
argv = *pargv; |
| 1072 |
|
1098 |
|
|
|
1099 |
#ifdef UNIX |
| 1100 |
extern char OEM_CP[MAX_CP_NAME]; |
| 1101 |
extern char ISO_CP[MAX_CP_NAME]; |
| 1102 |
#endif |
| 1103 |
|
| 1073 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1104 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
| 1074 |
s = *argv + 1; |
1105 |
s = *argv + 1; |
| 1075 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
1106 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
|
Lines 1233-1238
Link Here
|
| 1233 |
} |
1264 |
} |
| 1234 |
break; |
1265 |
break; |
| 1235 |
#endif /* MACOS */ |
1266 |
#endif /* MACOS */ |
|
|
1267 |
#ifdef UNIX |
| 1268 |
case ('I'): |
| 1269 |
if (negative) { |
| 1270 |
Info(slide, 0x401, ((char *)slide, |
| 1271 |
"error: encodings can't be negated")); |
| 1272 |
return(PK_PARAM); |
| 1273 |
} else { |
| 1274 |
if(*s) { /* Handle the -Icharset case */ |
| 1275 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
| 1276 |
if(*s == '-') { |
| 1277 |
Info(slide, 0x401, ((char *)slide, |
| 1278 |
"error: a valid character encoding should follow the -I argument")); |
| 1279 |
return(PK_PARAM); |
| 1280 |
} |
| 1281 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
| 1282 |
} else { /* -I charset */ |
| 1283 |
++argv; |
| 1284 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
| 1285 |
Info(slide, 0x401, ((char *)slide, |
| 1286 |
"error: a valid character encoding should follow the -I argument")); |
| 1287 |
return(PK_PARAM); |
| 1288 |
} |
| 1289 |
s = *argv; |
| 1290 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
| 1291 |
} |
| 1292 |
while(*(++s)); /* No params straight after charset name */ |
| 1293 |
} |
| 1294 |
break; |
| 1295 |
#endif /* ?UNIX */ |
| 1236 |
case ('j'): /* junk pathnames/directory structure */ |
1296 |
case ('j'): /* junk pathnames/directory structure */ |
| 1237 |
if (negative) |
1297 |
if (negative) |
| 1238 |
uO.jflag = FALSE, negative = 0; |
1298 |
uO.jflag = FALSE, negative = 0; |
|
Lines 1299-1304
Link Here
|
| 1299 |
} else |
1359 |
} else |
| 1300 |
++uO.overwrite_all; |
1360 |
++uO.overwrite_all; |
| 1301 |
break; |
1361 |
break; |
|
|
1362 |
#ifdef UNIX |
| 1363 |
case ('O'): |
| 1364 |
if (negative) { |
| 1365 |
Info(slide, 0x401, ((char *)slide, |
| 1366 |
"error: encodings can't be negated")); |
| 1367 |
return(PK_PARAM); |
| 1368 |
} else { |
| 1369 |
if(*s) { /* Handle the -Ocharset case */ |
| 1370 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
| 1371 |
if(*s == '-') { |
| 1372 |
Info(slide, 0x401, ((char *)slide, |
| 1373 |
"error: a valid character encoding should follow the -I argument")); |
| 1374 |
return(PK_PARAM); |
| 1375 |
} |
| 1376 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
| 1377 |
} else { /* -O charset */ |
| 1378 |
++argv; |
| 1379 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
| 1380 |
Info(slide, 0x401, ((char *)slide, |
| 1381 |
"error: a valid character encoding should follow the -O argument")); |
| 1382 |
return(PK_PARAM); |
| 1383 |
} |
| 1384 |
s = *argv; |
| 1385 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
| 1386 |
} |
| 1387 |
while(*(++s)); /* No params straight after charset name */ |
| 1388 |
} |
| 1389 |
break; |
| 1390 |
#endif /* ?UNIX */ |
| 1302 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1391 |
case ('p'): /* pipes: extract to stdout, no messages */ |
| 1303 |
if (negative) { |
1392 |
if (negative) { |
| 1304 |
uO.cflag = FALSE; |
1393 |
uO.cflag = FALSE; |