unzip_def.rnh 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. .!
  2. .! File: UNZIP_DEF.RNH
  3. .!
  4. .! Author: Hunter Goatley
  5. .!
  6. .! Date: October 23, 1991
  7. .!
  8. .! Description:
  9. .!
  10. .! RUNOFF source file for VMS on-line help for portable UnZip.
  11. .! Adapted from UNZIP.MAN (now UNZIP.TXT).
  12. .!
  13. .! To build: $ REN UNZIP_DEF.RNH UNZIP.RNH
  14. .! $ RUNOFF UNZIP.RNH
  15. .! $ LIBR/HELP/INSERT libr UNZIP
  16. .!
  17. .! Modification history:
  18. .!
  19. .! 01-001 Hunter Goatley 23-OCT-1991 09:21
  20. .! Genesis.
  21. .! 01-002 Cave Newt 16-MAR-1992 22:37
  22. .! Updated for UnZip 4.2.
  23. .! 01-003 Igor Mandrichenko 23-MAY-1992 22:14
  24. .! Added -X option to command syntax.
  25. .! 01-004 Cave Newt 24-MAY-1992 13:30
  26. .! Added UNZIP_OPTS environment variable help.
  27. .! 01-005 Igor Mandrichenko 14-DEC-1993 18:55
  28. .! Modified for UnZip V5.1
  29. .! 01-006 Cave Newt 21-DEC-1993 12:38
  30. .! Added -x option and cleaned up.
  31. .! 01-007 Cave Newt 14-JUL-1994 09:45
  32. .! Added -Z, -C and -L options, removed -U, minor clean-up.
  33. .! 01-008 Cave Newt 28-JUL-1994 08:57
  34. .! Removed semi-colons from comments.
  35. .! 02-001 Christian Spieler 09-DEC-1995 02:25
  36. .! Modified for UnZip 5.2.
  37. .! 02-002 Christian Spieler 06-FEB-1996 02:25
  38. .! Added -h "help" option.
  39. .! 02-003 Christian Spieler 04-MAR-1997 20:25
  40. .! Added -P "command line password" option.
  41. .! 02-004 Christian Spieler 26-JUL-1997 00:05
  42. .! Added Exit_Codes subtopic, explaining UnZip's VMS return codes.
  43. .! 02-005 Christian Spieler 28-APR-2000 03:22
  44. .! Changed references to plaintext UnZip documentation file
  45. .! into "UNZIP.TXT".
  46. .! 02-006 Christian Spieler 15-APR-2001 22:29
  47. .! Added description for extended functionality of -b option.
  48. .! 02-007 Christian Spieler 10-DEC-2001 13:58
  49. .! Added description for new -: traverse dirs option.
  50. .! 02-008 Christian Spieler 29-JAN-2005 01:50
  51. .! Added description for the -T "set archive timestamp" option.
  52. .!
  53. .noflags
  54. .lm4 .rm72
  55. .indent -4
  56. 1 UNZIP
  57. .br
  58. UnZip is used to extract files compressed and packaged by Zip (see HELP ZIP
  59. for information on ZIP).
  60. .sk
  61. For a brief help on Zip and Unzip, run each without specifying any
  62. parameters on the command line, or specify the -h flag (but not in UnZip's
  63. Zipinfo mode).
  64. .sk
  65. UNZIP will list, test, or extract from a ZIP archive. ZIP archives are commonly
  66. found on MS-DOS systems; a VMS version of ZIP can also be found here.
  67. .sk
  68. Archive member extraction is implied by the absence of the -c, -p, -t, -l, -v or
  69. -z options. All archive members are processed unless a filespec is provided to
  70. specify a subset of the archive members.
  71. Format:
  72. .sk;.lm+1;.literal
  73. UNZIP [-cfhlptTuvxz[ajnoqCLMVX]] file[.zip] [list] [-x xlist] [-d out_dir]
  74. .end literal;.lm-1
  75. .!------------------------------------------------------------------------------
  76. .indent -4
  77. 2 Parameters
  78. .sk;.indent -4
  79. file[.zip]
  80. .sk
  81. File specification for the ZIP archive(s) with optional wildcards. UnZip will
  82. perform actions specified for every zipfile matching the specification.
  83. Default file specification is SYS$DISK:[].ZIP.
  84. Note that self-extracting ZIP files are supported; just specify the .EXE
  85. suffix yourself.
  86. .sk;.indent -4
  87. [list]
  88. .sk
  89. An optional list of archive members to be processed; if no list is given, all
  90. archive members are processed. Expressions may be
  91. used to match multiple members. Expressions should be enclosed in double-quotes
  92. to prevent interpretation by DCL. Multiple filenames should be separated by
  93. blanks. Each file specification is similar to a Unix egrep expression and may
  94. contain:
  95. .sk
  96. .literal
  97. * matches a sequence of 0 or more characters
  98. ? matches exactly 1 character
  99. [...] matches any single character found inside the brackets;
  100. ranges are specified by a beginning character, a hyphen,
  101. and an ending character. If a '!' or '^' immediately
  102. follows the left bracket, then any character not in the
  103. given range is matched.
  104. Hint: To specify a verbatim left bracket '[', the
  105. three-character sequence "[[]" has to be used.
  106. .end literal
  107. .sk
  108. .sk;.indent -4
  109. [-x xlist]
  110. .sk
  111. An optional list of archive members to be excluded from processing. The xlist
  112. overrides any files included in the normal list.
  113. .sk;.indent -4
  114. [-d out_dir]
  115. .sk
  116. Optional directory specification to be used as target root directory
  117. for files to be extracted. Directory should be specified in "[.foo]"
  118. format rather than "foo.dir" or "foo/" format.
  119. .!------------------------------------------------------------------------------
  120. .indent -4
  121. 2 Options
  122. .br
  123. The default action of UnZip is to extract all zipfile entries. The following
  124. options and modifiers can be provided:
  125. .sk;.literal
  126. -Z ZipInfo mode
  127. -c extract files to SYS$OUTPUT (terminal)
  128. -f freshen existing files (replace if newer); create none
  129. -h show brief help screen and exit quietly
  130. -l list archive files (short format)
  131. -p extract files to SYS$OUTPUT; no informational messages
  132. -t test archive files
  133. -T set zipfile timestamps to that of each archive's newest entry
  134. -u update existing files; create new ones if needed
  135. -v list archive files (verbose format)
  136. -z display only the archive comment
  137. .end literal;.sk;.literal
  138. MODIFIERS
  139. -a extract text files in standard VMS text file format
  140. -aa extract all files as text
  141. -b auto-extract only binary files in VMS fixed 512-byte record format
  142. -bb extract all files as binary in VMS fixed 512-byte record format
  143. -j junk paths (don't recreate archive's directory structure)
  144. -n never overwrite existing files; don't prompt
  145. -o OK to overwrite files without prompting
  146. -q perform operations quietly (-qq => even quieter)
  147. -C match filenames case-insensitively
  148. -L convert filenames to lowercase if created under DOS, VMS, etc.
  149. -M feed screen output through built-in "more" pager
  150. -P<password> supply decryption password on the command line (insecure!)
  151. -V retain (VMS) file version numbers
  152. -X restore owner/protection info (may require privileges)
  153. -: allow "../" path components that traverse across extract dir root
  154. .end literal;.sk
  155. Note that uppercase options (-C, -L, -M, -P, -T, -V and -X) must be
  156. specified in quotes. For example:
  157. .sk;.literal
  158. unzip "-VX" -a zipfile
  159. .end literal;.sk
  160. When extracting to SYS$OUTPUT (-c or -p options) redirected to a file,
  161. you may want to override the default text file converion by specifying
  162. the -b option. A single "-b" option switches to "binary piping" mode
  163. for Zip entries marked as non-text, only. To force "binary piping" mode
  164. even for Zip file entries marked as text, the "-bb" option should be used.
  165. (Please note that a later "-a" cancels any -b option, see below.)
  166. .sk
  167. The output conversion options -b and -a may be combined to perform
  168. binary conversions on binary files and text conversion on text files.
  169. But note: For compatibility with implementation on other systems, -b cancels
  170. any -a option; to get the intended result, -a must be specified AFTER -b.
  171. And, in combination, "text" recognition takes precedence; this means
  172. that -bba (-bb -a) has the same effect as -ba (-b -a), and -aa overrides
  173. binary conversion for ALL files.
  174. .sk
  175. Please note that using the "-P<password>" option is higly insecure, the
  176. plaintext password may be seen by others. For this reason (and because of
  177. lack of space), the "-P<password>" option is not advertised on UnZip's
  178. online help screen.
  179. .!------------------------------------------------------------------------------
  180. .indent -4
  181. 2 Exit_Codes
  182. .br
  183. On VMS, UnZip's UNIX style exit values are mapped into proper
  184. VMS status codes:
  185. .sk;.literal
  186. 1 (success) normal exit,
  187. (0x7fff0000 + 16*UnZip_errnum) -W- warnings
  188. (0x7fff0002 + 16*UnZip_errnum) -E- normal errors
  189. (0x7fff0004 + 16*UnZip_errnum) -F- fatal errors
  190. .end literal;.sk
  191. The UnZip error level (or exit code) approximates the exit
  192. codes defined by PKWARE and takes on the following values:
  193. .sk;.literal
  194. VMS UnZip Type of error
  195. severity errcode
  196. - 0 normal; no errors or warnings detected.
  197. W 1 one or more warning errors were encountered,
  198. but processing completed successfully any-
  199. way. This includes zipfiles where one or
  200. more files was skipped due to unsupported
  201. compression method or encryption with an
  202. unknown password.
  203. E 2 a generic error in the zipfile format was
  204. detected. Processing may have completed
  205. successfully anyway; some broken zipfiles
  206. created by other archivers have simple work-
  207. arounds.
  208. F 3 a severe error in the zipfile format was
  209. detected. Processing probably failed imme-
  210. diately.
  211. F 4 unzip was unable to allocate memory for one
  212. or more buffers during program initializa-
  213. tion.
  214. F 5 unzip was unable to allocate memory or
  215. unable to obtain a tty to read the decryp-
  216. tion password(s).
  217. F 6 unzip was unable to allocate memory during
  218. decompression to disk.
  219. F 7 unzip was unable to allocate memory during
  220. in-memory decompression.
  221. F 8 [currently not used]
  222. E 9 the specified zipfiles were not found.
  223. E 10 invalid options were specified on the com-
  224. mand line.
  225. E 11 no matching files were found.
  226. F 50 the disk is (or was) full during extraction.
  227. F 51 the end of the ZIP archive was encountered
  228. prematurely.
  229. E 80 the user aborted unzip prematurely with con-
  230. trol-C (or similar)
  231. E 81 no files were found due to unsupported com-
  232. pression methods or unsupported decryption.
  233. (If even one additional file is successfully
  234. processed, however, the exit status is 1.)
  235. E 82 no files were found due to bad decryption
  236. password(s). This is also the exit status
  237. if no files were found due to a combination
  238. of unsupported compression and bad pass-
  239. words. As in the previous case, however, a
  240. single successful file will result in an
  241. exit status of 1 instead.)
  242. .end literal;.sk
  243. In addition, there is a compilation option to expand upon this behavior:
  244. An executable compiled with the option RETURN_CODES defined displays
  245. a human-readable explanation of what the error status means.
  246. .!------------------------------------------------------------------------------
  247. .indent -4
  248. 2 Logical_Names
  249. .br
  250. UnZip allows to modify its default behaviour by specifying option defaults
  251. via the UNZIP_OPTS logical name.
  252. For example, the following will cause UnZip to restore owner/protection
  253. information and perform all operations at quiet-level 1 by default:
  254. .sk;.literal
  255. define UNZIP_OPTS "-qX"
  256. .end literal;.sk
  257. Note that the quotation marks here are required to preserve lowercase options
  258. (opposite of the command-line behavior).
  259. To negate a default option on the command line, add one or more minus
  260. signs before the option letter, in addition to the leading switch character
  261. `-':
  262. .sk;.literal
  263. unzip --ql zipfile
  264. .end literal
  265. or
  266. .literal
  267. unzip -l-q zipfile
  268. .end literal;.sk
  269. At present it is not possible to decrement an option below zero--that is,
  270. more than a few minuses have no effect.
  271. .sk
  272. UNZIP_OPTS may be defined as a symbol rather than a logical name, but if
  273. both are defined, the logical name takes precedence.
  274. .!-----------------------------------------------------------------------------
  275. .indent -4
  276. 2 Authors
  277. .br
  278. Info-ZIP; currently maintained by Christian Spieler. VMS support maintained
  279. by Christian Spieler and Hunter Goatley. Originally based on a program
  280. by Samuel H. Smith.
  281. .sk
  282. VMS on-line help ported from UNZIP.TXT by Hunter Goatley.