From 39ba73d80123014c0516f5d632ca7724a5637c19 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 28 Jun 2018 14:24:39 +0900 Subject: [PATCH] Imported Upstream version 610c19 Change-Id: Iea3a7744a9a9e7dd3fd4cb7c5bb280480e24b0c8 Signed-off-by: DongHun Kwak --- BUGS | 2 +- Contents | 6 +- History.610 | 33 +- INSTALL | 35 +- README | 4 +- consts.h | 2 - docs/Contents | 4 +- docs/unzip.txt | 635 ++++++++++++++++++----------------- docs/unzipsfx.txt | 16 +- docs/zipinfo.txt | 153 +++++---- extract.c | 46 +-- fileio.c | 86 +++-- globals.h | 1 - libiz/Contents | 4 +- man/Contents | 4 +- man/man1/Contents | 4 +- man/man1/unzip.1 | 36 +- man/man1/unzipsfx.1 | 14 +- man/man1/zipinfo.1 | 23 +- process.c | 15 +- unix/Contents | 4 +- unix/README.zOS | 6 +- unzip.c | 184 +++++----- unzip.h | 5 +- unzip610c.ann | 8 +- unzpriv.h | 21 +- unzvers.h | 8 +- vms/Contents | 4 +- vms/INSTALL_VMS.txt | 20 +- vms/UNZIP_DEF.RNH | 16 +- vms/build_unzip.com | 22 +- vms/cmdline.c | 68 ++-- vms/descrip.mms | 4 +- vms/descrip_mkdeps.mms | 4 +- vms/descrip_src.mms | 15 +- vms/unz_cli.cld | 18 +- vms/unzip_cli.help | 8 +- win32/Contents | 6 +- win32/vc10/unzipsfx/unzipsfx.vcxproj | 2 - windll/Contents | 4 +- wrap/Contents | 4 +- zip-comment.txt | 2 +- zipinfo.c | 28 +- 43 files changed, 870 insertions(+), 714 deletions(-) diff --git a/BUGS b/BUGS index c7f66b5..20ab589 100644 --- a/BUGS +++ b/BUGS @@ -22,7 +22,7 @@ Bogus bugs (not our fault!): tion, "which -a unzip" will show *all* copies of "unzip" in your path.) -Modern Bugs (UnZip 6.10): +Modern Bugs (UnZip 6.1): ------------------------ - unix/zipgrep shell script has only limited support for long options diff --git a/Contents b/Contents index 8917ffb..7363636 100644 --- a/Contents +++ b/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive - ----------------------------------------- + Contents of the UnZip 6.1 Source Archive + ---------------------------------------- (Subdirectories may contain their own Contents listings.) @@ -16,7 +16,7 @@ README General information about UnZip ToDo List of new features/fixes under consideration unzip610a.ann Notes on the UnZip 6.10a beta release unzip610b.ann Notes on the UnZip 6.10b beta release -unzip610c.ann Notes on the UnZip 6.10c beta release +unzip610c.ann Notes on the UnZip 6.1c beta release zip-comment.txt Source kit archive comment proginfo/ Programming docs, additional technical info, contributor list diff --git a/History.610 b/History.610 index f44e6ca..82151c0 100644 --- a/History.610 +++ b/History.610 @@ -1,6 +1,6 @@ -UnZip, version 6.10c, ?? ??? 2014 +UnZip, version 6.1c, ?? ??? 2014 -These changes occurred in beta versions 6.10a through 6.10c. +These changes occurred in beta versions 6.10a through 6.1c. Features added (or removed): @@ -1688,10 +1688,33 @@ Bugs fixed: 6.10c18 (18 Mar 2015) - Repaired damage to REENTRANT-sensitive code (such as the Windows DLL) - in versions 6.10c16 and 6.10c17. (extract.c, fileio.c, process.c) - [SMS] + beginning in version 6.10c16. (extract.c, fileio.c, process.c) [SMS] - Missing initialization of some variables related to segmented archives could cause spurious error messages: "error: Unexpected end-of-file reading XXX.zip." (globals.c, unzpriv.h) [Petr Stodulka, SMS] - + +6.1c19 (26 Jun 2015) + - Changed the displayed program version number to omit the PATCH_LEVEL + digit when it's zero, so, henceforth, UnZip version 6.1 will + generally be called version "6.1", not "6.10". Added + -vq/--quick-version (/VERBOSE=BRIEF) option to provide a brief + (one-line) program version report. (BUGS, Contents, INSTALL, README, + unzip.c, unzip.h, unzip610c.ann, unzpriv.h, unzvers.h, zipinfo.c, + docs/Contents, docs/unzip.txt, docs/unzipsfx.txt, docs/zipinfo.txt, + libiz/Contents, man/Contents, man/man1/Contents, man/man1/unzip.1, + man/man1/unzipsfx.1, man/man1/zipinfo.1, unix/Contents, + unix/README.zOS, vms/build_unzip.com, vms/cmdline.c, vms/Contents, + vms/descrip.mms, vms/descrip_mkdeps.mms, vms/descrip_src.mms, + vms/INSTALL_VMS.txt, vms/unzip_cli.help, vms/UNZIP_DEF.RNH, + vms/unz_cli.cld, win32/Contents, windll/Contents, wrap/Contents) + [SMS] + - Repaired damage to AppleDouble extraction in the non-stream case, + beginning in 6.10c16. (extract.c) [SMS] + - The "files tested" count in the error-summary trailer could be wrong + for a streamed archive, when a list of archive members was specified. + (extract.c) [SMS] + - Removed the now-spurious warning, "zipfile claims to be last disk of + a multi-part archive [...]". Improved handling of segmented archives + where the segment size varied. (fileio.c, globals.h, process.c) + [Petr Stodulka, SMS] diff --git a/INSTALL b/INSTALL index b00b594..185fb47 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ INSTALL -- Info-ZIP UnZip Installation Instructions =================================================== - UnZip version 6.10. Revised: 2015-01-09 + UnZip version 6.1. Revised: 2015-06-10 ------------------------------------------------------------------------ @@ -34,7 +34,7 @@ user-selected options. For Macintosh Mac OS X, follow the Unix procedures. - For VMS instructions, see [.vms]INSTALL_VMS.txt. + For VMS instructions, see also [.vms]INSTALL_VMS.txt. For Windows, using Cygwin or MinGW, follow the Unix procedures. (For Windows using native tools, see the Windows section below.) @@ -157,7 +157,7 @@ bzip2 compression, or to download a different bzip2 source kit: http://www.bzip.org/ - The UnZip builders for Unix, VMS, and Windows wiil, by default, use + The UnZip builders for Unix, VMS, and Windows will, by default, use the bzip2 source kit which is included in the UnZip source kit to create the required bzip2 object library. The Unix and VMS builders can also use an existing bzip2 object library, which could be supplied by the @@ -171,6 +171,22 @@ sources only in the "bzip2" subdirectory of the main UnZip directory. Existing bzip2 kits in other directory trees should be safe from damage by UnZip builders. +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Optional Compression and Encryption Methods + ------------------------------------------- + + Beginning with UnZip version 6.10c (beta), support for optional +compression methods bzip2, LZMA, and PPMd is enabled by default. The +code used to implement these compression methods and the code in the +optional source kit for AES_WG encryption are generally written to newer +C language standards than the base Info-ZIP code, so some very old +compilers may be unable to build UnZip if these features are enabled. +In other cases, some special build options must be specified to get a +particular feature to work properly. The build instructions below (and +in other, system-specific, supplementary documents) show how to disable +these optional features and/or how work around specific build problems. + ------------------------------------------------------------------------ Build @@ -561,9 +577,12 @@ built without some expected features enabled. --------------------------------------------------- Macintosh (Mac OS X) - On Mac OS X, use the Unix build procedure, described above. When - using Xcode, the optional command-line tools must be installed. For - pre-Mac-OS-X Macintosh, see below for old infomation. + On Mac OS X, use the Unix build procedure, described above. Our + testing has been done using the Command Line Tools for Xcode. (In + some Xcode versions, the Command Line Tools may not be enabled by + default.) Currently, installing the (separate, much smaller) Command + Line Tools package (without the whole Xcode package) is all that is + needed. For pre-Mac-OS-X Macintosh, see below for old infomation. MS-DOS See the msdos\Contents file for notes regarding which makefile(s) to @@ -1375,7 +1394,7 @@ UNICODE_SUPPORT used now to the equivalent wide character calls. All internal string handling and text output needs to be ported to use wchar_t character storage, which for the most part requires just proper - type updating. This capability could be included in UnZip 6.10. + type updating. This capability could be included in UnZip 6.1. Beginning with version 6.10b (beta), UnZip includes full wide character support of UTF-8 paths on Windows NT and later. On these @@ -1383,7 +1402,7 @@ UNICODE_SUPPORT paths used to recreate the Unicode paths on the file system. Still not implemented on Windows are language-dependent messages, wide-character console input and output, and wide character list - support. These may be implemented in UnZip 6.10. + support. These may be implemented in UnZip 6.1. On current GNU/Linux and similar systems, UnZip now supports UTF-8 names and patterns on the command line as well as display of UTF-8 diff --git a/README b/README index 2924ac6..712f685 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ README -- Info-ZIP UnZip ------------------------ - Program version: 6.10c (BETA) - Document date: 2015-03-18 + Program version: 6.1c (BETA). + Document date: 2015-04-15 ------------------------------------------------------------------------ diff --git a/consts.h b/consts.h index 9a95530..5eea4a9 100644 --- a/consts.h +++ b/consts.h @@ -23,8 +23,6 @@ ZCONST unsigned near mask_bits[17] = { 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; -ZCONST char Far VersionDate[] = UZ_VERSION_DATE; /* now defined in unzvers.h */ - #ifndef SFX ZCONST char Far EndSigMsg[] = "\nnote: didn't find end-of-central-dir signature at end of central dir.\n"; diff --git a/docs/Contents b/docs/Contents index 36c5413..9282803 100644 --- a/docs/Contents +++ b/docs/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "docs" Directory - ---------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "docs" Directory + --------------------------------------------------------- funzip.txt fUnZip manual page, formatted output unzip.txt UnZip manual page, formatted output diff --git a/docs/unzip.txt b/docs/unzip.txt index 13777fb..73aad80 100644 --- a/docs/unzip.txt +++ b/docs/unzip.txt @@ -20,12 +20,11 @@ DESCRIPTION Nowadays, many other programs are available which work with ZIP ar- chives. - Note: Beginning with UnZip version 6.10, the old command-line parser - has been replaced by one like the one used in Zip (version 3.0 and - later). One significant change is that option negation now uses a - TRAILING hyphen ("-"), so, for example, -B- negates the -B option. - This change was made because a double hyphen ("--") now introduces a - long option. + Note: Beginning with UnZip version 6.1, the old command-line parser has + been replaced by one like the one used in Zip (version 3.0 and later). + One significant change is that option negation now uses a TRAILING + hyphen ("-"), so, for example, -B- negates the -B option. This change + was made because a double hyphen ("--") now introduces a long option. To display the basic built-in help, use the command: unzip -h @@ -34,31 +33,31 @@ DESCRIPTION The built-in help may be more current than this manual page, especially between full product releases. - To list all available options for a particular UnZip program, use the + To list all available options for a particular UnZip program, use the command: unzip --show-options - This report will not include any options which are available only on - other system types, or options which must be enabled at build-time but + This report will not include any options which are available only on + other system types, or options which must be enabled at build-time but were not enabled in the particular UnZip program being used. - [VMS] On VMS, alternate program editions with VMS-style command-line + [VMS] On VMS, alternate program editions with VMS-style command-line interfaces are also available. For details, see the VMS-specific docu- mentation. ARGUMENTS file[.zip] File path/name of a ZIP archive. A wildcard name may be used to - specify multiple ZIP archives to be processed in one command. - On VMS systems, any of the standard wildcards for a direc- - tory/file specification may be used: "...", "*", or "%" (or, - since VMS V7.2, "?"). On non-VMS systems, a wildcard name may + specify multiple ZIP archives to be processed in one command. + On VMS systems, any of the standard wildcards for a direc- + tory/file specification may be used: "...", "*", or "%" (or, + since VMS V7.2, "?"). On non-VMS systems, a wildcard name may be used only in the filename part of the file specification, not - in the directory part, and, on Unix, characters which are spe- + in the directory part, and, on Unix, characters which are spe- cial to the shell must be escaped or quoted to protect them from - processing by the shell. If a wildcard is used, then each + processing by the shell. If a wildcard is used, then each matching archive file is processed in an order determined by the - operating system or shell (or file system). Non-VMS wildcard - expressions are similar to those supported (for "globbing") in + operating system or shell (or file system). Non-VMS wildcard + expressions are similar to those supported (for "globbing") in commonly used Unix shells (csh, ksh, sh, and so on) and may con- tain: @@ -66,105 +65,105 @@ ARGUMENTS ? Matches exactly 1 character. - [...] Matches any single character found inside the brackets. - Ranges are specified by a beginning character, a hyphen, - and an ending character. If an exclamation point ("!") + [...] Matches any single character found inside the brackets. + Ranges are specified by a beginning character, a hyphen, + and an ending character. If an exclamation point ("!") or a caret ("^") follows the left bracket, then the range - of characters within the brackets is complemented. That + of characters within the brackets is complemented. That is, anything except the characters inside the brackets is - considered a match. To specify a literal left bracket, + considered a match. To specify a literal left bracket, use the three-character sequence "[[]". - If no wildcard matches are found, then the specification is - assumed to be a literal filename. If that also fails, then the - suffix ".zip" and/or ".ZIP" is appended, and that is tried. - (For this reason, if a non-existent file is specified, then the + If no wildcard matches are found, then the specification is + assumed to be a literal filename. If that also fails, then the + suffix ".zip" and/or ".ZIP" is appended, and that is tried. + (For this reason, if a non-existent file is specified, then the resulting error message may mention these other names with their ".zip" or ".ZIP" suffixes.) Note that a ".zip" or ".ZIP" name ending on an archive is merely a convention, not a requirement. For example, a self-extracting - ZIP archive named "fred" or "fred.exe" could be processed as if - it were an ordinary archive; just specify the actual file name + ZIP archive named "fred" or "fred.exe" could be processed as if + it were an ordinary archive; just specify the actual file name with its actual name ending (if any), whatever that may be. Strictly speaking, an archive name is optional, but, except in a - special case like "unzip -v", it's difficult to do much useful + special case like "unzip -v", it's difficult to do much useful work without specifying an archive. member ... - An optional list of archive members to be processed, separated - by spaces. If no member list is specified, then all archive - members are processed. Wildcard patterns (like those used for - an archive file name on Unix, described above) may be used to - match multiple members. Again, be sure to quote expressions - that would otherwise be expanded or modified by the operating + An optional list of archive members to be processed, separated + by spaces. If no member list is specified, then all archive + members are processed. Wildcard patterns (like those used for + an archive file name on Unix, described above) may be used to + match multiple members. Again, be sure to quote expressions + that would otherwise be expanded or modified by the operating system or shell. On Mac OS X systems, file attributes, a resource fork, and simi- - lar data may be stored in a separate AppleDouble archive member - which has a "._" name prefix. When restoring files with such - attributes (no -J/--junk-attrs option, and the destination file + lar data may be stored in a separate AppleDouble archive member + which has a "._" name prefix. When restoring files with such + attributes (no -J/--junk-attrs option, and the destination file system supports such attributes), if the user specifies only the - main archive member, then UnZip should automatically handle the + main archive member, then UnZip should automatically handle the corresponding AppleDouble archive member. If -J/--junk-attrs is - specified, or the destination file system does not support such - file attributes (so that an AppleDouble archive member will be + specified, or the destination file system does not support such + file attributes (so that an AppleDouble archive member will be stored as a separate file), then AppleDouble archive members are - not handled automatically, and the user must specify patterns - which explicitly include any desired AppleDouble archive mem- + not handled automatically, and the user must specify patterns + which explicitly include any desired AppleDouble archive mem- bers. - On VMS systems, the wildcard rules used for archive members are - the same as on Unix systems. VMS wildcard rules are used only - for archive file specifications, not for archive member pat- + On VMS systems, the wildcard rules used for archive members are + the same as on Unix systems. VMS wildcard rules are used only + for archive file specifications, not for archive member pat- terns. OPTIONS - UnZip's usage summary ("unzip -h") is kept short to try to accommodate - small terminal/emulator screens, so it's normally incomplete. The + UnZip's usage summary ("unzip -h") is kept short to try to accommodate + small terminal/emulator screens, so it's normally incomplete. The option list below should be complete. OPTIONS (ZipInfo Mode) -Z --zipinfo-mode - ZipInfo mode. If the first option on the command line is -Z, - then the program runs in ZipInfo mode. Remaining options are + ZipInfo mode. If the first option on the command line is -Z, + then the program runs in ZipInfo mode. Remaining options are interpreted as ZipInfo options. See the zipinfo manual page for a description of those options. OPTIONS (Primary Mode) - Options in this group (-c -f -h -l -p -T -t -u -v -z) specify the pri- - mary mode of operation of UnZip. Only one of these primary mode + Options in this group (-c -f -h -l -p -T -t -u -v -vq -z) specify the + primary mode of operation of UnZip. Only one of these primary mode options may be specified. -c --to-stdout - Primary Mode. Extract files to stdout/screen. This option is - similar to the -p option except that the name of each file is - displayed as it is extracted, and the -a option is allowed, + Primary Mode. Extract files to stdout/screen. This option is + similar to the -p option except that the name of each file is + displayed as it is extracted, and the -a option is allowed, which can provide automatic ASCII-EBCDIC conversion, where appropriate. -f --freshen - Primary Mode. Freshen existing files. That is, extract only - those files that already exist on disk and that are newer than - the disk copies. By default UnZip queries before overwriting, - but the -o option may be used to suppress the queries. Note - that on many operating systems, the TZ (timezone) environment - variable must be set correctly in order for -f/--freshen and - -u/--update to work properly. (On Unix the variable is usually - set automatically.) The reasons for this are somewhat subtle - but have to do with the differences between DOS-format file + Primary Mode. Freshen existing files. That is, extract only + those files that already exist on disk and that are newer than + the disk copies. By default UnZip queries before overwriting, + but the -o option may be used to suppress the queries. Note + that on many operating systems, the TZ (timezone) environment + variable must be set correctly in order for -f/--freshen and + -u/--update to work properly. (On Unix the variable is usually + set automatically.) The reasons for this are somewhat subtle + but have to do with the differences between DOS-format file times (always local time) and Unix-format times (always UTC) and - the necessity to compare the two. A typical TZ value is - "PST8PDT" (US Pacific time with automatic adjustment for Day- + the necessity to compare the two. A typical TZ value is + "PST8PDT" (US Pacific time with automatic adjustment for Day- light Saving Time). -h --help - Primary Mode. Display brief (roughly 24 lines) usage instruc- + Primary Mode. Display brief (roughly 24 lines) usage instruc- tions. See also -hh. -hh @@ -176,36 +175,36 @@ OPTIONS (Primary Mode) --list Primary Mode. List archive members. By default, a brief format is used, which includes the following items: member name, uncom- - pressed file size ("Length"), and modification date-time of the + pressed file size ("Length"), and modification date-time of the member. A summary is included at the end of the report, showing - total size and count for all the members in the report. Speci- + total size and count for all the members in the report. Speci- fying a member list limits the report to those members. - Adding -v (--verbose) to an "unzip -l" command line adds the - following items to the report: compression method, compressed + Adding -v (--verbose) to an "unzip -l" command line adds the + following items to the report: compression method, compressed size ("Size"), compression ratio, and 32-bit CRC. - In contrast to some other programs, UnZip does not include the - 12-byte encryption header in the compressed size values for a - Traditionally encrypted member. Therefore, compressed size and + In contrast to some other programs, UnZip does not include the + 12-byte encryption header in the compressed size values for a + Traditionally encrypted member. Therefore, compressed size and compression ratio figures are independent of the member's - encryption status and show the correct compression performance. - (The complete size of the encrypted compressed data stream for + encryption status and show the correct compression performance. + (The complete size of the encrypted compressed data stream for archive members is reported by the more verbose ZipInfo reports. See the separate zipinfo manual page.) If UnZip was built with OS2_EAS enabled, then the -l report also - includes the sizes of stored OS/2 extended attributes (EAs) and + includes the sizes of stored OS/2 extended attributes (EAs) and OS/2 access control lists (ACLs). In addition, the archive com- ment and individual member comments (if any) are displayed. If a file was archived from a single-case file system (for exam- - ple, the old MS-DOS FAT file system) and the -L option was - given, the filename is converted to lowercase and is shown pre- + ple, the old MS-DOS FAT file system) and the -L option was + given, the filename is converted to lowercase and is shown pre- fixed with a caret (^). - Note: If only -v (--verbose) is specified with an archive name, - then UnZip acts as if "-l -v" were specified, and a detailed + Note: If only -v (--verbose) is specified with an archive name, + then UnZip acts as if "-l -v" were specified, and a detailed listing is generated. --license @@ -213,62 +212,67 @@ OPTIONS (Primary Mode) -p --pipe-to-stdout - Primary Mode. Extract files to stdout (pipe). Only the actual - file data for the members are sent to stdout (no file names, or + Primary Mode. Extract files to stdout (pipe). Only the actual + file data for the members are sent to stdout (no file names, or other information, as would be displayed with -c), and the files - are always extracted in binary format, just as they are stored + are always extracted in binary format, just as they are stored (no line-ending or ASCII-EBCDIC conversions). -T --timestamp-new - Primary Mode. Set the timestamp on the archive(s) to that of - the newest file in each one. This corresponds to Zip's -go - option, except that it can be used on wildcard archives (for + Primary Mode. Set the timestamp on the archive(s) to that of + the newest file in each one. This corresponds to Zip's -go + option, except that it can be used on wildcard archives (for example, "unzip -T '*.zip'") and is much faster. -t --test - Primary Mode. Test archive members. Testing means that each + Primary Mode. Test archive members. Testing means that each archive member is extracted in memory (expanding and decrypting, - as needed), but not written to a file. The resulting CRC + as needed), but not written to a file. The resulting CRC (cyclic redundancy check, an enhanced checksum) of the extracted data is then compared with the original file's stored CRC value, and an error message is emitted if a CRC mismatch is detected. - Adding -v to -t adds some diagnostic information to the report + Adding -v to -t adds some diagnostic information to the report for archive members with LZMA or PPMd compression. -u --update - Primary mode. Update existing files and create new ones if - needed. This mode performs the same function as the Freshen - (-f) mode, extracting (with query) files that are newer than - those with the same name on disk, but it also extracts those - files that do not already exist on disk. See -f, above, for + Primary mode. Update existing files and create new ones if + needed. This mode performs the same function as the Freshen + (-f) mode, extracting (with query) files that are newer than + those with the same name on disk, but it also extracts those + files that do not already exist on disk. See -f, above, for information on setting the timezone properly. -v --verbose - Primary mode (when alone) or option. When used as a primary + Primary mode (when alone) or option. When used as a primary mode (alone), and no archive is specified, an "unzip -v" command - generates a report showing the program version, build options, + generates a report showing the program version, build options, and relevant environment variables. - When used with some other primary mode option, -v can make out- + When used with some other primary mode option, -v can make out- put more verbose. - If no other primary mode is specified, and an archive is speci- - fied, then UnZip acts as if "-l -v" were specified, and a + If no other primary mode is specified, and an archive is speci- + fied, then UnZip acts as if "-l -v" were specified, and a detailed listing is generated. See -l. --version Primary Mode. Display the program version, build options, and relevant environment variables. - Currently, --version is implemented as a synonym for -v/--ver- - bose, so, for proper operation, it must be specified with no + Currently, --version is implemented as a synonym for -v/--ver- + bose, so, for proper operation, it must be specified with no other options. + -vq + --quick-version + Primary mode. Display a brief (one-line) program version + report. + -z --zipfile-comment Primary mode. Display only the archive comment. @@ -420,11 +424,11 @@ OPTIONS (Ordinary) other systems, -D- has no effect. [Non-VMS] Timestamp restoration behavior changed between UnZip - versions 6.00 and 6.10. The following table shows the effects - of various -D options for both versions. + versions 6.00 and 6.1. The following table shows the effects of + various -D options for both versions. UnZip version | - 6.00 | 6.10 | Restore timestamps on: + 6.00 | 6.1 | Restore timestamps on: -----------+-----------+------------------------ -DD | -D | Nothing. -D | (default) | Files, not directories. @@ -614,7 +618,7 @@ OPTIONS (Ordinary) With -k, the archived permissions are restored without regard to the Unix umask or VMS default protection. (This was the default - behavior in UnZip versions before 6.10.) + behavior in UnZip versions before 6.1.) With -k-, the archived permissions are ignored, so only the Unix umask or VMS default protection is effective. (On VMS, directo- @@ -843,12 +847,12 @@ OPTIONS (Ordinary) short lengths, the version numbers may be truncated or stripped regardless of this option.) - [Non-VMS] Note that before UnZip version 6.10, on a non-VMS sys- + [Non-VMS] Note that before UnZip version 6.1, on a non-VMS sys- tem, a file with a name like "fred;123" would, by default, be extracted as "fred", even if the file did not originate on a VMS system (so that ";123" was probably not really a VMS version - number). Beginning with UnZip version 6.10, the default behav- - ior is to strip VMS version numbers only from files which were + number). Beginning with UnZip version 6.1, the default behavior + is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: -V-. @@ -872,17 +876,22 @@ OPTIONS (Ordinary) Primary Mode. Display the program version, build options, and relevant environment variables. For details, see Primary Mode options. + -vq + --quick-version + Primary mode. Display a brief (one-line) program version + report. + -W --wild-no-span - [WILD_STOP_AT_DIR] (Valid when the program was built with the C + [WILD_STOP_AT_DIR] (Valid when the program was built with the C macro WILD_STOP_AT_DIR defined.) By default, the wildcard char- acters "?" (single-character wildcard) and "*" (multi-character wildcard) match any character in a member path/name. "-W" modi- - fies the pattern-matching behavior for archive members so that - both "?" (single-character wildcard) and "*" (multi-character - wildcard) do not match the directory separator character "/". + fies the pattern-matching behavior for archive members so that + both "?" (single-character wildcard) and "*" (multi-character + wildcard) do not match the directory separator character "/". (The two-character sequence "**" acts as a multi-character wild- - card that includes the directory separator in its matched char- + card that includes the directory separator in its matched char- acters.) For example, with "-W": "*.c" matches "foo.c" but not "mydir/foo.c" @@ -891,161 +900,161 @@ OPTIONS (Ordinary) "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo" - This modified behavior is equivalent to the pattern matching + This modified behavior is equivalent to the pattern matching style used by the shells of some of UnZip's supported target OSs - (one example is Acorn RISC OS). This option may not be avail- + (one example is Acorn RISC OS). This option may not be avail- able on systems where the Zip archive's internal directory sepa- - rator character "/" is allowed as regular character in native + rator character "/" is allowed as regular character in native operating system filenames. - [non-VMS] Currently, UnZip uses the same pattern matching rules - for both wildcard archive file name specifications and archive - member selection patterns on most system types. For systems - allowing "/" as regular filename character, the -W option would + [non-VMS] Currently, UnZip uses the same pattern matching rules + for both wildcard archive file name specifications and archive + member selection patterns on most system types. For systems + allowing "/" as regular filename character, the -W option would not work as expected on a wildcard file name specification. -X --restore-owner [NT, OS/2, Unix, VMS, Tandem] Restore owner info (user and group - info (UID/GID) on Unix, UIC on VMS, or access control lists - (ACLs) on certain network-enabled versions of OS/2 (Warp Server - with IBM LAN Server/Requester 3.0 to 5.0; Warp Connect with IBM - Peer 1.0), or security ACLs on Windows NT.) In most cases this - will require special system privileges, and doubling the option - (-XX) on NT instructs UnZip to use privileges for extraction; - but on Unix, for example, a user who belongs to several groups - can restore files owned by any of those groups, so long as the + info (UID/GID) on Unix, UIC on VMS, or access control lists + (ACLs) on certain network-enabled versions of OS/2 (Warp Server + with IBM LAN Server/Requester 3.0 to 5.0; Warp Connect with IBM + Peer 1.0), or security ACLs on Windows NT.) In most cases this + will require special system privileges, and doubling the option + (-XX) on NT instructs UnZip to use privileges for extraction; + but on Unix, for example, a user who belongs to several groups + can restore files owned by any of those groups, so long as the user IDs match the user's own. Note that ordinary file - attributes are always restored. This option applies only to - optional, extra ownership info available on some operating sys- + attributes are always restored. This option applies only to + optional, extra ownership info available on some operating sys- tems. (NT's access control lists do not appear to be especially - compatible with OS/2's, so no attempt is made at cross-platform - portability of access privileges. It is not clear under which + compatible with OS/2's, so no attempt is made at cross-platform + portability of access privileges. It is not clear under which conditions this would ever be useful anyway.) -x member ... --exclude member ... An optional list of archive members to be excluded from process- - ing. Because wildcard characters normally match "/" directory - separators (for exceptions, see the option -W), this option may - be used to exclude any files that are in subdirectories. For - example, "unzip foo *.[ch] -x */*" would extract all C source - files (*.c, *.h) in the main directory, but none in any subdi- - rectories. Without the -x option, all C source files in all + ing. Because wildcard characters normally match "/" directory + separators (for exceptions, see the option -W), this option may + be used to exclude any files that are in subdirectories. For + example, "unzip foo *.[ch] -x */*" would extract all C source + files (*.c, *.h) in the main directory, but none in any subdi- + rectories. Without the -x option, all C source files in all directories within the archive would be extracted. When the program sees -x (--exclude) on a command line, it stops scanning for options, and treats every succeeding item as an ar- - chive member name. To avoid confusion between member names and + chive member name. To avoid confusion between member names and command options, it's simplest to specify -x (--exclude) and its member list as the last items on a command line. Alternatively, - the special name "@" can be used to terminate the member list - (and cause the program to resume scanning for options). That + the special name "@" can be used to terminate the member list + (and cause the program to resume scanning for options). That is, the following two commands are equivalent: unzip fred.zip -b -x file1 file2 file3 unzip fred.zip -x file1 file2 file3 @ -b -Y --dot-version - [VMS] Treat archive member name endings of ".nnn" (where "nnn" - is a decimal number) as if they were VMS version numbers - (";nnn"). (The default is to treat them as file types.) For + [VMS] Treat archive member name endings of ".nnn" (where "nnn" + is a decimal number) as if they were VMS version numbers + (";nnn"). (The default is to treat them as file types.) For example: "a.b.3" -> "a.b;3" -Z --zipinfo-mode - ZipInfo mode. If the first option on the command line is -Z, - then the program runs in ZipInfo mode. Remaining options are + ZipInfo mode. If the first option on the command line is -Z, + then the program runs in ZipInfo mode. Remaining options are interpreted as ZipInfo options. See the zipinfo manual page for a description of those options. -z --zipfile-comment - Primary mode. Display only the archive comment. For details, + Primary mode. Display only the archive comment. For details, see Primary Mode options. -$ --volume-labels - [MS-DOS, NT, OS/2, VMS] Restore the volume label if the extrac- - tion medium is removable (for example, a diskette). Doubling - the option (-$$) allows fixed media (hard disks) to be labeled + [MS-DOS, NT, OS/2, VMS] Restore the volume label if the extrac- + tion medium is removable (for example, a diskette). Doubling + the option (-$$) allows fixed media (hard disks) to be labeled as well. By default, volume labels are ignored. [VMS] On VMS, a volume must be allocated, not shared, for a vol- ume label to be set. -/ --extensions - [Acorn] Overrides the extension list supplied by the Unzip$Ext - environment variable. During extraction, filename extensions - that match one of the items in this extension list are swapped + [Acorn] Overrides the extension list supplied by the Unzip$Ext + environment variable. During extraction, filename extensions + that match one of the items in this extension list are swapped in front of the base name of the extracted file. -: --do-double-dots [all but Acorn, VM/CMS, MVS, Tandem] Allows UnZip to extract ar- - chive members into locations outside of the current extraction + chive members into locations outside of the current extraction destination directory (and its subdirectories). - For security reasons, UnZip normally removes "parent directory" - path components ("../") from the path names of archive members - as they are extracted. This safety feature (new for version + For security reasons, UnZip normally removes "parent directory" + path components ("../") from the path names of archive members + as they are extracted. This safety feature (new for version 5.50) prevents UnZip from accidentally writing files to directo- - ries outside the current destination directory tree. The -: - option sets UnZip back to its previous, more liberal behavior, + ries outside the current destination directory tree. The -: + option sets UnZip back to its previous, more liberal behavior, allowing exact extraction of archives that use "../" path compo- - nents to create multiple directory trees at or above the level + nents to create multiple directory trees at or above the level of the destination directory. - This option does not enable writing explicitly to the root - directory ("/"). To achieve this, it is necessary to set the - extraction target folder to "/" (by using an option like - "-d /"). However, when the -: option is specified, it is still - possible implicitly to write to the root directory if member + This option does not enable writing explicitly to the root + directory ("/"). To achieve this, it is necessary to set the + extraction target folder to "/" (by using an option like + "-d /"). However, when the -: option is specified, it is still + possible implicitly to write to the root directory if member paths specifying enough "../" path components. Use this option with extreme caution. -^ --control-in-name - [Unix] Allow control characters in file names of extracted ZIP - archive members. On Unix, a file name may contain any (8-bit) - character code with the two exceptions of "/" (the directory - delimiter) and NUL (0x00, the C string-termination character), - unless the specific file system has more restrictive conven- - tions. Generally, this allows embedding ASCII control charac- - ters or escape sequences in file names. However, this feature - allows the use of malicious file names which can cause various - kinds of bad trouble when displayed on a user's terminal/emula- - tor. (Even a file name with unprintable but otherwise harmless + [Unix] Allow control characters in file names of extracted ZIP + archive members. On Unix, a file name may contain any (8-bit) + character code with the two exceptions of "/" (the directory + delimiter) and NUL (0x00, the C string-termination character), + unless the specific file system has more restrictive conven- + tions. Generally, this allows embedding ASCII control charac- + ters or escape sequences in file names. However, this feature + allows the use of malicious file names which can cause various + kinds of bad trouble when displayed on a user's terminal/emula- + tor. (Even a file name with unprintable but otherwise harmless characters can cause problems for users.) - For these reasons, by default, UnZip applies a filter that - removes potentially dangerous control characters from the - extracted file names. The -^ option overrides this filter in - the rare case that embedded filename dangerous control charac- + For these reasons, by default, UnZip applies a filter that + removes potentially dangerous control characters from the + extracted file names. The -^ option overrides this filter in + the rare case that embedded filename dangerous control charac- ters are to be intentionally restored. ENVIRONMENT OPTIONS - UnZip's default behavior may be modified by placing command-line - options in an environment variable. This can be done with any option, - but it is probably most useful options like -a (auto-convert text - files), -L (downcase file names from systems with all uppercase file + UnZip's default behavior may be modified by placing command-line + options in an environment variable. This can be done with any option, + but it is probably most useful options like -a (auto-convert text + files), -L (downcase file names from systems with all uppercase file names), -C (use case-insensitive name matching), -q (quiet), -o (always overwrite), or -n (never overwrite). - For UnZip, the environment variable name is UNZIP, except on - VMS, where it's UNZIP_OPTS (to avoid conflict with a foreign- - command DCL symbol, UNZIP). For similarity with Zip, if UNZIP + For UnZip, the environment variable name is UNZIP, except on + VMS, where it's UNZIP_OPTS (to avoid conflict with a foreign- + command DCL symbol, UNZIP). For similarity with Zip, if UNZIP (UNZIP_OPTS on VMS) is not defined, then UnZip will use UNZIPOPT the same way. - For ZipInfo ("unzip -Z"), the environment variable name is ZIP- - INFO, except on VMS, where it's ZIPINFO_OPTS. For similarity - with Zip, if ZIPINFO (ZIPINFO_OPTS on VMS) is not defined, then + For ZipInfo ("unzip -Z"), the environment variable name is ZIP- + INFO, except on VMS, where it's ZIPINFO_OPTS. For similarity + with Zip, if ZIPINFO (ZIPINFO_OPTS on VMS) is not defined, then ZipInfo will use ZIPINFOOPT the same way. - For example, to make UnZip act as quietly as possible, only + For example, to make UnZip act as quietly as possible, only reporting errors, one could use commands like the following: Unix Bourne (or similar) shell: @@ -1061,58 +1070,58 @@ ENVIRONMENT OPTIONS define UNZIP_OPTS "-q -q" ! Logical name, or UNZIP_OPTS = "-q -q" ! DCL symbol. (Either works.) - Environment options are treated the same as any other command- + Environment options are treated the same as any other command- line options, except that they are effectively the first options on the command line. To override an environment option, one may - use an explicit option to cancel or override it. For example, + use an explicit option to cancel or override it. For example, to override one of the "quiet" flags in the example above, use a command like: unzip -q- [other options] archive.zip - The leading hyphen is the normal option character, and the - trailing one negates the option, canceling one level of quiet- - ness. To cancel multiple "quiet" flags, use multiple -q- + The leading hyphen is the normal option character, and the + trailing one negates the option, canceling one level of quiet- + ness. To cancel multiple "quiet" flags, use multiple -q- options: unzip -t -q- -q- archive unzip -q- -q- -t archive - Note that multiple one-character options like "-q" and "-q" can - be combined into a single "-qq", but it's generally clearer to - keep each instance of each option separate. Similarly, negated - one-character options can be combined, as with "-q-q-", but + Note that multiple one-character options like "-q" and "-q" can + be combined into a single "-qq", but it's generally clearer to + keep each instance of each option separate. Similarly, negated + one-character options can be combined, as with "-q-q-", but "-q- -q-" is generally clearer. The examples show short (one-character) options, but long ("--") options are also allowed. - The timezone variable (TZ) should be set according to the local time- - zone in order for the Freshen (-f) and Update (-u) modes to operate - correctly. For details, see -f. This variable may also be necessary + The timezone variable (TZ) should be set according to the local time- + zone in order for the Freshen (-f) and Update (-u) modes to operate + correctly. For details, see -f. This variable may also be necessary to get timestamps of extracted files to be set correctly. - On Windows systems, UnZip gets the timezone configuration from + On Windows systems, UnZip gets the timezone configuration from the registry, assuming it is correctly set in the Control Panel. The TZ variable is ignored on these systems. ENCRYPTION/DECRYPTION - Zip and UnZip have long supported a relatively weak encryption method, - which we call Traditional ZIP encryption. The source code for Tradi- - tional encryption is included in the source kits, and support for Tra- - ditional encryption is enabled by default. (Build-time C macros: + Zip and UnZip have long supported a relatively weak encryption method, + which we call Traditional ZIP encryption. The source code for Tradi- + tional encryption is included in the source kits, and support for Tra- + ditional encryption is enabled by default. (Build-time C macros: IZ_CRYPT_TRAD, NO_CRYPT.) - Beginning with UnZip version 6.10 and Zip version 3.1, these programs - also offer a stronger, Advanced Encryption Standard (AES) encryption - method, which we call AES WinZip/Gladman (AES_WG) encryption. (The - encryption code was supplied by Brian Gladman, and the archive format - is intended to be compatible with that used by the WinZip program. - WinZip is a registered trademark of WinZip International LLC.) The + Beginning with UnZip version 6.1 and Zip version 3.1, these programs + also offer a stronger, Advanced Encryption Standard (AES) encryption + method, which we call AES WinZip/Gladman (AES_WG) encryption. (The + encryption code was supplied by Brian Gladman, and the archive format + is intended to be compatible with that used by the WinZip program. + WinZip is a registered trademark of WinZip International LLC.) The source code for AES_WG encryption is distributed in a separate kit (for - export control reasons), and support for AES_WG encryption must be - enabled explicitly at build time. (Build-time C macro: - IZ_CRYPT_AES_WG.) See the INSTALL file in the source kit for details - on how to enable AES_WG encryption (or how to disable Traditional + export control reasons), and support for AES_WG encryption must be + enabled explicitly at build time. (Build-time C macro: + IZ_CRYPT_AES_WG.) See the INSTALL file in the source kit for details + on how to enable AES_WG encryption (or how to disable Traditional encryption). For details on the WinZip AES scheme, see: @@ -1122,49 +1131,49 @@ ENCRYPTION/DECRYPTION ftp://ftp.info-zip.org/pub/infozip/crypt/ ftp://ftp.info-zip.org/pub/infozip/crypt/README_AES_WG.txt - Normally, encryption passwords are supplied by the user interactively - when requested by the program. See the -P option for a (less secure) + Normally, encryption passwords are supplied by the user interactively + when requested by the program. See the -P option for a (less secure) method of specifying a password on the command line. - With Traditional encryption, when decrypting, a password will be + With Traditional encryption, when decrypting, a password will be checked against header data, and used if it appears to be correct. The - correct password will always check out against the header data, but - there is a 1-in-256 chance that an incorrect password will as well. + correct password will always check out against the header data, but + there is a 1-in-256 chance that an incorrect password will as well. (This is a security feature of the PKWARE archive format; it helps pre- vent brute-force attacks that might otherwise gain a large speed advan- - tage by testing only the header.) In the case that an incorrect pass- + tage by testing only the header.) In the case that an incorrect pass- word is given but it passes the header test anyway, either an incorrect - CRC will be generated for the extracted data or else UnZip will fail + CRC will be generated for the extracted data or else UnZip will fail during the extraction because the "decrypted" bytes do not constitute a valid compressed data stream. - If the first password fails the header check on some file, UnZip will - prompt for another password, and so on until all files are extracted. - If a password is not known, entering a null password (that is, just a - carriage return or "Enter") is taken as a signal to skip all further + If the first password fails the header check on some file, UnZip will + prompt for another password, and so on until all files are extracted. + If a password is not known, entering a null password (that is, just a + carriage return or "Enter") is taken as a signal to skip all further prompting. Only unencrypted files in the archive(s) will thereafter be extracted. (The situation is actually a little more complicated. Some - old versions of Zip and ZipCloak allowed null passwords, so UnZip + old versions of Zip and ZipCloak allowed null passwords, so UnZip checks each encrypted file to see if the null password works. This may result in "false positives" and extraction errors, as noted above.) - Archives encrypted with 8-bit-character passwords (for example, pass- - words with accented European characters) may not be portable across + Archives encrypted with 8-bit-character passwords (for example, pass- + words with accented European characters) may not be portable across systems or to other archivers. This problem stems from the use of mul- - tiple encoding methods for such characters, including Latin-1 (ISO + tiple encoding methods for such characters, including Latin-1 (ISO 8859-1) and OEM code page 850. DOS PKZIP 2.04g uses the OEM code page; Windows PKZIP 2.50 uses Latin-1 (and is therefore incompatible with DOS - PKZIP); Info-ZIP uses the OEM code page on DOS, OS/2 and Win3.x ports - but ISO coding (Latin-1 etc.) everywhere else; and Nico Mak's WinZip - 6.x does not allow 8-bit-character passwords at all. UnZip 5.3 (or + PKZIP); Info-ZIP uses the OEM code page on DOS, OS/2 and Win3.x ports + but ISO coding (Latin-1 etc.) everywhere else; and Nico Mak's WinZip + 6.x does not allow 8-bit-character passwords at all. UnZip 5.3 (or newer) attempts to use the default character set first (e.g., Latin-1), - followed by the alternate one (e.g., OEM code page) to test passwords. - On EBCDIC systems, if both of these fail, EBCDIC encoding will be - tested as a last resort. (EBCDIC is not tested on non-EBCDIC systems, - because there are no known archivers that encrypt using EBCDIC encod- - ing.) ISO character encodings other than Latin-1 are not supported. - The new addition of (partial) Unicode (UTF-8) support in UnZip 6.0 has - not yet been adapted to the encryption password handling in UnZip. On + followed by the alternate one (e.g., OEM code page) to test passwords. + On EBCDIC systems, if both of these fail, EBCDIC encoding will be + tested as a last resort. (EBCDIC is not tested on non-EBCDIC systems, + because there are no known archivers that encrypt using EBCDIC encod- + ing.) ISO character encodings other than Latin-1 are not supported. + The new addition of (partial) Unicode (UTF-8) support in UnZip 6.0 has + not yet been adapted to the encryption password handling in UnZip. On systems that use UTF-8 as native character encoding, UnZip simply tries decryption with the native UTF-8 encoded password; the built-in attempts to check the password in translated encoding have not yet been @@ -1191,11 +1200,11 @@ EXAMPLES unzip -t -q "*.zip" - Here, the wildcard archive name was quoted to keep a Unix shell from + Here, the wildcard archive name was quoted to keep a Unix shell from expanding ("globbing") it. (This would not be necessary on VMS.) - The following command extracts to standard output all members of let- - ters.zip whose names end in .tex, auto-converting to the local end-of- + The following command extracts to standard output all members of let- + ters.zip whose names end in .tex, auto-converting to the local end-of- line convention, and piping the output into more(1) (again, quoting the wildcard member name pattern): @@ -1206,27 +1215,27 @@ EXAMPLES unzip -p articles paper1.dvi | dvips - To extract from source.zip all Fortran and C source files (*.f, *.c, - *.h) and Makefile into the /tmp directory (again, quoting the wild- + To extract from source.zip all Fortran and C source files (*.f, *.c, + *.h) and Makefile into the /tmp directory (again, quoting the wild- card): unzip source.zip "*.[fch]" Makefile -d /tmp - To extract all FORTRAN and C source files, regardless of case (for + To extract all FORTRAN and C source files, regardless of case (for example, both *.c and *.C, and any makefile, Makefile, MAKEFILE or sim- ilar): unzip -C source.zip "*.[fch]" makefile -d /tmp To extract any such files but convert any uppercase MS-DOS or VMS names - to lowercase and convert the line-endings of all of the files to the - local standard (without respect to any files that might be marked + to lowercase and convert the line-endings of all of the files to the + local standard (without respect to any files that might be marked "binary"): unzip -aa -C -L source.zip "*.[fch]" makefile -d /tmp The following command extracts only newer versions of the files already - in the current directory, without querying. (Note: Be careful of + in the current directory, without querying. (Note: Be careful of extracting in one timezone an archive created in another. ZIP archives created by Zip versions before 2.1 contain no timezone information, and a "newer" file from an eastern timezone may, in fact, be older): @@ -1234,18 +1243,18 @@ EXAMPLES unzip -f -o sources To extract newer versions of the files already in the current directory - and to create any files not already there (same caveat as previous + and to create any files not already there (same caveat as previous example): unzip -u -o sources - To display a configuration report showing the program version, the OS - and compiler used to build it, a list of optional features enabled at + To display a configuration report showing the program version, the OS + and compiler used to build it, a list of optional features enabled at build time, and the values of all the relevant environment variables: unzip -v - In the last five examples, assume that UNZIP or UNZIP_OPTS is set to + In the last five examples, assume that UNZIP or UNZIP_OPTS is set to -q. To do a (singly) quiet listing: unzip -l file.zip @@ -1254,7 +1263,7 @@ EXAMPLES unzip -l -q file.zip - (Note that the ".zip" is generally not necessary.) To do a standard + (Note that the ".zip" is generally not necessary.) To do a standard listing: unzip -l -q- file.zip @@ -1269,21 +1278,21 @@ EXIT STATUS 0 Normal. No errors or warnings detected. - 1 One or more warnings were encountered, but processing + 1 One or more warnings were encountered, but processing completed successfully. This includes archives where one - or more (but not all) files were skipped because of an - unsupported compression or encryption method, or a bad + or more (but not all) files were skipped because of an + unsupported compression or encryption method, or a bad encryption password. - 2 Error in the archive format. Processing may or may not + 2 Error in the archive format. Processing may or may not have completed successfully. - 3 Severe error in the archive format. Processing probably + 3 Severe error in the archive format. Processing probably failed immediately. 4 Memory allocation failed in program initialization. - 5 Memory allocation or terminal I/O failed in encryption + 5 Memory allocation or terminal I/O failed in encryption password processing. 6 Memory allocation failed while decompressing to disk. @@ -1304,63 +1313,63 @@ EXIT STATUS 80 User interrupt (Ctrl/C or similar). - 81 No files were processed, because of unsupported compres- + 81 No files were processed, because of unsupported compres- sion or encryption methods. - 82 No files were processed, because of bad encryption pass- + 82 No files were processed, because of bad encryption pass- word(s). - 83 Large-file archive could not be processed by this small- + 83 Large-file archive could not be processed by this small- file program. - 84 Failed to create automatic extraction directory. + 84 Failed to create automatic extraction directory. (Already exists?) - [VMS] On VMS, the standard Unix exit status values are translated into - valid VMS status codes. For details, see the file [.vms]NOTES.TXT in + [VMS] On VMS, the standard Unix exit status values are translated into + valid VMS status codes. For details, see the file [.vms]NOTES.TXT in the source kit. BUGS - Multi-part archives are not yet supported, except in conjunction with - Zip. (All parts must be concatenated together in order, and then - "zip -F" (for Zip 2.x) or "zip -FF" (for Zip 3.x) must be performed on - the concatenated archive in order to "fix" it. Also, zip version 3.0 - and later can combine multi-part (split) archives into a combined sin- - gle-file archive using "zip -s- inarchive -O outarchive". See the zip - manual page for more information.) This may be corrected in the next + Multi-part archives are not yet supported, except in conjunction with + Zip. (All parts must be concatenated together in order, and then + "zip -F" (for Zip 2.x) or "zip -FF" (for Zip 3.x) must be performed on + the concatenated archive in order to "fix" it. Also, zip version 3.0 + and later can combine multi-part (split) archives into a combined sin- + gle-file archive using "zip -s- inarchive -O outarchive". See the zip + manual page for more information.) This may be corrected in the next major release. - Archives read from standard input are not yet supported, except with + Archives read from standard input are not yet supported, except with fUnZip (and then only the first member of the archive can be extracted). - Archives encrypted with 8-bit-character passwords (such as passwords - with accented European characters) may not be portable across systems + Archives encrypted with 8-bit-character passwords (such as passwords + with accented European characters) may not be portable across systems and/or other archivers. See also ENCRYPTION/DECRYPTION. UnZip's -M ("--more") option tries to take into account automatic wrap- - ping of long lines. However, the code may fail to detect the correct - wrapping locations. First, TAB characters (and similar control - sequences) are not taken into account, they are handled as ordinary - printable characters. Second, depending on the actual system type, - UnZip may not detect the true terminal/emulator geometry, but instead - may rely on "commonly used" default dimensions. The correct handling - of tabs would require the implementation of a query for the actual tab + ping of long lines. However, the code may fail to detect the correct + wrapping locations. First, TAB characters (and similar control + sequences) are not taken into account, they are handled as ordinary + printable characters. Second, depending on the actual system type, + UnZip may not detect the true terminal/emulator geometry, but instead + may rely on "commonly used" default dimensions. The correct handling + of tabs would require the implementation of a query for the actual tab setup on the output terminal/emulator. - [Unix] Unix special files such as FIFO buffers (named pipes), block + [Unix] Unix special files such as FIFO buffers (named pipes), block devices and character devices are not restored even if they are somehow - represented in the archive, nor are hard-linked files relinked. Basi- - cally, the only file types restored by UnZip are regular files, direc- + represented in the archive, nor are hard-linked files relinked. Basi- + cally, the only file types restored by UnZip are regular files, direc- tories, and symbolic (soft) links. [OS/2] Extended attributes for existing directories are only updated if - the -o ("overwrite all") option is given. This is a limitation of the + the -o ("overwrite all") option is given. This is a limitation of the operating system; because directories only have a creation time associ- - ated with them, UnZip has no way to determine whether the stored + ated with them, UnZip has no way to determine whether the stored attributes are newer or older than those on disk. In practice this may - mean a two-pass approach is required: first unpack the archive nor- - mally (with or without freshening/updating existing files), then over- + mean a two-pass approach is required: first unpack the archive nor- + mally (with or without freshening/updating existing files), then over- write just the directory entries (for example, "unzip -o foo */"). SEE ALSO @@ -1375,31 +1384,31 @@ URL ftp://ftp.info-zip.org/pub/infozip/ AUTHORS - The primary Info-ZIP authors (current semi-active members of the Zip- + The primary Info-ZIP authors (current semi-active members of the Zip- Bugs workgroup) are: Ed Gordon (Zip, general maintenance, shared code, - Zip64, Win32, Unix, Unicode); Christian Spieler (UnZip maintenance - coordination, VMS, MS-DOS, Win32, shared code, general Zip and UnZip - integration and optimization); Onno van der Linden (Zip); Mike White - (Win32, Windows GUI, Windows DLLs); Kai Uwe Rommel (OS/2, Win32); - Steven M. Schweda (VMS, Unix, support of new features); Paul Kienitz - (Amiga, Win32, Unicode); Chris Herborth (BeOS, QNX, Atari); Jonathan + Zip64, Win32, Unix, Unicode); Christian Spieler (UnZip maintenance + coordination, VMS, MS-DOS, Win32, shared code, general Zip and UnZip + integration and optimization); Onno van der Linden (Zip); Mike White + (Win32, Windows GUI, Windows DLLs); Kai Uwe Rommel (OS/2, Win32); + Steven M. Schweda (VMS, Unix, support of new features); Paul Kienitz + (Amiga, Win32, Unicode); Chris Herborth (BeOS, QNX, Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi (Acorn RISC OS); Harald Denker (Atari, - MVS); John Bush (Solaris, Amiga); Hunter Goatley (VMS, Info-ZIP Site - maintenance); Steve Salisbury (Win32); Steve Miller (Windows CE GUI), + MVS); John Bush (Solaris, Amiga); Hunter Goatley (VMS, Info-ZIP Site + maintenance); Steve Salisbury (Win32); Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS, Win32, Zip64); and Dave Smith (Tandem NSK). - The following people are former members of the Info-ZIP development - group, and provided major contributions to key parts of the current - code: Greg "Cave Newt" Roelofs (UnZip, unshrink decompression); Jean- - loup Gailly (deflate compression); Mark Adler (inflate decompression, + The following people are former members of the Info-ZIP development + group, and provided major contributions to key parts of the current + code: Greg "Cave Newt" Roelofs (UnZip, unshrink decompression); Jean- + loup Gailly (deflate compression); Mark Adler (inflate decompression, fUnZip). - The author of the original unzip code upon which Info-ZIP's was based - is Samuel H. Smith; Carl Mascott did the first Unix port; and David P. - Kirschbaum organized and led Info-ZIP in its early days with Keith - Petersen hosting the original mailing list at WSMR-SimTel20. The full - list of contributors to UnZip has grown quite large; please refer to + The author of the original unzip code upon which Info-ZIP's was based + is Samuel H. Smith; Carl Mascott did the first Unix port; and David P. + Kirschbaum organized and led Info-ZIP in its early days with Keith + Petersen hosting the original mailing list at WSMR-SimTel20. The full + list of contributors to UnZip has grown quite large; please refer to the proginfo/CONTRIBS file in the UnZip source distribution for a rela- tively complete version. -Info-ZIP 10 Oct 2014 (v6.10) UNZIP(1L) +Info-ZIP 17 Apr 2015 (v6.1) UNZIP(1L) diff --git a/docs/unzipsfx.txt b/docs/unzipsfx.txt index 219d768..cc44420 100644 --- a/docs/unzipsfx.txt +++ b/docs/unzipsfx.txt @@ -258,11 +258,11 @@ OPTIONS (Ordinary) On other systems, -D- has no effect. [Non-VMS] Timestamp restoration behavior changed between UnZip - versions 6.00 and 6.10. The following table shows the effects - of various -D options for both versions. + versions 6.00 and 6.1. The following table shows the effects of + various -D options for both versions. UnZip version | - 6.00 | 6.10 | Restore timestamps on: + 6.00 | 6.1 | Restore timestamps on: -----------+-----------+------------------------ -DD | -D | Nothing. -D | (default) | Files, not directories. @@ -356,7 +356,7 @@ OPTIONS (Ordinary) With -k, the archived permissions are restored without regard to the Unix umask or VMS default protection. (This was the default - behavior in UnZip versions before 6.10.) + behavior in UnZip versions before 6.1.) With -k-, the archived permissions are ignored, so only the Unix umask or VMS default protection is effective. (On VMS, directo- @@ -550,12 +550,12 @@ OPTIONS (Ordinary) short lengths, the version numbers may be truncated or stripped regardless of this option.) - [Non-VMS] Note that before UnZip version 6.10, on a non-VMS sys- + [Non-VMS] Note that before UnZip version 6.1, on a non-VMS sys- tem, a file with a name like "fred;123" would, by default, be extracted as "fred", even if the file did not originate on a VMS system (so that ";123" was probably not really a VMS version - number). Beginning with UnZip version 6.10, the default behav- - ior is to strip VMS version numbers only from files which were + number). Beginning with UnZip version 6.1, the default behavior + is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: -V-. @@ -923,4 +923,4 @@ AUTHORS essary to create UnZipSFX. See unzip(1L) for the current list of Info- ZIP authors. -Info-ZIP 06 Nov 2013 (v6.10) UNZIPSFX(1L) +Info-ZIP 15 Apr 2015 (v6.1) UNZIPSFX(1L) diff --git a/docs/zipinfo.txt b/docs/zipinfo.txt index fa80e38..ebf4b7c 100644 --- a/docs/zipinfo.txt +++ b/docs/zipinfo.txt @@ -212,14 +212,27 @@ OPTIONS (Ordinary) handling of filename codings within ZipInfo falls back to the behavior of pre-Unicode versions. + --version + When used alone, display the program version, and usage. See also + Primary Format option -v. + + Currently, --version is implemented as a synonym for -v/--ver- + bose, so, for proper operation, it must be specified with no + other options. + + -vq + --quick-version + Primary mode. Display a brief (one-line) program version + report. + -W --wild-no-span [WILD_STOP_AT_DIR] (Valid when the program was built with WILD_STOP_AT_DIR enabled.) Modify the pattern-matching behavior - so that both "?" (single-character wildcard) and "*" (multi- + so that both "?" (single-character wildcard) and "*" (multi- character wildcard) do not match the directory separator charac- ter "/". (The two-character sequence "**" acts as a multi-char- - acter wildcard that includes the directory separator in its + acter wildcard that includes the directory separator in its matched characters.) For example, with "-W": "*.c" matches "foo.c" but not "mydir/foo.c" @@ -228,37 +241,37 @@ OPTIONS (Ordinary) "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo" - This modified behavior is equivalent to the pattern matching + This modified behavior is equivalent to the pattern matching style used by the shells of some of UnZip's supported target OSs - (one example is Acorn RISC OS). This option may not be avail- + (one example is Acorn RISC OS). This option may not be avail- able on systems where the Zip archive's internal directory sepa- - rator character "/" is allowed as regular character in native + rator character "/" is allowed as regular character in native operating system filenames. (Currently, UnZip uses the same pat- tern matching rules for both wildcard archive file name specifi- - cations and archive member selection patterns on most system - types. For systems allowing "/" as regular filename character, + cations and archive member selection patterns on most system + types. For systems allowing "/" as regular filename character, the -W option would not work as expected on a wildcard file name specification.) -x member ... --exclude member ... An optional list of archive members to be excluded from process- - ing. Because wildcard characters normally match "/" directory - separators (for exceptions see the option -W), this option may - be used to exclude any files that are in subdirectories. For + ing. Because wildcard characters normally match "/" directory + separators (for exceptions see the option -W), this option may + be used to exclude any files that are in subdirectories. For example, "zipinfo foo *.[ch] -x */*" would report on all C - source files (*,c, *.h) in the main directory, but none in any - subdirectories. Without the -x option, all C source files in - all directories within the archive would be included in the + source files (*,c, *.h) in the main directory, but none in any + subdirectories. Without the -x option, all C source files in + all directories within the archive would be included in the report. When the program sees -x (--exclude) on a command line, it stops scanning for options, and treats every succeeding item as an ar- - chive member name. To avoid confusion between member names and + chive member name. To avoid confusion between member names and command options, it's simplest to specify -x (--exclude) and its member list as the last items on a command line. Alternatively, - the special name "@" can be used to terminate the member list - (and cause the program to resume scanning for options). That + the special name "@" can be used to terminate the member list + (and cause the program to resume scanning for options). That is, the following two commands are equivalent: zipinfo fred.zip -2 -t -x file1 file2 file3 zipinfo fred.zip -x file1 file2 file3 @ -2 -t @@ -268,13 +281,13 @@ OPTIONS (Ordinary) Include the archive comments (if any) in the report. DETAILED DESCRIPTION - ZipInfo has three basic report formats, providing different degrees of - detail in the information about the members of an archive: a simple - list of names (-1, -2), a Unix ls-style listing (-l, -m, -s), and a - very detailed analysis (-v). Some of the information, such as file - sizes, is easy to interpret. Some of the information involves fairly - obscure details of ZIP archive structure. ZIP archive structure is - documented in the PKWARE Inc. APPNOTE.TXT: http://www.pkware.com/docu- + ZipInfo has three basic report formats, providing different degrees of + detail in the information about the members of an archive: a simple + list of names (-1, -2), a Unix ls-style listing (-l, -m, -s), and a + very detailed analysis (-v). Some of the information, such as file + sizes, is easy to interpret. Some of the information involves fairly + obscure details of ZIP archive structure. ZIP archive structure is + documented in the PKWARE Inc. APPNOTE.TXT: http://www.pkware.com/docu- ments/casestudies/APPNOTE.TXT The table below shows some typical -l report entries: @@ -285,8 +298,8 @@ DETAILED DESCRIPTION -rwxr-x--- 3.1 unx 709 Tx 311 aesw 11-Aug-21 22:20 endian.c RWED,RE, 3.1 vms 6656 bx 2295 defN 07-Aug-15 14:12 itrc/TST.EXE;8 - Field 1 (Perm/Prot) shows the file permission/protection attributes, - formatted according to the original operating system or file system + Field 1 (Perm/Prot) shows the file permission/protection attributes, + formatted according to the original operating system or file system where the archive was created. Field 2 (Zver) shows the (approximate) version of the Zip program which @@ -297,10 +310,10 @@ DETAILED DESCRIPTION Field 4 (UncoSize) shows the original, uncompressed file size. - Field 5 (At) shows some archive member attributes, as detailed in the - tables below. The first character indicates whether a file was binary - or text, and whether it was encrypted. The second character indicates - the presence of a data descriptor (sometimes called an "extended + Field 5 (At) shows some archive member attributes, as detailed in the + tables below. The first character indicates whether a file was binary + or text, and whether it was encrypted. The second character indicates + the presence of a data descriptor (sometimes called an "extended header") and/or an extra field in the member data. | File Type Extra Field | @@ -309,21 +322,21 @@ DETAILED DESCRIPTION Encrypted no | b t x - | no Data Descriptor yes | B T X l | yes - A Data Descriptor holds CRC and size data at an alternate place - in the archive (after processed member data instead of before), - and is normally used when the archiving program can't seek in - the output archive data/file. An Extra Field can hold a wide - variety of data, including 64-bit file sizes, many kinds of OS- + A Data Descriptor holds CRC and size data at an alternate place + in the archive (after processed member data instead of before), + and is normally used when the archiving program can't seek in + the output archive data/file. An Extra Field can hold a wide + variety of data, including 64-bit file sizes, many kinds of OS- specific attribute data, UTC times, and so on. Field 6 (CompSize) shows the compressed file size. With -m, this field shows the compression fraction as a percentage. With -s (the default), - this field is omitted. This compressed size value (unlike the one in - an "unzip -l" report) includes all the overhead resulting from Tradi- + this field is omitted. This compressed size value (unlike the one in + an "unzip -l" report) includes all the overhead resulting from Tradi- tional encryption. - Field 7 (Cmth) shows the compression method used. Note that AES_WG - encryption is treated as a compression method here. Not all of the + Field 7 (Cmth) shows the compression method used. Note that AES_WG + encryption is treated as a compression method here. Not all of the methods shown in the table below are supported. (Some are obsolete.) Num Abbr Name, description @@ -348,24 +361,24 @@ DETAILED DESCRIPTION 98 ppmd PPMd version I, Rev 1 99 aesw AES_WG encryption - Fields 8 and 9 (ModDate, Mtime) show the file modification date-time + Fields 8 and 9 (ModDate, Mtime) show the file modification date-time (MS-DOS format, local time). Field 10 (Name) shows the file path/name. ENVIRONMENT OPTIONS - ZipInfo's default behavior may be modified by placing command-line - options in an environment variable. This can be done with any option, + ZipInfo's default behavior may be modified by placing command-line + options in an environment variable. This can be done with any option, but it is probably most useful options like -T (decimal time format) or one of the non-default Unix format optiond (-l, -m). - For ZipInfo ("unzip -Z"), the environment variable name is ZIP- - INFO, except on VMS, where it's ZIPINFO_OPTS. For similarity - with Zip, if ZIPINFO (ZIPINFO_OPTS on VMS) is not defined, then + For ZipInfo ("unzip -Z"), the environment variable name is ZIP- + INFO, except on VMS, where it's ZIPINFO_OPTS. For similarity + with Zip, if ZIPINFO (ZIPINFO_OPTS on VMS) is not defined, then ZipInfo will use ZIPINFOOPT the same way. - For example, to make the default format the long Unix format - instead of the short Unix format, one could use commands like + For example, to make the default format the long Unix format + instead of the short Unix format, one could use commands like the following: Unix Bourne (or similar) shell: @@ -381,11 +394,11 @@ ENVIRONMENT OPTIONS define ZIPINFO_OPTS "-l" ! Logical name, or ZIPINFO_OPTS = "-l" ! DCL symbol. (Either works.) - Environment options are treated the same as any other command- + Environment options are treated the same as any other command- line options, except that they are effectively the first options on the command line. To override an environment option, one may - use an explicit option to cancel or override it. For example, - to disable the totals trailer line by default, one could use + use an explicit option to cancel or override it. For example, + to disable the totals trailer line by default, one could use commands like the following: Unix Bourne (or similar) shell: @@ -404,17 +417,17 @@ ENVIRONMENT OPTIONS The examples show short (one-character) options, but long ("--") options are also allowed. - The timezone variable (TZ) should be set according to the local time- - zone in order for the Freshen (-f) and Update (-u) modes to operate - correctly. For details, see -f. This variable may also be necessary + The timezone variable (TZ) should be set according to the local time- + zone in order for the Freshen (-f) and Update (-u) modes to operate + correctly. For details, see -f. This variable may also be necessary to get timestamps of extracted files to be set correctly. - On Windows systems, UnZip gets the timezone configuration from + On Windows systems, UnZip gets the timezone configuration from the registry, assuming it is correctly set in the Control Panel. The TZ variable is ignored on these systems. EXAMPLES - To get a basic, short-format listing of the complete contents of a ZIP + To get a basic, short-format listing of the complete contents of a ZIP archive zip31c.zip, with both header and totals lines, use only the ar- chive name as an argument to zipinfo: @@ -426,14 +439,14 @@ EXAMPLES zipinfo -l zip31c.zip - To list the complete contents of the archive without header and totals + To list the complete contents of the archive without header and totals lines, either negate the -h and -t options or else specify the contents explicitly: zipinfo -h- -t- zip31c.zip zipinfo zip31c.zip "*" - (Here, the wildcard "*" is quoted to prevent a Unix shell from expand- + (Here, the wildcard "*" is quoted to prevent a Unix shell from expand- ing (globbing) it.) To list information on a single archive member, in medium format, spec- @@ -441,40 +454,40 @@ EXAMPLES zipinfo -m unzip60.zip "*/unshrink.c" - When any member name is specified, the header and totals trailer are, - by default, not included in the report, but explicitly specifying -h + When any member name is specified, the header and totals trailer are, + by default, not included in the report, but explicitly specifying -h and/or -t will restore them. For example: zipinfo -m -t unzip610b.zip "*.[ch]" "*/Make*" - On a Unix system, one could use the -T option along with an external + On a Unix system, one could use the -T option along with an external sorting program (and another filter like head or tail) to get a listing of the least or most recently modified files in the archive: zipinfo -l -T -h- -t- zip31c.zip | sort -k 8 | head -12 zipinfo -l -T -h- -t- zip31c.zip | sort -r -k 8 | head -12 - The sort option -k 8 tells it to sort on field 8, which is the date- - time field in a long- or medium-format (-l, -m) ZipInfo report. (Use - -k 7 for the short (-s) format.) The -r option reverses the default + The sort option -k 8 tells it to sort on field 8, which is the date- + time field in a long- or medium-format (-l, -m) ZipInfo report. (Use + -k 7 for the short (-s) format.) The -r option reverses the default smallest-to-largest sort order. BUGS As with UnZip, ZipInfo's -M ("more") option is overly simplistic in its - handling of screen output. As noted above, it fails to detect the - wrapping of long lines and may thereby cause lines at the top of the + handling of screen output. As noted above, it fails to detect the + wrapping of long lines and may thereby cause lines at the top of the screen to be scrolled off before being read. ZipInfo should detect and - treat each occurrence of line-wrap as one additional line printed. - This requires knowledge of the screen's width as well as its height. + treat each occurrence of line-wrap as one additional line printed. + This requires knowledge of the screen's width as well as its height. In addition, ZipInfo should detect the true screen geometry on all sys- tems. - The interactions among the various listing format, header, and trailer - options (-h, -l, -m, -s, -t) are unnecessarily complex and should be + The interactions among the various listing format, header, and trailer + options (-h, -l, -m, -s, -t) are unnecessarily complex and should be simplified, despite the potential disruption to current users. SEE ALSO - funzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L), zip- + funzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L), zip- note(1L), zipsplit(1L) URL @@ -484,4 +497,4 @@ URL FTP access is available, too: ftp://ftp.info-zip.org/pub/infozip/ -Info-ZIP 06 Nov 2013 (v3.1) ZIPINFO(1L) +Info-ZIP 17 Apr 2015 (v6.1) ZIPINFO(1L) diff --git a/extract.c b/extract.c index 4a44faf..a6e4a02 100644 --- a/extract.c +++ b/extract.c @@ -4153,8 +4153,11 @@ int extract_or_test_stream( __G) /* Return PK-type error code. */ undefer_input(__G); /* Re-adjust input counts, pointers. */ } } + else + { + members_processed++; + } - members_processed++; if (error == PK_OK) { if (store_info(__G) != 0) @@ -4173,13 +4176,6 @@ int extract_or_test_stream( __G) /* Return PK-type error code. */ */ G.seeking_apl_dbl = !G.apl_dbl; } - else - { - /* No special AppleDouble processing. Treat each member - * independently. - */ - G.seeking_apl_dbl = 0; - } # endif /* defined( UNIX) && defined( __APPLE__) */ # ifdef IZ_CRYPT_AES_WG @@ -4803,17 +4799,20 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, if (bitmap[ 0]& (1 << 0)) /* Version made by. */ { G.pInfo->hostver = xlhdr.version_made_by[ 0]; - G.pInfo->hostnum = IZ_MIN( xlhdr.version_made_by[ 1], NUM_HOSTS); + G.pInfo->hostnum = + IZ_MIN( xlhdr.version_made_by[ 1], NUM_HOSTS); } if (bitmap[ 0]& (1 << 1)) /* Internal file attributes. */ { - G.crec.internal_file_attributes = xlhdr.internal_file_attributes; + G.crec.internal_file_attributes = + xlhdr.internal_file_attributes; } if (bitmap[ 0]& (1 << 2)) /* External file attributes. */ { - G.crec.external_file_attributes = xlhdr.external_file_attributes; + G.crec.external_file_attributes = + xlhdr.external_file_attributes; } #ifdef FUTURE @@ -4950,6 +4949,9 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, } #if defined( UNIX) && defined( __APPLE__) + /* Set do_this_prev, for possible use with the next (AD?) file. */ + G.do_this_prev = (G.apple_double == 0); + /* If we are doing special AppleDouble file processing, and the * user renamed the main file, then act accordingly. */ @@ -5576,6 +5578,11 @@ int extract_or_test_files(__G) /* return PK-type error code */ */ do_this_file = match_include_exclude( __G); +# if defined( UNIX) && defined( __APPLE__) + G.do_this_prev = do_this_file; + G.seeking_apl_dbl = 0; +# endif /* defined( UNIX) && defined( __APPLE__) */ + members_processed++; if (do_this_file > 0) { @@ -5586,18 +5593,13 @@ int extract_or_test_files(__G) /* return PK-type error code */ } #if defined( UNIX) && defined( __APPLE__) - /* Save do_this_file, for possible use with the next (AD?) file. */ - G.do_this_prev = do_this_file; if ((!uO.J_flag) && G.exdir_attr_ok) - /* Using integrated AppleDouble processing. Look for an - * AppleDouble next, iff this one was normal. - */ - G.seeking_apl_dbl = !G.apl_dbl; - else - /* No special AppleDouble processing. Treat each member - * independently. - */ - G.seeking_apl_dbl = 0; + { + /* Using integrated AppleDouble processing. Look for an + * AppleDouble next, iff this one was normal. + */ + G.seeking_apl_dbl = !G.apl_dbl; + } #endif /* defined( UNIX) && defined( __APPLE__) */ } /* end while-loop (adding files to current block) */ diff --git a/fileio.c b/fileio.c index 05e790f..aa7bf00 100644 --- a/fileio.c +++ b/fileio.c @@ -394,7 +394,7 @@ int set_zipfn_sgmnt_name( __G__ sgmnt_nr) * easily replace one file type with another (and null out the version * number), so use it, instead. */ - vms_sgmnt_name( G.zipfn_sgmnt, G.zipfn, (sgmnt_nr+ 1)); + vms_sgmnt_name( G.zipfn_sgmnt, G.zipfn, (sgmnt_nr+ 1)); #else /* def VMS */ @@ -1114,6 +1114,21 @@ int seek_zipf(__G__ abs_offset) zoff_t request; zoff_t inbuf_offset; zoff_t bufstart; + int sgmnt_movement = G.ecrec.number_this_disk - G.sgmnt_nr; + /* If request < 0, then we will move between segment files if + * archive is segmented and in that case we need start always + * from last file. So set right movement against actual segment. + * !! Do not set G.sgmnt_ns variable directly !! Now it could be done + * safely if request < 0 and it's more effective solution for loop, + * however it's not clean and it can be source of troubles in future, + * when code will be modified again. + * if(request < 0) + * G.sgmnt_nr = G.ecrec.number_this_disk; + * ..... + * .. in loop .. + * if ((G.sgmnt_nr == 0) || open_infile_sgmnt( __G__ -1)) + * .... + * */ request = abs_offset + G.extra_bytes; @@ -1125,53 +1140,32 @@ int seek_zipf(__G__ abs_offset) return PK_BADERR; } #endif /* 0 */ /* Pre-segment-support. */ - while (request < 0) { - if (G.sgmnt_size == 0) + if ((G.sgmnt_nr == 0) || open_infile_sgmnt( __G__ sgmnt_movement)) { - if ((G.sgmnt_nr == 0) || open_infile_sgmnt( __G__ -1)) - { - Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), - G.zipfn, 12, LoadFarString(ReportMsg))); - return PK_BADERR; - } - /* Get the new segment size, and calculate the new offset. - * This is where G.sgmnt_size gets a real (non-zero) value. - */ + Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), + G.zipfn, 12, LoadFarString(ReportMsg))); + return PK_BADERR; + } + /* Get the new segment size, and calculate the new offset. + * This is where G.sgmnt_size gets a real (non-zero) value. + */ #ifdef USE_STRM_INPUT - zfseeko(G.zipfd, 0, SEEK_END); - G.sgmnt_size = zftello(G.zipfd); + zfseeko(G.zipfd, 0, SEEK_END); + request += zftello(G.zipfd); #else /* def USE_STRM_INPUT */ - G.sgmnt_size = zlseek(G.zipfd, 0, SEEK_END); + request += zlseek(G.zipfd, 0, SEEK_END); #endif /* USE_STRM_INPUT */ - request += G.sgmnt_size; - } - else - { - /* SMSd. Can we trust that all segments have the same size? */ - /* We know segment size(s?), so we can calculate against - * abs_offset and sgmnt_nr, and open the segment file which we - * actually need. - */ - unsigned int tmp_disk = G.ecrec.number_this_disk; - while (request < 0) - { - tmp_disk--; - request += G.sgmnt_size; - } - /* for same as actual disk (movement == 0) return 0 */ - if (open_infile_sgmnt( __G__ (tmp_disk- G.sgmnt_nr))) - { - Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), - G.zipfn, 13, LoadFarString(ReportMsg))); - return PK_BADERR; - } - } - /* In both cases we need to refill buffer, so set - * G.cur_zipfile_bufstart negative (so that bufstart != - * G.cur_zipfile_bufstart, below). + /* now it should be always -1 + * Not all segmented files have same size! So we must go file by file + * and work with real sizes. + */ + sgmnt_movement = -1; + + /* We need to refill buffer, so set G.cur_zipfile_bufstart to negative + * value (so that bufstart != G.cur_zipfile_bufstart, below). */ G.cur_zipfile_bufstart = -1; } @@ -1207,7 +1201,7 @@ int seek_zipf(__G__ abs_offset) /* If we're not at the end of file, then we need move to the * next segment file. * TODO: Check if EOF, instead? - */ + */ if (G.ecrec.number_this_disk != G.sgmnt_nr) { int tmp; @@ -1566,10 +1560,10 @@ static int partflush(__G__ rawbuf, size, unshrink) * Add more code here to inhibit setting * selected extended attributes. */ -# define XATTR_QTR "com.apple.quarantine" +# define XATTR_QTN "com.apple.quarantine" if ((!uO.Jq_flag) || - (strcmp( attr_ptr, XATTR_QTR) != 0)) + (strcmp( attr_ptr, XATTR_QTN) != 0)) { sts = setxattr( G.filename, /* Real file name. */ @@ -1589,7 +1583,7 @@ static int partflush(__G__ rawbuf, size, unshrink) /* Advance index to the next align:4 value. */ ndx = (ndx+ attr_size+ 3)& 0xfffffffc; } - } + } # endif /* def APPLE_XATTR */ /* Restore name suffix ("/rsrc"). */ @@ -1824,7 +1818,7 @@ static int partflush(__G__ rawbuf, size, unshrink) /* 2012-11-25 SMS. (OUSPG report.) * Changed eb_len and ef_len from unsigned to signed, to catch underflow - * of ef_len caused by corrupt/malicious data. (32-bit is adequate. + * of ef_len caused by corrupt/malicious data. (32-bit is adequate. * Used "long" to accommodate any systems with 16-bit "int".) */ diff --git a/globals.h b/globals.h index 4745795..3c38b3c 100644 --- a/globals.h +++ b/globals.h @@ -316,7 +316,6 @@ typedef struct Globals { char *zipfn_sgmnt; /* zipfile segment path/name */ int zipfn_sgmnt_size; /* zipfile segment path/name size */ zuvl_t sgmnt_nr; /* zipfile segment number */ - zoff_t sgmnt_size; /* zipfile segment size */ zipfd_t zipfd; /* zipfile primary file descr/pointer */ zipfd_t zipfd_sgmnt; /* zipfile segment file descr/pointer */ int zipstdin; /* Archive is stdin. */ diff --git a/libiz/Contents b/libiz/Contents index bc4d35d..3f0b7d7 100644 --- a/libiz/Contents +++ b/libiz/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "libiz" directory - ----------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "libiz" Directory + ---------------------------------------------------------- General Documentation Contents This file diff --git a/man/Contents b/man/Contents index 97b370b..e6d4039 100644 --- a/man/Contents +++ b/man/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "man/man1" Directory - -------------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "man/man1" Directory + ------------------------------------------------------------- man1/ nroff "man" sources for the main user documentation funzip.1 fUnZip manual page, source diff --git a/man/man1/Contents b/man/man1/Contents index c30ecf1..feaacee 100644 --- a/man/man1/Contents +++ b/man/man1/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "man/man1" Directory - -------------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "man/man1" Directory + ------------------------------------------------------------- funzip.1 fUnZip manual page, source unzip.1 UnZip manual page, source diff --git a/man/man1/unzip.1 b/man/man1/unzip.1 index 846bf4e..95e7359 100644 --- a/man/man1/unzip.1 +++ b/man/man1/unzip.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1990-2014 Info-ZIP. All rights reserved. +.\" Copyright (c) 1990-2015 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2009-Jan-02 or later .\" (the contents of which are also included in unzip.h) for terms of use. @@ -8,7 +8,7 @@ .\" unzip.1 by Greg Roelofs, Fulvio Marino, Jim van Zandt and others. .\" .\" ========================================================================= -.TH UNZIP 1L "10 Oct 2014 (v6.10)" "Info-ZIP" +.TH UNZIP 1L "17 Apr 2015 (v6.1)" "Info-ZIP" .\" ========================================================================= .\" .\" Define .EX/.EE (for multiline user-command examples; normal Courier font). @@ -52,7 +52,7 @@ archives created by PKWARE's \fIPKZIP\fP and \fIPKUNZIP\fP programs default behaviors differ. Nowadays, many other programs are available which work with ZIP archives. .PP -Note: Beginning with \fIUnZip\fP version 6.10, the old command-line +Note: Beginning with \fIUnZip\fP version 6.1, the old command-line parser has been replaced by one like the one used in \fIZip\fP (version 3.0 and later). One significant change is that \fIoption negation now uses a TRAILING hyphen ("\-")\fP, so, for example, \fB\-B\-\fP negates @@ -173,7 +173,7 @@ options are interpreted as \fIZipInfo\fP options. See the \fBzipinfo\fP manual page for a description of those options. .\" -------------------------------------------------------------------- .SH OPTIONS (Primary Mode) -Options in this group (\fB\-c \-f \-h \-l \-p \-T \-t \-u \-v \-z\fP) +Options in this group (\fB\-c \-f \-h \-l \-p \-T \-t \-u \-v \-vq \-z\fP) specify the primary mode of operation of \fIUnZip\fP. Only one of these primary mode options may be specified. .PP @@ -353,6 +353,14 @@ Currently, \fB\-\-version\fP is implemented as a synonym for specified with no other options. .PP .PD 0 +.B \-vq +.TP +.PD +.B \-\-quick-version +.br +Primary mode. Display a brief (one-line) program version report. +.PP +.PD 0 .B \-z .TP .PD @@ -541,12 +549,12 @@ works only on systems that support setting timestamps for directories systems, \fB\-D\-\fP has no effect. .IP [Non-VMS] Timestamp restoration behavior changed between \fIUnZip\fP -versions 6.00 and 6.10. The following table shows the effects of +versions 6.00 and 6.1. The following table shows the effects of various \fB\-D\fP options for both versions. .IP .EX UnZip version | - 6.00 | 6.10 | Restore timestamps on: + 6.00 | 6.1 | Restore timestamps on: -----------+-----------+------------------------ -DD | -D | Nothing. -D | (default) | Files, not directories. @@ -805,7 +813,7 @@ protection is applied to the UIC-based (SOGW) protections. .IP With \-k, the archived permissions are restored without regard to the Unix umask or VMS default protection. (This was the default behavior in -\fIUnZip\fP versions before 6.10.) +\fIUnZip\fP versions before 6.1.) .IP With \-k\-, the archived permissions are ignored, so only the Unix umask or VMS default protection is effective. (On VMS, directories are always @@ -1114,11 +1122,11 @@ are stripped, but this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) .IP -[Non-VMS] Note that before \fIUnZip\fP version 6.10, on a non-VMS +[Non-VMS] Note that before \fIUnZip\fP version 6.1, on a non-VMS system, a file with a name like "\fCfred;123\fR" would, by default, be extracted as "\fCfred\fR", even if the file did not originate on a VMS system (so that "\fC;123\fR" was probably not really a VMS version -number). Beginning with UnZip version 6.10, the default behavior is to +number). Beginning with UnZip version 6.1, the default behavior is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: \fB\-V\-\fP. @@ -1151,6 +1159,14 @@ Primary Mode. Display the program version, build options, and relevant environment variables. For details, see Primary Mode options. .PP .PD 0 +.B \-vq +.TP +.PD +.B \-\-quick-version +.br +Primary mode. Display a brief (one-line) program version report. +.PP +.PD 0 .B \-W .TP .PD @@ -1428,7 +1444,7 @@ code for Traditional encryption is included in the source kits, and support for Traditional encryption is enabled by default. (Build-time C macros: IZ_CRYPT_TRAD, NO_CRYPT.) .PP -Beginning with \fIUnZip\fP version 6.10 and \fIZip\fP version 3.1, +Beginning with \fIUnZip\fP version 6.1 and \fIZip\fP version 3.1, these programs also offer a stronger, Advanced Encryption Standard (AES) encryption method, which we call AES WinZip/Gladman (AES_WG) encryption. (The encryption code was supplied by Brian Gladman, and the diff --git a/man/man1/unzipsfx.1 b/man/man1/unzipsfx.1 index 69b0462..aaf8f24 100644 --- a/man/man1/unzipsfx.1 +++ b/man/man1/unzipsfx.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1990-2013 Info-ZIP. All rights reserved. +.\" Copyright (c) 1990-2015 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2009-Jan-02 or later .\" (the contents of which are also included in unzip.h) for terms of use. @@ -8,7 +8,7 @@ .\" unzipsfx.1 by Greg Roelofs .\" .\" ========================================================================= -.TH UNZIPSFX 1L "06 Nov 2013 (v6.10)" "Info-ZIP" +.TH UNZIPSFX 1L "15 Apr 2015 (v6.1)" "Info-ZIP" .\" ========================================================================= .\" .\" Define .EX/.EE (for multiline user-command examples; normal Courier font). @@ -336,12 +336,12 @@ works only on systems that support setting timestamps for directories systems, \fB\-D\-\fP has no effect. .IP [Non-VMS] Timestamp restoration behavior changed between UnZip versions -6.00 and 6.10. The following table shows the effects of various +6.00 and 6.1. The following table shows the effects of various \fB\-D\fP options for both versions. .IP .EX UnZip version | - 6.00 | 6.10 | Restore timestamps on: + 6.00 | 6.1 | Restore timestamps on: -----------+-----------+------------------------ -DD | -D | Nothing. -D | (default) | Files, not directories. @@ -466,7 +466,7 @@ protection is applied to the UIC-based (SOGW) protections. .IP With \-k, the archived permissions are restored without regard to the Unix umask or VMS default protection. (This was the default behavior in -UnZip versions before 6.10.) +UnZip versions before 6.1.) .IP With \-k\-, the archived permissions are ignored, so only the Unix umask or VMS default protection is effective. (On VMS, directories are always @@ -720,11 +720,11 @@ are stripped, but this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) .IP -[Non-VMS] Note that before UnZip version 6.10, on a non-VMS system, a +[Non-VMS] Note that before UnZip version 6.1, on a non-VMS system, a file with a name like "\fCfred;123\fR" would, by default, be extracted as "\fCfred\fR", even if the file did not originate on a VMS system (so that "\fC;123\fR" was probably not really a VMS version number). -Beginning with UnZip version 6.10, the default behavior is to strip VMS +Beginning with UnZip version 6.1, the default behavior is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: \fB\-V\-\fP. diff --git a/man/man1/zipinfo.1 b/man/man1/zipinfo.1 index 2a03fea..e0e7cca 100644 --- a/man/man1/zipinfo.1 +++ b/man/man1/zipinfo.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1990-2013 Info-ZIP. All rights reserved. +.\" Copyright (c) 1990-2015 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2009-Jan-02 or later .\" (the contents of which are also included in unzip.h) for terms of use. @@ -8,7 +8,7 @@ .\" zipinfo.1 by Greg Roelofs and others. .\" .\" ========================================================================= -.TH ZIPINFO 1L "06 Nov 2013 (v3.1)" "Info-ZIP" +.TH ZIPINFO 1L "17 Apr 2015 (v6.1)" "Info-ZIP" .\" ========================================================================= .\" Define .EX/.EE (for multiline user-command examples; normal Courier font). .\" Must follow ".TH"; otherwise macros get redefined. @@ -304,6 +304,25 @@ handling of filename codings within \fIZipInfo\fP falls back to the behavior of pre-Unicode versions. .PP .PD 0 +.B \-\-version +.TP +.PD +When used alone, display the program version, and usage. See also +Primary Format option \fB\-v\fP. +.IP +Currently, \fB\-\-version\fP is implemented as a synonym for +\fB\-v\fP/\fB\-\-verbose\fP, so, for proper operation, it must be +specified with no other options. +.PP +.PD 0 +.B \-vq +.TP +.PD +.B \-\-quick-version +.br +Primary mode. Display a brief (one-line) program version report. +.PP +.PD 0 .B \-W .TP .PD diff --git a/process.c b/process.c index ba7adad..ce40cf4 100644 --- a/process.c +++ b/process.c @@ -1076,7 +1076,6 @@ static int extract_archive_seekable( __G__ lastchance) G.cur_zipfile_bufstart = 0; G.inptr = G.inbuf; - G.sgmnt_size = 0; /* Init before ECREC for each archive in the list. */ #if ((!defined(WINDLL) && !defined(SFX)) || !defined(NO_ZIPINFO)) # if !defined(WINDLL) && !defined(SFX) @@ -1142,8 +1141,6 @@ static int extract_archive_seekable( __G__ lastchance) #ifdef NO_MULTIPART error = !uO.zipinfo_mode && (G.ecrec.number_this_disk == 1) && (G.ecrec.num_disk_start_cdir == 1); -#else - error = !uO.zipinfo_mode && (G.ecrec.number_this_disk != 0); #endif #ifndef SFX @@ -1180,8 +1177,8 @@ static int extract_archive_seekable( __G__ lastchance) error_in_archive = PK_WARN; } #endif /* ndef SFX */ - if ((G.extra_bytes = G.real_ecrec_offset-G.expect_ecrec_offset) < - (zoff_t)0) + if (((G.extra_bytes = G.real_ecrec_offset-G.expect_ecrec_offset) < + (zoff_t)0) && (G.ecrec.number_this_disk == 0)) { Info(slide, 0x401, ((char *)slide, LoadFarString(MissingBytes), G.zipfn, FmZofft((-G.extra_bytes), NULL, NULL))); @@ -1277,10 +1274,6 @@ static int extract_archive_seekable( __G__ lastchance) or test member files as instructed, and close the zipfile. -----------------------------------------------------------------------*/ - /* TODO: We need know offset against actual file!!! If we are - * not in the same file as EOCDR, it will fail always. - */ - error = seek_zipf(__G__ G.ecrec.offset_start_central_directory); if (error != PK_OK) { CLOSE_INFILE( &G.zipfd); @@ -1472,7 +1465,7 @@ static int extract_archive( __G__ lastchance) /* Return PK-type error code. */ } } - return error; + return error; } /* extract_archive() */ @@ -1552,7 +1545,7 @@ static int check_auto_dest_dir( __G) } } } /* (Else, retry the same name.) */ - + if ((auto_exdir_state > 0) && (auto_exdir_state < 4)) { # ifdef VMS diff --git a/unix/Contents b/unix/Contents index a4a7cfe..44d0796 100644 --- a/unix/Contents +++ b/unix/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "unix" Directory - ---------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "unix" Directory + --------------------------------------------------------- configure Shell script to probe system environment, capabilities Contents This file diff --git a/unix/README.zOS b/unix/README.zOS index e646e3f..8c8ec39 100644 --- a/unix/README.zOS +++ b/unix/README.zOS @@ -1,4 +1,4 @@ -unix/README.zOS - UnZip 6.10 09 Sept 2011 +unix/README.zOS - UnZip 6.1 09 Sept 2011 Copyright (c) 2011 Info-ZIP. All rights reserved. @@ -166,9 +166,9 @@ follows: +----------------------------------------------------------------------------+ | Overview of Changes for z/OS UNIX port | +----------------------------------------------------------------------------+ -UNZIP 6.10 changes by Al Dunsmuir (09 Sept 2011) +UNZIP 6.1 changes by Al Dunsmuir (09 Sept 2011) -The z/OS UNIX port is based on (and replaces) the original updated UNZIP 6.10 +The z/OS UNIX port is based on (and replaces) the original updated UNZIP 6.1 "OS/390" port by Bob Woodside. - Replaced make target for _.o files by providing standard file-pattern rules diff --git a/unzip.c b/unzip.c index b85db65..27fb640 100644 --- a/unzip.c +++ b/unzip.c @@ -112,10 +112,6 @@ static int setsignalhandler OF((__GPRO__ savsigs_info **p_savedhandler_chain, static void help_extended OF((__GPRO)); # endif /* ndef SFX */ -# if !defined( SFX) || defined( DIAG_SFX) -static void show_version_info OF((__GPRO)); -# endif /* !defined( SFX) || defined( DIAG_SFX) */ - # ifdef ENABLE_USER_PROGRESS # ifdef VMS # define USER_PROGRESS_CLASS extern @@ -374,7 +370,7 @@ static ZCONST char Far ZipInfoExample[] = "*, ?, [] (e.g., \"[a-j]*.zip\")"; # endif static ZCONST char Far ZipInfoUsageLine1[] = "\ -ZipInfo %d.%d%d%s (%s) by Info-ZIP. Maintainer: \n\ +ZipInfo %s (%s) by Info-ZIP. Maintainer: %s\n\ \n\ List name, date/time, attribute, size, compression method, etc., about files\n\ in list (excluding those in xlist) contained in the specified .zip archive(s).\ @@ -409,12 +405,13 @@ ZCONST char Far BetaVersion[] = "%s\ THIS IS STILL A BETA VERSION OF UNZIP%s -- DO NOT DISTRIBUTE.\n\n"; # endif -# ifdef SFX -# ifndef VMSCLI +# ifndef VMSCLI static /* Used in vms/cmdline.c, so not static in VMS CLI. */ -# endif /* ndef VMSCLI */ -ZCONST char Far UnzipSFXBanner[] = - "UnZipSFX %d.%d%d%s (%s) by Info-ZIP (http://www.info-zip.org).\n"; +# endif /* ndef VMSCLI */ +ZCONST char Far UnzipBanner[] = + "%s %s (%s) (c)%4.4s Info-ZIP http://info-zip.org\n"; + +# ifdef SFX # ifdef SFX_EXDIR static ZCONST char Far UnzipSFXOpts[] = "Valid options are -cfptuz; modifiers are -abCdjLnoPq%sV%s.\n"; @@ -484,6 +481,10 @@ static ZCONST char Far AsmInflateCodes[] = static ZCONST char Far Check_Versions[] = "CHECK_VERSIONS (Check VMS versions, build v. run-time)"; # endif +# if defined( _MSC_VER) && defined( _DEBUG) +static ZCONST char Far WinDebug[] = + "_DEBUG (Windows Debug configuration)"; +# endif # ifdef DEBUG static ZCONST char Far UDebug[] = "DEBUG"; # endif @@ -584,7 +585,9 @@ static ZCONST char Far Use_Unreduce[] = # else # ifdef USE_UNREDUCE_SMITH static ZCONST char Far Use_Unreduce[] = - "USE_UNREDUCE_SMITH (PKZIP 0.9x Reduce compression, (c) S. H. Smith)"; + "USE_UNREDUCE_SMITH (PKZIP 0.9x Reduce compression, proprietary)"; +static ZCONST char Far Use_UnreduceSc[] = + " (UnReduce copyright (c) 1989 by S. H. Smith.)"; # endif # endif # ifdef UNICODE_SUPPORT @@ -677,8 +680,8 @@ static ZCONST char Far AesWgEncryptionNotice2[] = This executable includes 256-bit AES strong encryption and may be\n\ subject to export restrictions in many countries, including the USA.\n"; - static ZCONST char Far AesWgDecryption[] = -" IZ_CRYPT_AES_WG (AES encryption (WinZip/Gladman), ver %d.%d%s)\n"; + static ZCONST char Far AesWgDecryption[] = " \ + IZ_CRYPT_AES_WG (AES encryption (IZ WinZip/Gladman), ver %d.%d%s)\n"; # endif # ifdef IZ_CRYPT_ANY # ifdef IZ_CRYPT_TRAD @@ -713,29 +716,16 @@ static ZCONST char Far EnvGO32TMP[] = "GO32TMP"; # endif /* !defined( SFX) || defined( DIAG_SFX) */ # ifndef SFX -# ifndef USE_UNREDUCE_SMITH /* Maintainer, not Smith copyright. */ -# ifdef VMSCLI +# ifdef VMSCLI /* Used in vms/cmdline.c, so not static in VMS CLI. "/lic" v. "--lic". */ ZCONST char Far UnzipUsageLine1[] = "\ -UnZip %d.%d%d%s (%s) by Info-ZIP. Maintainer: \n\ +UnZip %s (%s) by Info-ZIP. Maintainer: %s\n\ Copyright (c) 1990-2015 Info-ZIP. For software license: unzip /license\n"; -# else /* def VMSCLI */ +# else /* def VMSCLI */ static ZCONST char Far UnzipUsageLine1[] = "\ -UnZip %d.%d%d%s (%s) by Info-ZIP. Maintainer: \n\ - Copyright (c) 1990-2015 Info-ZIP. For software license: unzip --license\n"; -# endif /* def VMSCLI [else] */ -# else /* ndef USE_UNREDUCE_SMITH */ /* Smith copyright, not maintainer. */ -# ifdef VMSCLI - /* Used in vms/cmdline.c, so not static in VMS CLI. "/lic" v. "--lic". */ -ZCONST char Far UnzipUsageLine1[] = "\ -UnZip %d.%d%d%s (%s) by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ - Copyright (c) 1990-2015 Info-ZIP. For software license: unzip /license\n"; -# else /* def VMSCLI */ -static ZCONST char Far UnzipUsageLine1[] = "\ -UnZip %d.%d%d%s (%s) by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ +UnZip %s (%s) by Info-ZIP. Maintainer: %s\n\ Copyright (c) 1990-2015 Info-ZIP. For software license: unzip --license\n"; -# endif /* def VMSCLI [else] */ -# endif /* ndef USE_UNREDUCE_SMITH [else] */ +# endif /* def VMSCLI [else] */ # define UnzipUsageLine1v UnzipUsageLine1 static ZCONST char Far UnzipUsageLine2v[] = "\ @@ -1587,7 +1577,7 @@ static struct option_struct far options[] = { 'e', "extract (not used?)"}, # ifdef MACOS {UZO, "E", "mac-efs", o_NO_VALUE, o_NEGATABLE, - 'E', "display Mac e.f. when restoring"}, + 'E', "show Mac e.f. when restoring"}, # endif {UZO, "f", "freshen", o_NO_VALUE, o_NEGATABLE, 'f', "freshen (extract only newer files)"}, @@ -1720,6 +1710,10 @@ static struct option_struct far options[] = { 'v', "verbose"}, {UZO, "", "version", o_NO_VALUE, o_NEGATABLE, o_ve, "version"}, + {UZO, "", "version", o_NO_VALUE, o_NEGATABLE, + o_ve, "version"}, + {UZO, "vq", "quick-version", o_NO_VALUE, o_NOT_NEGATABLE, + o_vq, "show brief/quick version"}, # endif # ifndef CMS_MVS {UZO, "V", "keep-versions", o_NO_VALUE, o_NEGATABLE, @@ -1740,7 +1734,7 @@ static struct option_struct far options[] = { 'Y', "VMS treat .nnn as ;nnn version"}, # endif {UZO, "z", "zipfile-comment", o_NO_VALUE, o_NEGATABLE, - 'z', "display zipfile comment"}, + 'z', "show zipfile comment"}, # if !defined( SFX) && !defined( NO_ZIPINFO) {UZO, "Z", "zipinfo-mode", o_NO_VALUE, o_NOT_NEGATABLE, 'Z', "ZipInfo mode (must be first option)"}, @@ -1821,6 +1815,8 @@ static struct option_struct far options[] = { 'v', "very detailed list"}, {ZIO, "", "version", o_NO_VALUE, o_NEGATABLE, o_ve, "version"}, + {ZIO, "vq", "quick-version", o_NO_VALUE, o_NOT_NEGATABLE, + o_vq, "show brief/quick version"}, # ifdef WILD_STOP_AT_DIR {ZIO, "W", "wild-no-span", o_NO_VALUE, o_NEGATABLE, 'W', "wildcard * doesn't span /"}, @@ -2478,13 +2474,24 @@ int uz_opts(__G__ pargc, pargv) # if !defined( SFX) || defined( DIAG_SFX) case ('v'): /* verbose */ case (o_ve): /* version */ - if (negative) { + if (negative) + { uO.vflag = IZ_MAX( (uO.vflag- negative), 0); negative = 0; - } else if (uO.vflag) + } + else if (uO.vflag) + { ++uO.vflag; + } else + { uO.vflag = 2; + } + break; + + case (o_vq): /* brief version */ + uO.vflag = 3; + uO.qflag = 4; break; # endif /* !defined( SFX) || defined( DIAG_SFX) */ # ifndef CMS_MVS @@ -2878,9 +2885,8 @@ int uz_opts(__G__ pargc, pargv) /* print our banner unless we're being fairly quiet */ if (uO.qflag < 2) Info(slide, (uzo_err ? 1 : 0), - ((char *)slide, LoadFarString(UnzipSFXBanner), - UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, - LoadFarStringSmall(VersionDate))); + ((char *)slide, LoadFarString( UnzipBanner), + "UnZipSFX", UzpVersionStr(), UZ_VERSION_DATE, UZ_VERSION_DATE)); # ifdef BETA /* always print the beta warning: no unauthorized distribution!! */ Info(slide, (uzo_err ? 1 : 0), @@ -3086,9 +3092,8 @@ int usage(__G__ u_err) /* return PK-type error code */ { int flag = (u_err? 1 : 0); - Info(slide, flag, ((char *)slide, LoadFarString(UnzipSFXBanner), - UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, - LoadFarStringSmall(VersionDate))); + Info(slide, flag, ((char *)slide, LoadFarString( UnzipBanner), + "UnZipSFX", UzpVersionStr(), UZ_VERSION_DATE, UZ_VERSION_DATE)); Info(slide, flag, ((char *)slide, LoadFarString(UnzipSFXOpts), SFXOPT1, LOCAL)); # ifdef VMS @@ -3134,13 +3139,12 @@ int usage(__G__ u_err) /* return PK-type error code */ # ifndef NO_ZIPINFO - Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine1), - ZI_MAJORVER, ZI_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, - LoadFarStringSmall(VersionDate), - LoadFarStringSmall2(ZipInfoExample), QUOTS,QUOTS)); + Info(slide, flag, ((char *)slide, LoadFarString( ZipInfoUsageLine1), + UzpVersionStr(), UZ_VERSION_DATE, UNZIP_MAINTAINER, + LoadFarStringSmall2( ZipInfoExample), QUOTS,QUOTS)); Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine2))); Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine3), - LoadFarStringSmall(ZipInfoUsageLine4))); + LoadFarStringSmall(ZipInfoUsageLine4))); # ifdef VMS Info(slide, flag, ((char *)slide, "\n\ (Must quote upper-case options and names, unless SET PROC/PARSE=EXTEND.)\ @@ -3151,9 +3155,8 @@ int usage(__G__ u_err) /* return PK-type error code */ } else { /* UnZip mode */ - Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine1), - UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, - LoadFarStringSmall(VersionDate))); + Info(slide, flag, ((char *)slide, LoadFarString( UnzipUsageLine1), + UzpVersionStr(), UZ_VERSION_DATE, UNZIP_MAINTAINER)); # ifdef BETA Info(slide, flag, ((char *)slide, LoadFarString(BetaVersion), "", "")); # endif @@ -3316,7 +3319,7 @@ static void help_extended(__G) "Below, MacOS refers to Mac OS before Mac OS X. Mac OS X is a Unix-based", "port and is referred to as MacOSX.", "", - "UnZip 6.10 uses a new command parser which supports long options. Short", + "UnZip 6.1 uses a new command parser which supports long options. Short", "options begin with a single dash (-h), while long options start with two", "(--help). Long options can be abbreviated until uniqueness is lost.", "", @@ -3445,11 +3448,10 @@ static void help_extended(__G) " archive. Exclude and include lists end at next option or end of line.", " unzip archive -x pattern pattern ...", "", - "Multi-part (split) archives (archives created as a set of split files):", - " Currently split archives are not readable by UnZip. A workaround is", - " to use zip to convert the split archive to a single-file archive and", - " use UnZip on that. See the manual page for Zip 3.0 or later.", - " Split support should be added to UnZip 6.10 before release.", + "Segmented (split) archives (archives created as a set of split files):", + " Currently, all archive segments must be files on a single volume, with", + " name extensions \".z01\", \".z02\", and so on, with the last segment" + " \".zip.\"", "", "Streaming (piping into UnZip):", " Currently UnZip does not support streaming. The FUnZip utility can be", @@ -3667,25 +3669,51 @@ extern char *getenv(); # endif # endif /* ndef SFX */ + +char *UZ_EXP UzpVersionStr( OFT( void)) +{ + static char vs[ 32] = ""; + char pl_sufx[ 8] = ""; + char *bt_sufx = ""; + + if (*vs == '\0') + { + if (UZ_PATCHLEVEL != 0) + { + sprintf( pl_sufx, ".%d", UZ_PATCHLEVEL); + } + if ((UZ_BETALEVEL != NULL) && (strcmp( UZ_BETALEVEL, ""))) + { + bt_sufx = UZ_BETALEVEL; + } + sprintf( vs, "%d.%d%s%s", UZ_MAJORVER, UZ_MINORVER, pl_sufx, bt_sufx); + } + + return vs; +} + + # if !defined( SFX) || defined( DIAG_SFX) /********************************/ /* Function show_version_info() */ /********************************/ -static void show_version_info(__G) +void show_version_info(__G) __GDEF { - if (uO.qflag > 3) /* "unzip -vqqqq" */ - Info(slide, 0, ((char *)slide, "%d\n", - (UZ_MAJORVER*100 + UZ_MINORVER*10 + UZ_PATCHLEVEL))); - else { + if (uO.qflag > 3) /* "-qqqqvv" or "-vq" */ + { + Info(slide, 0, ((char *)slide, LoadFarString( UnzipBanner), + "UnZip", UzpVersionStr(), UZ_VERSION_DATE, UZ_VERSION_DATE)); + } + else + { int numopts = 0; # ifndef SFX - Info(slide, 0, ((char *)slide, LoadFarString(UnzipUsageLine1v), - UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, - LoadFarStringSmall(VersionDate))); + Info(slide, 0, ((char *)slide, LoadFarString( UnzipUsageLine1v), + UzpVersionStr(), UZ_VERSION_DATE, UNZIP_MAINTAINER)); Info(slide, 0, ((char *)slide, LoadFarString(UnzipUsageLine2v))); version(__G); @@ -3727,6 +3755,11 @@ static void show_version_info(__G) LoadFarStringSmall(Check_Versions))); ++numopts; # endif +# if defined( _MSC_VER) && defined( _DEBUG) + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(WinDebug))); + ++numopts; +# endif # ifdef DEBUG Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), LoadFarStringSmall(UDebug))); @@ -3939,6 +3972,10 @@ static void show_version_info(__G) # if defined( USE_UNREDUCE_PUBLIC) || defined( USE_UNREDUCE_SMITH) Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), LoadFarStringSmall(Use_Unreduce))); +# ifdef USE_UNREDUCE_SMITH + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_UnreduceSc))); +# endif ++numopts; # endif # ifdef VMS_TEXT_CONV @@ -4066,7 +4103,7 @@ static void show_version_info(__G) */ /* For now stay with multi-byte characters. May support wide characters - in Zip 3.1 and UnZip 6.10. + in Zip 3.1 and UnZip 6.1. */ /* multibyte character set support @@ -5545,18 +5582,11 @@ int arg; not_first = 1; /* Host name. (Trim off any domain info. (Needed on Tru64.)) */ uname( &u_p_utsname); - if (u_p_utsname.nodename == NULL) - { - *u_p_nodename = '\0'; - } - else - { - strncpy( u_p_nodename, u_p_utsname.nodename, (U_P_NODENAME_LEN- 8)); - u_p_nodename[ 24] = '\0'; - cp = strchr( u_p_nodename, '.'); - if (cp != NULL) - *cp = '\0'; - } + strncpy( u_p_nodename, u_p_utsname.nodename, (U_P_NODENAME_LEN- 8)); + u_p_nodename[ 24] = '\0'; + cp = strchr( u_p_nodename, '.'); + if (cp != NULL) + *cp = '\0'; /* Terminal name. (Trim off any leading "/dev/"). */ tty_name = ttyname( 0); @@ -5598,7 +5628,7 @@ int arg; fprintf( stderr, " Archive: %s\n", G.zipfn); } - if (G.filename != NULL) + if (*G.filename != '\0') { /* Repeat the extraction message (to the extent possible). */ fprintf( stderr, ActionMsg, ((G.action_msg_str == NULL) ? "????" : G.action_msg_str), diff --git a/unzip.h b/unzip.h index 5f3c8df..d900640 100644 --- a/unzip.h +++ b/unzip.h @@ -1,8 +1,8 @@ /*--------------------------------------------------------------------------- - unzip.h (new) + unzip.h - Copyright (c) 1990-2014 Info-ZIP. All rights reserved. + Copyright (c) 1990-2015 Info-ZIP. All rights reserved. This header file contains the public macros and typedefs required by both the UnZip sources and by any application using the UnZip API. If @@ -750,6 +750,7 @@ int UZ_EXP UzpFileTree OF((char *name, cbList(callBack), # endif /* def OS2 */ unsigned UZ_EXP UzpVersion2 OF((UzpVer2 *version)); +char *UZ_EXP UzpVersionStr OF((void)); int UZ_EXP UzpValidate OF((char *archive, int AllCodes)); void show_commandline OF((char *args[])); diff --git a/unzip610c.ann b/unzip610c.ann index de2961e..1789451 100644 --- a/unzip610c.ann +++ b/unzip610c.ann @@ -1,13 +1,13 @@ -UnZip 6.10c +UnZip 6.1c -Announcement for UnZip Beta 6.10c, >>25 Feb 2014. This is a beta -release. Changes may be made before UnZip 6.10 is released. See the +Announcement for UnZip Beta 6.1c, >>15 Apr 2015. This is a beta +release. Changes may be made before UnZip 6.1 is released. See the file History.610 for details of changes in this beta release. Complaints and suggestions regarding this beta release can help to improve the next full release. -Quick list of major changes in UnZip 6.10c (See INSTALL and README for +Quick list of major changes in UnZip 6.1c (See INSTALL and README for details): - New command-line parser (like that in Zip 3.0) allows long ("--xxx") diff --git a/unzpriv.h b/unzpriv.h index 67ae0e2..36db7b2 100644 --- a/unzpriv.h +++ b/unzpriv.h @@ -1611,7 +1611,8 @@ void izu_md_check( void); #define o_sc 0x10b /* -sc: Show command line (and exit). */ #define o_si 0x10c /* -si: Show process ID. */ #define o_so 0x10d /* -so: Show options. */ -#define o_ve 0x10e /* -version: Show program version/option info. */ +#define o_ve 0x10e /* -ve/--version: Show program version/option info. */ +#define o_vq 0x10f /* -vq/--quick-version: Show brief pgm version info. */ /* options array is set in unzip.c */ struct option_struct { @@ -2662,11 +2663,11 @@ typedef struct _APIDocStruct { ---------------------------------------------------------------------------*/ #ifndef WINDLL - int MAIN OF((int argc, char **argv)); + int MAIN OF((int argc, char **argv)); #endif /* ndef WINDLL */ - int unzip OF((__GPRO__ int argc, char **argv)); - int uz_opts OF((__GPRO__ int *pargc, char ***pargv)); - int usage OF((__GPRO__ int error)); + int unzip OF((__GPRO__ int argc, char **argv)); + int uz_opts OF((__GPRO__ int *pargc, char ***pargv)); + int usage OF((__GPRO__ int error)); /* Command-line option function prototypes. */ @@ -2695,10 +2696,13 @@ int insert_arg OF((__GPRO__ char ***args, ZCONST char *arg, int insert_at, void show_env OF(( __GPRO__ int non_null_only)); #endif /* def VMSCLI */ -void show_license OF((__GPRO)); +void show_license OF((__GPRO)); #ifndef SFX -void show_options OF((__GPRO)); +void show_options OF((__GPRO)); #endif /* ndef SFX */ +#if !defined( SFX) || defined( DIAG_SFX) +void show_version_info OF((__GPRO)); +#endif /* !defined( SFX) || defined( DIAG_SFX) */ /*--------------------------------------------------------------------------- Functions in process.c (main driver routines): @@ -3546,6 +3550,8 @@ char *GetLoadPath OF((__GPRO)); /* local */ /* Global constants */ /**********************/ +#define UNZIP_MAINTAINER "Steven M. Schweda" + extern ZCONST unsigned near mask_bits[17]; #ifdef EBCDIC @@ -3560,7 +3566,6 @@ char *GetLoadPath OF((__GPRO)); /* local */ extern ZCONST uch Far oem2iso_850[]; #endif - extern ZCONST char Far VersionDate[]; extern ZCONST char Far CentSigMsg[]; #ifndef SFX extern ZCONST char Far EndSigMsg[]; diff --git a/unzvers.h b/unzvers.h index ffe8e69..0ad0072 100644 --- a/unzvers.h +++ b/unzvers.h @@ -22,11 +22,11 @@ # endif # ifdef BETA -# define UZ_BETALEVEL "c18 BETA" -# define UZ_VERSION_DATE "2015-03-28" /* Internal beta version. */ +# define UZ_BETALEVEL "c19-BETA" +# define UZ_VERSION_DATE "2015-04-15" /* Internal beta version. */ # else # define UZ_BETALEVEL "" -# define UZ_VERSION_DATE "2015-??-??" /* Official release version. */ +# define UZ_VERSION_DATE "2015-XX-XX" /* Official release version. */ # define RELEASE # endif @@ -38,7 +38,7 @@ # define UZ_PATCHLEVEL 0 -# define UZ_VER_STRING "6.10c18" /* Keep in sync with Version numbers! */ +# define UZ_VER_STRING "6.1c19" /* Sync with Version numbers! */ # ifndef IZ_COMPANY_NAME # define IZ_COMPANY_NAME "Info-ZIP" diff --git a/vms/Contents b/vms/Contents index 2804a62..f8c2879 100644 --- a/vms/Contents +++ b/vms/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "vms" directory - --------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "vms" Directory + -------------------------------------------------------- build_unzip.com DCL script to build UnZip (and friends) bzlib.h VMS wrapper header file for the bzip2 library definitions diff --git a/vms/INSTALL_VMS.txt b/vms/INSTALL_VMS.txt index c55b753..d37d6e9 100644 --- a/vms/INSTALL_VMS.txt +++ b/vms/INSTALL_VMS.txt @@ -1,7 +1,7 @@ INSTALL_VMS.txt -- UnZip Installation Supplement for VMS (OpenVMS) ================================================================== - UnZip version 6.10. Revised: 2014-10-20. + UnZip version 6.1. Revised: 2015-06-10. ------------------------------------------------------------------------ @@ -149,7 +149,7 @@ does not support. Alpha systems with VMS V7.2 or later (and with a sufficiently new C compiler), and on all IA64 systems. Large-file support is not available on VAX. By default, the builders will enable large-file support where -it is available. (Note that UnZip versions before 6.10c (BETA) required +it is available. (Note that UnZip versions before 6.1c (BETA) required the user to request large-file support explicitly. Now it must be disabled explicitly, if it's not desired.) @@ -225,8 +225,9 @@ like these: MMS /DESC = [.vms] /MACRO = ("CCOPTS=/NAMES=AS_IS", - IZ_BZIP2=IZ_BZIP2_106) - The %CC-I-UNKNOWNPRAGMA complaints are still emitted, but the link - (and the program) should work. + The compiler will still emit the %CC-I-UNKNOWNPRAGMA complaints, + and MMS may emit %MMS-W-GWKACTNOUPD complaints (or, with MMK: + %MMK-I-ACTNOUPD), but the link (and the program) should work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -234,8 +235,11 @@ like these: --------------------------------- The optional LZMA and PPMd compression methods (new in UnZip version -6.10) are enabled by default, and the required source code is included -in the UnZip source kit. +6.1) are enabled by default, and the required source code is included +in the UnZip source kit. The code used to implement these compression +methods is generally written to newer C language standards than the base +Info-ZIP code, so some very old compilers may be unable to build UnZip +if these features are enabled. To disable LZMA and/or PPMd compression, add the appropriate option to the builder command line. For example: @@ -259,6 +263,10 @@ line. For example: or: MMS /DESC = [.vms] /MACRO = (AES_WG=1) + The code used to implement AES_WG encryption is generally written to +newer C language standards than the base Info-ZIP code, so some very old +compilers may be unable to build UnZip if this feature is enabled. + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Traditional Zip Encryption diff --git a/vms/UNZIP_DEF.RNH b/vms/UNZIP_DEF.RNH index f5f8ff4..a94c17e 100644 --- a/vms/UNZIP_DEF.RNH +++ b/vms/UNZIP_DEF.RNH @@ -6,7 +6,7 @@ .! Date: October 23, 1991 .! .!---------------------------------------------------------------------- -.! Copyright (c) 1991-2013 Info-ZIP. All rights reserved. +.! Copyright (c) 1991-2015 Info-ZIP. All rights reserved. .! .! See the accompanying file LICENSE, version 2009-Jan-2 or later (the .! contents of which are also included in zip.h) for terms of use. If, @@ -93,7 +93,7 @@ Format unzip -Z [ zipinfo_options ] [ file[.zip] ] [ member ... ] .end literal .sk -Note: Beginning with UnZip version 6.10, the old command-line parser has +Note: Beginning with UnZip version 6.1, the old command-line parser has been replaced by one like the one used in Zip. One significant change is that option negation now uses a TRAILING hyphen ("-"), so, for example, -B- negates the -B option. This change was made because a @@ -524,12 +524,12 @@ support setting timestamps for directories (currently ATheOS, BeOS, MacOS, OS/2, Unix, VMS, Win32). On other systems, -D- has no effect. .sk [Non-VMS] Timestamp restoration behavior changed between UnZip versions -6.00 and 6.10. The following table shows the effects of various -D +6.00 and 6.1. The following table shows the effects of various -D options for both versions. .sk .literal UnZip version | - 6.00 | 6.10 | Restore timestamps on: + 6.00 | 6.1 | Restore timestamps on: -----------+-----------+------------------------ -DD | -D | Nothing. -D | (default) | Files, not directories. @@ -696,7 +696,7 @@ protection is applied to the UIC-based (SOGW) protections. .sk With -k, the archived permissions are restored without regard to the Unix umask or VMS default protection. (This was the default behavior in -UnZip versions before 6.10.) +UnZip versions before 6.1.) .sk With -k-, the archived permissions are ignored, so only the Unix umask or VMS default protection is effective. (On VMS, directories are always @@ -1030,11 +1030,11 @@ this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) .sk -[Non-VMS] Note that before UnZip version 6.10, on a non-VMS system, a +[Non-VMS] Note that before UnZip version 6.1, on a non-VMS system, a file with a name like "fred;123" would, by default, be extracted as "fred", even if the file did not originate on a VMS system (so that ";123" was probably not really a VMS version number). Beginning with -UnZip version 6.10, the default behavior is to strip VMS version numbers +UnZip version 6.1, the default behavior is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: "-V-". @@ -1340,7 +1340,7 @@ Traditional encryption is included in the source kits, and support for Traditional encryption is enabled by default. (Build-time C macro: CRYPT_TRAD.) .sk -Beginning with UnZip version 6.10 and Zip version 3.1, +Beginning with UnZip version 6.1 and Zip version 3.1, these programs also offer a stronger, Advanced Encryption Standard (AES) encryption method, which we call AES WinZip/Gladman (AES_WG) encryption. (The encryption code was supplied by Brian Gladman, and the diff --git a/vms/build_unzip.com b/vms/build_unzip.com index 5431d64..a090f20 100755 --- a/vms/build_unzip.com +++ b/vms/build_unzip.com @@ -1,11 +1,11 @@ $! BUILD_UNZIP.COM $! -$! UnZip 6.10 for VMS -- DCL Build procedure. +$! UnZip 6.1 for VMS -- DCL Build procedure. $! -$! Last revised: 2014-10-20 SMS. +$! Last revised: 2015-05-18 SMS. $! $!---------------------------------------------------------------------- -$! Copyright (c) 2004-2014 Info-ZIP. All rights reserved. +$! Copyright (c) 2004-2015 Info-ZIP. All rights reserved. $! $! See the accompanying file LICENSE, version 2009-Jan-2 or later (the $! contents of which are also included in zip.h) for terms of use. If, @@ -18,7 +18,7 @@ $! - Suppress C compilation (re-link): "NOCOMPILE" $! - Suppress linking executables: "NOLINK" $! - Suppress help file processing: "NOHELP" $! - Suppress message file processing: "NOMSG" -$! - Define DCL symbols: "SYMBOLS" (Was default before UnZip 6.10.) +$! - Define DCL symbols: "SYMBOLS" (Was default before UnZip 6.1.) $! - Select compiler environment: "VAXC", "DECC", "GNUC" $! - Disable AES_WG encryption support: "NOAES_WG" $! By default, the SFX programs are built without AES_WG support. @@ -437,23 +437,13 @@ $ endif $! $! Build. $! -$! Sense the host architecture (Alpha, Itanium, or VAX). +$! Sense the host architecture (Alpha, Itanium, VAX, or x86_64). $! $ if (f$getsyi( "HW_MODEL") .lt. 1024) $ then $ arch = "VAX" $ else -$ if (f$getsyi( "ARCH_TYPE") .eq. 2) -$ then -$ arch = "ALPHA" -$ else -$ if (f$getsyi( "ARCH_TYPE") .eq. 3) -$ then -$ arch = "IA64" -$ else -$ arch = "unknown_arch" -$ endif -$ endif +$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") $ endif $! $ destl = "" diff --git a/vms/cmdline.c b/vms/cmdline.c index 3e9853c..ddceae6 100644 --- a/vms/cmdline.c +++ b/vms/cmdline.c @@ -25,7 +25,7 @@ */ #if 0 #define module_name VMS_UNZIP_CMDLINE -#define module_ident "02-015" +#define module_ident "02-018" #endif /* 0 */ /* @@ -44,7 +44,9 @@ ** ** Modified by: ** -** 02-017 S. Schweda 06-Oct-2012 17:00 +** 02-018 S. Schweda 18-Apr-2015 +** Added /VERBOSE = BRIEF. +** 02-017 S. Schweda 06-Oct-2012 ** Added /DECIMAL_TIME, /[NO]JAR, /JUNK_DIRS=n, ** /MATCH (replacing /CASE_MATCH). Restored and deprecated ** /[NO]CASE_INSENSITIVE. Changed /NAMES = [NO]LOWERCASE @@ -281,10 +283,11 @@ $DESCRIPTOR(cli_decimal_time, "DECIMAL_TIME"); /* -Z -T */ $DESCRIPTOR(cli_times, "TIMES"); /* -Z -T */ $DESCRIPTOR(cli_totals, "TOTALS"); /* -Z -t */ $DESCRIPTOR(cli_noverbose, "NOVERBOSE"); /* -v-, -Z -v- */ -$DESCRIPTOR(cli_verbose, "VERBOSE"); /* -v, -Z -v */ -$DESCRIPTOR(cli_verbose_normal, "VERBOSE.NORMAL"); /* -v, -Z -v */ -$DESCRIPTOR(cli_verbose_more, "VERBOSE.MORE"); /* -vv, -Z -vv */ +$DESCRIPTOR(cli_verbose, "VERBOSE"); /* -v, -Z -v, -vq */ +$DESCRIPTOR(cli_verbose_brief, "VERBOSE.BRIEF"); /* -vq */ $DESCRIPTOR(cli_verbose_command, "VERBOSE.COMMAND"); /* (none) */ +$DESCRIPTOR(cli_verbose_more, "VERBOSE.MORE"); /* -vv, -Z -vv */ +$DESCRIPTOR(cli_verbose_normal, "VERBOSE.NORMAL"); /* -v, -Z -v */ $DESCRIPTOR(cli_yyz, "YYZ_UNZIP"); @@ -1351,13 +1354,14 @@ vms_unzip_cmdline (int *argc_p, char ***argv_p) } /* - * Verbose/version ("-v" report). + * Verbose/version ("-v" or "-vq" report). * Clear any existing "-v" options with "-v-v-", then add * the desired "v" value. */ #define OPT_V "-v-v-v" /* "-v" Verbose (normal). */ -#define OPT_VV "-v-v-vv" /* "-vv" Verbose (more). */ #define OPT_VN "-v-v-" /* "" Normal extract (default). */ +#define OPT_VQ "-vq" /* "-vq" Verbose (brief). */ +#define OPT_VV "-v-v-vv" /* "-vv" Verbose (more). */ status = cli$present( &cli_noverbose); if (status & 1) @@ -1366,36 +1370,36 @@ vms_unzip_cmdline (int *argc_p, char ***argv_p) ADD_ARG( OPT_VN); } - status = cli$present( &cli_verbose_normal); - if ((status & 1) || (status == CLI$_NEGATED)) + /* Note that if more than one of the following options is + * specified, the maximum one is used. CLD rules may be more + * restrictive. + */ + status = cli$present( &cli_verbose); + if (status & 1) { - if (status == CLI$_NEGATED) + int i; + char *opt = NULL; + + if ((status = cli$present( &cli_verbose_brief)) & 1) { - /* /NOVERBOSE (?) */ - opt = OPT_VN; + /* /VERBOSE = BRIEF */ + opt = OPT_VQ; } - else + if ((status = cli$present( &cli_verbose_normal)) & 1) { - /* /VERBOSE = NORMAL */ + /* /VERBOSE [ = NORMAL ] */ opt = OPT_V; } - ADD_ARG( opt); - } - - status = cli$present( &cli_verbose_more); - if ((status & 1) || (status == CLI$_NEGATED)) - { - if (status == CLI$_NEGATED) - { - /* /NOVERBOSE (?) */ - opt = OPT_VN; - } - else + if ((status = cli$present( &cli_verbose_more)) & 1) { /* /VERBOSE = MORE */ opt = OPT_VV; } + + if (opt != NULL) + { ADD_ARG( opt); + } } /* @@ -1969,7 +1973,7 @@ int VMSCLI_usage(__GPRO__ int error) /* returns PK-type error code */ /* UnZipSFX Usage Guide. */ - extern ZCONST char UnzipSFXBanner[]; + extern ZCONST char UnzipBanner[]; # ifdef BETA extern ZCONST char BetaVersion[]; # endif @@ -1980,8 +1984,11 @@ int VMSCLI_usage(__GPRO__ int error) /* returns PK-type error code */ flag = (error? 1 : 0); - Info(slide, flag, ((char *)slide, UnzipSFXBanner, - UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE)); + Info(slide, flag, ((char *)slide, UnzipBanner, + "UnZip", + UzpVersionStr(), + UZ_VERSION_DATE, + UZ_VERSION_DATE)); Info(slide, flag, ((char *)slide, "\ \n\ @@ -2145,8 +2152,7 @@ Quote member names if /MATCH=CASE=SENSITIVE (default).\n\ /* Normal UnZip Usage Guide. */ Info(slide, flag, ((char *)slide, UnzipUsageLine1, - UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, - UZ_VERSION_DATE)); + UzpVersionStr(), UZ_VERSION_DATE, UNZIP_MAINTAINER)); # ifdef BETA Info(slide, flag, ((char *)slide, BetaVersion, "", "")); diff --git a/vms/descrip.mms b/vms/descrip.mms index 11d923d..8952ba1 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -1,8 +1,8 @@ # DESCRIP.MMS # -# UnZip 6.10 for VMS -- MMS (or MMK) Description File. +# UnZip 6.1 for VMS -- MMS (or MMK) Description File. # -# Last revised: 2015-01-21 +# Last revised: 2015-04-15 # #---------------------------------------------------------------------- # Copyright (c) 2001-2015 Info-ZIP. All rights reserved. diff --git a/vms/descrip_mkdeps.mms b/vms/descrip_mkdeps.mms index d532ced..b62535e 100644 --- a/vms/descrip_mkdeps.mms +++ b/vms/descrip_mkdeps.mms @@ -1,8 +1,8 @@ # DESCRIP_MKDEPS.MMS # -# UnZip 6.10 for VMS -- MMS Dependency Description File. +# UnZip 6.1 for VMS -- MMS Dependency Description File. # -# Last revised: 2015-01-09 +# Last revised: 2015-04-15 # #---------------------------------------------------------------------- # Copyright (c) 2004-2015 Info-ZIP. All rights reserved. diff --git a/vms/descrip_src.mms b/vms/descrip_src.mms index 4db9fd8..6886a87 100644 --- a/vms/descrip_src.mms +++ b/vms/descrip_src.mms @@ -1,11 +1,11 @@ # DESCRIP_SRC.MMS # -# UnZip 6.10 for VMS -- MMS (or MMK) Source Description File. +# UnZip 6.1 for VMS -- MMS (or MMK) Source Description File. # -# Last revised: 2014-11-22 +# Last revised: 2015-05-18 # #---------------------------------------------------------------------- -# Copyright (c) 2004-2014 Info-ZIP. All rights reserved. +# Copyright (c) 2004-2015 Info-ZIP. All rights reserved. # # See the accompanying file LICENSE, version 2009-Jan-2 or later (the # contents of which are also included in zip.h) for terms of use. If, @@ -29,6 +29,7 @@ $$$$ THIS DESCRIPTION FILE IS NOT INTENDED TO BE USED THIS WAY. ALPHA_X_ALPHA = 1 IA64_X_IA64 = 1 VAX_X_VAX = 1 +X86_64_X_X86_64 = 1 .IFDEF $(MMS$ARCH_NAME)_X_ALPHA # $(MMS$ARCH_NAME)_X_ALPHA __ALPHA__ = 1 .ENDIF # $(MMS$ARCH_NAME)_X_ALPHA @@ -38,6 +39,9 @@ __IA64__ = 1 .IFDEF $(MMS$ARCH_NAME)_X_VAX # $(MMS$ARCH_NAME)_X_VAX __VAX__ = 1 .ENDIF # $(MMS$ARCH_NAME)_X_VAX +.IFDEF $(MMS$ARCH_NAME)_X_X86_64 # $(MMS$ARCH_NAME)_X_X86_64 +__X86_64__ = 1 +.ENDIF # $(MMS$ARCH_NAME)_X_X86_64 .ENDIF # __MMK__ # Combine command-line VAX C compiler macros. @@ -73,8 +77,13 @@ DESTM = VAX .ENDIF # GNUC .ENDIF # VAXC_OR_FORCE_VAXC .ELSE # __VAX__ +.IFDEF __X86_64__ # __X86_64__ +DECC = 1 +DESTM = X86_64 +.ELSE # __X86_64__ DESTM = UNK UNK_DEST = 1 +.ENDIF # __X86_64__ .ENDIF # __VAX__ .ENDIF # __IA64__ .ENDIF # __ALPHA__ diff --git a/vms/unz_cli.cld b/vms/unz_cli.cld index 69b330e..05723c4 100644 --- a/vms/unz_cli.cld +++ b/vms/unz_cli.cld @@ -1,8 +1,8 @@ Module VMS_UNZIP_CLD - Ident "03-006" + Ident "03-007" !----------------------------------------------------------------------- -! Copyright (c) 2001-2014 Info-ZIP. All rights reserved. +! Copyright (c) 2001-2015 Info-ZIP. All rights reserved. ! ! See the accompanying file LICENSE, version 2009-Jan-2 or later (the ! contents of which are also included in zip.h) for terms of use. If, @@ -97,8 +97,9 @@ Define Verb UNZIP DisAllow TEXT.NONE and TEXT.ALL DisAllow TEXT.NONE and TEXT.STMLF DisAllow (neg TEXT) and TEXT.STMLF - DisAllow NOVERBOSE and (VERBOSE.NORMAL or VERBOSE.MORE) - DisAllow VERBOSE.MORE and VERBOSE.NORMAL + DisAllow NOVERBOSE and + (VERBOSE.BRIEF or VERBOSE.MORE or VERBOSE.NORMAL) + DisAllow any2( VERBOSE.BRIEF, VERBOSE.MORE, VERBOSE.NORMAL) DisAllow ZIPINFO and HELP Define Type AUTO_DIR_KEYWORDS @@ -165,9 +166,10 @@ Define Type FULL_MODIFIER Keyword DIAGNOSTICS Define Type VERBOSE_OPTS - Keyword NORMAL, DEFAULT - Keyword MORE + Keyword BRIEF Keyword COMMAND + Keyword MORE + Keyword NORMAL, DEFAULT Define Syntax INFORMATION Parameter P1, Label=ZIPFILE, Prompt="Zip file" @@ -196,7 +198,9 @@ Define Syntax INFORMATION DisAllow DECIMAL_TIME and (neg TIMES) DisAllow (neg DECIMAL_TIME) and TIMES - DisAllow NOVERBOSE and VERBOSE.NORMAL + DisAllow NOVERBOSE and + (VERBOSE.BRIEF or VERBOSE.MORE or VERBOSE.NORMAL) + DisAllow any2( VERBOSE.BRIEF, VERBOSE.MORE, VERBOSE.NORMAL) DisAllow ONE_LINE and SHORT DisAllow ONE_LINE and MEDIUM DisAllow ONE_LINE and LONG diff --git a/vms/unzip_cli.help b/vms/unzip_cli.help index b99a14c..9b81d83 100644 --- a/vms/unzip_cli.help +++ b/vms/unzip_cli.help @@ -6,7 +6,7 @@ .! Date: 12 Jul 94 (orig. UNZIP.RNH, 23 Oct 91) .! .!---------------------------------------------------------------------- -.! Copyright (c) 1991-2014 Info-ZIP. All rights reserved. +.! Copyright (c) 1991-2015 Info-ZIP. All rights reserved. .! .! See the accompanying file LICENSE, version 2009-Jan-2 or later (the .! contents of which are also included in zip.h) for terms of use. If, @@ -859,11 +859,11 @@ this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) -[Non-VMS] Note that before UnZip version 6.10, on a non-VMS system, a +[Non-VMS] Note that before UnZip version 6.1, on a non-VMS system, a file with a name like "fred;123" would, by default, be extracted as "fred", even if the file did not originate on a VMS system (so that ";123" was probably not really a VMS version number). Beginning with -UnZip version 6.10, the default behavior is to strip VMS version numbers +UnZip version 6.1, the default behavior is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: "-V-". @@ -927,7 +927,7 @@ Traditional encryption is included in the source kits, and support for Traditional encryption is enabled by default. (Build-time C macro: CRYPT_TRAD.) -Beginning with UnZip version 6.10 and Zip version 3.1, +Beginning with UnZip version 6.1 and Zip version 3.1, these programs also offer a stronger, Advanced Encryption Standard (AES) encryption method, which we call AES WinZip/Gladman (AES_WG) encryption. (The encryption code was supplied by Brian Gladman, and the diff --git a/win32/Contents b/win32/Contents index 24389f9..129398f 100644 --- a/win32/Contents +++ b/win32/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "win32" Directory - ----------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "win32" Directory + ---------------------------------------------------------- Contents This file crc_i386.asm 32-bit Intel-assembler version of CRC routine @@ -59,7 +59,7 @@ than the assembler routines provide. This has not been tested lately, however. Many of the "make" files and other builders here are now obsolete. -They may not have been updated for UnZip 6.10, and may not support its +They may not have been updated for UnZip 6.1, and may not support its new optional features. The Unix builders should support the Cygwin and MinGW environments. The "vc10\" builders for Visual C++ 2010 should work. See INSTALL for more information. diff --git a/win32/vc10/unzipsfx/unzipsfx.vcxproj b/win32/vc10/unzipsfx/unzipsfx.vcxproj index 5866a40..adb53f3 100644 --- a/win32/vc10/unzipsfx/unzipsfx.vcxproj +++ b/win32/vc10/unzipsfx/unzipsfx.vcxproj @@ -33,7 +33,6 @@ Application true Unicode - Windows7.1SDK Application @@ -46,7 +45,6 @@ false true Unicode - Windows7.1SDK diff --git a/windll/Contents b/windll/Contents index 6d828de..00b30d9 100644 --- a/windll/Contents +++ b/windll/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "windll" Directory - ------------------------------------------------------------ + Contents of the UnZip 6.1 Source Archive "windll" Directory + ----------------------------------------------------------- Contents This file. decs.h Exported function declarations. diff --git a/wrap/Contents b/wrap/Contents index 9f86884..4f6f731 100644 --- a/wrap/Contents +++ b/wrap/Contents @@ -1,5 +1,5 @@ - Contents of the UnZip 6.10 Source Archive "wrap" Directory - ---------------------------------------------------------- + Contents of the UnZip 6.1 Source Archive "wrap" Directory + --------------------------------------------------------- aescrypt.c Wrapper for "aes_wg/aescrypt.c" aeskey.c Wrapper for "aes_wg/aeskey.c" diff --git a/zip-comment.txt b/zip-comment.txt index 5dfd4d4..5f1f595 100644 --- a/zip-comment.txt +++ b/zip-comment.txt @@ -1,5 +1,5 @@ -Info-Zip UnZip -- Source kit. Version 6.10c18 (pre-BETA) 2015-03-31. +Info-Zip UnZip -- Source kit. Version 6.10c19 (pre-BETA) 2015-06-26. See enclosed files INSTALL, LICENSE, and README. For information on Info-Zip UnZip and Zip: diff --git a/zipinfo.c b/zipinfo.c index e548620..e18bfb6 100644 --- a/zipinfo.c +++ b/zipinfo.c @@ -729,13 +729,24 @@ int zi_opts(__G__ pargc, pargv) break; #ifndef SFX case (o_ve): /* version */ - if (negative) { + if (negative) + { uO.vflag = IZ_MAX( (uO.vflag- negative), 0); negative = 0; - } else if (uO.vflag) + } + else if (uO.vflag) + { ++uO.vflag; + } else + { uO.vflag = 2; + } + break; + + case (o_vq): /* brief version */ + uO.vflag = 3; + uO.qflag = 4; break; #endif /* ndef SFX */ @@ -867,8 +878,17 @@ int zi_opts(__G__ pargc, pargv) if (uO.vflag > 0) { - *pargc = -1; /* Tell caller to exit. */ - return USAGE(0); + if (uO.qflag > 3) + { + show_version_info(__G); /* Show brief (UnZip) version. */ + *pargc = -1; /* Tell caller to exit. */ + return PK_OK; + } + else + { + *pargc = -1; /* Tell caller to exit. */ + return USAGE(0); + } } /* convert files and xfiles lists to arrays */ -- 2.7.4