Lines 309-319
static ZCONST char Far ZipInfoUsageLine2
Link Here
|
309 |
-2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ |
309 |
-2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ |
310 |
-v verbose, multi-page format\n"; |
310 |
-v verbose, multi-page format\n"; |
311 |
|
311 |
|
|
|
312 |
#ifndef UNIX |
312 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
313 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
313 |
-h print header line -t print totals for listed files or for all\n\ |
314 |
-h print header line -t print totals for listed files or for all\n\ |
314 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
315 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
315 |
\n %c-C%c be case-insensitive %s\ |
316 |
\n %c-C%c be case-insensitive %s\ |
316 |
-x exclude filenames that follow from listing\n"; |
317 |
-x exclude filenames that follow from listing\n"; |
|
|
318 |
#else /* UNIX */ |
319 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
320 |
-h print header line -t print totals for listed files or for all\n\ |
321 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
322 |
\n %c-C%c be case-insensitive %s\ |
323 |
-x exclude filenames that follow from listing\n\ |
324 |
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ |
325 |
-I CHARSET specify a character encoding for UNIX and other archives\n"; |
326 |
#endif /* !UNIX */ |
317 |
#ifdef MORE |
327 |
#ifdef MORE |
318 |
#ifdef VMS |
328 |
#ifdef VMS |
319 |
static ZCONST char Far ZipInfoUsageLine4[] = |
329 |
static ZCONST char Far ZipInfoUsageLine4[] = |
Lines 599-604
static ZCONST char Far UnzipUsageLine3[]
Link Here
|
599 |
#endif /* ?VM_CMS */ |
609 |
#endif /* ?VM_CMS */ |
600 |
#endif /* ?MACOS */ |
610 |
#endif /* ?MACOS */ |
601 |
|
611 |
|
|
|
612 |
#ifndef UNIX |
602 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
613 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
603 |
modifiers: -q quiet mode (-qq => quieter)\n\ |
614 |
modifiers: -q quiet mode (-qq => quieter)\n\ |
604 |
-n never overwrite existing files -a auto-convert any text files\n\ |
615 |
-n never overwrite existing files -a auto-convert any text files\n\ |
Lines 606-611
modifiers:
Link Here
|
606 |
-j junk paths (do not make directories) -v be verbose/print version info\n\ |
617 |
-j junk paths (do not make directories) -v be verbose/print version info\n\ |
607 |
%c-C%c match filenames case-insensitively %c-L%c make (some) names \ |
618 |
%c-C%c match filenames case-insensitively %c-L%c make (some) names \ |
608 |
lowercase\n %-42s %c-V%c retain VMS version numbers\n%s"; |
619 |
lowercase\n %-42s %c-V%c retain VMS version numbers\n%s"; |
|
|
620 |
#else /* UNIX */ |
621 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
622 |
modifiers: -q quiet mode (-qq => quieter)\n\ |
623 |
-n never overwrite existing files -a auto-convert any text files\n\ |
624 |
-o overwrite files WITHOUT prompting -aa treat ALL files as text\n \ |
625 |
-j junk paths (do not make directories) -v be verbose/print version info\n\ |
626 |
%c-C%c match filenames case-insensitively %c-L%c make (some) names \ |
627 |
lowercase\n %-42s %c-V%c retain VMS version numbers\n%s\n\ |
628 |
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ |
629 |
-I CHARSET specify a character encoding for UNIX and other archives\n\n"; |
630 |
#endif /* !UNIX */ |
609 |
|
631 |
|
610 |
static ZCONST char Far UnzipUsageLine5[] = "\ |
632 |
static ZCONST char Far UnzipUsageLine5[] = "\ |
611 |
Examples (see unzip.txt for more info):\n\ |
633 |
Examples (see unzip.txt for more info):\n\ |
Lines 668-673
int unzip(__G__ argc, argv)
Link Here
|
668 |
|
690 |
|
669 |
SETLOCALE(LC_CTYPE,""); |
691 |
SETLOCALE(LC_CTYPE,""); |
670 |
|
692 |
|
|
|
693 |
#ifdef UNIX |
694 |
init_conversion_charsets(); |
695 |
#endif |
696 |
|
671 |
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) |
697 |
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) |
672 |
extern void DebugMalloc(void); |
698 |
extern void DebugMalloc(void); |
673 |
|
699 |
|
Lines 1089-1094
int uz_opts(__G__ pargc, pargv)
Link Here
|
1089 |
argc = *pargc; |
1115 |
argc = *pargc; |
1090 |
argv = *pargv; |
1116 |
argv = *pargv; |
1091 |
|
1117 |
|
|
|
1118 |
#ifdef UNIX |
1119 |
extern char OEM_CP[MAX_CP_NAME]; |
1120 |
extern char ISO_CP[MAX_CP_NAME]; |
1121 |
#endif |
1122 |
|
1092 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1123 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1093 |
s = *argv + 1; |
1124 |
s = *argv + 1; |
1094 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
1125 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
Lines 1252-1257
int uz_opts(__G__ pargc, pargv)
Link Here
|
1252 |
} |
1283 |
} |
1253 |
break; |
1284 |
break; |
1254 |
#endif /* MACOS */ |
1285 |
#endif /* MACOS */ |
|
|
1286 |
#ifdef UNIX |
1287 |
case ('I'): |
1288 |
if (negative) { |
1289 |
Info(slide, 0x401, ((char *)slide, |
1290 |
"error: encodings can't be negated")); |
1291 |
return(PK_PARAM); |
1292 |
} else { |
1293 |
if(*s) { /* Handle the -Icharset case */ |
1294 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
1295 |
if(*s == '-') { |
1296 |
Info(slide, 0x401, ((char *)slide, |
1297 |
"error: a valid character encoding should follow the -I argument")); |
1298 |
return(PK_PARAM); |
1299 |
} |
1300 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
1301 |
} else { /* -I charset */ |
1302 |
++argv; |
1303 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
1304 |
Info(slide, 0x401, ((char *)slide, |
1305 |
"error: a valid character encoding should follow the -I argument")); |
1306 |
return(PK_PARAM); |
1307 |
} |
1308 |
s = *argv; |
1309 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
1310 |
} |
1311 |
while(*(++s)); /* No params straight after charset name */ |
1312 |
} |
1313 |
break; |
1314 |
#endif /* ?UNIX */ |
1255 |
case ('j'): /* junk pathnames/directory structure */ |
1315 |
case ('j'): /* junk pathnames/directory structure */ |
1256 |
if (negative) |
1316 |
if (negative) |
1257 |
uO.jflag = FALSE, negative = 0; |
1317 |
uO.jflag = FALSE, negative = 0; |
Lines 1327-1332
int uz_opts(__G__ pargc, pargv)
Link Here
|
1327 |
} else |
1387 |
} else |
1328 |
++uO.overwrite_all; |
1388 |
++uO.overwrite_all; |
1329 |
break; |
1389 |
break; |
|
|
1390 |
#ifdef UNIX |
1391 |
case ('O'): |
1392 |
if (negative) { |
1393 |
Info(slide, 0x401, ((char *)slide, |
1394 |
"error: encodings can't be negated")); |
1395 |
return(PK_PARAM); |
1396 |
} else { |
1397 |
if(*s) { /* Handle the -Ocharset case */ |
1398 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
1399 |
if(*s == '-') { |
1400 |
Info(slide, 0x401, ((char *)slide, |
1401 |
"error: a valid character encoding should follow the -I argument")); |
1402 |
return(PK_PARAM); |
1403 |
} |
1404 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
1405 |
} else { /* -O charset */ |
1406 |
++argv; |
1407 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
1408 |
Info(slide, 0x401, ((char *)slide, |
1409 |
"error: a valid character encoding should follow the -O argument")); |
1410 |
return(PK_PARAM); |
1411 |
} |
1412 |
s = *argv; |
1413 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
1414 |
} |
1415 |
while(*(++s)); /* No params straight after charset name */ |
1416 |
} |
1417 |
break; |
1418 |
#endif /* ?UNIX */ |
1330 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1419 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1331 |
if (negative) { |
1420 |
if (negative) { |
1332 |
uO.cflag = FALSE; |
1421 |
uO.cflag = FALSE; |