From: DongHun Kwak Date: Thu, 28 Jun 2018 05:24:18 +0000 (+0900) Subject: Imported Upstream version 610c18 X-Git-Tag: upstream/610c18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F182795%2F1;p=platform%2Fupstream%2Funzip.git Imported Upstream version 610c18 Change-Id: Ieb62f87f33ba503af096f9f4ef235df7c60c188d Signed-off-by: DongHun Kwak --- diff --git a/History.610 b/History.610 index 3698537..f44e6ca 100644 --- a/History.610 +++ b/History.610 @@ -608,13 +608,19 @@ Features added (or removed): Windows, but not tested. (extract.c, fileio.c, globals.c, globals.h, process.c, unix/unix.c, unix/unxcfg.h, unzip.c, unzpriv.h) [SMS] - Added tentative, experimental-grade support for segmented - (multi-part) archives. Patch contributed by pstodulk. + (multi-part) archives. Patch contributed by Petr Stodulka. Forum topic: http://www.info-zip.org/phpBB3/viewtopic.php?f=4&t=455 Currently, only multiple segment files on one volume ("split" archive), with name extensions ".z01", ".z02", ..., ".zip" are supported; multiple volumes ("spanned" archive) are not. (extract.c, fileio.c, globals.c, globals.h, process.c, unzip.c, - unzpriv.h, vms/vms.c, zipinfo.c, zos/vmmvs.c) [pstodulk, SMS] + unzpriv.h, vms/vms.c, zipinfo.c, zos/vmmvs.c) [Petr Stodulka, SMS] + +6.10c17 (18 Mar 2015) + - No news. + +6.10c18 (20 Mar 2015): + - No news. Bugs fixed: @@ -1674,3 +1680,18 @@ Bugs fixed: reorganization changed some variable names in non-Windows-specific modules. (consts.h, extract.c, globals.h, unix/unix.c, unzip.c, unzpriv.h, vms/vms.c) [SMS] + +6.10c17 (18 Mar 2015) + - Added a type cast to clear a compiler complaint. (fileio.c) [SMS] + - Changed an archive size variable type from z_uint4 to zoff_t for + better agreement with run-time seek/tell functions. (globals.h) [SMS] + +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] + - 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] + diff --git a/UNZIP.HLP b/UNZIP.HLP deleted file mode 100644 index 600d5e8..0000000 --- a/UNZIP.HLP +++ /dev/null @@ -1,1727 +0,0 @@ -1 UnZip - - UnZip lists, tests, or extracts files from a ZIP archive (an archive - format commonly used on many different systems). The default - behavior (with no options) is to extract into the current directory - (and subdirectories below it) all files from the specified ZIP - archive. A companion program, Zip, creates ZIP archives. - - Info-ZIP UnZip and Zip were intended to be compatible with archives - created by PKWARE's PKZIP and PKUNZIP programs (originally for - MS-DOS), but in many cases the program options or default behaviors - differ. Nowadays, many other programs are available which work with - ZIP archives. - - This help file describes the Unix-style command-line edition of - UnZip. A VMS CLI edition is also available, with a separate help - file. - - Format - - unzip [ unzip_options ] [ file[.zip] ] [ member ... ] - unzip -Z [ zipinfo_options ] [ file[.zip] ] [ member ... ] - - Note: Beginning with UnZip version 6.10, 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 double hyphen ("--") now introduces a long - option. - - To display the basic built-in help, use the command: - unzip -h - - To display the extended built-in help, use the command: - unzip -hh - - The built-in help may be more current than this help file, - especially between full product releases. - - 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 were not enabled in the particular UnZip program being used. -2 Command_Parameters - -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 directory/file - specification may be used: "...", "*", or "%" (or, since VMS V7.2, - "?"). The default archive file specification is ".ZIP". - - Note that a ".zip" or ".ZIP" file type 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 with its - actual name ending (if any), whatever that may be. - -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. Unix-like ("globbing") wildcard patterns may be used - to match multiple members: - - * Matches a sequence of 0 or more characters. - ? 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 ("!") or a - caret ("^") follows the left bracket, then the range 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, use - the three-character sequence "[[]". -2 Options_Primary_Mode - Options in this group specify the primary mode of operation of - UnZip. Only one of these primary mode options may be specified. - - Note that uppercase options (like -T) must be specified in quotes - (unless SET PROCESS/PARSE_STYLE=EXTENDED is set). For example: - - unzip "-VX" -a zipfile -3 -c --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, which - can provide automatic ASCII-EBCDIC conversion, where appropriate. -3 -f --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. -3 -h --h ---help - - Primary Mode. Display brief (roughly 24 lines) usage instructions. - See also -hh. -3 -hh --hh ---long-help - - Primary Mode. Display extended help (more complete usage - instructions). See also -h. -3 -l --l ---list - - Primary Mode. List archive members. By default, a brief format is - used, which includes the following items: member name, uncompressed - 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. Specifying 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 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 - 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 archive members is - reported by the more verbose ZipInfo reports. See ZipInfo. - - If UnZip was built with OS2_EAS enabled, then the -l report also - includes the sizes of stored OS/2 extended attributes (EAs) and OS/2 - access control lists (ACLs). In addition, the archive comment and - individual member comments (if any) are displayed. - - If a file was archived from a single-case file system (for example, - the old MS-DOS FAT file system) and the -L option was given, the - filename is converted to lowercase and is shown prefixed 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 listing - is generated. -3 --license - - Primary Mode. Display the Info-ZIP license. -3 -p --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 other - information, as would be displayed with -c, and the files are always - extracted in binary format, just as they are stored (no - conversions). -3 -T --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 example, "unzip - -T *.zip"), and is much faster. -3 -t --t ---test - - 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 (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 for - archive members with LZMA or PPMd compression. -3 -u --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. -3 -v --v ---verbose - - 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, and - relevant envrironment variables. - - When used with some other primary mode option, -v can make output - more verbose (detailed). - - If no other primary mode is specified, and an archive is specified, - then UnZip acts as if "-l -v" were specified, and a detailed listing - is generated. See -l. -3 -z --z ---zipfile-comment - - Primary mode. Display only the archive comment. -2 Options_Ordinary - Options in this group modify the operation of UnZip. - - Note that uppercase options (like -V) must be specified in quotes - (unless SET PROC/PARSE=EXTEND is set). For example: - - unzip "-VX" -a zipfile - -3 -2 --2 ---force-ods2 - - [VMS] Convert extracted file names to ODS2-compatible names, even on - an ODS5 file system. By default, if the destination file system is - ODS5, case is preserved, and extended file name characters are - caret-escaped as needed, while if the destination file system is - ODS2, invalid characters are replaced by underscores. -3 -A --A ---api-help - - [OS/2, Unix DLL] Print extended help for the DLL's application - programming interface (API). -3 -a --a ---ascii - - Convert text files. Ordinarily, all files are extracted exactly as - they are stored, byte-for-byte. With -a, line endings in a text - file are adjusted to the local standard as the file is extracted. - When appropriate, ASCII<-->EBCDIC conversion is also done. - - Zip (or a similar archiving program) identifies files as "binary" or - "text" when they are archived. (A short-format ZipInfo report - denotes a binary file with a "b", and a text file with a "t".) Zip's - identification of text files may not be perfect, so UnZip prints - "[binary]" or "[text]" as a visual check for each file it extracts - with -a. The -aa option forces all files to be extracted (and - converted) as text, regardless of the supposed file type. - - [VMS] On VMS, for archives with VMS attribute information (made with - "zip -V"), files are always created with their original record - formats. For archives without VMS attribute information (not made - with "zip -V"), all files are normally created with Stream_LF record - format. With -a, text files are normally created with - variable-length record format, but adding -S gives them Stream_LF - record format. With -aa, all files are treated as text files. See - also -b and -S. -3 -B --B ---backup - - [when built with UNIXBACKUP enabled] Save a backup copy of each - overwritten file. The backup file gets the name of the target file - with a tilde and optionally a unique sequence number (up to 5 - digits) appended. The sequence number is appended whenever another - file with the original name plus tilde already exists. When used - together with the "overwrite all" option, -o, numbered backup files - are never created. In this case, all backup files are named as the - original file with an appended tilde, and existing backup files are - deleted without notice. This feature works similarly to the default - behavior of emacs(1) in many locations. - - Example: the old copy of "foo" is renamed to "foo~". - - Warning: Users should be aware that the -B option does not prevent - loss of existing data under all circumstances. For example, when - UnZip is run in overwrite-all mode, an existing "foo~" file is - deleted before UnZip attempts to rename "foo" to "foo~". When this - rename attempt fails (because of a file lock, insufficient - privileges, or any other reason), the extraction of "foo~" gets - cancelled, but the old backup file is already lost. A similar - scenario takes place when the sequence number range for numbered - backup files gets exhausted (99999, or 65535 for 16-bit systems). - In this case, the backup file with the maximum sequence number is - deleted and replaced by the new backup version without notice. -3 -b --b ---binary - - [Tandem, VMS] Selects the file record format used when extracting - binary files. -b may conflict or interact with -a in different ways - on different system types. -b is ignored on systems other than - Tandem and VMS. - - Zip (or a similar archiving program) identifies files as "binary" or - "text" when they are archived. (A short-format ZipInfo report - denotes a binary file with a "b", and a text file with a "t".) - - [Tandem] Force the creation files with filecode type 180 ('C') when - extracting archive members marked as "text". (On Tandem, -a is - enabled by default, see above). - - [VMS] On VMS, for archives with VMS attribute information (made with - "zip -V"), files are always created with their original record - formats. For archives without VMS attribute information (not made - with "zip -V"), files are normally created with Stream_LF record - format. With -b, binary files are created with fixed-length, - 512-byte record format. With -bb, all files are created with - fixed-length, 512-byte record format. When extracting to standard - output (-c or -p option in effect), the default conversion of text - record delimiters is disabled for binary files (with -b), or for all - files (with -bb). -3 -C --c ---ignore-case ([CMS, MVS] --CMS-MVS-lower) - - Use case-insensitive name matching for names in the member list and - the -x excluded-member list on the command line. By default, - case-sensitive matching is done. For example, specifying "makefile" - on the command line will match only "makefile" in the archive, not - "Makefile" or "MAKEFILE". On many systems, the local file system is - case-insensitive, so case-insensitive name matching would be more - natural. With -C, "makefile" would match "makefile", "Makefile", or - "MAKEFILE". - - -C does not affect the search for the ZIP archive file(s), nor the - matching of archive members to existing files on the extraction - path. So, on a case-sensitive file system, UnZip will never try to - overwrite a file "FOO" when extracting a member named "foo"! -3 -c --c ---to-stdout - - Primary Mode. Extract files to stdout/screen. For details, see - Options_Primary_Mode. -3 -D --D ---dir-timestamps - - Control timestamps on extracted files and directories. By default, - UnZip restores timestamps for extracted files, but not for - directories it creates. Specifying -D tells UnZip not to restore - any timestamps. Specifying -D- tells UnZip to restore timestamps - for directories as well as other items. -D- works only on systems - that support setting timestamps for directories (currently ATheOS, - BeOS, MacOS, OS/2, Unix, VMS, Win32). 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. - - UnZip version | - 6.00 | 6.10 | Restore timestamps on: - -----------+-----------+------------------------ - -DD | -D | Nothing. - -D | (default) | Files, not directories. - (default) | -D- | Files and directories. - - [VMS] The old behavior on VMS was the same as the new behavior on - all systems. (The old negated --D option is now -D-, because of - changes to the command-line parser.) -3 -d --d dest_dir ---extract-dir dest_dir - - Specifies a destination directory for extracted files. By default, - files are extracted (and subdirectories created) in the current - directory. With "-d dest_dir", extraction is done into the - specified directory, instead. See also -da. - - The option and directory may be concatenated without any white space - between them, but this may cause normal shell behavior to be - suppressed. For example, "-d ~" (tilde) is expanded by Unix shells - into the name of the user's home directory, but "-d~" is treated as - a literal "~" subdirectory of the current directory. - - [VMS] On VMS, only a VMS-style device:[directory] specification is - permitted. -3 -d --da[=reuse] ---auto-extract-dir[=reuse] - - Specifies a destination directory for extracted files which is - derived from the base name of the archive. By default, files are - extracted (and subdirectories created) in the current default - directory. With -da, UnZip automatically derives a subdirectory - name from the archive name, creates that subdirectory, and extracts - files into that subdirectory. - - For example, with -da, extraction of "fred.zip" is done into - subdirectory "[.fred]" instead of into the current directory. (On - non-VMS, systems, subdirectory "fred".) - - For greater safety, by default, UnZip will refuse to extract into an - automatic extraction directory which already exists. Specifying the - optional keyword "reuse" will allow an existing directory to be - used. - - If -da is specified as a default option in an environment variable, - it can be overridden by either a negated -da- option or an explicit - "-d dest_dir" option. See also -d. -3 -f --f ---freshen - - Primary Mode. Freshen existing files. For details, see - Options_Primary_Mode. -3 -h --h ---help - - Primary Mode. Display brief (roughly 24 lines) usage instructions. - For details, see Options_Primary_Mode. -3 -hh --hh ---long-help - - Primary Mode. Display complete usage instructions. For details, - see Options_Primary_Mode. -3 -i --i ---no-mac-ef-names - - [MacOS (pre-OS-X)] Ignore filenames stored in MacOS extra fields. - Instead, the most compatible filename stored in the generic part of - the member's header is used. -3 -J --J ---junk-attrs - - [BeOS] Junk file attributes. The file's BeOS file attributes are - not restored, only the file's data. - - [MacOS] Ignore MacOS extra fields. All Macintosh-specific info is - skipped. AppleDouble files are restored as separate files. -3 -j --j[=depth] ---junk-dirs[=depth] - - Junk directories on extracted files. With -j, all directory - information is stripped from an archive member name, so all files - are extracted into the destination directory. (See also -d.) - - If a depth ("=depth", where "depth" is a positive integer) is - specified, then that number of directory levels will be stripped - from an archive member name. For example, an archive member like - "a/b/c/d/ee.txt" would normally be extracted as "[.a.b.c.d]ee.txt". - With -j, it would be extracted as "ee.txt". With -j=2, the first - two directory levels would be stripped, so it would be extracted as - "[.c.d]ee.txt". -3 --jar - - Treat archive(s) as Java JAR. Over-simplification in Java JAR - archives can cause UnZip to transform UTF-8 file names according to - inappropriate (MS-DOS) rules, yielding corrupt names on extracted - files (typically those with ASCII codes 128-255). Archives - containing a Java "CAFE" extra field should be detected - automatically, and handled correctly, but not all JAR archives - include that extra field. Specifying --jar tells UnZip to expect - UTF-8 file names, regardless of whether the archive contains a - "CAFE" extra field. -3 -K --K ---keep-s-attrs - - [AtheOS, BeOS, Unix] Retain SUID/SGID/Tacky permission bits. By - default, these permission bits are cleared, for security reasons. -3 -k ---keep-permissions - - [AtheOS, BeOS, Unix, VMS] Control how archived permissions or - protections are restored on extracted files and directories. - - By default, archived permissions are restored with some limitations. - On AtheOS, BeOS, and Unix, the current umask value is applied (to - the normal user/group/other permissions). On VMS, the current - default protection is applied to the UIC-based (SOGW) protections. - - 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.) - - With -k-, the archived permissions are ignored, so only the Unix - umask or VMS default protection is effective. (On VMS, directories - are always created without any Delete access.) - - On AtheOS, BeOS, and Unix, the SUID/SGID/Tacky permission bits are - controlled by the -K/--keep-s-attrs option, regardless of the - -k/--keep-permissions setting. -3 -ka ---keep-acl [VMS] Restore ACLs on extracted files and directories. -3 -L --L ---lowercase-names - - Convert to lowercase any filename originating on an uppercase-only - operating system or file system. (This was UnZip's default behavior - in versions before 5.11. The current default behavior is the same - as the old behavior with the -U option. -U is now used for another - purpose.) - - Depending on the archiver, files archived from single-case file - systems (old MS-DOS FAT, VMS ODS2, and so on) may be stored as - all-uppercase names; this can be ugly or inconvenient when - extracting to a case-preserving file system such as OS/2 HPFS or a - case-sensitive one such as on Unix. By default UnZip lists and - extracts such filenames exactly as they're stored (excepting - truncation, conversion of unsupported characters, an so on). With - -L, the names of all files from certain systems will be converted to - lowercase. With -LL, all file names will be down-cased, regardless - of the originating file system. -3 -l --l ---list - - Primary Mode. List archive members. For details, see - Options_Primary_Mode. -3 -M --M ([CMS,MVS] Or: " -m ) ---more - - Pipe all output through an internal pager similar to the Unix - more(1) command. At the end of a screenful of output, UnZip pauses - with a "--More--" prompt; the next screenful may be viewed by - pressing the Enter (Return) key or the space bar. UnZip can be - terminated by pressing the "q" key and, on some systems, the - Enter/Return key. Unlike Unix more(1), there is no - forward-searching or editing capability. Also, UnZip doesn't notice - if long lines wrap at the edge of the screen, effectively resulting - in the printing of two or more lines and the likelihood that some - text will scroll off the top of the screen before being viewed. If - the actual number of lines on the screen can not be determined, 24 - lines will be assumed. -3 -mc --mc ---member-counts - - Control inclusion of separate member counts for directories, files, - and links, after the totals summary at the end of the report. By - default, they are included. Use "-mc-" or "--member-counts-" to - suppress them. See also -t. -3 -N --N ---comment-to-note - - [Amiga] Extract member comments as Amiga filenotes. Member comments - are created with the -c option of Zip, or with the -N option of the - Amiga port of Zip, which stores filenotes as comments. -3 -n --n ---never-overwrite - - When extracting, never overwrite existing files. If a file already - exists, skip the extraction of that file without asking. See also - -o (--overwrite). - - By default, UnZip queries the user before extracting any file that - already exists. The user may choose to overwrite only the current - file, overwrite all files, skip extraction of the current file, skip - extraction of all existing files, or rename the current file (choose - a new name for the extracted file). - - [VMS] On VMS, the usual query choices are to create a new version of - an existing file, to skip extraction, or to rename the current file. - In the case where an archive member name includes a version number, - and -V ("retain VMS file version numbers") is in effect, then an - additional query choice is offered: to overwrite the existing file. -3 -O --O ---oem-char-set char_set - - [Unix] Select OEM character set char_set. -3 -o --o ---overwrite - - Always overwrite existing files without prompting. This is a - dangerous option, so use it with care. (It is often used with -f, - however, and is the only way to overwrite directory EAs on OS/2.) - - By default, UnZip queries the user before extracting any file that - already exists. - - [Non-VMS] On non-VMS systems, the user may choose to overwrite only - the current file, overwrite all files, skip extraction of the - current file, skip extraction of all existing files, or rename the - current file (choose a new name for the extracted file). - - [VMS] On VMS, the usual query choices are to create a new version of - an existing file, to skip extraction, or to rename the current file. - In the case where an archive member name includes a version number, - and -V ("retain VMS file version numbers") is in effect, then an - additional query choice is offered: to overwrite the existing file. - In this case, -o selects the "new version" choice, and -oo (or "-o - -o") selects the "overwrite" choice. -3 -P --P password ---password password - - Use "password" to decrypt encrypted archive members (if any). THIS - IS INSECURE! Many multi-user operating systems provide ways for any - user to see the current command line of any other user. Even on - stand-alone systems, there is always the threat of over-the-shoulder - peeking. Storing the plaintext password as part of a command line - in an automated script can be even less secure, Whenever possible, - use the non-echoing, interactive prompt to enter passwords. Where - security is truly important, use a strong encryption method, such as - AES, instead of the relatively weak encryption provided by - Traditional ZIP encryption. Or, use an external encryption program, - such as GnuPG, before archiving the file. (Note that Zip will - probably not be able to do significant compression on a file which - has already been encrypted.) -3 -p --p ---pipe-to-stdout - - Primary Mode. Extract files to stdout (pipe). For details, see - Options_Primary_Mode. -3 -q --q ---quiet - - Perform operations quietly. (-qq: even more quietly). By default, - UnZip prints the names of the files it's extracting or testing, the - extraction methods, any member or archive comments that may be - stored in the archive, and possibly a summary when finished with - each archive. The -q[q] options suppress the printing of some or - all of these messages. -3 -r --r ---remove-exts - - [Tandem] Remove file extensions. -3 -S --S ---streamlf - - [VMS] Use Stream_LF record format when converting extracted text - files (-a, -aa), instead of the text-file default, variable-length - record format. - - [VMS] On VMS, for archives with VMS attribute information (made with - "zip -V"), files are always created with their original record - formats. For archives without VMS attribute information (not made - with "zip -V"), all files are normally created with Stream_LF record - format. With -a, text files are normally created with - variable-length record format, but adding -S gives them Stream_LF - record format. With -aa, all files are treated as text files. See - also -a and -b. -3 -s --s ---space-to-uscore - - [OS/2, NT, MS-DOS] Convert spaces in filenames to underscores. - Because all these operating systems allow spaces in filenames, UnZip - normally extracts filenames with spaces intact (for example, "EA - DATA. SF"). Working with such file names can be awkward, however, - so -s can be used to replace spaces with underscores. -3 -sc --sc ---show-command - - Show processed command line (options, arguments), and then exit. - - Strictly speaking this is a primary-mode option, but it's intended - for use in program development, not in normal use. -3 -si --si ---show-pid - - [Non-VMS] Show the UnZip program's process ID (pid) before - performing any other work. This value can then be used in a "kill - -USR1 pid" command to trigger a user-triggered progress report. -3 -so --so ---show-options - - Display all valid program options, then exit. - - Strictly speaking this is a primary-mode option, but it's intended - for use in program development, not in normal use. -3 -T --T ---timestamp-new - - Primary Mode. Set the timestamp on the archive(s) to that of the - newest file in each one. For details, see Options_Primary_Mode. -3 -t --t ---test - - Primary Mode. Test archive members. For details, see - Options_Primary_Mode. -3 -U --U ---unicode - - [UNICODE_SUPPORT] Control UTF-8 handling. When UNICODE_SUPPORT is - available, -U forces UnZip to escape all non-ASCII characters from - UTF-8 coded filenames as "#Uxxxx' (for UCS-2 characters, or - "#Lxxxxxx" for Unicode codepoints needing 3 octets). This option is - mainly provided for debugging purpose when the fairly new UTF-8 - support is suspected to mangle up extracted filenames. - - -UU disables the recognition of UTF-8 encoded filenames. The - handling of filename codings within UnZip falls back to the behavior - of previous versions. - - [old, obsolete usage] Leave filenames uppercase if created on - MS-DOS, VMS, and so on. See -L. -3 -u --u ---update - - Primary mode. Update existing files and create new ones if needed. - For details, see Options_Primary_Mode. -3 -V --V ---keep-versions - - [Non-CMS-MVS] Retain VMS file version numbers. VMS files can be - stored with a version number, in the format "file.type;##", where - "##" is a decimal number. By default the ";##" version numbers 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.) - - [Non-VMS] Note that before UnZip version 6.10, 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 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-". -3 -v --v ---verbose - - When used with some primary mode option, -v can make output more - verbose. See also Primary Mode options, and -l in particular. - - 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. -3 -W --W ---wild-no-span - - [WILD_STOP_AT_DIR] (Valid when the program was built with the C - macro WILD_STOP_AT_DIR defined.) By default, the wildcard characters - "?" (single-character wildcard) and "*" (multi-character wildcard) - match any character in a member path/name. "-W" modifies 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 wildcard that includes the - directory separator in its matched characters.) For example, with - "-W": - - "*.c" matches "foo.c" but not "mydir/foo.c" - "**.c" matches both "foo.c" and "mydir/foo.c" - "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" - "??*/*" matches "ab/foo" and "abc/foo" - but not "a/foo" or "a/b/foo" - - 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 available on - systems where the Zip archive's internal directory separator - 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 not work as - expected on a wildcard file name specification. -3 -X --X ---restore-info - - [VMS, Unix, OS/2, NT, Tandem] Restore owner/protection info (UICs - and ACL entries on VMS, or user and group info (UID/GID) on Unix, 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 systems. (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 conditions this would ever be useful - anyway.) -3 -x --x member ... ---exclude member ... - - An optional list of archive members to be excluded from processing. - 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 subdirectories. 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 archive - 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 is, the following two - commands are equivalent: - - unzip fred.zip -b -x file1 file2 file3 - unzip fred.zip -x file1 file2 file3 @ -b -3 -Y --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 example: - - "a.b.3" -> "a.b;3" -3 -Z --Z ---zipinfo-mode - - ZipInfo mode. If the first option on the command line is -Z, then - the program runs in ZipInfo mode, which is used to display - information about an archive and its members. Remaining options are - interpreted as ZipInfo options. See ZipInfo_mode. -3 -z --z ---zipfile-comment - - Primary mode. Display only the archive comment. For details, see - Options_Primary_Mode. -3 -$ --$ ---volume-labels - - [MS-DOS, OS/2, NT] Restore the volume label if the extraction 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. -3 -/ --/ ---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 in front - of the base name of the extracted file. -3 -: --: ---do-double-dots - - [all but Acorn, VM/CMS, MVS, Tandem] Allows UnZip to extract archive - 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 5.50) prevents - UnZip from accidentally writing files to directories 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 components 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 paths specifying enough "../" - path components. - - Use this option with extreme caution. -3 -^ --^ ---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 conventions. - Generally, this allows embedding ASCII control characters 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/emulator. (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 characters are to be - intentionally restored. -2 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 names), -C (use case-insensitive name matching), -q (quiet), -o - (always overwrite), or -n (never overwrite). - - For UnZip, the environment variable name on VMS is UNZIP_OPTS - (non-VMS: UNZIP). The name on VMS is different to avoid conflict - with a foreign-command DCL symbol, UNZIP. For compatibility with - Zip, if UNZIP_OPTS is not defined, then UnZip will use UNZIPOPT the - same way. - - For ZipInfo ("unzip -Z"), the environment variable name on VMS is - ZIPINFO_OPTS (non-VMS: ZIPINFO). For compatibility with Zip, if - ZIPINFO_OPTS is not defined, then ZipInfo will use ZIPINFOOPT the - same way. - - 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: - UNZIP='-q -q'; export UNZIP - - Unix C shell: - setenv UNZIP '-q -q' - - OS/2 or MS-DOS: - set UNZIP="-q -q" - - VMS (with quotation to preserve lower case in DCL): - 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-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 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 quietness. 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 "-q- - -q-" is generally clearer. - - The examples show short (one-character) options, but long ("--") - options are also allowed. -2 Encryption_Decryption - Zip and UnZip have long supported a relatively weak encryption - method, which we call Traditional ZIP encryption. The source code - for 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, 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: 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: - http://www.winzip.com/aes_info.htm - - For information on the separate AES_WG source kit, see: - 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) method of specifying a password on the command line. - - 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. (This is a security feature of the PKWARE archive format; it - helps prevent brute-force attacks that might otherwise gain a large - speed advantage by testing only the header.) In the case that an - incorrect password 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 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 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 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, - passwords with accented European characters) may not be portable - across systems or to other archivers. This problem stems from the - use of multiple 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 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 encoding.) 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 adapted for UTF-8 support and will consequently fail. -2 Examples - To use UnZip to extract all members of the archive letters.zip into - the current directory and subdirectories below it, creating any - subdirectories as necessary: - - unzip letters - - To extract all members of letters.zip into the current directory - only: - - unzip -j letters - - To test letters.zip, printing only a summary message indicating - whether the archive is OK or not: - - unzip -t -q letters - - To test all ".zip" archives in the current directory, printing only - the summaries: - - unzip -t -q *.zip - - (On a Unix system, the wildcard archive name would typically need to - be quoted to keep a a Unix shell from expanding ("globbing") it. - This is not necessary on VMS.) - - The following command extracts to standard output all members of - letters.zip whose names end in ".tex", auto-converting to the local - end-of-line convention, in Stream_LF record format, and piping the - output into TYPE /PAGE: - - pipe unzip -c -a -S letters *.tex | type /page sys$input - - To extract from source.zip all Fortran and C source files (*.f, *.c, - *.h) and Makefile into the SYS$SCRATCH directory: - - unzip source.zip *.[fch] Makefile -d sys$scratch - - To extract all FORTRAN and C source files, regardless of case (for - example, both *.c and *.C, and any makefile, Makefile, MAKEFILE or - similar): - - unzip -C source.zip *.[fch] makefile -d sys$scratch - - The following command extracts only newer versions of the files - already 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): - - 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 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 build time, and the values of all the relevant - environment variables: - - unzip -v - - In the last five examples, assume that UNZIP_OPTS is set to -q. To - do a (singly) quiet listing: - - unzip -l file.zip - - To do a doubly quiet listing: - - unzip -l -q file.zip - - (Note that the ".zip" is generally not necessary.) To do a standard - listing: - - unzip -l -q- file.zip - - or: - - unzip -lq- file.zip - - or: - - unzip -q-l file.zip - -2 Exit_Status - UnZip's exit status approximates the exit codes defined by PKWARE. - On VMS, UnZip's UNIX-style exit values are translated into VMS-style - status codes with facility code 1954 = %x7A2, and with the - inhibit-message (%x10000000) and facility-specific (%x00008000) bits - set: - - %x17A28001 normal exit - %x17A28000 + 16*UnZip_error_code warnings - %x17A28002 + 16*UnZip_error_code normal errors - %x17A28004 + 16*UnZip_error_code fatal errors - - Note that multiplying the UNIX-style UnZip error code by 16 places - it conveniently in the hexadecimal representation of the VMS exit - code, "__" in %x17A28__s, where "s" is the severity code. For - example, a missing archive might cause UnZip error code 9, which - would be transformed into the VMS exit status %X17A28092. - - The UnZip VMS exit codes include severity values which approximate - those defined by PKWARE, as shown in the following table: - - VMS UnZip - severity err code Error description - ----------+----------+---------------------------------------------- - Success 0 Normal. No errors or warnings detected. - Warning 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 encryption password. - Error 2 Error in the archive format. Processing may - or may not have completed successfully. - Fatal 3 Severe error in the archive format. - Processing probably failed immediately. - Fatal 4 Memory allocation failed in program - initialization. - Fatal 5 Memory allocation or terminal I/O failed in - password processing. - Fatal 6 Memory allocation failed while decompressing - to disk. - Fatal 7 Memory allocation failed while decompressing - in memory. - Fatal 8 Memory allocation failed. (Currently not - used.) - Error 9 Specified archive files were not found. - Error 10 Invalid command-line options or parameters. - Error 11 No matching files were found. - Fatal 50 Disk (file system) filled during extraction. - Fatal 51 Unexpected end-of-file while reading the - archive. - Error 80 User interrupt (Ctrl/C). - Error 81 No files were processed, because of - unsupported compression or encryption - methods. - Error 82 No files were processed, because of bad - encryption password(s). - Fatal 83 Large-file archive could not be processed by - this small-file program. -2 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 3.0 and later can combine multi-part (split) archives into a - combined single-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 - UnZip (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 and/or other archivers. See also Encryption_Decryption. - - UnZip's -M ("--more") option tries to take into account automatic - wrapping 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 - devices and character devices are not restored even if they are - somehow represented in the archive, nor are hard-linked files - relinked. Basically, the only file types restored by UnZip are - regular files, directories, and symbolic (soft) links. - - [OS/2] Extended attributes for existing directories are only updated - if the -o ("--overwrite") option is given. This is a limitation of - the operating system; because directories only have a creation time - associated 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 normally (with or without freshening/updating - existing files), then overwrite just the directory entries (for - example, "unzip -o foo */"). - - Note that uppercase options (-C, -D, -L, -M, -P, -S, -T, -V, -X, -Y, - and -Z) must be specified in quotes (unless SET PROC/PARSE=EXTEND is - set). For example: - - unzip "-VX" -a zipfile - - When extracting to SYS$OUTPUT (-c or -p options) redirected to a - file, you may want to override the default text file conversion by - specifying the -b option. A single "-b" option switches to "binary - piping" mode for Zip entries marked as non-text, only. To force - "binary piping" mode even for Zip file entries marked as text, the - "-bb" option should be used. (Please note that a later "-a" cancels - any -b option, see below.) - - The output conversion options -b and -a may be combined to perform - binary conversions on binary files and text conversion on text - files. But note: For compatibility with implementation on other - systems, -b cancels any -a option; to get the intended result, -a - must be specified AFTER -b. And, in combination, "text" recognition - takes precedence; this means that -bba (-bb -a) has the same effect - as -ba (-b -a), and -aa overrides binary conversion for ALL files. - - The conversion option -S is only effective when used together with - -a or -aa. When specified, "text" files are written in Stream_LF - record format instead of the VMS default of Variable-Length record - format. (When no conversion options are specified, all non-VMS - entries are always written as Stream_LF files.) - - Please note that using the "-P" option is higly insecure, - the plaintext password may be seen by others. For this reason (and - because of lack of space), the "-P" option is not - advertised on UnZip's online help screen. -2 URL - The Info-ZIP main Web page is: - http://www.info-zip.org/ - - FTP access is available, too: - ftp://ftp.info-zip.org/pub/infozip/ -2 ZipInfo_mode - If the first option on the UnZip command line is "-Z", then the - program runs in ZipInfo mode. Remaining options are interpreted as - ZipInfo options. - - ZipInfo reports detailed information about a ZIP archive and its - members. This information may include file access permissions, - compression method, encryption method, version and operating system - (or file system) of the archive-creating program, and so on. The - default behavior (with no options) is to show a single-line entry - for each member in the archive, with a header and a trailer - providing summary information for the entire archive. The format is - a cross between Unix "ls -l" and "unzip -lv" output. See - Detailed_Description. ZipInfo is the same program as UnZip. (On - Unix, "zipinfo" may be a link to "unzip". On VMS, "zipinfo" is - normally a DCL symbol defined as "''unzip' -Z".) However, ZipInfo - support may have been disabled when UnZip was built. - - Format - - zipinfo [ zipinfo_options ] [ file[.zip] ] [ member ... ] - unzip -Z [ zipinfo_options ] [ file[.zip] ] [ member ... ] -3 Command_Parameters - -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 directory/file - specification may be used: "...", "*", or "%" (or, since VMS V7.2, - "?"). The default archive file specification is "[]*.ZIP". - - Note that a ".zip" or ".ZIP" file type 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 with its - actual name ending (if any), whatever that may be. - -member ... - - An optional list of archive members to be processed, separated by - spaces. Unix-like ("globbing") wildcard patterns may be used to - match multiple members: - - * Matches a sequence of 0 or more characters. - ? 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 ("!") or a - caret ("^") follows the left bracket, then the range 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, use - the three-character sequence "[[]". -3 Options_Primary_Format - Options in this group (-1, -2, -l, -m, -s, -v) specify the primary - report format of ZipInfo. Only one of these primary format options - may be specified. -4 -1 --1 ---names-only - - Primary Format. Show member names only, one per line. This option - excludes all others, and the report does not include headers, - trailers, or archive comments. This format may be useful with Unix - shell (or other) scripts. -4 -2 --2 ---names-mostly - - Primary Format. Show member names only, one per line (as with - "-1"), but allow headers (-h), trailers (-t), and archive comments - (-z), if requested explicitly. -4 -l --l ---long-list - - Primary Format. Show member info in long Unix "ls -l" format. Like - the -m format, except that the compressed size (in bytes) is printed - instead of the compression ratio. -4 -m --m ---medium-list - - Primary Format. Show member info in medium-length Unix "ls -l" - format. Like the -s format, except that the compression factor, - expressed as a percentage, is also included. -4 -s --s ---short-list - - Primary Format. Show member info in short Unix "ls -l" format. - This is the default behavior, unless -h or -t is specified. -4 -v --v ---verbose - - Primary Format. The verbose report is very detailed, and mostly - self-explanatory, but it does assume some familiarity with the ZIP - archive format. It also includes the archive comment, if any. - Extra fields in the central directory are broken dowm into - subfields, with brief descriptions of recognized subfields (or - abbreviated dumps of unrecognized subfields). -3 Options_Ordinary - Options in this group modify the operation or report format of - ZipInfo. -4 -C --C ---ignore-case ([CMS, MVS] --CMS-MVS-lower) - - Use case-insensitive name matching for names in the member list and - the -x excluded-member list on the command line. By default, - case-sensitive matching is done. For example, specifying "makefile" - on the command line will match only "makefile" in the archive, not - "Makefile" or "MAKEFILE". On many systems, the local file system is - case-insensitive, so case-insensitive name matching would be more - natural. With -C, "makefile" would match "makefile", "Makefile", or - "MAKEFILE". - - /CASE_MATCH does not affect the search for the ZIP archive file(s). -4 -h --h ---header - - Include a header in the report, showing the archive name, the - archive size (in bytes), and the number of members in the archive. - - For the Unix-format reports (options -l, -m, -s), the header is - included by default, if no archive members are specified. If -h is - specified alone, that is, without one of the Unix-format options, - and without a member list, then only the header lines will be put - out. -4 -M --M ([CMS,MVS] Or: -m) ---more - - Pipe all output through an internal pager similar to the Unix - more(1) command. At the end of a screenful of output, Zipinfo - pauses with a "--More--" prompt; the next screenful may be viewed by - pressing the Enter (Return) key or the space bar. ZipInfo can be - terminated by pressing the "q" key, or, on some systems, the - Enter/Return key. Unlike Unix more(1), there is no - forward-searching or editing capability. Also, ZipInfo doesn't - notice if long lines wrap at the edge of the screen, effectively - resulting in the printing of two or more lines and the likelihood - that some text will scroll off the top of the screen before being - viewed. If the actual number of lines on the screen can not be - determined, 24 lines will be assumed. -4 -T --T ---decimal-time - - Show the file date-times in a sortable, all-numeric, - "YYYYMMDD.hhmmss" format. The default date format is an - alpha-numeric "YY-Mmm-DD hh:mm". For example ("-s", "-s -T"): - - -rw-a-- 3.1 fat 211916 tx defX 10-Jun-18 00:27 zip31c/zip.c - -rw-a-- 3.1 fat 211916 tx defX 20100618.002703 zip31c/zip.c -4 -t --t ---totals - - Include a totals summary at the end of the report, showing the - number of members in the report, the sum of their uncompressed - sizes, the sum of their compressed sizes, and the compression factor - as a percentage. - - For the Unix-format reports (options -l, -m, -s), the totals summary - is included by default, if no archive members are specified. If -t - is specified alone, that is, without one of the Unix-format options, - and without a member list, then only the totals summary trailer - lines will be put out. - - The total "bytes compressed" reported includes only the actual data, - not the ZIP archive meta-data, so the size of the archive will - always be greater than this value. - - See also -mc. -4 -U --U ---unicode - - [UNICODE_SUPPORT] Control UTF-8 handling. When UNICODE_SUPPORT is - available, -U forces ZipInfo to escape all non-ASCII characters from - UTF-8 coded filenames as "#Uxxxx" (for UCS-2 characters, or - "#Lxxxxxx" for Unicode codepoints needing 3 octets). This option is - mainly provided for debugging purpose when the fairly new UTF-8 - support is suspected of damaging extracted filenames. - - -UU disables the recognition of UTF-8 encoded filenames. The - handling of filename codings within ZipInfo falls back to the - behavior of pre-Unicode versions. -4 -W --W ---wild-no-span - - [WILD_STOP_AT_DIR] (Valid when the program was built with the C - macro WILD_STOP_AT_DIR defined.) By default, the wildcard characters - "?" (single-character wildcard) and "*" (multi-character wildcard) - match any character in a member path/name. "-W" modifies 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 wildcard that includes the - directory separator in its matched characters.) For example, with - "-W": - - "*.c" matches "foo.c" but not "mydir/foo.c" - "**.c" matches both "foo.c" and "mydir/foo.c" - "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" - "??*/*" matches "ab/foo" and "abc/foo" - but not "a/foo" or "a/b/foo" - - 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 available on - systems where the Zip archive's internal directory separator - character "/" is allowed as regular character in native operating - system filenames. (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.) -4 -x --x member ... ---exclude member ... - - An optional list of archive members to be excluded from processing. - 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 subdirectories. 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 archive - 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 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 -4 -z --z ---zipfile-comment - - Include the archive comments (if any) in the report. -3 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/documents/casestudies/APPNOTE.TXT - - The table below shows some typical -l report entries: - - Perm/Prot Zver Ofs UncSize At CmpSize Cmth ModDate Mtime Name - ----------+----+---+-------+--+-------+----+---------------+---------- - -rw-a-- 3.1 fat 211916 tx 53467 defX 10-Jun-18 00:27 zip3/zip.c - -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 it/T.EXE;8 - - 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 created the archive. - - Field 3 (Ofs) shows the original operating system where the archive - was created, or the file system on which the member file was stored. - - Field 4 (UncSize) 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 and/or an extra field in - the member data. - - | File Type Extra Field | - First char | binary text yes no | Second char - --------------+-------+----- ------+-----+-------------------- - 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-specific attribute - data, UTC times, and so on. - - Field 6 (CmpSize) 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 Traditional 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 - methods shown in the table below are supported. (Some are - obsolete.) - - Num Abbr Name, description - ----+----+------------------------------------------------------------ - 0 stor Store (no compression) - 1 shrk Shrink - 2 re:1 Reduce (factor 1) - 3 re:2 Reduce (factor 2) - 4 re:3 Reduce (factor 3) - 5 re:4 Reduce (factor 4) - 6 i#:# Implode (dictonary_size:Shannon-Fano_trees) - 7 tokn Tokenize - 8 def# Deflate (N: normal, X: maximum, F: fast, S: super-fast) - 9 d64# Deflate64 (N: normal, X: maximum, F: fast, S: super-fast) - 10 dcli PKWARE Data Compression Library Imploding - IBM TERSE (old) - 12 bzp2 bzip2 - 14 lzma LZMA - 18 ters IBM TERSE (new) - 19 lz77 IBM LZ77 z Architecture (PFS) - 96 jpeg JPEG - 97 wavp WavPack - 98 ppmd PPMd version I, Rev 1 - 99 aesw AES_WG encryption - - 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. -3 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, but it is probably most useful options like -T (decimal time - format) or one of the non-default Unix format options: -l, -m. - - For ZipInfo ("unzip -Z"), the environment variable name on VMS is - ZIPINFO_OPTS (non-VMS: ZIPINFO). For compatibility with Zip, if - ZIPINFO_OPTS 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 the following: - - Unix Bourne (or similar) shell: - ZIPINFO='-l'; export UNZIP - - Unix C shell: - setenv ZIPINFO '-l' - - OS/2 or MS-DOS: - set ZIPINFO="-l" - - VMS (with quotation to preserve lower case in DCL): - define ZIPINFO_OPTS "-l" ! Logical name, or - ZIPINFO_OPTS = "-l" ! DCL symbol. (Either works.) - - 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 commands like the - following: - - Unix Bourne (or similar) shell: - ZIPINFO='-t-'; export ZIPINFO - - Unix C shell: - setenv ZIPINFO '-t-' - - VMS (with quotation to preserve lower case in DCL): - define ZIPINFO_OPTS "-t-" ! Logical name, or - ZIPINFO_OPTS = "-t-" ! DCL symbol. (Either works.) - - The examples show short (one-character) options, but long ("--") - options are also allowed. -3 Examples - 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 archive name as an argument to zipinfo: - - zipinfo zip31c.zip - zipinfo zip31c - - To produce a basic, long-format listing (not verbose), including - header and totals lines, use -l: - - zipinfo -l zip31c.zip - - 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 * - - (On a Unix system, the wildcard member name would typically need to - be quoted to keep a a Unix shell from expanding ("globbing") it. - This is not necessary on VMS.) - - To list information on a single archive member, in medium format, - specify the member name explicitly: - - 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 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 - 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 smallest-to-largest sort order. -3 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 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. In addition, ZipInfo should detect the - true screen geometry on all systems. - - 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. -3 URL - The Info-ZIP main Web page is: - http://www.info-zip.org/ - - FTP access is available, too: - ftp://ftp.info-zip.org/pub/infozip/ diff --git a/UNZIP_CLI.HLP b/UNZIP_CLI.HLP deleted file mode 100644 index 813710d..0000000 --- a/UNZIP_CLI.HLP +++ /dev/null @@ -1,1342 +0,0 @@ -1 UNZIP - UnZip lists, tests, or extracts files from a ZIP archive (an - archive format commonly used on many different systems). The - default behavior (with no options) is to extract into the current - directory (and subdirectories below it) all files from the - specified ZIP archive. A companion program, Zip, creates ZIP - archives. - - Info-ZIP UnZip and Zip were intended to be compatible with archives - created by PKWARE's PKZIP and PKUNZIP programs (originally for - MS-DOS), but in many cases the program options or default behaviors - differ. Nowadays, many other programs are available which work - with ZIP archives. - - This help file describes the VMS CLI edition of UnZip. A - Unix-style command-line edition is also available, with a separate - help file. - - The VMS CLI edition of UnZip adds a command-line translator to the - normal UnZip program. This translator transforms a set of - VMS-style qualifiers and parameters into an equivalent set of - Unix-style options and parameters, and then passes those - transformed arguments to UnZip's standard Unix-style command-line - processor. The documentation often shows the related Unix-style - options in parentheses after a VMS-style qualifier. For example: - /HELP (-h, -hh). - - Format: - - UNZIP [/unzip_qualifiers] [file[.zip]] [member [,...]] - - UNZIP /ZIPINFO [/zipinfo_qualifiers] [file[.zip]] [member [,...]] - - ZIPINFO [/zipinfo_qualifiers] [file[.zip]] [member [,...]] - - To display the basic built-in help, use the command: - - UNZIP /HELP - - To display the extended built-in help, use the command: - - UNZIP /HELP=EXTENDED - - The built-in help may be more current than this help file, - especially between full product releases. - - The VMS CLI edition of the program can also provide built-in help - on the Unix-style command-line edition; just use the "-h" or "-hh" - options. -2 Command_Parameters - 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 - directory/file specification may be used: "...", "*", or "%" - (or, since VMS V7.2, "?"). The default archive file - specification is ".ZIP". - - Note that a ".zip" or ".ZIP" file type 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 - with its actual name ending (if any), whatever that may be. - - member [,...] - - An optional list of archive members to be processed, separated - by commas. If no member list is specified, then all archive - members are processed. Unix-like ("globbing") wildcard patterns - may be used to match multiple members: - - * Matches a sequence of 0 or more characters. - ? 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 ("!") - or a caret ("^") follows the left bracket, then the - range 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, use the three-character sequence "[[]". -2 Qualifiers_Primary_mode - Qualifiers in this group specify the primary mode of operation of - UnZip. Only one of these primary mode qualifiers may be specified. -3 /COMMENT (-z) - Primary mode. Display only the archive comment. -3 /FRESHEN (-f) - 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 - /EXISTING (-o) option may be used to suppress the queries. -3 /HELP (-h, -hh) - /HELP [=NORMAL] - /HELP=EXTENDED - - Primary Mode. Display brief (roughly 24 lines) usage instructions - (NORMAL, the default), or EXTENDED help (more complete usage - instructions). -3 /LICENSE (--license) - Primary Mode. Display the Info-ZIP license. -3 /LIST (-l) - Primary Mode. List archive members. By default, a brief format is - used, which includes the following items: member name, - uncompressed 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. - Specifying a member list limits the report to those members. - - Adding /VERBOSE to an "UNZIP /LIST" 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 - 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 - archive members is reported by the more verbose ZipInfo reports. - See ZipInfo. - - If UnZip was built with OS2_EAS enabled, then the /LIST report also - includes the sizes of stored OS/2 extended attributes (EAs) and - OS/2 access control lists (ACLs). In addition, the archive comment - and individual member comments (if any) are displayed. - - If a file was archived from a single-case file system (for example, - the old MS-DOS FAT file system) and the /NAMES=DOWNCASE option was - given, the filename is converted to lowercase and is shown prefixed - with a caret (^). - - Note: If only /VERBOSE is specified with an archive name, then - UnZip acts as if "/LIST /VERBOSE" were specified, and a detailed - listing is generated. -3 /PIPE (-p) - 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 /SCREEN (-c), and the - files are always extracted in binary format, just as they are - stored (no conversions). See also /SCREEN. -3 /SCREEN (-c) - Primary Mode. Extract files to stdout/screen. This option is - similar to the /PIPE (-p) option except that the name of each file - is displayed as it is extracted, and the /TEXT (-a) option is - allowed, which can provide automatic ASCII-EBCDIC conversion, where - appropriate. See also /PIPE. -3 /TEST (-t) - 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 (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 /VERBOSE (-v) to /TEST adds some diagnostic information to - the report for archive members with LZMA or PPMd compression. -3 /TIMESTAMP (-T) - Primary Mode. Set the timestamp on the archive(s) to that of the - newest file in each one. This corresponds to Zip's /APPEND /LATEST - (-go) option, except that it can be used on wildcard archives (for - example, "unzip -T *.zip"), and is much faster. -3 /UPDATE (-u) - Primary mode. Update existing files and create new ones if needed. - This mode performs the same function as the Freshen (/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. -3 /VERBOSE (-v) - - Primary mode (when alone) or option. When used as a primary mode - (alone), and no archive is specified, an "UNZIP /VERBOSE" command - generates a report showing the program version, build options, and - relevant envrironment variables. - - When used with some other primary mode option, /VERBOSE can make - output more verbose (detailed). - - If no other primary mode is specified, and an archive is specified, - then UnZip acts as if "/LIST /VERBOSE" were specified, and a - detailed listing is generated. See Qualifiers_Primary_mode, - particularly /LIST. -2 Qualifiers_Ordinary - Qualifiers in this group modify the operation of UnZip. -3 /AUTO_DIRECTORY (-da) - /NOAUTO_DIRECTORY (default) - /AUTO_DIRECTORY[=REUSE] - - Specifies a destination directory for extracted files which is - derived from the base name of the archive. By default, files are - extracted (and subdirectories created) in the current default - directory. With /AUTO_DIRECTORY, UnZip automatically derives a - subdirectory name from the archive name, creates that subdirectory, - and extracts files into that subdirectory. - - For example, with /AUTO_DIRECTORY, extraction of "fred.zip" is done - into subdirectory "[.fred]" instead of into the current directory. - (On non-VMS systems, subdirectory "fred".) - - Using this option can help to avoid cluttering the current - directory with files extracted from an archive whose structure does - not include a top-level directory. - - If -da is specified as a default option in an environment variable, - it can be overridden by either a /NOAUTO_DIRECTORY qualifier or an - explicit /DIRECTORY=dest_dir qualifier. See also /DIRECTORY. -3 /BINARY (-b, -bb) - /BINARY[=keyword] - /NOBINARY (Default.) - - Selects the file record format used when extracting binary files. - - The optional keywords are: - - ALL Extract all files with fixed-length, 512-byte record - format. (-bb) - AUTO Extract binary files with fixed-length, 512-byte - record format. (Default value keyword: "/BINARY" is - equivalent to "/BINARY=AUTO".) (-b) - NONE Same as /NOBINARY. Extract binary files with - Stream_LF record format. (Default condition.) - - Zip (or a similar archiving program) identifies files as "binary" - or "text" when they are archived. (A short-format ZipInfo report - denotes a binary file with a "b", and a text file with a "t".) - - [VMS] On VMS, for archives with VMS attribute information (made - with "zip -V", "ZIP /VMS"), files are always created with their - original record formats. For archives without VMS attribute - information (not made with "zip -V", "ZIP /VMS"), files are - normally created with Stream_LF record format. With - /BINARY[=AUTO], binary files are created with fixed-length, - 512-byte record format. With /BINARY=ALL, all files are created - with fixed-length, 512-byte record format. When extracting to - standard output (/PIPE or /SCREEN in effect), the default - conversion of text record delimiters is disabled for binary files - (with /BINARY[=AUTO]), or for all files (with /BINARY=ALL). - - /BINARY may conflict or interact with /TEXT. A combination of - /BINARY[=AUTO] and /TEXT[=AUTO] is allowed. (See /TEXT.) -3 /BRIEF - Deprecated. Ignored. A no-op place-holder, originally intended as - an opposite of /FULL (also deprecated). See - Qualifiers_Primary_mode, particularly /LIST and /VERBOSE. -3 /CASE_INSENSITIVE (-C) - /CASE_INSENSITIVE - /NOCASE_INSENSITIVE (default) - - Deprecated. Use /MATCH=CASE. - - With /CASE_INSENSITIVE, match member names case-blindly. -3 /DIRECTORY (-d) - /DIRECTORY=dest_dir - - Specifies a destination directory for extracted files. By default, - files are extracted (and subdirectories created) in the current - default directory. With "/DIRECTORY=dest_dir", extraction is done - into the specified directory, instead. - - [VMS] On VMS, only a VMS-style device:[directory] specification is - permitted. -3 /DOT_VERSION (-Y) - [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" -3 /EXCLUDE (-x) - /EXCLUDE=(member [,...]) - - An optional list of archive members to be excluded from processing. - Because wildcard characters normally match "/" directory separators - (for exceptions see /MATCH=[NO]WILD_MATCH_SLASH (-W)), this option - may be used to exclude any files that are in subdirectories. For - example, - UNZIP foo *.[ch] /EXCLUDE = */* - would extract all C source files (*.c, *.h) in the main directory, - but none in any subdirectories. Without the /EXCLUDE option, all C - source files in all directories within the archive would be - extracted. - - Note that archive members are specified using the Unix-style names - which are used in ZIP archives, not VMS-style names. -3 /EXISTING (-n, -o) - /EXISTING[=keyword] - - Specifies the action when extracting files, and a file already - exists. - - The optional keywords are: - - NEW_VERSION Create a new version of an existing file. (-o) - OVERWRITE Overwrite an existing file. (-oo) - NOEXTRACT Do not extract. Leave an existing file intact. (-n) - - By default, UnZip queries the user before extracting any file that - already exists. - - [Non-VMS] On non-VMS systems, the user may choose to overwrite only - the current file, overwrite all files, skip extraction of the - current file, skip extraction of all existing files, or rename the - current file (choose a new name for the extracted file). - - [VMS] On VMS, the usual query choices are to create a new version - of an existing file, to skip extraction, or to rename the current - file. In the case where an archive member name includes a version - number, and /VERSION (-V, "retain VMS file version numbers") is in - effect, then an additional query choice is offered: to overwrite - the existing file. -3 /FULL (-v) - /FULL - /FULL=DIAGNOSTICS - - Deprecated. Adds detail to a /LIST report. See - Qualifiers_Primary_mode, particularly /LIST and /VERBOSE, and - Qualifiers_Ordinary, particularly /VERBOSE. -3 /JAR (--jar) - Treat archive(s) as Java JAR. Over-simplification in Java JAR - archives can cause UnZip to transform UTF-8 file names according to - inappropriate (MS-DOS) rules, yielding corrupt names on extracted - files (typically those with ASCII codes 128-255). Archives - containing a Java "CAFE" extra field should be detected - automatically, and handled correctly, but not all JAR archives - include that extra field. Specifying /JAR tells UnZip to expect - UTF-8 file names, regardless of whether the archive contains a - "CAFE" extra field. -3 /JUNK_DIRS (-j) - /NOJUNK_DIRS (Default.) - /JUNK_DIRS[=depth] - - Junk directories on extracted files. With /JUNK_DIRS, all - directory information is stripped from an archive member name, so - all files are extracted into the destination directory. (See also - /DIRECTORY.) - - If a depth ("=depth", where "depth" is a positive integer) is - specified, then that number of directory levels will be stripped - from an archive member name. For example, an archive member like - "a/b/c/d/ee.txt" would normally be extracted as "[.a.b.c.d]ee.txt". - With /JUNK_DIRS, it would be extracted as "ee.txt". With - /JUNK_DIRS=2, the first two directory levels would be stripped, so - it would be extracted as "[.c.d]ee.txt". -3 /LOWERCASE (-L) - /[NO]LOWERCASE - - Deprecated. Use /NAMES=[NO]DOWNCASE. - - /LOWERCASE: Convert to lowercase any filename originating on an - uppercase-only operating system or file system. - - /NOLOWERCASE: Do not convert to lowercase any filename originating - on an uppercase-only operating system or file system. - - See also /UPPERCASE, which is also deprecated. -3 /MATCH (-C, -W) - /MATCH=(keyword, ...) - - Specifies name-matching behavior for names in the member list and - the /EXCLUDE excluded-member list on the command line. - - The optional keywords and values are: - - CASE=BLIND Name matching is case-insensitive. (-C) - CASE=SENSITIVE Name matching is case-sensitive. (Default.) - - By default, case-sensitive matching is done. For example, - specifying "makefile" on the command line will match only - "makefile" in the archive, not "Makefile" or "MAKEFILE". On many - systems, the local file system is case-insensitive, so - case-insensitive name matching would be more natural. With - /MATCH=CASE=BLIND, "makefile" would match "makefile", "Makefile", - or "MAKEFILE". - - /MATCH does not affect the search for the ZIP archive file(s), nor - the matching of archive members to existing files on the extraction - path. So, on a case-sensitive file system, UnZip will never try to - overwrite a file "FOO" when extracting a member named "foo"! - - [WILD_STOP_AT_DIR] If the C macro WILD_STOP_AT_DIR is defined at - build time, then an additional keyword is allowed: - - NOWILD_MATCH_SLASH Wildcards stop at directory slash. (-W) - WILD_MATCH_SLASH Wildcards match directory slash. (Default.) - - By default, the wildcard characters "?" (single-character wildcard) - and "*" (multi-character wildcard) match any character in a member - path/name. /MATCH=NOWILD_MATCH_SLASH (-W) modifies 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 wildcard that - includes the directory separator in its matched characters.) For - example, with /MATCH=NOWILD_MATCH_SLASH: - - "*.c" matches "foo.c" but not "mydir/foo.c" - "**.c" matches both "foo.c" and "mydir/foo.c" - "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" - "??*/*" matches "ab/foo" and "abc/foo" - but not "a/foo" or "a/b/foo" - - This modified behavior is equivalent to the pattern matching style - used by the shells of some of \fIUnZip\fP's supported target OSs - (one example is Acorn RISC OS). This option may not be available - on systems where the Zip archive's internal directory separator - 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 not - work as expected on a wildcard file name specification.) -3 /NAMES (-0 -2, -L, -s) - /NAMES - /NAMES=(keyword, ...) - - Selects name transformations during extraction. The keywords are: - - [NO]CHAR_SET CHAR_SET: Use CP850 character-set mapping on names - of archive members which originated on a FAT or - NTFS file system. (Default condition.) - NOCHAR_SET: Do not map these archive member names. - DOWNCASE Convert filenames from all-uppercase operating - systems to lowercase. (-L) - DOWNCASE=ALL Convert all filenames to lowercase. (-LL) - ODS2 Restrict names to ODS2 conventions, regardless - of the destination file system. (Invalid - character -> "_".) (-2) - [NO]SPACES SPACES: Permit space characters in (ODS5) names. - (Default condition.) - NOSPACES: Change spaces to underscores. (-s) - - The default is to use ODS5-compatible file names (including spaces) - when the destination file system is ODS5, and to convert the names - to ODS2-compatible names when the destination file system is ODS2. -3 /OVERWRITE (-n, -o) - /[NO]OVERWRITE - - Deprecated. Use /EXISTING. - - /OVERWRITE is equivalent to /EXISTING=NEW_VERSION. - /NOOVERWRITE is equivalent to /EXISTING=NOEXTRACT. -3 /PAGE (-M) - Pipe all output through an internal pager similar to the Unix - more(1) command. At the end of a screenful of output, UnZip pauses - with a "--More--" prompt; the next screenful may be viewed by - pressing the Enter (Return) key or the space bar. UnZip can be - terminated by pressing the "Q" key and, on some systems, the - Enter/Return key. Unlike Unix more(1), there is no - forward-searching or editing capability. Also, UnZip doesn't - notice if long lines wrap at the edge of the screen, effectively - resulting in the printing of two or more lines and the likelihood - that some text will scroll off the top of the screen before being - viewed. If the actual number of lines on the screen can not be - determined, 24 lines will be assumed. -3 /PASSWORD (-P) - /PASSWORD=password - - Use "password" to decrypt encrypted archive members (if any). THIS - IS INSECURE! Many multi-user operating systems provide ways for - any user to see the current command line of any other user. Even - on stand-alone systems, there is always the threat of - over-the-shoulder peeking. Storing the plaintext password as part - of a command line in an automated script can be even less secure, - Whenever possible, use the non-echoing, interactive prompt to enter - passwords. Where security is truly important, use a strong - encryption method, such as AES, instead of the relatively weak - encryption provided by Traditional ZIP encryption. Or, use an - external encryption program, such as GnuPG, before archiving the - file. (Note that Zip will probably not be able to do significant - compression on a file which has already been encrypted.) -3 /QUIET (-q, -qq) - /QUIET[=SUPER] - - Perform operations quietly. (/QUIET=SUPER: even more quietly). - - By default, UnZip prints the names of the files it's extracting or - testing, the extraction methods, any member or archive comments - that may be stored in the archive, and possibly a summary when - finished with each archive. The /QUIET[=SUPER] options suppress - the printing of some or all of these messages. -3 /RESTORE (-D, -k, -ka, -X) - /RESTORE[=(keyword, ...)] - - Selects restoration options for some meta-data. The optional - keywords are: - - ACL Restore file ACL settings. (-ka) - OWNER Restore file owner/UIC settings. (-X) - PROTECTION = LIMITED Restore file UIC-based (SOGW) protection - settings, respecting the current default - protection. (Default.) - PROTECTION = ORIGINAL Restore file UIC-based (SOGW) protection - settings, ignoring the current default - protection. (-k) - NOPROTECTION Do not restore file UIC-based (SOGW) protection settings. - The current default protection is used. (-k-) - NODATE Do not restore any timestamps. - DATE=ALL Restore timestamps for all extracted entries, - files and directories. - DATE=FILES Restore timestamps for extracted files. (Default.) - - By default, on VMS, UnZip restores the original date-time - attributes for files, but not for directories. This agrees with - the behavior of VMS BACKUP (and UnZip versions before 5.52 where - the capability to restore directory timestamps was added). - - For compatibility with UnZip versions before 6.0 (5.53), the - following deprecated short forms are still accepted: - - Deprecated form: Modern form: - /RESTORE /RESTORE=PROTECTION - /NORESTORE /RESTORE=NOPROTECTION -3 /TEXT (-a, -aa, -S) - - /TEXT[=(keyword, ...)] - /NOTEXT (Default.) - - The optional keywords are: - - ALL Extract all files with variable-length record format. - Adjust line endings to local standard, and convert - EBCDIC to ASCII, as needed. (-aa) - AUTO Extract text files with variable-length record format. - Adjust line endings to local standard, and convert - EBCDIC to ASCII, as needed. (Default value keyword: - "/TEXT" is equivalent to "/TEXT=AUTO".) (-a) - NONE Same as /NOTEXT. Extract text files with Stream_LF - record format without conversions. (Default - condition.) - STMLF Use Stream_LF record format for text files (instead of - variable-length record format) when ALL or AUTO is in - effect. Adjust line endings to local standard, and - convert EBCDIC to ASCII, as needed. (-S) - - Selects the file record format, character encoding, and line-ending - type used when extracting text files. - - Zip (or a similar archiving program) identifies files as "binary" - or "text" when they are archived. (A short-format ZipInfo report - denotes a binary file with a "b", and a text file with a "t".) - Zip's identification of text files may not be perfect, so UnZip - prints "[binary]" or "[text]" as a visual check for each file it - extracts with /TEXT. /TEXT=ALL forces all files to be extracted - (and converted) as text, regardless of the supposed file type. - - [VMS] On VMS, for archives with VMS attribute information (made - with "zip -V", "ZIP /VMS"), files are always created with their - original record formats. For archives without VMS attribute - information (not made with "zip -V", "ZIP /VMS"), all files are - normally created with Stream_LF record format. With /TEXT[=AUTO], - text files are normally created with variable-length record format, - but adding STMLF gives them Stream_LF record format. Additionally, - line endings (CR, LF, CR+LF, ..) are adjusted to the local - standard, and EBCDIC is converted to ASCII. With /TEXT=ALL, all - files are treated as text files, and processed as described above. - - See also /BINARY. -3 /TRAVERSE_DIRS (-:) - /[NO]TRAVERSE_DIRS (Default: /NOTRAVERSE_DIRS.) - - Allows UnZip to extract archive 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 5.50) - prevents UnZip from accidentally writing files to directories - outside the current destination directory tree. /TRAVERSE_DIRS - sets UnZip back to its previous, more liberal behavior, allowing - exact extraction of archives that use "../" path components to - create multiple directory trees at or above the level of the - destination directory. - - Use this option with extreme caution. -3 /UPPERCASE (-L) - /[NO]UPPERCASE - - Deprecated. Use /NAMES=[NO]DOWNCASE. - - /UPPERCASE: Do not convert to lowercase any filename originating - on an uppercase-only operating system or file system. - - /NOUPPERCASE: Convert to lowercase any filename originating on an - uppercase-only operating system or file system. - - See also /LOWERCASE, which is also deprecated. -3 /VERBOSE (-v) - /VERBOSE[=(keyword, ...)] - - The optional keywords are: - - NORMAL Make a report more detailed/verbose. (Default value - keyword: "/VERBOSE" is equivalent to - "/VERBOSE=NORMAL".) (-v) - MORE Enable special developer I/O diagnostics. See below. - (-vv) - COMMAND Enable special developer CLI diagnostics. See below. - - MORE and NORMAL may not be specified together. (MORE implies - NORMAL.) - - When used with some primary mode options, /VERBOSE can make output - more detailed/verbose. See also Qualifiers_Primary_mode, - particularly /LIST. - - If no other primary mode is specified, and an archive is specified, - then UnZip acts as if "/LIST /VERBOSE" were specified, and a - detailed listing is generated. See Qualifiers_Primary_mode, - particularly /LIST and /VERBOSE. - - /VERBOSE=MORE ("-vv") enables some VMS-specific I/O diagnostic - messages, and is intended for use in program development, not in - normal use. - - /VERBOSE=COMMAND causes UnZip to show the translated Unix-style - command-line argument vector before processing it, and is intended - for use in program development, not in normal use. - /VERBOSE=COMMAND has no Unix-style equivalent. -3 /VERSION (-V) - [Non-CMS-MVS] Retain VMS file version numbers. VMS files can be - stored with a version number, in the format "file.type;##", where - "##" is a decimal number. By default the ";##" version numbers 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.) - - [Non-VMS] Note that before UnZip version 6.10, 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 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-". -3 /ZIPINFO (-Z) - ZipInfo mode. With /ZIPINFO, the program runs in ZipInfo mode, - which is used to display information about an archive and its - members. Remaining options are interpreted as ZipInfo options. If - used, /ZIPINFO must be the first qualifier on the command line. - See ZipInfo_mode. -2 Environment_Options - UnZip's default behavior may be modified by placing Unix-style - command-line options in an environment variable. (The VMS CLI - translator acts only on the command line itself, not on the - environment variables.) This can be done with any option, but it is - probably most useful options like -a (/TEXT, auto-convert text - files), -L (/NAMES, downcase file names from systems with all - uppercase file names), -C (/MATCH=CASE=BLIND, use case-insensitive - name matching), -q (/QUIET, quiet), -o (/EXISTING, always - overwrite), or -n (/EXISTING, never overwrite). - - For UnZip, the environment variable name on VMS is UNZIP_OPTS - (non-VMS: UNZIP). The name on VMS is different to avoid conflict - with a foreign-command DCL symbol, UNZIP. For compatibility with - Zip, if UNZIP_OPTS is not defined, then UnZip will use UNZIPOPT the - same way. - - For ZipInfo ("UNZIP /ZIPINFO"), the environment variable name on - VMS is ZIPINFO_OPTS (non-VMS: ZIPINFO). For compatibility with - Zip, if ZIPINFO_OPTS is not defined, then ZipInfo will use - ZIPINFOOPT the same way. - For example, to make UnZip act as quietly as possible, only - reporting errors, one could use commands like the following (with - quotation to preserve lower case in DCL): - - 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 Unix-style - command-line options, except that they are effectively the first - options on the command line. Generally, the VMS CLI translator - will override an environment option if an explicit corresponding - VMS-style qualifier is specified. - - The examples show short (one-character) options, but long ("--") - options are also allowed. -2 Encryption_Decryption - Zip and UnZip have long supported a relatively weak encryption - method, which we call Traditional ZIP encryption. The source code - for 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, 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: 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: - http://www.winzip.com/aes_info.htm - - For information on the separate AES_WG source kit, see: - 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 /PASSWORD for a - (less secure) method of specifying a password on the command line. - - 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. (This is a security feature of the PKWARE archive format; it - helps prevent brute-force attacks that might otherwise gain a large - speed advantage by testing only the header.) In the case that an - incorrect password 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 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 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 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, - passwords with accented European characters) may not be portable - across systems or to other archivers. This problem stems from the - use of multiple 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 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 encoding.) 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 adapted for UTF-8 support - and will consequently fail. -2 Examples - To use UnZip to extract all members of the archive letters.zip into - the current directory and subdirectories below it, creating any - subdirectories as necessary: - - unzip letters - - To extract all members of letters.zip into the current directory - only: - - unzip /junk_dirs letters - - To test letters.zip, printing only a summary message indicating - whether the archive is OK or not: - - unzip /test /quiet letters - - To test all ".zip" archives in the current directory, printing only - the summaries: - - unzip /test /quiet *.zip - - (On a Unix system, the wildcard member name would typically need to - be quoted to keep a a Unix shell from expanding ("globbing") it. - This is not necessary on VMS. However, a name with a slash ("/") - character, such as "*/zip*.*", must be quoted. Otherwise, DCL may - interpret the slash as introducing a qualifier, causing unexpected - behavior or an "%CLI-W-IVQUAL, unrecognized qualifier" error.) - - The following command extracts to standard output all members of - letters.zip whose names end in ".tex", auto-converting to the local - end-of-line convention, in Stream_LF record format, and piping the - output into TYPE /PAGE: - - pipe unzip /screen /text=(auto, stmlf) letters *.tex | \ - type /page sys$input - - To extract from source.zip all Fortran and C source files (*.f, - *.c, *.h) and Makefile into the SYS$SCRATCH directory: - - unzip source.zip *.[fch] Makefile /directory = sys$scratch - - To extract all FORTRAN and C source files, regardless of case (for - example, both *.c and *.C, and any makefile, Makefile, MAKEFILE or - similar): - - unzip -C source.zip *.[fch] makefile /directory = sys$scratch - - The following command extracts only newer versions of the files - already 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): - - unzip /freshen /existing=new_version 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 example): - - unzip /update /existing=new_version 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 build time, and the values of all the relevant - environment variables: - - unzip /verbose -2 Exit_Status - UnZip's exit status approximates the exit codes defined by PKWARE. - On VMS, UnZip's UNIX-style exit values are translated into - VMS-style status codes with facility code 1954 = %x7A2, and with - the inhibit-message (%x10000000) and facility-specific (%x00008000) - bits set: - - %x17A28001 normal exit - %x17A28000 + 16*UnZip_error_code warnings - %x17A28002 + 16*UnZip_error_code normal errors - %x17A28004 + 16*UnZip_error_code fatal errors - - Note that multiplying the UNIX-style UnZip error code by 16 places - it conveniently in the hexadecimal representation of the VMS exit - code, "__" in %x17A28__s, where "s" is the severity code. For - example, a missing archive might cause UnZip error code 9, which - would be transformed into the VMS exit status %X17A28092. - - The UnZip VMS exit codes include severity values which approximate - those defined by PKWARE, as shown in the following table: - - VMS UnZip - severity err code Error description - ----------+----------+---------------------------------------------- - Success 0 Normal. No errors or warnings detected. - Warning 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 encryption password. - Error 2 Error in the archive format. Processing may - or may not have completed successfully. - Fatal 3 Severe error in the archive format. - Processing probably failed immediately. - Fatal 4 Memory allocation failed in program - initialization. - Fatal 5 Memory allocation or terminal I/O failed in - password processing. - Fatal 6 Memory allocation failed while decompressing - to disk. - Fatal 7 Memory allocation failed while decompressing - in memory. - Fatal 8 Memory allocation failed. (Currently not - used.) - Error 9 Specified archive files were not found. - Error 10 Invalid command-line options or parameters. - Error 11 No matching files were found. - Fatal 50 Disk (file system) filled during extraction. - Fatal 51 Unexpected end-of-file while reading the - archive. - Error 80 User interrupt (Ctrl/C). - Error 81 No files were processed, because of - unsupported compression or encryption - methods. - Error 82 No files were processed, because of bad - encryption password(s). - Fatal 83 Large-file archive could not be processed by - this small-file program. -2 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 3.0 and later can combine multi-part (split) archives into a - combined single-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 UnZip (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 and/or other archivers. See also - Encryption_Decryption. - - UnZip's -M ("--more") option tries to take into account automatic - wrapping 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 - devices and character devices are not restored even if they are - somehow represented in the archive, nor are hard-linked files - relinked. Basically, the only file types restored by UnZip are - regular files, directories, and symbolic (soft) links. - - [OS/2] Extended attributes for existing directories are only - updated if the -o ("--overwrite") option is given. This is a - limitation of the operating system; because directories only have a - creation time associated 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 normally (with or without - freshening/updating existing files), then overwrite just the - directory entries (for example, "unzip -o foo */"). -2 URL - The Info-ZIP main Web page is: - http://www.info-zip.org/ - - FTP access is available, too: - ftp://ftp.info-zip.org/pub/infozip/ -2 ZipInfo_mode - When /ZIPINFO is specified, the program runs in ZipInfo mode. - Remaining options are interpreted as ZipInfo options. If used, - /ZIPINFO must be the first qualifier on the command line. - - ZipInfo reports detailed information about a ZIP archive and its - members. This information may include file access permissions, - compression method, encryption method, version and operating system - (or file system) of the archive-creating program, and so on. The - default behavior (with no options) is to show a single-line entry - for each member in the archive, with a header and a trailer - providing summary information for the entire archive. The format - is a cross between Unix "ls -l" and "UNZIP /LIST /VERBOSE" output. - See Detailed_Description. ZipInfo is the same program as UnZip. - (On Unix, "zipinfo" may be a link to "unzip". On VMS, "ZIPINFO" is - normally a DCL symbol defined as "''UNZIP' /ZIPINFO".) However, - ZipInfo support may have been disabled when UnZip was built. - - Format: - - ZIPINFO [/zipinfo_options] [file[.zip]] [member [,...]] - - UNZIP /ZIPINFO [/zipinfo_options] [file[.zip]] [member [,...]] -3 Command_Parameters - 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 - directory/file specification may be used: "...", "*", or "%" - (or, since VMS V7.2, "?"). The default archive file - specification is ".ZIP". - - Note that a ".zip" or ".ZIP" file type 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 - with its actual name ending (if any), whatever that may be. - - member [,...] - - An optional list of archive members to be processed, separated - by commas. If no member list is specified, then all archive - members are processed. Unix-like ("globbing") wildcard patterns - may be used to match multiple members: - - * Matches a sequence of 0 or more characters. - ? 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 ("!") or a caret ("^") follows the - left bracket, then the range 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, use the three-character sequence "[[]". -3 Qualifiers_Primary_Format - Qualifiers in this group specify the primary report format of - ZipInfo. Only one of these primary format qualifiers may be - specified. -4 /LONG (-l) - Primary Format. Show member info in long Unix "ls -l" format. - Like the /MEDIUM format, except that the compressed size (in bytes) - is printed instead of the compression ratio. -4 /ONE_LINE (-2) - Primary Format. Show member names only, one per line. Other - report elements are allowed, if requested explicitly using /HEADER, - /TOTALS, and/or /COMMENT. -4 /MEDIUM (-m) - Primary Format. Show member info in medium-length Unix "ls -l" - format. Like the /SHORT format, except that the compression - factor, expressed as a percentage, is also included. -4 /SHORT (-s) - Primary Format. Show member info in short Unix "ls -l" format. - This is the default behavior, unless /HEADER or /TOTALS is - specified. -4 /VERBOSE (-v) - Primary Format. The ZipInfo /VERBOSE report is very detailed, and - mostly self-explanatory, but it does assume some familiarity with - the ZIP archive format. It also includes the archive comment, if - any. Extra fields in the central directory are broken down into - subfields, with brief interpretations of recognized subfields (or - abbreviated dumps of unrecognized subfields). -3 Qualifiers_Ordinary - Qualifiers in this group modify the operation or report format of - ZipInfo. -4 /COMMENT (-z) - Include the archive comments (if any) in the report. -4 /DECIMAL_TIME (-T) - Show the file date-times in a sortable, all-numeric, - "YYYYMMDD.hhmmss" format. The default date format is an - alpha-numeric "YY-Mmm-DD hh:mm". For example ("/SHORT", "/SHORT - /DECIMAL_TIME"): - - -rw-a-- 3.1 fat 211916 tx defX 10-Jun-18 00:27 zip31c/zip.c - -rw-a-- 3.1 fat 211916 tx defX 20100618.002703 zip31c/zip.c -4 /EXCLUDE (-x) - /EXCLUDE=(member [,...]) - An optional list of archive members to be excluded from processing. - Because wildcard characters normally match "/" directory separators - (for exceptions see /WILD_SPAN (-W)), this option may be used to - exclude any files that are in subdirectories. For example, - UNZIP foo *.[ch] /EXCLUDE = */* - would extract all C source files (*.c, *.h) in the main directory, - but none in any subdirectories. Without the /EXCLUDE option, all C - source files in all directories within the archive would be - extracted. - - Note that archive members are specified using the Unix-style names - which are used in ZIP archives, not VMS-style names. -4 /HEADER (-h) - Include a header in the report, showing the archive name, the - archive size (in bytes), and the number of members in the archive. - - For the Unix-format reports (options /LONG, /MEDIUM, /SHORT), the - header is included by default, if no archive members are specified. - If /HEADER is specified alone, that is, without one of the - Unix-format options, and without a member list, then only the - header lines will be put out. -3 /MATCH (-C, -W) - /MATCH=(keyword, ...) - - Specifies name-matching behavior for names in the member list and - the /EXCLUDE excluded-member list on the command line. - - The optional keywords and values are: - - CASE=BLIND Name matching is case-insensitive. (-C) - CASE=SENSITIVE Name matching is case-sensitive. (Default.) - - By default, case-sensitive matching is done. For example, - specifying "makefile" on the command line will match only - "makefile" in the archive, not "Makefile" or "MAKEFILE". On many - systems, the local file system is case-insensitive, so - case-insensitive name matching would be more natural. With - /MATCH=CASE=BLIND, "makefile" would match "makefile", "Makefile", - or "MAKEFILE". - - /MATCH does not affect the search for the ZIP archive file(s), nor - the matching of archive members to existing files on the extraction - path. So, on a case-sensitive file system, UnZip will never try to - overwrite a file "FOO" when extracting a member named "foo"! - - [WILD_STOP_AT_DIR] If the C macro WILD_STOP_AT_DIR is defined at - build time, then an additional keyword is allowed: - - NOWILD_MATCH_SLASH Wildcards stop at directory slash. (-W) - WILD_MATCH_SLASH Wildcards match directory slash. (Default.) - - By default, the wildcard characters "?" (single-character wildcard) - and "*" (multi-character wildcard) match any character in a member - path/name. /MATCH=NOWILD_MATCH_SLASH (-W) modifies 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 wildcard that - includes the directory separator in its matched characters.) For - example, with /MATCH=NOWILD_MATCH_SLASH: - "*.c" matches "foo.c" but not "mydir/foo.c" - "**.c" matches both "foo.c" and "mydir/foo.c" - "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" - "??*/*" matches "ab/foo" and "abc/foo" - but not "a/foo" or "a/b/foo" - - This modified behavior is equivalent to the pattern matching style - used by the shells of some of \fIUnZip\fP's supported target OSs - (one example is Acorn RISC OS). This option may not be available - on systems where the Zip archive's internal directory separator - 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 not - work as expected on a wildcard file name specification.) -4 /MEMBER_COUNTS (default) (-mc) - /NOMEMBER_COUNTS - Control inclusion of separate member counts for directories, files, - and (if symlinks are supported) links, after the totals summary at - the end of the report. By default, they are included. Use - /NOMEMBER_COUNTS" to suppress them. See also /TOTALS. -4 /PAGE (-M) - Pipe all output through an internal pager similar to the Unix - more(1) command. At the end of a screenful of output, UnZip pauses - with a "--More--" prompt; the next screenful may be viewed by - pressing the Enter (Return) key or the space bar. UnZip can be - terminated by pressing the "Q" key and, on some systems, the - Enter/Return key. Unlike Unix more(1), there is no - forward-searching or editing capability. Also, UnZip doesn't - notice if long lines wrap at the edge of the screen, effectively - resulting in the printing of two or more lines and the likelihood - that some text will scroll off the top of the screen before being - viewed. If the actual number of lines on the screen can not be - determined, 24 lines will be assumed. -4 /TOTALS (-t) - Include a totals summary at the end of the report, showing the - number of members in the report, the sum of their uncompressed - sizes, the sum of their compressed sizes, and the compression - factor as a percentage. - - For the Unix-format reports (/LONG, /MEDIUM, /SHORT), the totals - summary is included by default, if no archive members are - specified. If /TOTALS is specified alone, that is, without one of - the Unix-format options, and without a member list, then only the - totals summary trailer lines will be put out. - - The total "bytes compressed" reported includes only the actual - data, not the ZIP archive meta-data, so the size of the archive - will always be greater than this value. - - See also /MEMBER_COUNTS. -3 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 (/ONE_LINE (-1, -2)), a Unix ls-style listing - (/LONG (-l), /MEDIUM (-m), /SHORT (-s)), and a very detailed - analysis (/VERBOSE (-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/documents/casestudies/APPNOTE.TXT - - The table below shows some typical /LONG report entries: - - Perm/Prot Zver Ofs UncSize At CmpSize Cmth ModDate Mtime Name - ----------+----+---+-------+--+-------+----+---------------+---------- - -rw-a-- 3.1 fat 211916 tx 53467 defX 10-Jun-18 00:27 zip3/zip.c - -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 it/T.EXE;8 - - 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 created the archive. - - Field 3 (Ofs) shows the original operating system where the archive - was created, or the file system on which the member file was - stored. - - Field 4 (UncSize) 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 and/or an extra field - in the member data. - - | File Type Extra Field | - First char | binary text yes no | Second char - --------------+-------+----- ------+-----+-------------------- - 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-specific attribute - data, UTC times, and so on. - - Field 6 (CmpSize) shows the compressed file size. With /MEDIUM, - this field shows the compression fraction as a percentage. With - /SHORT (the default), this field is omitted. This compressed size - value (unlike the one in an "UNZIP /LIST" report) includes all the - overhead resulting from Traditional 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 - methods shown in the table below are supported. (Some are - obsolete.) - - Num Abbr Name, description - ----+----+------------------------------------------------------------ - 0 stor Store (no compression) - 1 shrk Shrink - 2 re:1 Reduce (factor 1) - 3 re:2 Reduce (factor 2) - 4 re:3 Reduce (factor 3) - 5 re:4 Reduce (factor 4) - 6 i#:# Implode (dictonary_size:Shannon-Fano_trees) - 7 tokn Tokenize - 8 def# Deflate (N: normal, X: maximum, F: fast, S: super-fast) - 9 d64# Deflate64 (N: normal, X: maximum, F: fast, S: super-fast) - 10 dcli PKWARE Data Compression Library Imploding - IBM TERSE (old) - 12 bzp2 bzip2 - 14 lzma LZMA - 18 ters IBM TERSE (new) - 19 lz77 IBM LZ77 z Architecture (PFS) - 96 jpeg JPEG - 97 wavp WavPack - 98 ppmd PPMd version I, Rev 1 - 99 aesw AES_WG encryption - - 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. -3 Environment_Options - ZipInfo's default behavior may be modified by placing Unix-style - command-line options in an environment variable. (The VMS CLI - translator acts only on the command line itself, not on the - environment variables.) This can be done with any option, but it is - probably most useful options like -T (/DECIMAL_TIME, decimal time - format) or one of the non-default Unix format options: -l (/LONG), - -m (/MEDIUM). - - For ZipInfo ("UNZIP /ZIPINFO", ZIPINFO), the environment variable - name on VMS is ZIPINFO_OPTS (non-VMS: ZIPINFO). For compatibility - 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 the - following (with quotation to preserve lower case in DCL): - - define ZIPINFO_OPTS "-l" ! Logical name, or - ZIPINFO_OPTS = "-l" ! DCL symbol. (Either works.) - - Environment options are treated the same as any other Unix-style - command-line options, except that they are effectively the first - options on the command line. Generally, the VMS CLI translator - will override an environment option if an explicit corresponding - VMS-style qualifier is specified. - - The examples show short (one-character) options, but long ("--") - options are also allowed. -3 Examples - 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 archive name as an argument to zipinfo: - - zipinfo zip31c.zip - zipinfo zip31c - - To produce a basic, long-format listing (not verbose), including - header and totals lines, use /LONG: - - zipinfo /long zip31c.zip - - To list the complete contents of the archive without header and - totals lines, either negate the /HEADER and /TOTALS qualifiers or - else specify the contents explicitly: - - zipinfo /noheader /nototals zip31c.zip - zipinfo zip31c.zip * - - (On a Unix system, the wildcard member name would typically need to - be quoted to keep a a Unix shell from expanding ("globbing") it. - This is not necessary on VMS. However, a name with a slash ("/") - character, such as "*/zip*.*", must be quoted. Otherwise, DCL may - interpret the slash as introducing a qualifier, causing unexpected - behavior or an "%CLI-W-IVQUAL, unrecognized qualifier" error.) - - To list information on a single archive member, in medium format, - specify the member name explicitly: - - zipinfo /medium unzip60.zip */unshrink.c - - On a VMS system, one could use /DECIMAL_TIME along with an external - sorting program to get a listing of files in the archive in - date-time order: - - pipe zipinfo /decimal_time /long /noheader /nototals zip31c.zip | - - sort sys$input sys$output /key = (position:47, size:15, descend) - - For a /LONG (-l) format report, the date-time field should begin at - position 47; for /MEDIUM (-m), 42; for /SHORT (-s), 38. HELP SORT - [/KEY] should lead to an explanation of the various SORT options. - (Unlike Unix, VMS does not include a useful "head" or "tail" - program.) - - 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 smallest-to-largest sort order. -3 Bugs - As with UnZip, ZipInfo's /PAGE (-M) 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 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. In addition, ZipInfo should detect the true - screen geometry on all systems. - - The interactions among the various listing format, header, and - trailer options (/HEADER, /LONG, /MEDIUM, /SHORT, /TOTALS) are - unnecessarily complex and should be simplified, despite the - potential disruption to current users. -3 URL - The Info-ZIP main Web page is: - http://www.info-zip.org/ - - FTP access is available, too: - ftp://ftp.info-zip.org/pub/infozip/ diff --git a/aes_wg/README_AES_WG.txt b/aes_wg/README_AES_WG.txt index ed838ae..54cb50a 100644 --- a/aes_wg/README_AES_WG.txt +++ b/aes_wg/README_AES_WG.txt @@ -60,9 +60,12 @@ the future. #include instead of "limits.h" in aes.h. + Changing some "long" types to "int" or "sha1_32t" in hmac.c and + hmac.h to accommodate systems (like Mac OS X on Intel) where a + 64-bit "long" type caused bad results. + Comments in the code identify the changes. (Look for "Info-ZIP".) The -original files are preserved in an "original_files" subdirectory, for -reference. +original files are preserved in an "orig" subdirectory, for reference. The name "IZ_AES_WG" (Info-ZIP AES WinZip/Gladman) is used by Info-ZIP to identify our implementation of WinZip AES encryption of Zip @@ -97,7 +100,7 @@ however, different UnZip and Zip versions may need particular IZ_AES_WG kit versions, so, before downloading a particular IZ_AES_WG source kit, it would be best to consult the INSTALL files in the UnZip and Zip source kits, and the the Version History section of the current version -of this document: +of this document: ftp://ftp.info-zip.org/pub/infozip/crypt/README_AES_WG.txt @@ -116,7 +119,7 @@ legally allowed to download and use this encryption software. Note that many of the servers that distribute Info-ZIP software are situated in the United States. See the latest version of file -USexport_AES_WG.msg for information regarding export from the US. +USexport_AES_WG.msg for information regarding export from the US. Downloads of Info-ZIP encryption software are subject to the limitations noted. @@ -142,21 +145,26 @@ it. IZ_AES_WG Version History ------------------------- + 1.4 2015-03-23 Changed "long" types to "int" for counters, and + to "sha1_32t" for apparent 32-bit byte groups, + where a 64-bit "long" type caused bad results (on + Mac OS X, Intel). (hmac.c, hmac.h) [SMS] 1.3 2013-11-18 Renamed USexport.msg to USexport_AES_WG.msg to distinguish it from the Traditional encryption - notice, USexport.msg. + notice, USexport.msg. [SMS] 1.2 2013-04-12 Avoid on __sun systems with - __sparc defined (for SunOS 4.x). + __sparc defined (for SunOS 4.x). (brg_endian.h) + [SMS] 1.1 2012-12-31 #include instead of "limits.h" in - aes.h (for VAX C). (SMS) - 1.0 2011-07-07 Minor documentation changes. (SMS, EG) + aes.h (for VAX C). [SMS] + 1.0 2011-07-07 Minor documentation changes. [SMS, EG] Compatible with UnZip 6.10 and Zip 3.1. US Department of Commerce BIS notified. - 0.5 2011-07-07 Minor documentation changes. (SMS, EG) + 0.5 2011-07-07 Minor documentation changes. [SMS, EG] Compatible with UnZip 6.10 and Zip 3.1. - 0.4 2011-06-25 Minor documentation changes. (SMS, EG) + 0.4 2011-06-25 Minor documentation changes. [SMS, EG] Compatible with UnZip 6.10 and Zip 3.1. - 0.3 2011-06-22 Initial beta version. (SMS, EG) - 0.2 2011-06-20 Minor documentation updates. (EG) - 0.1 2011-06-17 Initial alpha version. (SMS) + 0.3 2011-06-22 Initial beta version. [SMS, EG] + 0.2 2011-06-20 Minor documentation updates. [EG] + 0.1 2011-06-17 Initial alpha version. [SMS] diff --git a/crypt.c b/crypt.c index a1661c0..6c31847 100644 --- a/crypt.c +++ b/crypt.c @@ -1,5 +1,5 @@ /* - 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-2 or later (the contents of which are also included in zip.h) for terms of use. @@ -327,11 +327,11 @@ unsigned zfwrite(buf, item_size, nb) * Here, writing salt and password verification. */ void aes_crypthead( OFT( ZCONST uch *)salt, - OFT( uch) salt_len, + OFT( int) salt_len, OFT( ZCONST uch *)pwd_verifier) # ifdef NO_PROTO ZCONST uch *salt; - uch salt_len; + int salt_len; ZCONST uch *pwd_verifier; # endif /* def NO_PROTO */ { @@ -572,7 +572,7 @@ int zipcloak(z, passwd) # ifdef IZ_CRYPT_AES_WG # define HEAD_LEN head_len /* Variable header length. */ int head_len; /* Variable encryption header length. */ - uch salt_len = 0; /* AES salt length. (Init'd to hush cmplr.) */ + int salt_len = 0; /* AES salt length. (Init'd to hush cmplr.) */ # else /* def IZ_CRYPT_AES_WG */ # define HEAD_LEN RAND_HEAD_LEN /* Constant trad. header length. */ # endif /* def IZ_CRYPT_AES_WG [else] */ diff --git a/extract.c b/extract.c index 3e348e7..4a44faf 100644 --- a/extract.c +++ b/extract.c @@ -1438,7 +1438,7 @@ static int extract_dest_dir( __G) /* Return PK-type error code. */ # define UNKN_PPMD TRUE /* PPMd (98) unknown */ #endif -#ifdef USE_WAVP +#ifdef WAVP_SUPPORT # define UNKN_WAVP (G.crec.compression_method != WAVPACKED) #else # define UNKN_WAVP TRUE /* WavPack (97) unknown */ @@ -2162,6 +2162,7 @@ static int extract_test_trailer(__G__ n_fil, n_bad_pwd, n_skip, err_in_arch) #endif void action_msg( __G__ action, flag) + __GDEF char *action; int flag; /* 0: Name only; 1: Name + [type]. */ { @@ -2279,7 +2280,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (!uO.qflag) { - action_msg( "test", 0); + action_msg( __G__ "test", 0); } } else { #ifdef DLL @@ -2371,12 +2372,12 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #ifdef SYMLINKS if (G.symlnk) /* can also be deflated, but rarer... */ { - action_msg( "link", 0); + action_msg( __G__ "link", 0); } else #endif /* SYMLINKS */ { - action_msg( "extract", 1); + action_msg( __G__ "extract", 1); #ifdef ENABLE_USER_PROGRESS G.action_msg_str = "extract"; #endif /* def ENABLE_USER_PROGRESS */ @@ -2425,7 +2426,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( LoadFarStringSmall(Unshrink), 1); + action_msg( __G__ LoadFarStringSmall(Unshrink), 1); } } if ((r = unshrink(__G)) != PK_COOL) { @@ -2461,7 +2462,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( "unreduc", 1); + action_msg( __G__ "unreduc", 1); } } if ((r = unreduce(__G)) != PK_COOL) { @@ -2480,7 +2481,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( "explod", 1); + action_msg( __G__ "explod", 1); } } if ((r = explode(__G)) != 0) { @@ -2540,7 +2541,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( "inflat", 1); + action_msg( __G__ "inflat", 1); } } @@ -2581,7 +2582,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( "bunzipp", 1); + action_msg( __G__ "bunzipp", 1); } } @@ -2617,7 +2618,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( "unLZMA", 1); + action_msg( __G__ "unLZMA", 1); } } @@ -2653,7 +2654,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ #endif /* def ENABLE_USER_PROGRESS */ if (QCOND2) { - action_msg( "unPPMd", 1); + action_msg( __G__ "unPPMd", 1); } } @@ -4114,7 +4115,7 @@ int extract_or_test_stream( __G) /* Return PK-type error code. */ /* Set the Java CAFE flag by the first extra field found. */ if (uO.java_cafe == 0) { - ef_scan_for_cafe( G.extra_field, + ef_scan_for_cafe( __G__ G.extra_field, (long)G.lrec.extra_field_length); } } /* if (error == PK_OK) */ @@ -4375,7 +4376,7 @@ int extract_or_test_stream( __G) /* Return PK-type error code. */ if (error > error_in_archive) error_in_archive = error; - error_in_archive = extract_test_trailer( (ulg)members_processed, + error_in_archive = extract_test_trailer( __G__ (ulg)members_processed, num_bad_pwd, num_skipped, error_in_archive); return error; @@ -4388,6 +4389,7 @@ int extract_or_test_stream( __G) /* Return PK-type error code. */ /* Function close_segment(). */ /*******************************/ static void close_segment(__G) + __GDEF { if (G.zipfn_sgmnt != NULL) { @@ -4428,9 +4430,9 @@ static int find_local_header( __G__ perr_in_arch, filnum, pold_extra_bytes) if (!fd_is_valid(G.zipfd_sgmnt) || G.sgmnt_nr != G.pInfo->diskstart) { if (fd_is_valid(G.zipfd_sgmnt)) - close_segment(); /* We need a different file. */ + close_segment( __G); /* We need a different file. */ - set_zipfn_sgmnt_name(G.pInfo->diskstart); + set_zipfn_sgmnt_name( __G__ G.pInfo->diskstart); if (open_infile( __G__ OIF_SEGMENT)) { /* TODO: ask for place/path of zipfile, see wild*!, ... */ @@ -4479,7 +4481,7 @@ static int find_local_header( __G__ perr_in_arch, filnum, pold_extra_bytes) if (request < 0) { Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), - 1, G.zipfn, LoadFarString(ReportMsg))); + G.zipfn, 1, LoadFarString(ReportMsg))); *perr_in_arch = PK_ERR; if (filnum == 1 && G.extra_bytes != 0L) { @@ -4502,7 +4504,7 @@ static int find_local_header( __G__ perr_in_arch, filnum, pold_extra_bytes) "debug: recompensated request still < 0\n")); Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), - G.zipfn, LoadFarString(ReportMsg))); + G.zipfn, 2, LoadFarString(ReportMsg))); error = *perr_in_arch = PK_BADERR; /* Error. Skip this member. */ } } @@ -4706,7 +4708,8 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, #endif /* Find the local header for this member. */ - error = find_local_header( &error_in_archive, + error = find_local_header( __G__ + &error_in_archive, *pfilnum, pold_extra_bytes); @@ -4974,7 +4977,7 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, (*G.statreportcb)(__G__ UZ_ST_START_EXTRACT, G.zipfn, G.filename, NULL)) { - close_segment(); + close_segment( __G); return IZ_CTRLC; /* Cancel operation by user request. */ } #endif @@ -4997,7 +5000,7 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, #endif ) { - close_segment(); + close_segment( __G); return error_in_archive; /* (unless disk full) */ } } @@ -5006,7 +5009,7 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, G.filename, (zvoid *)&G.lrec.ucsize)) { - close_segment(); + close_segment( __G); return IZ_CTRLC; /* Cancel operation by user request. */ } #endif @@ -5015,7 +5018,7 @@ static int extract_or_test_entrylist(__G__ mbr_ndx, #endif } /* end for-loop (i: files in current block) */ - close_segment(); + close_segment( __G); return error_in_archive; } /* extract_or_test_entrylist(). */ @@ -5064,7 +5067,8 @@ static int extract_or_test_entrylistw(__G__ mbr_ndx, # endif /* Find the local header for this member. */ - error = find_local_header( &error_in_archive, + error = find_local_header( __G__ + &error_in_archive, *pfilnum, pold_extra_bytes); @@ -5304,7 +5308,7 @@ static int extract_or_test_entrylistw(__G__ mbr_ndx, (*G.statreportcb)(__G__ UZ_ST_START_EXTRACT, G.zipfn, G.filename, NULL)) { - close_segment(); + close_segment( __G); return IZ_CTRLC; /* Cancel operation by user request. */ } # endif @@ -5320,7 +5324,7 @@ static int extract_or_test_entrylistw(__G__ mbr_ndx, # endif ) { - close_segment(); + close_segment( __G); return error_in_archive; /* (unless disk full) */ } } @@ -5329,13 +5333,13 @@ static int extract_or_test_entrylistw(__G__ mbr_ndx, (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, G.filename, (zvoid *)&G.lrec.ucsize)) { - close_segment(); + close_segment( __G); return IZ_CTRLC; /* Cancel operation by user request. */ } # endif } /* end for-loop (i: files in current block) */ - close_segment(); + close_segment( __G); return error_in_archive; } /* extract_or_test_entrylistw(). */ @@ -5542,7 +5546,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ else if (uO.java_cafe == 0) { /* Set the Java CAFE flag by the first extra field found. */ - ef_scan_for_cafe( G.extra_field, + ef_scan_for_cafe( __G__ G.extra_field, (long)G.crec.extra_field_length); } @@ -5767,7 +5771,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ } #endif /* ndef SFX */ - error_in_archive = extract_test_trailer( filnum, + error_in_archive = extract_test_trailer( __G__ filnum, num_bad_pwd, num_skipped, error_in_archive); return error_in_archive; @@ -6658,7 +6662,7 @@ uzlzma_cleanup_exit: /* Advance the global input pointer to past the used data. */ G.inptr = next_in+ in_buf_size_len; - G.incnt = avail_in; + G.incnt = (int)avail_in; return sts; } /* UZlzma(). */ diff --git a/fileio.c b/fileio.c index 5474e04..05e790f 100644 --- a/fileio.c +++ b/fileio.c @@ -278,7 +278,7 @@ int open_infile(__G__ which) *pfd = open( fn, 0); # else /* def MACOS */ # ifdef CMS_MVS - *pfd = vmmvs_open_infile(__G fn, pfd); + *pfd = vmmvs_open_infile(__G__ fn, pfd); # else /* def CMS_MVS */ if (G.zipstdin) { @@ -320,17 +320,16 @@ int close_infile( __G__ pfd) __GDEF zipfd_t *pfd; { - int sts; + int sts = 0; if (fd_is_valid( *pfd)) { #ifdef USE_STRM_INPUT sts = fclose( *pfd); - *pfd = NULL; #else /* def USE_STRM_INPUT */ sts = close( *pfd); - *pfd = -1; #endif /* def USE_STRM_INPUT [else] */ + *pfd = ZIPFD_INVALID; } return sts; @@ -360,7 +359,7 @@ int set_zipfn_sgmnt_name( __G__ sgmnt_nr) if (G.zipfn_sgmnt == NULL) { - G.zipfn_sgmnt_size = strlen(G.zipfn)+ SGMNT_NAME_BOOST; + G.zipfn_sgmnt_size = (int)strlen(G.zipfn)+ SGMNT_NAME_BOOST; if ((G.zipfn_sgmnt = izu_malloc(G.zipfn_sgmnt_size)) == NULL) { G.zipfn_sgmnt_size = -1; @@ -371,7 +370,7 @@ int set_zipfn_sgmnt_name( __G__ sgmnt_nr) { if (G.zipfn_sgmnt_size < (int)strlen(G.zipfn)+ SGMNT_NAME_BOOST) { - G.zipfn_sgmnt_size = strlen(G.zipfn)+ SGMNT_NAME_BOOST; + G.zipfn_sgmnt_size = (int)strlen(G.zipfn)+ SGMNT_NAME_BOOST; izu_free(G.zipfn_sgmnt); if ((G.zipfn_sgmnt = izu_malloc(G.zipfn_sgmnt_size)) == NULL) { @@ -447,16 +446,16 @@ int open_infile_sgmnt(__G__ movement) zipfd_sgmnt = G.zipfd_sgmnt; /* Set the new segment file name. */ - if (set_zipfn_sgmnt_name(G.sgmnt_nr+ movement)) + if (set_zipfn_sgmnt_name( __G__ G.sgmnt_nr+ movement)) return 1; - if (open_infile( __G OIF_SEGMENT)) + if (open_infile( __G__ OIF_SEGMENT)) { /* TODO: ask for input and try it again */ /* error, load back old zipfn (it shouldn't be frequently) */ if (fd_is_valid(zipfd_sgmnt)) { - set_zipfn_sgmnt_name(G.sgmnt_nr); + set_zipfn_sgmnt_name( __G__ G.sgmnt_nr); } else { @@ -906,7 +905,7 @@ unsigned readbuf(__G__ buf, size) /* return number of bytes read into buf */ /*if(fd_is_valid(G.zipfd_sgmnt)) {*/ if (G.ecrec.number_this_disk > 0) { - if ((open_infile_sgmnt( 1) != 0) || + if ((open_infile_sgmnt( __G__ 1) != 0) || (G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0) return (n-size); /* Return short retry size. */ } else @@ -964,7 +963,7 @@ int readbyte(__G) /* refill inbuf and return a byte if available, else EOF */ /* if(fd_is_valid(G.zipfd_sgmnt)) { */ if (G.ecrec.number_this_disk > 0) { - if ((open_infile_sgmnt( 1) != 0) || + if ((open_infile_sgmnt( __G__ 1) != 0) || (G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0) return EOF; } else @@ -1122,7 +1121,7 @@ int seek_zipf(__G__ abs_offset) if (request < 0) { Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), - 2, G.zipfn, LoadFarString(ReportMsg))); + G.zipfn, 11, LoadFarString(ReportMsg))); return PK_BADERR; } #endif /* 0 */ /* Pre-segment-support. */ @@ -1131,10 +1130,10 @@ int seek_zipf(__G__ abs_offset) { if (G.sgmnt_size == 0) { - if ((G.sgmnt_nr == 0) || open_infile_sgmnt(-1)) + if ((G.sgmnt_nr == 0) || open_infile_sgmnt( __G__ -1)) { Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), - 3, G.zipfn, LoadFarString(ReportMsg))); + G.zipfn, 12, LoadFarString(ReportMsg))); return PK_BADERR; } /* Get the new segment size, and calculate the new offset. @@ -1163,10 +1162,10 @@ int seek_zipf(__G__ abs_offset) request += G.sgmnt_size; } /* for same as actual disk (movement == 0) return 0 */ - if (open_infile_sgmnt(tmp_disk - G.sgmnt_nr)) + if (open_infile_sgmnt( __G__ (tmp_disk- G.sgmnt_nr))) { Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), - 4, G.zipfn, LoadFarString(ReportMsg))); + G.zipfn, 13, LoadFarString(ReportMsg))); return PK_BADERR; } } @@ -1213,7 +1212,7 @@ int seek_zipf(__G__ abs_offset) { int tmp; - if (open_infile_sgmnt(1)) + if (open_infile_sgmnt( __G__ 1)) return PK_EOF; /*TODO: Add some new return code? */ /* append rest of data to buffer - it's important when we are only diff --git a/globals.c b/globals.c index eebc3e8..128ebc2 100644 --- a/globals.c +++ b/globals.c @@ -195,6 +195,9 @@ Uz_Globs *globalsCtor() G.mpause = UzpMorePause; #endif G.decr_passwd = UzpPassword; + G.zipfn_sgmnt = NULL; /* Archive segment name */ + G.zipfn_sgmnt_size = 0; /* Archive segment size */ + G.zipfd_sgmnt = ZIPFD_INVALID; /* Archive segment file descr/pntr */ #endif /* !FUNZIP */ G.query_fp = stdin; /* Change to terminal if streaming archive. */ diff --git a/process.c b/process.c index beabdb0..ba7adad 100644 --- a/process.c +++ b/process.c @@ -1484,7 +1484,8 @@ static int extract_archive( __G__ lastchance) /* Return PK-type error code. */ # define ANS ((char *)(slide + (extent)(WSIZE>> 1))) -static int check_auto_dest_dir() +static int check_auto_dest_dir( __G) + __GDEF { int error_auto_dest = 0; @@ -2017,7 +2018,7 @@ int process_zipfiles(__G) /* return PK-type error code */ want_blank = 1; /* Check auto destination directory. */ - if (check_auto_dest_dir() != 0) + if (check_auto_dest_dir( __G) != 0) { /* Bad auto dest dir. Don't process archive. */ error = IZ_BADDEST; diff --git a/sgmnt.txt b/sgmnt.txt deleted file mode 100644 index f792f6b..0000000 --- a/sgmnt.txt +++ /dev/null @@ -1,57 +0,0 @@ - - globals.h: - -char *zipfn_part; char *zipfn_sgmnt -int zipfn_part_size; int zipfn_sgmnt_size -zuvl_t actual_disknumber; zuvl_t sgmnt_nr -ulg zipfd_part_size; z_uint4 sgmnt_size - # ifdef USE_STRM_INPUT -FILE *zipfd_part; FILE *zipfd_sgmnt - # else -int zipfd_part; int zipfd_sgmnt - - - - unzpriv.h - -# define CLOSE_PART_INFILE() CLOSE_INFILE_SGMNT() - close_part_infile(__G) close_infile_sgmnt(__G) - -# define CLOSE_INFILE() CLOSE_INFILE() - close_input_file(__G) close_infile(__G) - -# define CLOSE_PART_INFILE() CLOSE_INFILE_SGMNT() - close_input_part_file(__G) close_infile_sgmnt(__G) - - Move [.zos]vmmvs.c:close_infile() code up to fileio.c. - Move close_infile() prototype out of CMS_MVS block. - - -int open_input_part_file OF((__GPRO)); open_infile_sgmnt - -void close_input_file OF((__GPRO)); close_infile -void close_input_part_file OF((__GPRO)); close_infile_sgmnt - -int open_next_input_part_file OF((__GPRO__ int movement)); - open_infile_sgmnt - -int set_zipfn_part_name OF((__GPRO__ zuvl_t disknum)); - set_zipfn_sgmnt_name - -FILE *vmmvs_open_part_infile OF((__GPRO)); vmmvs_open_infile_sgmnt -void close_part_infile OF((__GPRO)); vmmvs_close_infile_sgmnt ??? - -open_input_file() open_infile - - extract.c - -close_segment() - - - fileio.c - -Need CLOSE_INFILE - CLOSE_INFILE_SGMNT - OPEN_INFILE - OPEN_INFILE_SGMNT - SET_ZIPFN_SGMNT_NAME diff --git a/unzpriv.h b/unzpriv.h index c1f217b..67ae0e2 100644 --- a/unzpriv.h +++ b/unzpriv.h @@ -3202,12 +3202,14 @@ char *GetLoadPath OF((__GPRO)); /* local */ # define zlseek(fd,o,w) zfseeko((FILE *)(fd),(o),(w)) # define close(fd) fclose((FILE *)(fd)) # define fd_is_valid(fd) (fd != NULL) +# define ZIPFD_INVALID NULL #else /* def USE_STRM_INPUT */ # ifdef _WIN32_WCE /* Really necessary? */ # define fd_is_valid(fd) (fd != -1) # else /* def _WIN32_WCE [else] */ # define fd_is_valid(fd) (fd >= 0) # endif /* def _WIN32_WCE [else] */ +# define ZIPFD_INVALID (-1) #endif /* def USE_STRM_INPUT [else] */ /* The return value of the Info() "macro function" is never checked in diff --git a/unzvers.h b/unzvers.h index 1b006b9..ffe8e69 100644 --- a/unzvers.h +++ b/unzvers.h @@ -22,8 +22,8 @@ # endif # ifdef BETA -# define UZ_BETALEVEL "c17s BETA" -# define UZ_VERSION_DATE "2015-03-18" /* Internal beta version. */ +# define UZ_BETALEVEL "c18 BETA" +# define UZ_VERSION_DATE "2015-03-28" /* Internal beta version. */ # else # define UZ_BETALEVEL "" # define UZ_VERSION_DATE "2015-??-??" /* Official release version. */ @@ -38,7 +38,7 @@ # define UZ_PATCHLEVEL 0 -# define UZ_VER_STRING "6.10c17s" /* Keep in sync with Version numbers! */ +# define UZ_VER_STRING "6.10c18" /* Keep in sync with Version numbers! */ # ifndef IZ_COMPANY_NAME # define IZ_COMPANY_NAME "Info-ZIP" diff --git a/vms/UNZIP_CLI.RNH b/vms/UNZIP_CLI.RNH deleted file mode 100755 index 06b768e..0000000 --- a/vms/UNZIP_CLI.RNH +++ /dev/null @@ -1,1792 +0,0 @@ -.! -.! File: UNZIP_CLI.HELP -.! -.! Author: Hunter Goatley -.! -.! Date: 12 Jul 94 (orig. UNZIP.RNH, 23 Oct 91) -.! -.!---------------------------------------------------------------------- -.! Copyright (c) 1991-2014 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, -.! for some reason, all these files are missing, the Info-ZIP license -.! may also be found at: ftp://ftp.info-zip.org/pub/infozip/license.html -.!---------------------------------------------------------------------- -.! -.! Description: -.! -.! TPU-processable source file to produce VMS on-line help for -.! portable UnZip. Adapted from UNZIP.RNH, originally based on -.! UNZIP.MAN (now UNZIP.TXT). -.! -.! To build: -.! $ EDIT /TPU/NOSECTION/NODISPLAY/COMMAND=CVTHELP.TPU UNZIP_CLI.HELP -.! $ RUNOFF /OUT=UNZIP.HLP UNZIP_CLI.RNH -.! $ LIBR /HELP/INSERT libr UNZIP -.! -.! Modification history: -.! -.! 02-001 Hunter Goatley 12-JUL-1994 16:59 -.! Genesis. -.! 02-002 Cave Newt 14-JUL-1994 11:36 -.! Fixed /*TEXT options and added/removed various options. -.! 02-003 Cave Newt 28-JUL-1994 08:54 -.! Removed semicolons from comments and moved /ZIPINFO. -.! 02-004 Christian Spieler 06-OCT-1995 02:02 -.! Changed to conform to revised .CLD definition. -.! 02-005 Christian Spieler 06-FEB-1996 02:20 -.! Added description of /HELP qualifier. -.! 02-006 Christian Spieler 12-MAY-1996 00:50 -.! Some clarifications/cleanups. -.! 02-007 Christian Spieler 04-MAR-1997 22:25 -.! Added /[NO]CASE_INSENSITIVE to ZipInfo mode; -.! documented the new /PASSWORD="decryption_key" option. -.! 02-007 Christian Spieler 22-JUL-1997 22:37 -.! Formatting changes (prevent line wraps); -.! added "Exit_Codes" subtopic (no version number change). -.! 02-007 Christian Spieler 28-APR-2000 03:22 -.! Changed references to plaintext UnZip documentation file -.! into UNZIP.TXT (no version number change). -.! 02-007 Hunter Goatley 07-Feb-2001 15:43 -.! Reformatted qualifier item headers to show negated form of -.! option qualifier on separate line (no version number change). -.! 02-008 Christian Spieler 18-Apr-2001 22:29 -.! Added description for extended functionality of -b option. -.! 02-009 Christian Spieler 10-Dec-2001 13:37 -.! Added description for new /TRAVERSE_DIRS option. -.! 02-010 Steven Schweda 28-Jan-2005 16:16:36 -.! Added /TIMESTAMP (-T) qualifier. -.! 02-010 Christian Spieler 29-Jan-2005 01:50 -.! Completed description of -T qualifier (also for UNIX style). -.! 02-011 Steven Schweda 14-FEB-2005 20:04 -.! Added /DOT_VERSION (-Y) and /ODS2 (-2) qualifiers. -.! 02-012 Steven Schweda 07-JUL-2006 01:30 -.! Added /TEXT = STMLF (-s) qualifier. -.! 02-012 Christian Spieler 04-Mar-2007 14:39 -.! Changed -s qualifier into -S; -.! updated documentation of UnZip's exit codes. -.! 03-002 S. Schweda, C. Spieler 09-Jan-2008 03:35 -.! Added documentation of extended /RESTORE=(...) qualifier. -.! 03-003 S. Schweda, C. Spieler 13-Sep-2008 20:00 -.! Added /EXISTING qualifier. -.! 03-004 S. Schweda 30-JUL-2010 22:00 -.! Added /CASE_MATCH qualifier, replacing -.! /[NO]CASE_INSENSITIVE (with something less confusing, -.! and more like existing DCL). -.! 03-005 S. Schweda 06-AUG-2011 15:00 -.! Added /LICENSE qualifier. -.! 03-006 S. Schweda 11-AUG-2011 20:00 -.! Added /NAMES qualifier. -.! 03-007 S. Schweda 14-OCT-2011 20:00 -.! Restored but deprecated /[NO]CASE_INSENSITIVE. Changed -.! /CASE_MATCH to /MATCH = CASE, Added /MATCH = -.! [NO]WILD_MATCH_SLASH) for "-W". Restored but deprecated -.! /BRIEF and /FULL. Added Zip-like /VERBOSE=MORE as the -.! replacement. -.! -.noflags;.lm3;.rm70 -.!------------------------------------------------------ -.indent-3 -1 UNZIP -.br -UnZip lists, tests, or extracts files from a ZIP archive (an archive -format commonly used on many different systems). The default behavior -(with no options) is to extract into the current directory (and -subdirectories below it) all files from the specified ZIP archive. A -companion program, Zip, creates ZIP archives. -.sk -Info-ZIP UnZip and Zip were intended to be compatible with archives -created by PKWARE's PKZIP and PKUNZIP programs (originally for MS-DOS), -but in many cases the program options or default behaviors -differ. Nowadays, many other programs are available which work with ZIP -archives. -.sk -This help file describes the VMS CLI edition of UnZip. A Unix-style -command-line edition is also available, with a separate help file. -.sk -The VMS CLI edition of UnZip adds a command-line translator to the -normal UnZip program. This translator transforms a set of VMS-style -qualifiers and parameters into an equivalent set of Unix-style options -and parameters, and then passes those transformed arguments to UnZip's -standard Unix-style command-line processor. The documentation often -shows the related Unix-style options in parentheses after a VMS-style -qualifier. For example: /HELP (-h, -hh). -.sk -Format: -.sk;.indent2 -UNZIP [/unzip_qualifiers] [file[.zip]] [member [,...]] -.sk;.indent2 -UNZIP /ZIPINFO [/zipinfo_qualifiers] [file[.zip]] [member [,...]] -.sk;.indent2 -ZIPINFO [/zipinfo_qualifiers] [file[.zip]] [member [,...]] -.sk -To display the basic built-in help, use the command: -.sk;.indent2 - UNZIP /HELP -.sk -To display the extended built-in help, use the command: -.sk;.indent2 - UNZIP /HELP=EXTENDED -.sk -The built-in help may be more current than this help file, especially -between full product releases. -.sk -The VMS CLI edition of the program can also provide built-in help on the -Unix-style command-line edition; just use the "-h" or "-hh" options. -.! -.!------------------------------------------------------ -.indent-3 -2 Command_Parameters -.br -.indent-2 -file[.zip] -.sk -.lm+3 -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 directory/file specification may be -used: "...", "*", or "%" (or, since VMS V7.2, "?"). The default archive -file specification is ".ZIP". -.sk -Note that a ".zip" or ".ZIP" file type 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 with its actual name -ending (if any), whatever that may be. -.lm-3 -.sk -.indent-2 -member [,...] -.sk -.lm+3 -An optional list of archive members to be processed, separated by -commas. If no member list is specified, then all archive members are -processed. Unix-like ("globbing") wildcard patterns may be used to -match multiple members: -.sk -.lm+4;.literal -* Matches a sequence of 0 or more characters. -? 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 ("!") - or a caret ("^") follows the left bracket, then the - range 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, use the three-character sequence "[[]". -.end literal;.lm-4 -.lm-3 -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Qualifiers_Primary_mode -.br -Qualifiers in this group specify the primary mode of operation of -UnZip. Only one of these primary mode qualifiers may be specified. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /COMMENT (-z) -.br -Primary mode. Display only the archive comment. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /FRESHEN (-f) -.br -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 /EXISTING -(-o) option may be used to suppress the queries. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /HELP (-h, -hh) -.br -/HELP [=NORMAL] -.br -/HELP=EXTENDED -.sk -Primary Mode. Display brief (roughly 24 lines) usage instructions -(NORMAL, the default), or EXTENDED help (more complete usage -instructions). -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /LICENSE (--license) -.br -Primary Mode. Display the Info-ZIP license. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /LIST (-l) -.br -Primary Mode. List archive members. By default, a brief format is -used, which includes the following items: member name, uncompressed -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. Specifying a member list -limits the report to those members. -.sk -Adding /VERBOSE to an "UNZIP /LIST" command line adds the following -items to the report: compression method, compressed size ("Size"), -compression ratio, and 32-bit CRC. -.sk -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 archive members is reported -by the more verbose ZipInfo reports. See ZipInfo. -.sk -If UnZip was built with OS2_EAS enabled, then the /LIST report also -includes the sizes of stored OS/2 extended attributes (EAs) and OS/2 -access control lists (ACLs). In addition, the archive comment and -individual member comments (if any) are displayed. -.sk -If a file was archived from a single-case file system (for example, the -old MS-DOS FAT file system) and the /NAMES=DOWNCASE option was given, -the filename is converted to lowercase and is shown prefixed with a -caret (^). -.sk -Note: If only /VERBOSE is specified with an archive name, then -UnZip acts as if "/LIST /VERBOSE" were specified, and a detailed listing -is generated. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /PIPE (-p) -.br -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 /SCREEN (-c), and the files are -always extracted in binary format, just as they are stored (no -conversions). See also /SCREEN. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /SCREEN (-c) -.br -Primary Mode. Extract files to stdout/screen. This option is similar -to the /PIPE (-p) option except that the name of each file is displayed -as it is extracted, and the /TEXT (-a) option is allowed, which can -provide automatic ASCII-EBCDIC conversion, where appropriate. See also -/PIPE. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /TEST (-t) -.br -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 (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. -.sk -Adding /VERBOSE (-v) to /TEST adds some diagnostic information to the -report for archive members with LZMA or PPMd compression. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /TIMESTAMP (-T) -.br -Primary Mode. Set the timestamp on the archive(s) to that of the newest -file in each one. This corresponds to Zip's /APPEND /LATEST (-go) -option, except that it can be used on wildcard archives (for example, -"unzip -T *.zip"), and is much faster. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /UPDATE (-u) -.br -Primary mode. Update existing files and create new ones if -needed. This mode performs the same function as the Freshen (/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. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /VERBOSE (-v) -.br -.sk -Primary mode (when alone) or option. When used as a primary mode -(alone), and no archive is specified, an "UNZIP /VERBOSE" command -generates a report showing the program version, build options, and -relevant envrironment variables. -.sk -When used with some other primary mode option, /VERBOSE can make output -more verbose (detailed). -.sk -If no other primary mode is specified, and an archive is specified, then -UnZip acts as if "/LIST /VERBOSE" were specified, and a detailed listing -is generated. See Qualifiers_Primary_mode, particularly /LIST. -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Qualifiers_Ordinary -.br -Qualifiers in this group modify the operation of UnZip. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /AUTO_DIRECTORY (-da) -.br -/NOAUTO_DIRECTORY (default) -.br -/AUTO_DIRECTORY[=REUSE] -.sk -Specifies a destination directory for extracted files which is derived -from the base name of the archive. By default, files are extracted -(and subdirectories created) in the current default directory. With -/AUTO_DIRECTORY, UnZip automatically derives a subdirectory -name from the archive name, creates that subdirectory, and extracts -files into that subdirectory. -.sk -For example, with /AUTO_DIRECTORY, extraction of "fred.zip" is done into -subdirectory "[.fred]" instead of into the current directory. (On -non-VMS systems, subdirectory "fred".) -.sk -Using this option can help to avoid cluttering the current directory -with files extracted from an archive whose structure does not include a -top-level directory. -.sk -If -da is specified as a default option in an environment -variable, it can be overridden by either a /NOAUTO_DIRECTORY qualifier -or an explicit /DIRECTORY=dest_dir qualifier. See also /DIRECTORY. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /BINARY (-b, -bb) -.br -/BINARY[=keyword] -.br -.literal -/NOBINARY (Default.) -.end literal -.sk -Selects the file record format used when extracting binary files. -.sk -The optional keywords are: -.sk -.lm+4;.literal -ALL Extract all files with fixed-length, 512-byte record - format. (-bb) -AUTO Extract binary files with fixed-length, 512-byte - record format. (Default value keyword: "/BINARY" is - equivalent to "/BINARY=AUTO".) (-b) -NONE Same as /NOBINARY. Extract binary files with - Stream_LF record format. (Default condition.) -.end literal;.lm-4 -.sk -Zip (or a similar archiving program) identifies files as "binary" -or "text" when they are archived. (A short-format ZipInfo report -denotes a binary file with a "b", and a text file with a "t".) -.! Zip's -.! identification of text files may not be perfect, so UnZip prints -.! "[binary]" or "[text]" as a visual check for each file it extracts with -.! /BINARY. /BINARY=ALL forces all files to be extracted (and converted) -.! as binary, regardless of the supposed file type. -.sk -[VMS] On VMS, for archives with VMS attribute information (made with -"zip -V", "ZIP /VMS"), files are always created with their original -record formats. For archives without VMS attribute information (not -made with "zip -V", "ZIP /VMS"), files are normally created with -Stream_LF record format. With /BINARY[=AUTO], binary files are created -with fixed-length, 512-byte record format. With /BINARY=ALL, all files -are created with fixed-length, 512-byte record format. When extracting -to standard output (/PIPE or /SCREEN in effect), the default conversion -of text record delimiters is disabled for binary files (with -/BINARY[=AUTO]), or for all files (with /BINARY=ALL). -.sk -/BINARY may conflict or interact with /TEXT. A combination of -/BINARY[=AUTO] and /TEXT[=AUTO] is allowed. (See /TEXT.) -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /BRIEF -.br -Deprecated. Ignored. A no-op place-holder, originally intended as an -opposite of /FULL (also deprecated). See Qualifiers_Primary_mode, -particularly /LIST and /VERBOSE. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /CASE_INSENSITIVE (-C) -.br -/CASE_INSENSITIVE -.br -/NOCASE_INSENSITIVE (default) -.sk -Deprecated. Use /MATCH=CASE. -.sk -With /CASE_INSENSITIVE, match member names case-blindly. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /DIRECTORY (-d) -.br -/DIRECTORY=dest_dir -.sk -Specifies a destination directory for extracted files. By default, -files are extracted (and subdirectories created) in the current default -directory. With "/DIRECTORY=dest_dir", extraction is done into the -specified directory, instead. -.sk -[VMS] On VMS, only a VMS-style device:[directory] specification is -permitted. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /DOT_VERSION (-Y) -.br -[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: -.sk -.lm+4;.literal -"a.b.3" -> "a.b;3" -.end literal;.lm-4 -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /EXCLUDE (-x) -.br -/EXCLUDE=(member [,...]) -.sk -An optional list of archive members to be excluded from -processing. Because wildcard characters normally match "/" directory -separators (for exceptions see /MATCH=[NO]WILD_MATCH_SLASH (-W)), this -option may be used to exclude any files that are in subdirectories. For -example, -.lm+4;.literal -UNZIP foo *.[ch] /EXCLUDE = */* -.end literal;.lm-4 -would extract all C source files (*.c, *.h) in the main directory, but -none in any subdirectories. Without the /EXCLUDE option, all C source -files in all directories within the archive would be extracted. -.sk -Note that archive members are specified using the Unix-style names which -are used in ZIP archives, not VMS-style names. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /EXISTING (-n, -o) -.br -/EXISTING[=keyword] -.br -.sk -Specifies the action when extracting files, and a file already exists. -.sk -The optional keywords are: -.sk -.lm+4;.literal -NEW_VERSION Create a new version of an existing file. (-o) -OVERWRITE Overwrite an existing file. (-oo) -NOEXTRACT Do not extract. Leave an existing file intact. (-n) -.end literal;.lm-4 -.sk -By default, UnZip queries the user before extracting any file that -already exists. -.sk -[Non-VMS] On non-VMS systems, the user may choose to overwrite only the -current file, overwrite all files, skip extraction of the current file, -skip extraction of all existing files, or rename the current file -(choose a new name for the extracted file). -.sk -[VMS] On VMS, the usual query choices are to create a new version of an -existing file, to skip extraction, or to rename the current file. In -the case where an archive member name includes a version number, and -/VERSION (-V, "retain VMS file version numbers") is in effect, then an -additional query choice is offered: to overwrite the existing file. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /FULL (-v) -.br -/FULL -.br -/FULL=DIAGNOSTICS -.sk -Deprecated. Adds detail to a /LIST report. See -Qualifiers_Primary_mode, particularly /LIST and /VERBOSE, and -Qualifiers_Ordinary, particularly /VERBOSE. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /JAR (--jar) -.br -Treat archive(s) as Java JAR. Over-simplification in Java JAR archives -can cause UnZip to transform UTF-8 file names according to -inappropriate (MS-DOS) rules, yielding corrupt names on extracted files -(typically those with ASCII codes 128-255). Archives containing a Java -"CAFE" extra field should be detected automatically, and handled -correctly, but not all JAR archives include that extra -field. Specifying /JAR tells UnZip to expect UTF-8 file names, -regardless of whether the archive contains a "CAFE" extra field. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /JUNK_DIRS (-j) -.literal -/NOJUNK_DIRS (Default.) -.end literal -/JUNK_DIRS[=depth] -.sk -Junk directories on extracted files. With /JUNK_DIRS, all directory -information is stripped from an archive member name, so all files are -extracted into the destination directory. (See also /DIRECTORY.) -.sk -If a depth ("=depth", where "depth" is a positive integer) is specified, -then that number of directory levels will be stripped from an archive -member name. For example, an archive member like "a/b/c/d/ee.txt" would -normally be extracted as "[.a.b.c.d]ee.txt". With /JUNK_DIRS, it would -be extracted as "ee.txt". With /JUNK_DIRS=2, the first two directory -levels would be stripped, so it would be extracted as "[.c.d]ee.txt". -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /LOWERCASE (-L) -.br -/[NO]LOWERCASE -.sk -Deprecated. Use /NAMES=[NO]DOWNCASE. -.sk -/LOWERCASE: Convert to lowercase any filename originating on an -uppercase-only operating system or file system. -.sk -/NOLOWERCASE: Do not convert to lowercase any filename originating on an -uppercase-only operating system or file system. -.sk -See also /UPPERCASE, which is also deprecated. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /MATCH (-C, -W) -.br -/MATCH=(keyword, ...) -.sk -Specifies name-matching behavior for names in the member list and -the /EXCLUDE excluded-member list on the command line. -.sk -The optional keywords and values are: -.sk -.lm+4;.literal -CASE=BLIND Name matching is case-insensitive. (-C) -CASE=SENSITIVE Name matching is case-sensitive. (Default.) -.end literal;.lm-4 -.sk -By default, case-sensitive matching is done. For example, specifying -"makefile" on the command line will match only "makefile" in -the archive, not "Makefile" or "MAKEFILE". On many systems, the local -file system is case-insensitive, so case-insensitive name matching would -be more natural. With /MATCH=CASE=BLIND, "makefile" would match -"makefile", "Makefile", or "MAKEFILE". -.sk -/MATCH does not affect the search for the ZIP archive file(s), nor the -matching of archive members to existing files on the extraction -path. So, on a case-sensitive file system, UnZip will never try to -overwrite a file "FOO" when extracting a member named "foo"! -.sk -[WILD_STOP_AT_DIR] If the C macro WILD_STOP_AT_DIR is defined at build -time, then an additional keyword is allowed: -.sk -.lm+4;.literal -NOWILD_MATCH_SLASH Wildcards stop at directory slash. (-W) -WILD_MATCH_SLASH Wildcards match directory slash. (Default.) -.end literal;.lm-4 -.sk -By default, the wildcard characters "?" (single-character wildcard) and -"*" (multi-character wildcard) match any character in a member -path/name. /MATCH=NOWILD_MATCH_SLASH (-W) modifies 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 wildcard that includes the directory separator in its -matched characters.) For example, with /MATCH=NOWILD_MATCH_SLASH: -.sk -.lm+4;.literal -"*.c" matches "foo.c" but not "mydir/foo.c" -"**.c" matches both "foo.c" and "mydir/foo.c" -"*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" -"??*/*" matches "ab/foo" and "abc/foo" - but not "a/foo" or "a/b/foo" -.end literal;.lm-4 -.sk -This modified behavior is equivalent to the pattern matching style used -by the shells of some of \fIUnZip\fP's supported target OSs (one example -is Acorn RISC OS). This option may not be available on systems where -the Zip archive's internal directory separator character "/" is allowed -as regular character in native operating system filenames. -.sk -[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.) -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /NAMES (-0 -2, -L, -s) -.br -/NAMES -.br -/NAMES=(keyword, ...) -.sk -Selects name transformations during extraction. The keywords are: -.sk -.lm+4;.literal -[NO]CHAR_SET CHAR_SET: Use CP850 character-set mapping on names - of archive members which originated on a FAT or - NTFS file system. (Default condition.) - NOCHAR_SET: Do not map these archive member names. -DOWNCASE Convert filenames from all-uppercase operating - systems to lowercase. (-L) -DOWNCASE=ALL Convert all filenames to lowercase. (-LL) -ODS2 Restrict names to ODS2 conventions, regardless - of the destination file system. (Invalid - character -> "_".) (-2) -[NO]SPACES SPACES: Permit space characters in (ODS5) names. - (Default condition.) - NOSPACES: Change spaces to underscores. (-s) -.end literal;.lm-4 -.sk -The default is to use ODS5-compatible file names (including spaces) when -the destination file system is ODS5, and to convert the names to -ODS2-compatible names when the destination file system is ODS2. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /OVERWRITE (-n, -o) -.br -/[NO]OVERWRITE -.sk -Deprecated. Use /EXISTING. -.sk -/OVERWRITE is equivalent to /EXISTING=NEW_VERSION. -.br -/NOOVERWRITE is equivalent to /EXISTING=NOEXTRACT. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /PAGE (-M) -.br -Pipe all output through an internal pager similar to the Unix more(1) -command. At the end of a screenful of output, UnZip pauses with a -"--More--" prompt; the next screenful may be viewed by pressing the -Enter (Return) key or the space bar. UnZip can be terminated by -pressing the "Q" key and, on some systems, the Enter/Return key. Unlike -Unix more(1), there is no forward-searching or editing -capability. Also, UnZip doesn't notice if long lines wrap at the edge -of the screen, effectively resulting in the printing of two or more -lines and the likelihood that some text will scroll off the top of the -screen before being viewed. If the actual number of lines on the screen -can not be determined, 24 lines will be assumed. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /PASSWORD (-P) -.br -/PASSWORD=password -.sk -Use "password" to decrypt encrypted archive members (if any). THIS IS -INSECURE! Many multi-user operating systems provide ways for any user -to see the current command line of any other user. Even on stand-alone -systems, there is always the threat of over-the-shoulder -peeking. Storing the plaintext password as part of a command line in an -automated script can be even less secure, Whenever possible, use the -non-echoing, interactive prompt to enter passwords. Where security is -truly important, use a strong encryption method, such as AES, instead of -the relatively weak encryption provided by Traditional ZIP -encryption. Or, use an external encryption program, such as GnuPG, -before archiving the file. (Note that Zip will probably not be able to -do significant compression on a file which has already been encrypted.) -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /QUIET (-q, -qq) -.br -/QUIET[=SUPER] -.sk -Perform operations quietly. (/QUIET=SUPER: even more quietly). -.sk -By default, UnZip prints the names of the files it's extracting or -testing, the extraction methods, any member or archive comments that may -be stored in the archive, and possibly a summary when finished with each -archive. The /QUIET[=SUPER] options suppress the printing of some or -all of these messages. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /RESTORE (-D, -k, -ka, -X) -.br -/RESTORE[=(keyword, ...)] -.sk -Selects restoration options for some meta-data. The optional keywords -are: -.sk -.lm+4;.literal -ACL Restore file ACL settings. (-ka) -OWNER Restore file owner/UIC settings. (-X) -PROTECTION = LIMITED Restore file UIC-based (SOGW) protection - settings, respecting the current default - protection. (Default.) -PROTECTION = ORIGINAL Restore file UIC-based (SOGW) protection - settings, ignoring the current default - protection. (-k) -NOPROTECTION Do not restore file UIC-based (SOGW) protection settings. - The current default protection is used. (-k-) -NODATE Do not restore any timestamps. -DATE=ALL Restore timestamps for all extracted entries, - files and directories. -DATE=FILES Restore timestamps for extracted files. (Default.) -.end literal;.lm-4 -.sk -By default, on VMS, UnZip restores the original date-time attributes for -files, but not for directories. This agrees with the behavior of VMS -BACKUP (and UnZip versions before 5.52 where the capability to restore -directory timestamps was added). -.sk -For compatibility with UnZip versions before 6.0 (5.53), the following -deprecated short forms are still accepted: -.sk -.lm+4;.literal -Deprecated form: Modern form: -/RESTORE /RESTORE=PROTECTION -/NORESTORE /RESTORE=NOPROTECTION -.end literal;.lm-4 -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /TEXT (-a, -aa, -S) -.br -.sk -/TEXT[=(keyword, ...)] -.br -.literal -/NOTEXT (Default.) -.end literal -.sk -The optional keywords are: -.sk -.lm+4;.literal -ALL Extract all files with variable-length record format. - Adjust line endings to local standard, and convert - EBCDIC to ASCII, as needed. (-aa) -AUTO Extract text files with variable-length record format. - Adjust line endings to local standard, and convert - EBCDIC to ASCII, as needed. (Default value keyword: - "/TEXT" is equivalent to "/TEXT=AUTO".) (-a) -NONE Same as /NOTEXT. Extract text files with Stream_LF - record format without conversions. (Default - condition.) -STMLF Use Stream_LF record format for text files (instead of - variable-length record format) when ALL or AUTO is in - effect. Adjust line endings to local standard, and - convert EBCDIC to ASCII, as needed. (-S) -.end literal;.lm-4 -.sk -Selects the file record format, character encoding, and line-ending type -used when extracting text files. -.sk -Zip (or a similar archiving program) identifies files as "binary" -or "text" when they are archived. (A short-format ZipInfo report -denotes a binary file with a "b", and a text file with a "t".) -Zip's identification of text files may not be perfect, so UnZip prints -"[binary]" or "[text]" as a visual check for each file it extracts with -/TEXT. /TEXT=ALL forces all files to be extracted (and converted) as -text, regardless of the supposed file type. -.sk -[VMS] On VMS, for archives with VMS attribute information (made with -"zip -V", "ZIP /VMS"), files are always created with their original -record formats. For archives without VMS attribute information (not made -with "zip -V", "ZIP /VMS"), all files are normally created with -Stream_LF record format. With /TEXT[=AUTO], text files are normally -created with variable-length record format, but adding STMLF gives them -Stream_LF record format. Additionally, line endings (CR, LF, CR+LF, -...) are adjusted to the local standard, and EBCDIC is converted to -ASCII. With /TEXT=ALL, all files are treated as text files, and -processed as described above. -.sk -See also /BINARY. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /TRAVERSE_DIRS (-:) -.literal -/[NO]TRAVERSE_DIRS (Default: /NOTRAVERSE_DIRS.) -.end literal -.sk -Allows UnZip to extract archive members into locations outside of the -current extraction destination directory (and its subdirectories). -.sk -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 directories outside -the current destination directory tree. /TRAVERSE_DIRS sets -UnZip back to its previous, more liberal behavior, allowing -exact extraction of archives that use "../" path components to create -multiple directory trees at or above the level of the destination -directory. -.sk -Use this option with extreme caution. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /UPPERCASE (-L) -.br -/[NO]UPPERCASE -.sk -Deprecated. Use /NAMES=[NO]DOWNCASE. -.sk -/UPPERCASE: Do not convert to lowercase any filename originating on -an uppercase-only operating system or file system. -.sk -/NOUPPERCASE: Convert to lowercase any filename originating on an -uppercase-only operating system or file system. -.sk -See also /LOWERCASE, which is also deprecated. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /VERBOSE (-v) -.br -/VERBOSE[=(keyword, ...)] -.sk -The optional keywords are: -.sk -.lm+4;.literal -NORMAL Make a report more detailed/verbose. (Default value - keyword: "/VERBOSE" is equivalent to - "/VERBOSE=NORMAL".) (-v) -MORE Enable special developer I/O diagnostics. See below. - (-vv) -COMMAND Enable special developer CLI diagnostics. See below. -.end literal;.lm-4 -.sk -MORE and NORMAL may not be specified together. (MORE implies NORMAL.) -.sk -When used with some primary mode options, /VERBOSE can make output more -detailed/verbose. See also Qualifiers_Primary_mode, particularly /LIST. -.sk -If no other primary mode is specified, and an archive is specified, then -UnZip acts as if "/LIST /VERBOSE" were specified, and a detailed listing -is generated. See Qualifiers_Primary_mode, particularly /LIST and -/VERBOSE. -.sk -/VERBOSE=MORE ("-vv") enables some VMS-specific I/O diagnostic messages, -and is intended for use in program development, not in normal use. -.sk -/VERBOSE=COMMAND causes UnZip to show the translated Unix-style -command-line argument vector before processing it, and is intended for -use in program development, not in normal use. /VERBOSE=COMMAND has no -Unix-style equivalent. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /VERSION (-V) -.br -[Non-CMS-MVS] Retain VMS file version numbers. VMS files can be stored -with a version number, in the format "file.type;##", where "##" is a -decimal number. By default the ";##" version numbers 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.) -.sk -[Non-VMS] Note that before UnZip version 6.10, 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 -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-". -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /ZIPINFO (-Z) -.br -ZipInfo mode. With /ZIPINFO, the program runs in ZipInfo mode, which is -used to display information about an archive and its members. Remaining -options are interpreted as ZipInfo options. If used, /ZIPINFO must be -the first qualifier on the command line. See ZipInfo_mode. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Environment_Options -.br -UnZip's default behavior may be modified by placing Unix-style -command-line options in an environment variable. (The VMS CLI -translator acts only on the command line itself, not on the -environment variables.) This can be done with any option, but it is -probably most useful options like -a (/TEXT, auto-convert text files), --L (/NAMES, downcase file names from systems with all uppercase file -names), -C (/MATCH=CASE=BLIND, use case-insensitive name matching), -q -(/QUIET, quiet), -o (/EXISTING, always overwrite), or -n (/EXISTING, -never overwrite). -.sk -For UnZip, the environment variable name on VMS is UNZIP_OPTS -(non-VMS: UNZIP). The name on VMS is different to avoid conflict with -a foreign-command DCL symbol, UNZIP. For compatibility with Zip, if -UNZIP_OPTS is not defined, then UnZip will use UNZIPOPT the same way. -.sk -For ZipInfo ("UNZIP /ZIPINFO"), the environment variable name on VMS is -ZIPINFO_OPTS (non-VMS: ZIPINFO). For compatibility with Zip, if -ZIPINFO_OPTS is not defined, then ZipInfo will use ZIPINFOOPT the same -way. -.br -For example, to make UnZip act as quietly as possible, only reporting -errors, one could use commands like the following (with quotation to -preserve lower case in DCL): -.sk -.lm+4;.literal -define UNZIP_OPTS "-q -q" ! Logical name, or -UNZIP_OPTS = "-q -q" ! DCL symbol. (Either works.) -.end literal;.lm-4 -.sk -Environment options are treated the same as any other Unix-style -command-line options, except that they are effectively the first options -on the command line. Generally, the VMS CLI translator will override an -environment option if an explicit corresponding VMS-style qualifier is -specified. -.sk -The examples show short (one-character) options, but long ("--") -options are also allowed. -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Encryption_Decryption -.br -Zip and UnZip have long supported a relatively weak encryption method, -which we call Traditional ZIP encryption. The source code for -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, -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: 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). -.sk -For details on the WinZip AES scheme, see: -.lm+4;.literal -http://www.winzip.com/aes_info.htm -.end literal;.lm-4 -.sk -For information on the separate AES_WG source kit, see: -.lm+4;.literal -ftp://ftp.info-zip.org/pub/infozip/crypt/ -ftp://ftp.info-zip.org/pub/infozip/crypt/README_AES_WG.txt -.end literal;.lm-4 -.sk -Normally, encryption passwords are supplied by the user interactively -when requested by the program. See /PASSWORD for a (less secure) -method of specifying a password on the command line. -.sk -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. (This is a -security feature of the PKWARE archive format; it helps prevent -brute-force attacks that might otherwise gain a large speed advantage by -testing only the header.) In the case that an incorrect password 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 during -the extraction because the "decrypted" bytes do not constitute a valid -compressed data stream. -.sk -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 checks each encrypted file to see if the -null password works. This may result in "false positives" and -extraction errors, as noted above.) -.sk -Archives encrypted with 8-bit-character passwords (for example, -passwords with accented European characters) may not be portable across -systems or to other archivers. This problem stems from the use of -multiple 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 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 encoding.) 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 adapted for UTF-8 -support and will consequently fail. -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Examples -.br -To use UnZip to extract all members of the archive letters.zip into the -current directory and subdirectories below it, creating any -subdirectories as necessary: -.sk -.lm+4;.literal -unzip letters -.end literal;.lm-4 -.sk -To extract all members of letters.zip into the current directory only: -.sk -.lm+4;.literal -unzip /junk_dirs letters -.end literal;.lm-4 -.sk -To test letters.zip, printing only a summary message indicating -whether the archive is OK or not: -.sk -.lm+4;.literal -unzip /test /quiet letters -.end literal;.lm-4 -.sk -To test all ".zip" archives in the current directory, printing -only the summaries: -.sk -.lm+4;.literal -unzip /test /quiet *.zip -.end literal;.lm-4 -.sk -(On a Unix system, the wildcard member name would typically need to be -quoted to keep a a Unix shell from expanding ("globbing") it. This is -not necessary on VMS. However, a name with a slash ("/") character, -such as "*/zip*.*", must be quoted. Otherwise, DCL may interpret the -slash as introducing a qualifier, causing unexpected behavior or an -"%CLI-W-IVQUAL, unrecognized qualifier" error.) -.sk -The following command extracts to standard output all members of -letters.zip whose names end in ".tex", auto-converting to the -local end-of-line convention, in Stream_LF record format, and piping the -output into TYPE /PAGE: -.sk -.lm+4;.literal -pipe unzip /screen /text=(auto, stmlf) letters *.tex | \ - type /page sys$input -.end literal;.lm-4 -.sk -To extract from source.zip all Fortran and C source files (*.f, -*.c, *.h) and Makefile into the SYS$SCRATCH directory: -.sk -.lm+4;.literal -unzip source.zip *.[fch] Makefile /directory = sys$scratch -.end literal;.lm-4 -.sk -To extract all FORTRAN and C source files, regardless of case (for -example, both *.c and *.C, and any makefile, Makefile, MAKEFILE or -similar): -.sk -.lm+4;.literal -unzip -C source.zip *.[fch] makefile /directory = sys$scratch -.end literal;.lm-4 -.sk -The following command extracts only newer versions of the files already -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): -.sk -.lm+4;.literal -unzip /freshen /existing=new_version sources -.end literal;.lm-4 -.sk -To extract newer versions of the files already in the current directory -and to create any files not already there (same caveat as previous -example): -.sk -.lm+4;.literal -unzip /update /existing=new_version sources -.end literal;.lm-4 -.sk -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: -.sk -.lm+4;.literal -unzip /verbose -.end literal;.lm-4 -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Exit_Status -.br -UnZip's exit status approximates the exit codes defined by -PKWARE. On VMS, UnZip's UNIX-style exit values are translated into -VMS-style status codes with facility code 1954 = %x7A2, and with the -inhibit-message (%x10000000) and facility-specific (%x00008000) bits -set: -.sk -.lm+4;.literal -%x17A28001 normal exit -%x17A28000 + 16*UnZip_error_code warnings -%x17A28002 + 16*UnZip_error_code normal errors -%x17A28004 + 16*UnZip_error_code fatal errors -.end literal;.lm-4 -.sk -Note that multiplying the UNIX-style UnZip error code by 16 places it -conveniently in the hexadecimal representation of the VMS exit code, -"__" in %x17A28__s, where "s" is the severity code. For example, a -missing archive might cause UnZip error code 9, which would be -transformed into the VMS exit status %X17A28092. -.sk -The UnZip VMS exit codes include severity values which approximate those -defined by PKWARE, as shown in the following table: -.sk -.literal - VMS UnZip - severity err code Error description -----------+----------+---------------------------------------------- - Success 0 Normal. No errors or warnings detected. - Warning 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 encryption password. - Error 2 Error in the archive format. Processing may - or may not have completed successfully. - Fatal 3 Severe error in the archive format. - Processing probably failed immediately. - Fatal 4 Memory allocation failed in program - initialization. - Fatal 5 Memory allocation or terminal I/O failed in - password processing. - Fatal 6 Memory allocation failed while decompressing - to disk. - Fatal 7 Memory allocation failed while decompressing - in memory. - Fatal 8 Memory allocation failed. (Currently not - used.) - Error 9 Specified archive files were not found. - Error 10 Invalid command-line options or parameters. - Error 11 No matching files were found. - Fatal 50 Disk (file system) filled during extraction. - Fatal 51 Unexpected end-of-file while reading the - archive. - Error 80 User interrupt (Ctrl/C). - Error 81 No files were processed, because of - unsupported compression or encryption - methods. - Error 82 No files were processed, because of bad - encryption password(s). - Fatal 83 Large-file archive could not be processed by - this small-file program. -.end literal -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 Bugs -.br -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 3.0 and later can combine multi-part (split) archives into a -combined single-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. -.sk -Archives read from standard input are not yet supported, except with -UnZip (and then only the first member of the archive can be extracted). -.sk -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. -.sk -UnZip's -M ("--more") option tries to take into account -automatic wrapping 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. -.sk -[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. Basically, the only file types restored by UnZip are -regular files, directories, and symbolic (soft) links. -.sk -[OS/2] Extended attributes for existing directories are only updated if -the -o ("--overwrite") option is given. This is a limitation of the -operating system; because directories only have a creation time -associated 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 normally -(with or without freshening/updating existing files), then overwrite -just the directory entries (for example, "unzip -o foo */"). -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -2 URL -.br -The Info-ZIP main Web page is: -.lm+4;.literal -http://www.info-zip.org/ -.end literal;.lm-4 -.sk -FTP access is available, too: -.lm+4;.literal -ftp://ftp.info-zip.org/pub/infozip/ -.end literal;.lm-4 -.!---------------------------------------------------------------------- -.!====================================================================== -.!------------------------------------------------------ -.indent-3 -2 ZipInfo_mode -.br -When /ZIPINFO is specified, the program runs in ZipInfo mode. Remaining -options are interpreted as ZipInfo options. If used, /ZIPINFO must be -the first qualifier on the command line. -.sk -ZipInfo reports detailed information about a ZIP archive and its -members. This information may include file access permissions, -compression method, encryption method, version and operating system (or -file system) of the archive-creating program, and so on. The default -behavior (with no options) is to show a single-line entry for each -member in the archive, with a header and a trailer providing summary -information for the entire archive. The format is a cross between Unix -"ls -l" and "UNZIP /LIST /VERBOSE" output. See -Detailed_Description. ZipInfo is the same program as UnZip. (On Unix, -"zipinfo" may be a link to "unzip". On VMS, "ZIPINFO" is normally a DCL -symbol defined as "''UNZIP' /ZIPINFO".) However, ZipInfo support may -have been disabled when UnZip was built. -.sk -Format: -.sk;.indent2 -ZIPINFO [/zipinfo_options] [file[.zip]] [member [,...]] -.sk;.indent2 -UNZIP /ZIPINFO [/zipinfo_options] [file[.zip]] [member [,...]] -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -3 Command_Parameters -.br -.indent-2 -file[.zip] -.sk -.lm+3 -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 directory/file specification may be -used: "...", "*", or "%" (or, since VMS V7.2, "?"). The default archive -file specification is ".ZIP". -.sk -Note that a ".zip" or ".ZIP" file type 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 with its actual name -ending (if any), whatever that may be. -.lm-3 -.sk -.indent-2 -member [,...] -.sk -.lm+3 -An optional list of archive members to be processed, separated by -commas. If no member list is specified, then all archive members are -processed. Unix-like ("globbing") wildcard patterns may be used to -match multiple members: -.sk -.lm+4;.literal -* Matches a sequence of 0 or more characters. -? 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 ("!") or a caret ("^") follows the - left bracket, then the range 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, use the three-character sequence "[[]". -.end literal;.lm-4 -.lm-3 -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -3 Qualifiers_Primary_Format -.br -Qualifiers in this group specify the primary report format of -ZipInfo. Only one of these primary format qualifiers may be specified. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /LONG (-l) -.br -Primary Format. Show member info in long Unix "ls -l" format. Like the -/MEDIUM format, except that the compressed size (in bytes) is printed -instead of the compression ratio. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /ONE_LINE (-2) -.br -Primary Format. Show member names only, one per line. Other report -elements are allowed, if requested explicitly using /HEADER, /TOTALS, -and/or /COMMENT. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /MEDIUM (-m) -.br -Primary Format. Show member info in medium-length Unix "ls -l" format. -Like the /SHORT format, except that the compression factor, expressed as -a percentage, is also included. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /SHORT (-s) -.br -Primary Format. Show member info in short Unix "ls -l" format. This is -the default behavior, unless /HEADER or /TOTALS is specified. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /VERBOSE (-v) -.br -Primary Format. The ZipInfo /VERBOSE report is very detailed, and -mostly self-explanatory, but it does assume some familiarity with the -ZIP archive format. It also includes the archive comment, if -any. Extra fields in the central directory are broken down into -subfields, with brief interpretations of recognized subfields (or -abbreviated dumps of unrecognized subfields). -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!---------------------------------------------------------------------- -.!------------------------------------------------------ -.indent-3 -3 Qualifiers_Ordinary -.br -Qualifiers in this group modify the operation or report format of -ZipInfo. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /COMMENT (-z) -.br -Include the archive comments (if any) in the report. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /DECIMAL_TIME (-T) -.br -Show the file date-times in a sortable, all-numeric, "YYYYMMDD.hhmmss" -format. The default date format is an alpha-numeric -"YY-Mmm-DD hh:mm". For example ("/SHORT", "/SHORT /DECIMAL_TIME"): -.sk -.literal --rw-a-- 3.1 fat 211916 tx defX 10-Jun-18 00:27 zip31c/zip.c --rw-a-- 3.1 fat 211916 tx defX 20100618.002703 zip31c/zip.c -.end literal -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /EXCLUDE (-x) -.br -/EXCLUDE=(member [,...]) -.br -An optional list of archive members to be excluded from -processing. Because wildcard characters normally match "/" directory -separators (for exceptions see /WILD_SPAN (-W)), this option may be used -to exclude any files that are in subdirectories. For example, -.lm+4;.literal -UNZIP foo *.[ch] /EXCLUDE = */* -.end literal;.lm-4 -would extract all C source files (*.c, *.h) in the main directory, but -none in any subdirectories. Without the /EXCLUDE option, all C source -files in all directories within the archive would be extracted. -.sk -Note that archive members are specified using the Unix-style names which -are used in ZIP archives, not VMS-style names. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /HEADER (-h) -.br -Include a header in the report, showing the archive name, the archive -size (in bytes), and the number of members in the archive. -.sk -For the Unix-format reports (options /LONG, /MEDIUM, /SHORT), the header -is included by default, if no archive members are specified. If /HEADER -is specified alone, that is, without one of the Unix-format options, and -without a member list, then only the header lines will be put out. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 /MATCH (-C, -W) -.br -/MATCH=(keyword, ...) -.sk -Specifies name-matching behavior for names in the member list and -the /EXCLUDE excluded-member list on the command line. -.sk -The optional keywords and values are: -.sk -.lm+4;.literal -CASE=BLIND Name matching is case-insensitive. (-C) -CASE=SENSITIVE Name matching is case-sensitive. (Default.) -.end literal;.lm-4 -.sk -By default, case-sensitive matching is done. For example, specifying -"makefile" on the command line will match only "makefile" in -the archive, not "Makefile" or "MAKEFILE". On many systems, the local -file system is case-insensitive, so case-insensitive name matching would -be more natural. With /MATCH=CASE=BLIND, "makefile" would match -"makefile", "Makefile", or "MAKEFILE". -.sk -/MATCH does not affect the search for the ZIP archive file(s), nor the -matching of archive members to existing files on the extraction -path. So, on a case-sensitive file system, UnZip will never try to -overwrite a file "FOO" when extracting a member named "foo"! -.sk -[WILD_STOP_AT_DIR] If the C macro WILD_STOP_AT_DIR is defined at build -time, then an additional keyword is allowed: -.sk -.lm+4;.literal -NOWILD_MATCH_SLASH Wildcards stop at directory slash. (-W) -WILD_MATCH_SLASH Wildcards match directory slash. (Default.) -.end literal;.lm-4 -.sk -By default, the wildcard characters "?" (single-character wildcard) and -"*" (multi-character wildcard) match any character in a member -path/name. /MATCH=NOWILD_MATCH_SLASH (-W) modifies 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 wildcard that includes the directory separator in its -matched characters.) For example, with /MATCH=NOWILD_MATCH_SLASH: -.lm+4;.literal -"*.c" matches "foo.c" but not "mydir/foo.c" -"**.c" matches both "foo.c" and "mydir/foo.c" -"*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" -"??*/*" matches "ab/foo" and "abc/foo" - but not "a/foo" or "a/b/foo" -.end literal;.lm-4 -.sk -This modified behavior is equivalent to the pattern matching style used -by the shells of some of \fIUnZip\fP's supported target OSs (one example -is Acorn RISC OS). This option may not be available on systems where -the Zip archive's internal directory separator character "/" is allowed -as regular character in native operating system filenames. -.sk -[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.) -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /MEMBER_COUNTS (default) (-mc) -.br -/NOMEMBER_COUNTS -.br -Control inclusion of separate member counts for directories, files, and -(if symlinks are supported) links, after the totals summary at the end -of the report. By default, they are included. Use /NOMEMBER_COUNTS" to -suppress them. See also /TOTALS. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /PAGE (-M) -.br -Pipe all output through an internal pager similar to the Unix more(1) -command. At the end of a screenful of output, UnZip pauses with a -"--More--" prompt; the next screenful may be viewed by pressing the -Enter (Return) key or the space bar. UnZip can be terminated by -pressing the "Q" key and, on some systems, the Enter/Return key. Unlike -Unix more(1), there is no forward-searching or editing -capability. Also, UnZip doesn't notice if long lines wrap at the edge -of the screen, effectively resulting in the printing of two or more -lines and the likelihood that some text will scroll off the top of the -screen before being viewed. If the actual number of lines on the screen -can not be determined, 24 lines will be assumed. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -4 /TOTALS (-t) -.br -Include a totals summary at the end of the report, showing the number of -members in the report, the sum of their uncompressed sizes, the sum of -their compressed sizes, and the compression factor as a percentage. -.sk -For the Unix-format reports (/LONG, /MEDIUM, /SHORT), the totals summary -is included by default, if no archive members are specified. If /TOTALS -is specified alone, that is, without one of the Unix-format options, and -without a member list, then only the totals summary trailer lines will -be put out. -.sk -The total "bytes compressed" reported includes only the actual data, not -the ZIP archive meta-data, so the size of the archive will always be -greater than this value. -.sk -See also /MEMBER_COUNTS. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 Detailed_Description -.br -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 (/ONE_LINE (-1, -2)), a Unix ls-style listing (/LONG (-l), -/MEDIUM (-m), /SHORT (-s)), and a very detailed analysis (/VERBOSE -(-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: -.lm+4;.literal -http://www.pkware.com/documents/casestudies/APPNOTE.TXT -.end literal;.lm-4 -.sk -The table below shows some typical /LONG report entries: -.sk -.literal -Perm/Prot Zver Ofs UncSize At CmpSize Cmth ModDate Mtime Name -----------+----+---+-------+--+-------+----+---------------+---------- --rw-a-- 3.1 fat 211916 tx 53467 defX 10-Jun-18 00:27 zip3/zip.c --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 it/T.EXE;8 -.end literal -.sk -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. -.sk -Field 2 (Zver) shows the (approximate) version of the Zip program which -created the archive. -.sk -Field 3 (Ofs) shows the original operating system where the archive was -created, or the file system on which the member file was stored. -.sk -Field 4 (UncSize) shows the original, uncompressed file size. -.sk -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 and/or an extra field in the member -data. -.sk -.literal - | File Type Extra Field | - First char | binary text yes no | Second char ---------------+-------+----- ------+-----+-------------------- -Encrypted no | b t x - | no Data Descriptor - yes | B T X l | yes -.end literal -.sk -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. -.sk -Field 6 (CmpSize) shows the compressed file size. With /MEDIUM, this -field shows the compression fraction as a percentage. With /SHORT -(the default), this field is omitted. This compressed size value -(unlike the one in an "UNZIP /LIST" report) includes all the -overhead resulting from Traditional encryption. -.sk -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.) -.sk -.literal - Num Abbr Name, description -----+----+------------------------------------------------------------ - 0 stor Store (no compression) - 1 shrk Shrink - 2 re:1 Reduce (factor 1) - 3 re:2 Reduce (factor 2) - 4 re:3 Reduce (factor 3) - 5 re:4 Reduce (factor 4) - 6 i#:# Implode (dictonary_size:Shannon-Fano_trees) - 7 tokn Tokenize - 8 def# Deflate (N: normal, X: maximum, F: fast, S: super-fast) - 9 d64# Deflate64 (N: normal, X: maximum, F: fast, S: super-fast) - 10 dcli PKWARE Data Compression Library Imploding - IBM TERSE (old) - 12 bzp2 bzip2 - 14 lzma LZMA - 18 ters IBM TERSE (new) - 19 lz77 IBM LZ77 z Architecture (PFS) - 96 jpeg JPEG - 97 wavp WavPack - 98 ppmd PPMd version I, Rev 1 - 99 aesw AES_WG encryption -.end literal -.sk -Fields 8 and 9 (ModDate, Mtime) show the file modification date-time -(MS-DOS format, local time). -.sk -Field 10 (Name) shows the file path/name. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 Environment_Options -.br -ZipInfo's default behavior may be modified by placing Unix-style -command-line options in an environment variable. (The VMS CLI -translator acts only on the command line itself, not on the -environment variables.) This can be done with any option, but it is -probably most useful options like -T (/DECIMAL_TIME, decimal time -format) or one of the non-default Unix format options: -l (/LONG), -m -(/MEDIUM). -.sk -For ZipInfo ("UNZIP /ZIPINFO", ZIPINFO), the environment variable name -on VMS is ZIPINFO_OPTS (non-VMS: ZIPINFO). For compatibility with Zip, -if ZIPINFO (ZIPINFO_OPTS on VMS) is not defined, then ZipInfo will use -ZIPINFOOPT the same way. -.sk -For example, to make the default format the long Unix format instead of -the short Unix format, one could use commands like the following (with -quotation to preserve lower case in DCL): -.sk -.lm+4;.literal -define ZIPINFO_OPTS "-l" ! Logical name, or -ZIPINFO_OPTS = "-l" ! DCL symbol. (Either works.) -.end literal;.lm-4 -.sk -Environment options are treated the same as any other Unix-style -command-line options, except that they are effectively the first options -on the command line. Generally, the VMS CLI translator will override -an environment option if an explicit corresponding VMS-style qualifier -is specified. -.sk -The examples show short (one-character) options, but long ("--") -options are also allowed. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 Examples -.br -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 -archive name as an argument to zipinfo: -.sk -.lm+4;.literal -zipinfo zip31c.zip -zipinfo zip31c -.end literal;.lm-4 -.sk -To produce a basic, long-format listing (not verbose), including header -and totals lines, use /LONG: -.sk -.lm+4;.literal -zipinfo /long zip31c.zip -.end literal;.lm-4 -.sk -To list the complete contents of the archive without header and totals -lines, either negate the /HEADER and /TOTALS qualifiers or else specify -the contents explicitly: -.sk -.lm+4;.literal -zipinfo /noheader /nototals zip31c.zip -zipinfo zip31c.zip * -.end literal;.lm-4 -.sk -(On a Unix system, the wildcard member name would typically need to be -quoted to keep a a Unix shell from expanding ("globbing") it. This is -not necessary on VMS. However, a name with a slash ("/") character, -such as "*/zip*.*", must be quoted. Otherwise, DCL may interpret the -slash as introducing a qualifier, causing unexpected behavior or an -"%CLI-W-IVQUAL, unrecognized qualifier" error.) -.sk -To list information on a single archive member, in medium format, -specify the member name explicitly: -.sk -.lm+4;.literal -zipinfo /medium unzip60.zip */unshrink.c -.end literal;.lm-4 -.sk -On a VMS system, one could use /DECIMAL_TIME along with an external -sorting program to get a listing of files in the archive in date-time -order: -.sk -.lm+4;.literal -pipe zipinfo /decimal_time /long /noheader /nototals zip31c.zip | - - sort sys$input sys$output /key = (position:47, size:15, descend) -.end literal;.lm-4 -.sk -For a /LONG (-l) format report, the date-time field should begin at -position 47; for /MEDIUM (-m), 42; for /SHORT (-s), 38. HELP SORT -[/KEY] should lead to an explanation of the various SORT options. -(Unlike Unix, VMS does not include a useful "head" or "tail" program.) -.sk -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: -.sk -.lm+4;.literal -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 -.end literal;.lm-4 -.sk -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. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 Bugs -.br -As with UnZip, ZipInfo's /PAGE (-M) 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 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. In addition, ZipInfo should detect the true screen -geometry on all systems. -.sk -The interactions among the various listing format, header, and trailer -options (/HEADER, /LONG, /MEDIUM, /SHORT, /TOTALS) are unnecessarily -complex and should be simplified, despite the potential disruption to -current users. -.!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.!------------------------------------------------------ -.indent-3 -3 URL -.br -The Info-ZIP main Web page is: -.lm+4;.literal -http://www.info-zip.org/ -.end literal;.lm-4 -.sk -FTP access is available, too: -.lm+4;.literal -ftp://ftp.info-zip.org/pub/infozip/ -.end literal;.lm-4 -.!---------------------------------------------------------------------- -.!====================================================================== diff --git a/zip-comment.txt b/zip-comment.txt index d6d424c..5dfd4d4 100644 --- a/zip-comment.txt +++ b/zip-comment.txt @@ -1,5 +1,5 @@ -Info-Zip UnZip -- Source kit. Version 6.10c17s (pre-BETA) 2015-03-18. +Info-Zip UnZip -- Source kit. Version 6.10c18 (pre-BETA) 2015-03-31. See enclosed files INSTALL, LICENSE, and README. For information on Info-Zip UnZip and Zip: