Lines 327-337
Link Here
|
327 |
-2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ |
327 |
-2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ |
328 |
-v verbose, multi-page format\n"; |
328 |
-v verbose, multi-page format\n"; |
329 |
|
329 |
|
|
|
330 |
#ifndef UNIX |
330 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
331 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
331 |
-h print header line -t print totals for listed files or for all\n\ |
332 |
-h print header line -t print totals for listed files or for all\n\ |
332 |
-z print zipfile comment -T print file times in sortable decimal format\ |
333 |
-z print zipfile comment -T print file times in sortable decimal format\ |
333 |
\n -C be case-insensitive %s\ |
334 |
\n -C be case-insensitive %s\ |
334 |
-x exclude filenames that follow from listing\n"; |
335 |
-x exclude filenames that follow from listing\n"; |
|
|
336 |
#else /* UNIX */ |
337 |
static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ |
338 |
-h print header line -t print totals for listed files or for all\n\ |
339 |
-z print zipfile comment %c-T%c print file times in sortable decimal format\ |
340 |
\n %c-C%c be case-insensitive %s\ |
341 |
-x exclude filenames that follow from listing\n\ |
342 |
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ |
343 |
-I CHARSET specify a character encoding for UNIX and other archives\n"; |
344 |
#endif /* !UNIX */ |
335 |
#ifdef MORE |
345 |
#ifdef MORE |
336 |
static ZCONST char Far ZipInfoUsageLine4[] = |
346 |
static ZCONST char Far ZipInfoUsageLine4[] = |
337 |
" -M page output through built-in \"more\"\n"; |
347 |
" -M page output through built-in \"more\"\n"; |
Lines 664-669
Link Here
|
664 |
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ |
674 |
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ |
665 |
-C match filenames case-insensitively -L make (some) names \ |
675 |
-C match filenames case-insensitively -L make (some) names \ |
666 |
lowercase\n %-42s -V retain VMS version numbers\n%s"; |
676 |
lowercase\n %-42s -V retain VMS version numbers\n%s"; |
|
|
677 |
#elif (defined UNIX) |
678 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
679 |
modifiers:\n\ |
680 |
-n never overwrite existing files -q quiet mode (-qq => quieter)\n\ |
681 |
-o overwrite files WITHOUT prompting -a auto-convert any text files\n\ |
682 |
-j junk paths (do not make directories) -aa treat ALL files as text\n\ |
683 |
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ |
684 |
-C match filenames case-insensitively -L make (some) names \ |
685 |
lowercase\n %-42s -V retain VMS version numbers\n%s\ |
686 |
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ |
687 |
-I CHARSET specify a character encoding for UNIX and other archives\n\n"; |
667 |
#else /* !VMS */ |
688 |
#else /* !VMS */ |
668 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
689 |
static ZCONST char Far UnzipUsageLine4[] = "\ |
669 |
modifiers:\n\ |
690 |
modifiers:\n\ |
Lines 802-807
Link Here
|
802 |
#endif /* UNICODE_SUPPORT */ |
823 |
#endif /* UNICODE_SUPPORT */ |
803 |
|
824 |
|
804 |
|
825 |
|
|
|
826 |
#ifdef UNIX |
827 |
init_conversion_charsets(); |
828 |
#endif |
829 |
|
805 |
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) |
830 |
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) |
806 |
extern void DebugMalloc(void); |
831 |
extern void DebugMalloc(void); |
807 |
|
832 |
|
Lines 1335-1340
Link Here
|
1335 |
argc = *pargc; |
1360 |
argc = *pargc; |
1336 |
argv = *pargv; |
1361 |
argv = *pargv; |
1337 |
|
1362 |
|
|
|
1363 |
#ifdef UNIX |
1364 |
extern char OEM_CP[MAX_CP_NAME]; |
1365 |
extern char ISO_CP[MAX_CP_NAME]; |
1366 |
#endif |
1367 |
|
1338 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1368 |
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { |
1339 |
s = *argv + 1; |
1369 |
s = *argv + 1; |
1340 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
1370 |
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ |
Lines 1516-1521
Link Here
|
1516 |
} |
1546 |
} |
1517 |
break; |
1547 |
break; |
1518 |
#endif /* MACOS */ |
1548 |
#endif /* MACOS */ |
|
|
1549 |
#ifdef UNIX |
1550 |
case ('I'): |
1551 |
if (negative) { |
1552 |
Info(slide, 0x401, ((char *)slide, |
1553 |
"error: encodings can't be negated")); |
1554 |
return(PK_PARAM); |
1555 |
} else { |
1556 |
if(*s) { /* Handle the -Icharset case */ |
1557 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
1558 |
if(*s == '-') { |
1559 |
Info(slide, 0x401, ((char *)slide, |
1560 |
"error: a valid character encoding should follow the -I argument")); |
1561 |
return(PK_PARAM); |
1562 |
} |
1563 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
1564 |
} else { /* -I charset */ |
1565 |
++argv; |
1566 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
1567 |
Info(slide, 0x401, ((char *)slide, |
1568 |
"error: a valid character encoding should follow the -I argument")); |
1569 |
return(PK_PARAM); |
1570 |
} |
1571 |
s = *argv; |
1572 |
strncpy(ISO_CP, s, sizeof(ISO_CP)); |
1573 |
} |
1574 |
while(*(++s)); /* No params straight after charset name */ |
1575 |
} |
1576 |
break; |
1577 |
#endif /* ?UNIX */ |
1519 |
case ('j'): /* junk pathnames/directory structure */ |
1578 |
case ('j'): /* junk pathnames/directory structure */ |
1520 |
if (negative) |
1579 |
if (negative) |
1521 |
uO.jflag = FALSE, negative = 0; |
1580 |
uO.jflag = FALSE, negative = 0; |
Lines 1591-1596
Link Here
|
1591 |
} else |
1650 |
} else |
1592 |
++uO.overwrite_all; |
1651 |
++uO.overwrite_all; |
1593 |
break; |
1652 |
break; |
|
|
1653 |
#ifdef UNIX |
1654 |
case ('O'): |
1655 |
if (negative) { |
1656 |
Info(slide, 0x401, ((char *)slide, |
1657 |
"error: encodings can't be negated")); |
1658 |
return(PK_PARAM); |
1659 |
} else { |
1660 |
if(*s) { /* Handle the -Ocharset case */ |
1661 |
/* Assume that charsets can't start with a dash to spot arguments misuse */ |
1662 |
if(*s == '-') { |
1663 |
Info(slide, 0x401, ((char *)slide, |
1664 |
"error: a valid character encoding should follow the -I argument")); |
1665 |
return(PK_PARAM); |
1666 |
} |
1667 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
1668 |
} else { /* -O charset */ |
1669 |
++argv; |
1670 |
if(!(--argc > 0 && *argv != NULL && **argv != '-')) { |
1671 |
Info(slide, 0x401, ((char *)slide, |
1672 |
"error: a valid character encoding should follow the -O argument")); |
1673 |
return(PK_PARAM); |
1674 |
} |
1675 |
s = *argv; |
1676 |
strncpy(OEM_CP, s, sizeof(OEM_CP)); |
1677 |
} |
1678 |
while(*(++s)); /* No params straight after charset name */ |
1679 |
} |
1680 |
break; |
1681 |
#endif /* ?UNIX */ |
1594 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1682 |
case ('p'): /* pipes: extract to stdout, no messages */ |
1595 |
if (negative) { |
1683 |
if (negative) { |
1596 |
uO.cflag = FALSE; |
1684 |
uO.cflag = FALSE; |