home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume44 / unzip / part17 < prev    next >
Internet Message Format  |  1994-09-19  |  72KB

  1. From: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
  2. Newsgroups: comp.sources.misc
  3. Subject: v44i082:  unzip - Info-ZIP portable UnZip, version 5.12, Part17/20
  4. Date: 18 Sep 1994 23:16:56 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <35j3bo$qrc@sparky.sterling.com>
  9. X-Md4-Signature: d614ddcf5f0ea61b237fecdedbf92556
  10.  
  11. Submitted-by: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
  12. Posting-number: Volume 44, Issue 82
  13. Archive-name: unzip/part17
  14. Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, COHERENT, AMIGA?, ATARI TOS, SGI, DEC, Cray, Convex, Amdahl, Sun
  15. Supersedes: unzip50: Volume 31, Issue 104-117
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  unzip-5.12/CONTRIBS unzip-5.12/COPYING
  22. #   unzip-5.12/amiga/filedate.c unzip-5.12/amiga/stat.c
  23. #   unzip-5.12/mac/macdir.c unzip-5.12/mac/macscreen.c
  24. #   unzip-5.12/mac/rsrc.hqx unzip-5.12/os2/makefile.os2
  25. #   unzip-5.12/vms/unzip_cli.help
  26. # Wrapped by kent@sparky on Sat Sep 17 23:33:47 1994
  27. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  28. echo If this archive is complete, you will see the following message:
  29. echo '          "shar: End of archive 17 (of 20)."'
  30. if test -f 'unzip-5.12/CONTRIBS' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'unzip-5.12/CONTRIBS'\"
  32. else
  33.   echo shar: Extracting \"'unzip-5.12/CONTRIBS'\" \(8435 characters\)
  34.   sed "s/^X//" >'unzip-5.12/CONTRIBS' <<'END_OF_FILE'
  35. XThis is a partial list of contributors to Info-ZIP UnZip and the code upon
  36. Xwhich it is based.  Others have also contributed, and if you are among them,
  37. Xplease let us know (don't be shy!).  Everyone who contributed via the Info-
  38. XZIP digest *should* now be listed here, but oversights are quite possible.
  39. X
  40. X  Mark Adler             decryption, inflate, explode, funzip code; misc. casts
  41. X  Steve Alpert           VMS rms.h bugfix
  42. X  Glenn Andrews          MS-DOS makefiles; prototyping bugfix; bogus main() fix
  43. X  Joel Aycock            descrip.mms bugfix
  44. X  Eric Baatz             Borland version() info
  45. X  Charles Bailey         VMS_SEVERITY fix; VMSWILD () extension
  46. X  Audrey Beck            Where info for AOL OS/2 forum
  47. X  Mike Bernardi          Unix makefile entry
  48. X  James Birdsall         extract.c/makefile/NT stuff, etc.; awesome beta tester
  49. X  Allan Bjorklund        in misc.c
  50. X  Denise Blakeley        Unix makefile entry
  51. X  Wim Bonner             original OS/2 port; Unix makefile entry
  52. X  Paul Borman            BSD/386 (BSDI) fixes; Unix makefile entry
  53. X  Rodney Brown           stdin-/dev/null bugfix; VMS error levels
  54. X  John Bush              first full Amiga port; FileDate; Amiga fixes; etc.
  55. X  Valter Cavecchia       Unix makefile entry
  56. X  John Cowan             mods to original match.c; other stuff?
  57. X  Frank da Cruz          xxu.c, on which original mapname.c was based
  58. X  Bill Davidsen          -q(q); mapname stuff; envargs; Xenix stuff; etc.
  59. X  Matt "Doc" D'Errico    AIX stuff, Unix makefile entry
  60. X  Kim DeVaughn           Unix makefile entry
  61. X  Arjan de Vet           various things, but I don't remember exactly what...
  62. X  James Dugal            ZMEM stuff; unshrink bugfix; file perms stuff; etc.
  63. X  Jim Dumser             -z stuff; umask bugfixes; opendir/Borland fix; etc.
  64. X  Mark Edwards           mapname.c, misc.c fixes; Unix makefile entry
  65. X  Gershon Elber          Unix makefile entry
  66. X  Bruce Evans            Unix makefile entry
  67. X  David Feinleib         Windows NT port
  68. X  David Fenyes           Unix makefile entry
  69. X  Greg Flint             Unix makefile entry
  70. X  Jeffrey Foy            OS/2 stuff(?); [CP/M]
  71. X  Mike Freeman           VMS GCC makefiles; VMS fixes; etc.
  72. X  Kevin Fritz            Borland bugfixes; etc.
  73. X  Jean-loup Gailly       decryption code; ReadByte replacement; much nagging :-)
  74. X  Forrest Gehrke         Unix makefile entry
  75. X  Tim Geibelhaus         Unix makefile entry
  76. X  Henry Gessau           flush/Fwrite/outcnt fixes; new NT port
  77. X  Christian Ghisler      inflate tweaks
  78. X  Filip Gieszczykiewicz  Unix makefile entry
  79. X  Hunter Goatley         VMSCLI interface; VMS help/RUNOFF; list maintainer
  80. X  Michael Graff          Unix makefile entry
  81. X  Richard H. Gumpertz    Unix makefile entry
  82. X  Steve Hanna            Macintosh stuff
  83. X  Mark Hanning-Lee       docs corrections, Unix Makefile fix
  84. X  Robert Heath           Windows port (WizUnZip)
  85. X  Dave Heiland           new usage screen
  86. X  Ron Henderson          -a bugfix
  87. X  Chris Herborth         new Atari port; Atari fixes
  88. X  Phil Howard            Unix makefile entry
  89. X  Joe Isuzu              Unix makefile entry
  90. X  Aubrey Jaffer          pixel, v7 targets
  91. X  Graham Jenkins         Sequent Dynix/ptx bugfix
  92. X  Peter Jones            Unix makefile entry
  93. X  Larry Jones            ZMEM stuff; unimplod bugfix; etc.
  94. X  Warren Jones           MKS bugfix
  95. X  Kjetil J{\o}rgenson    ln/copy misc_.c Makefile bugfix; OSF/1 fix; NetBSD fix
  96. X  Bruce Kahn             DOS floppy detection?; Unix makefile entry
  97. X  Bob Kemp               NOTINT16 rewrite; Unix makefile entry
  98. X  J. Kercheval           filmatch.c, on which second match.c was based
  99. X  Paul Kienitz           continuing general Amiga porting; Aztec C support; ASM
  100. X  Mike Kincer            AIX "ps2" bugfix
  101. X  David Kirschbaum       mapname port; general-purpose meddling; Python jokes
  102. X  Paul Klahr             Regulus port
  103. X  Jim Knoble             Turbo C++ makefile fix
  104. X  Alvin Koh              Borland C++ bugfixes
  105. X  Karel Kubat            Linux strncasecmp bugfix
  106. X  Bo Kullmar             -z code; bugfixes: umask, do_string, BSD time; etc.
  107. X  Michael Lawler         Borland version() info
  108. X  Johnny Lee             Macintosh port; Win3.1 port; far strings/small model
  109. X  Marty Leisner          man pages fonts; install-target fixes
  110. X  Daniel Lewart          AIX stuff; compiler warnings
  111. X  John Limpert           Unix makefile entry
  112. X  Hogan Long             Borland preprocessor bugfix
  113. X  Mike Long              Unix Makefile installation bugfix
  114. X  Warner Losh            in misc.c
  115. X  Dave Lovelace          Data General AOS/VS port
  116. X  Tony Luu               NT timezone bugfix
  117. X  Igor Mandrichenko      vms.c; many improvements and VMS modifications
  118. X  Javier Manero          file_io.c bugfix; MS-DOS version() bugfix
  119. X  Paul Manno             makefile.tc fixes
  120. X  Fulvio Marino          revised UnZip and ZipInfo man pages; Makefile entry
  121. X  Carl Mascott           original Unix port
  122. X  Rafal Maszkowski       Convex unzip.h fixes; Unix makefile entry
  123. X  Peter Mauzey           Unix makefile entry
  124. X  Scott Maxwell          version.h; OS/2 DLL port [coming soon!]
  125. X  Bob Maynard            16-bit OS/2 pathname bugfix
  126. X  Randy McCaskile        Unix makefile entry
  127. X  Gene McManus           -o code
  128. X  Joe Meadows            file.c, on which VMSmunch.c (timestamps) was based
  129. X  Jason Merrill          Sequent patches
  130. X  Tom Metro              corrupted-zipfile handler bugfix
  131. X  Ricky Mobley           Unix makefile entry
  132. X  Navin Modi             Unix makefile entry
  133. X  Paul Motsuk            Borland _rtl_chmod() fix
  134. X  Anthony Naggs          MS-DOS error handling stuff
  135. X  NIIMI Satoshi          Human68k port
  136. X  Mike O'Carroll         early OS/2 stuff
  137. X  "Moby" Dick O'Connor   Unix makefile entry
  138. X  Thomas Opheys          Watcom C stat() bugfix
  139. X  Humberto Ortiz-Zuazaga Linux port; permissions bugfix; missing declarations
  140. X  Rafael Pappalardo      Convex CRYPT bugfix; Convex Makefile entry, useful info
  141. X  Trevor Paquette        Unix makefile entry
  142. X  Keith Petersen         Pyramid fixes; former Info-ZIP list maintainer
  143. X  Alan Phillips          Unix makefile entry
  144. X  Art Pina               C Set/2 crypt.c optimization bug
  145. X  Piet W. Plomp          nice fix for msc_dos Makefile target
  146. X  Clint Pulley           Unix makefile entry
  147. X  Antonio Querubin, Jr.  descrip.mms (VMS makefile)
  148. X  Alistair Rae           Encore preprocessor bugfix
  149. X  David Robinson         MSC 6.0 stat() bugfix
  150. X  Jochen Roderburg       floating-point BSD4_4 fix
  151. X  Greg Roelofs           maintainer; ZipInfo; orig VMS port; SFX; unshrink; etc.
  152. X  Kai Uwe Rommel         "real" OS/2 port; many new compilers; bugfixes; etc.
  153. X  Paul Roub              first self-extracting code
  154. X  Steve Salisbury        NT fixes; dual-mode SFX instructions; variable INBUFSIZ
  155. X  Georg Sassen           Amiga DICE compiler port
  156. X  Jon Saxton             date formats, OS/2 fixes
  157. X  Tom Schmidt            Unix makefile entry
  158. X  Hugh Schmidt           VMS stuff
  159. X  Martin Schulz          original Atari port, symlinks bugfix
  160. X  Charles Scripter       various bug reports and bugfixes
  161. X  Chris Seaman           Unix time stuff
  162. X  Richard Seay           MS-DOS Quick C makefile
  163. X  Alex Sergejew          file_io.c, stat(), Makefile fixes; Down Under jokes :-)
  164. X  Jim Seymour            Borland OS/2 fixes
  165. X  Timur Shaporev         inflate optimizations
  166. X  Fred Smith             Coherent 4.0 fixes
  167. X  Samuel H. Smith        original unzip code (Pascal and C) for MS-DOS
  168. X  Christian Spieler      performance tweaks; VMS and other fixes
  169. X  Cliff Stanford         file_io.c umask bug
  170. X  Jack Stansbury         DEC Alpha NT makefile fix
  171. X  Jim Steiner            Unix makefile entry
  172. X  Richard Stephen        Unix makefile entry
  173. X  Brian Tillman          "Where" file VMS correction
  174. X  Onno van der Linden    many fixes, esp. Intel Unix and 386 DOS
  175. X  Jim Van Zandt          one of original man pages
  176. X  Geraldo Veiga          Pyramid strrchr/rindex
  177. X  Erik-Jan Vens          Unix makefile entry
  178. X  Antoine Verheijen      new Mac port; Mac fixes; MTS/EBCDIC stuff; etc.
  179. X  Rich Wales             former Info-ZIP moderator and zip guy; MKS stuff
  180. X  Frank Wancho           original TOPS-20 port
  181. X  Paul Weiss             unzipsfx bugfix
  182. X  Paul Wells             original Amiga port for SAS/C and Lattice C (?)
  183. X  Mark Wright            Netware 3.11 NLM port
  184. X  Randy Wright           Unix makefile entry
  185. X  Meiwei Wu              open() return bugfix
  186. X  Martin Zinser          VMS .hlp file for unzipsfx; MAKESFX.COM command file
  187. END_OF_FILE
  188.   if test 8435 -ne `wc -c <'unzip-5.12/CONTRIBS'`; then
  189.     echo shar: \"'unzip-5.12/CONTRIBS'\" unpacked with wrong size!
  190.   fi
  191.   # end of 'unzip-5.12/CONTRIBS'
  192. fi
  193. if test -f 'unzip-5.12/COPYING' -a "${1}" != "-c" ; then 
  194.   echo shar: Will not clobber existing file \"'unzip-5.12/COPYING'\"
  195. else
  196.   echo shar: Extracting \"'unzip-5.12/COPYING'\" \(8192 characters\)
  197.   sed "s/^X//" >'unzip-5.12/COPYING' <<'END_OF_FILE'
  198. X__________________________________________________________________________
  199. X
  200. X  This is the Info-ZIP file COPYING (for UnZip), last updated 10 Aug 94.
  201. X__________________________________________________________________________
  202. X
  203. X   There are currently three explicit copyrights on portions of UnZip
  204. X   code (at least, of which Info-ZIP is aware):  the original Sam Smith
  205. X   copyright on unzip 2.0, upon which Info-ZIP's UnZip 3.0 was based;
  206. X   Igor Mandrichenko's copyright on his routines in vms.c; and Greg
  207. X   Roelofs' copyright on the new version of unshrink.c.  In addition,
  208. X   Mark Adler has placed inflate.h, inflate.c, explode.c and funzip.c
  209. X   into the public domain; i.e., these files may be used without any
  210. X   restrictions beyond those of simple courtesy (credit where it's due).
  211. X   All of these are discussed immediately below; the Frequently Asked
  212. X   Questions regarding (re)distribution of Zip and UnZip are near the
  213. X   end of this file.
  214. X__________________________________________________________________________
  215. X
  216. X   The original unzip source code has been extensively modified and
  217. X   mostly rewritten (changes include random zipfile access rather than
  218. X   sequential; replacement of unimplode() with explode(); replacement
  219. X   of output routines; addition of inflate(), wildcards, filename-
  220. X   mapping, text translation, ...; etc.).  As far as we can tell, the
  221. X   only remaining code which is substantially similar to Mr. Smith's
  222. X   is that in the files unreduce.c and the old version of unshrink.c
  223. X   (although even those have been modified), to which the following
  224. X   copyright therefore applies:
  225. X
  226. X     * Copyright 1989 Samuel H. Smith;  All rights reserved
  227. X     *
  228. X     * Do not distribute modified versions without my permission.
  229. X     * Do not remove or alter this notice or any other copyright notice.
  230. X     * If you use this in your own program you must distribute source code.
  231. X     * Do not use any of this in a commercial product.
  232. X
  233. X   Regarding the first stipulation, Mr. Smith was finally tracked down
  234. X   in southern California [Samuel H. Smith, The Tool Shop, P.O. Box 8808,
  235. X   Panorama City, CA  91412-4808, (818) 891-4228 (voice), (818) 891-6780
  236. X   (BBS, 2400 baud, free access)]  [ADDITIONAL NOTE, July 1994:  he's
  237. X   moved again, as of mid-May 1994; these numbers are no longer correct]:
  238. X
  239. X   "He says that he thought that whoever contacted him understood that
  240. X    he has no objection to the Info-ZIP group's inclusion of his code.
  241. X    His primary concern is that it remain freely distributable, he said."
  242. X
  243. X   Info-ZIP is indebted and grateful to Mr. Smith; we hope he finds our
  244. X   contributions as useful as we have his.
  245. X
  246. X   Note that the third and fourth stipulations still apply to any com-
  247. X   pany which wishes to incorporate the unreduce and/or "old" unshrink
  248. X   code into its products; if you wish to do so, you must contact Mr.
  249. X   Smith regarding licensing.
  250. X
  251. X
  252. X   The following copyright applies to most of the VMS code in vms.c,
  253. X   distributed with UnZip versions 4.2 and later:
  254. X
  255. X     * Copyright (C) 1992 Igor Mandrichenko.
  256. X     * Permission is granted to any individual or institution to use,
  257. X     * copy, or redistribute this software so long as all of the orig-
  258. X     * inal files are included unmodified, that it is not sold for
  259. X     * profit, and that this copyright notice is retained.
  260. X
  261. X
  262. X   The following copyright applies to the new version of "unshrink" in
  263. X   unshrink.c, distributed with UnZip versions 5.11 and later:
  264. X
  265. X     * Copyright (C) 1994 Greg Roelofs.
  266. X     * Permission is granted to any individual/institution/corporate
  267. X     * entity to use, copy, redistribute or modify this software for
  268. X     * any purpose whatsoever, subject to the conditions noted in the
  269. X     * Frequently Asked Questions section below, plus one additional
  270. X     * condition:  namely, that my name remain attached to the source
  271. X     * code.  (Other names may, of course, be added as modifications
  272. X     * are made.)  Corporate legal staff (like at IBM :-) ) who have
  273. X     * problems understanding this can contact me through zip-bugs...
  274. X
  275. X
  276. X   The remaining code was written by many people associated with the
  277. X   Info-ZIP group, with large contributions from (but not limited to):
  278. X   Mark Adler (inflate, explode, funzip), Kai Uwe Rommel (OS/2), John
  279. X   Bush and Paul Kienitz (Amiga), Antoine Verheijen (Macintosh), Hunter
  280. X   Goatley (more VMS) and Greg Roelofs (lots of stuff).  See the file
  281. X   CONTRIBS in the source distribution for a much more complete list of
  282. X   contributors.  As noted above, Mark Adler's inflate.[ch], explode.c
  283. X   and funzip.c are in the public domain.  As for the remaining code,
  284. X   while it may not be explicitly copyrighted, we do request that no
  285. X   one else try to copyright it, either.  In other words, use it with
  286. X   our blessings, but it's still our code.  (You can consider that an
  287. X   implicit copyright if it makes you feel better. :-) )  Thank you!
  288. X__________________________________________________________________________
  289. X
  290. X   Frequently Asked Questions about distributing Zip and UnZip:
  291. X
  292. X
  293. X   Q. Can I distribute Zip and UnZip sources and/or executables?
  294. X
  295. X   A. You may redistribute the latest official distributions without
  296. X      any modification, and without even asking us for permission.
  297. X      [Note that an "executable distribution" includes documentation,
  298. X      even if it's in a separate zipfile; plain executables do NOT
  299. X      count.]  You can charge for the cost of the media (CDROM, disk-
  300. X      ettes, etc.) and a small copying fee.  Distributed archives
  301. X      should follow the naming conventions used in the Where file.
  302. X      If you want to distribute modified versions please contact us
  303. X      at zip-bugs@wkuvx1.wku.edu first.  You must not distribute beta
  304. X      versions without explicit permission to do so.
  305. X
  306. X
  307. X   Q. Can I use the executables of Zip and UnZip to distribute my
  308. X      software?
  309. X
  310. X   A. Yes, so long as it is clear that Zip and UnZip are not being
  311. X      sold, that the source code is freely available, and that there
  312. X      are no extra or hidden charges resulting from its use by or in-
  313. X      clusion with the commercial product.  Here is an example of a
  314. X      suitable notice:
  315. X
  316. X         NOTE:  <Product> is packaged on this CD using Info-ZIP's
  317. X         compression utility.  The installation program uses UnZip
  318. X         to read zip files from the CD.  Info-ZIP's software (Zip,
  319. X         UnZip and related utilities) is free and can be obtained
  320. X         as source code or executables from various bulletin board
  321. X         services and anonymous-ftp sites, including CompuServe's
  322. X         IBMPRO forum and ftp.uu.net:/pub/archiving/zip/*.
  323. X
  324. X
  325. X   Q. Can I use the source code of Zip and UnZip in my commercial
  326. X      application?
  327. X
  328. X   A. Yes, so long as you include in your product an acknowledgment
  329. X      and an offer of the original compression sources for free or for
  330. X      a small copying fee, and make clear that there are no extra or
  331. X      hidden charges resulting from the use of the compression code by
  332. X      your product (see below for an example).  The acknowledgment should
  333. X      appear in at least one piece of human-readable documentation (e.g.,
  334. X      a README file or man page), although additionally putting it in
  335. X      the executable(s) is OK, too.  In other words, you are allowed to
  336. X      sell only your own work, not ours--and we'd like a little credit.
  337. X      [Note the additional restrictions above on the code in unreduce.c,
  338. X      unshrink.c and vms.c.]  Contact us at zip-bugs@wkuvx1.wku.edu if
  339. X      you have special requirements.  We also like to know when our code
  340. X      is being used, but we don't require that.
  341. X
  342. X         <Product> incorporates compression code by the Info-ZIP group.
  343. X         There are no extra charges or costs due to the use of this code,
  344. X         and the original compression sources are freely available from
  345. X         CompuServe in the IBMPRO forum and by anonymous ftp from the
  346. X         Internet site ftp.uu.net:/pub/archiving/zip.  We will also, upon
  347. X         request, mail you the full sources on a 3.5" MSDOS-format disk-
  348. X         ette for the cost of mailing.  Send $2.00 to <address> and ..."
  349. X
  350. X__________________________________________________________________________
  351. X
  352. END_OF_FILE
  353.   if test 8192 -ne `wc -c <'unzip-5.12/COPYING'`; then
  354.     echo shar: \"'unzip-5.12/COPYING'\" unpacked with wrong size!
  355.   fi
  356.   # end of 'unzip-5.12/COPYING'
  357. fi
  358. if test -f 'unzip-5.12/amiga/filedate.c' -a "${1}" != "-c" ; then 
  359.   echo shar: Will not clobber existing file \"'unzip-5.12/amiga/filedate.c'\"
  360. else
  361.   echo shar: Extracting \"'unzip-5.12/amiga/filedate.c'\" \(7106 characters\)
  362.   sed "s/^X//" >'unzip-5.12/amiga/filedate.c' <<'END_OF_FILE'
  363. X/***********************/
  364. X/* Function filedate() */
  365. X/***********************/
  366. X
  367. X/*  FileDate() (originally utime.c), by Paul Wells.  Modified by John Bush
  368. X *  and others (see also sendpkt() comments, below); NewtWare SetFileDate()
  369. X *  clone cheaply ripped off from utime().
  370. X */
  371. X
  372. X/* HISTORY/CHANGES
  373. X *  2 Sep 92, Greg Roelofs, Original coding.
  374. X *  6 Sep 92, John Bush, Incorporated into UnZip 5.1
  375. X *  6 Sep 92, John Bush, Interlude "FileDate()" defined, which calls or
  376. X *            redefines SetFileDate() depending upon AMIGADOS2 definition.
  377. X * 11 Oct 92, John Bush, Eliminated AMIGADOS2 switch by determining
  378. X *            revision via OpenLibrary() call.  Now only one version of
  379. X *            the program runs on both platforms (1.3.x vs. 2.x)
  380. X * 11 Oct 92, John Bush, Merged with Zip version and changed arg passing
  381. X *            to take time_t input instead of struct DateStamp.
  382. X *            Arg passing made to conform with utime().
  383. X * 22 Nov 92, Paul Kienitz, fixed includes for Aztec and cleaned up some
  384. X *            lint-ish errors; simplified test for AmigaDOS version.
  385. X */
  386. X
  387. X/* DESCRIPTION
  388. X * This routine chooses between 2 methods to set the file date on AMIGA.
  389. X * Since AmigaDOS 2.x came out, SetFileDate() was available in ROM (v.36
  390. X * and higher).  Under AmigaDOS 1.3.x (less than v.36 ROM), SetFileDate()
  391. X * must be accomplished by constructing a message packet and sending it
  392. X * to the file system handler of the file to be stamped.
  393. X *
  394. X * The system's ROM version is extracted from the external system Library
  395. X * base.
  396. X *
  397. X * NOTE:  although argument passing conforms with utime(), note the
  398. X *        following differences:  
  399. X *          - Return value is boolean success/failure.
  400. X *          - If a structure or array is passed, only the first value
  401. X *            is used, which *may* correspond to date accessed and not
  402. X *            date modified.
  403. X */
  404. X
  405. X#include <string.h>
  406. X#include <time.h>
  407. X#include <errno.h>
  408. X#include <stdio.h>
  409. X
  410. X#include <exec/types.h>
  411. X#include <exec/memory.h>
  412. X#include <exec/libraries.h>
  413. X#include <libraries/dos.h>
  414. X#include <libraries/dosextens.h>
  415. X
  416. X#ifdef AZTEC_C
  417. X   extern int timezone;
  418. X   void tzset(void);
  419. X#  include <clib/exec_protos.h>
  420. X#  include <clib/dos_protos.h>
  421. X#  include <pragmas/exec_lib.h>
  422. X#  include <pragmas/dos_lib.h>
  423. X#  define ESRCH ENOENT
  424. X#  define EOSERR EIO
  425. X#endif
  426. X
  427. X#if defined(LATTICE) || defined(__SASC)
  428. X#  include <proto/exec.h>
  429. X#  include <proto/dos.h>
  430. X#endif
  431. X
  432. Xextern int _OSERR;
  433. X
  434. X#ifndef SUCCESS
  435. X#  define SUCCESS (-1L)
  436. X#  define FAILURE 0L
  437. X#endif
  438. X
  439. X#define ReqVers 36L  /* required library version for SetFileDate() */
  440. X
  441. Xextern struct Library *SysBase;
  442. X
  443. XLONG FileDate (char *filename, time_t u[]);
  444. X
  445. X/* =============================================================== */
  446. X
  447. XLONG FileDate(filename, u)
  448. X  char *filename;
  449. X  time_t u[];
  450. X{
  451. X  LONG SetFileDate(UBYTE *filename, struct DateStamp *pDate);
  452. X  LONG sendpkt(struct MsgPort *pid, LONG action, LONG *args, LONG nargs);
  453. X  struct MsgPort *taskport;
  454. X  struct FileLock *dirlock, *lock;
  455. X  struct FileInfoBlock *fib;
  456. X  LONG pktargs[4];
  457. X  UBYTE *ptr;
  458. X  long ret;
  459. X
  460. X  struct DateStamp pDate;
  461. X  time_t mtime;
  462. X
  463. X  tzset();
  464. X  mtime=u[0]-timezone;
  465. X
  466. X#ifdef DEBUG
  467. X  fprintf (stderr,"Entry to FileDate(): mtime=%s\n",ctime(&mtime));
  468. X#endif
  469. X    
  470. X/*  magic number = 2922 = 8 years + 2 leaps between 1970 - 1978 */
  471. X
  472. X  pDate.ds_Days = (mtime / 86400L) - 2922L;
  473. X  mtime = mtime % 86400L;
  474. X  pDate.ds_Minute = mtime / 60L;
  475. X  mtime = mtime % 60L;
  476. X  pDate.ds_Tick = mtime * TICKS_PER_SECOND;
  477. X
  478. X#ifdef DEBUG
  479. X  fprintf (stderr,"In FileDate(): Days=%ld Minutes=%ld Ticks=%ld\n",
  480. X           pDate.ds_Days,pDate.ds_Minute,pDate.ds_Tick);
  481. X#endif
  482. X
  483. X  if (SysBase->lib_Version >= ReqVers) {
  484. X      return (SetFileDate(filename,&pDate));  /* native routine at 2.0+ */
  485. X    }
  486. X    else  /* !(SysBase->lib_Version >=ReqVers) */
  487. X    { 
  488. X      if( !(taskport = (struct MsgPort *)DeviceProc(filename)) )
  489. X      {
  490. X          errno = ESRCH;          /* no such process */
  491. X          _OSERR = IoErr();
  492. X          return FAILURE;
  493. X      }
  494. X
  495. X      if( !(lock = (struct FileLock *)Lock(filename,SHARED_LOCK)) )
  496. X      {
  497. X          errno = ENOENT;         /* no such file */
  498. X          _OSERR = IoErr();
  499. X          return FAILURE;
  500. X      }
  501. X
  502. X      if( !(fib = (struct FileInfoBlock *)AllocMem(
  503. X          (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
  504. X      {
  505. X          errno = ENOMEM;         /* insufficient memory */
  506. X          UnLock((BPTR)lock);
  507. X          return FAILURE;
  508. X      }
  509. X
  510. X      if( Examine((BPTR)lock,fib)==FAILURE )
  511. X      {
  512. X          errno = EOSERR;         /* operating system error */
  513. X          _OSERR = IoErr();
  514. X          UnLock((BPTR)lock);
  515. X          FreeMem((char *)fib,(long)sizeof(*fib));
  516. X          return FAILURE;
  517. X      }
  518. X
  519. X      dirlock = (struct FileLock *)ParentDir((BPTR)lock);
  520. X      ptr = (UBYTE *)AllocMem(64L,MEMF_PUBLIC);
  521. X      strcpy((ptr+1),fib->fib_FileName);
  522. X      *ptr = strlen(fib->fib_FileName);
  523. X      FreeMem((char *)fib,(long)sizeof(*fib));
  524. X      UnLock((BPTR)lock);
  525. X
  526. X      /* now fill in argument array */
  527. X
  528. X      pktargs[0] = 0;
  529. X      pktargs[1] = (LONG)dirlock;
  530. X      pktargs[2] = (LONG)&ptr[0] >> 2;
  531. X      pktargs[3] = (LONG)&pDate;
  532. X
  533. X      errno = ret = sendpkt(taskport,ACTION_SET_DATE,pktargs,4L);
  534. X
  535. X      FreeMem(ptr,64L);
  536. X      UnLock((BPTR)dirlock);
  537. X
  538. X      return SUCCESS;
  539. X    }  /* ?(SysBase->lib_Version >= ReqVers) */
  540. X} /* FileDate() */
  541. X
  542. X/* LOW LEVEL SUPPORT ROUTINES */
  543. X
  544. X/*  sendpkt.c
  545. X *  by A. Finkel, P. Lindsay, C. Sheppner
  546. X *  returns Res1 of the reply packet
  547. X */
  548. X/*
  549. X#include <exec/types.h>
  550. X#include <exec/memory.h>
  551. X#include <libraries/dos.h>
  552. X#include <libraries/dosextens.h>
  553. X#include <proto/exec.h>
  554. X#include <proto/dos.h>
  555. X*/
  556. X
  557. XLONG sendpkt(pid,action,args,nargs)
  558. Xstruct MsgPort *pid;           /* process identifier (handler message port) */
  559. XLONG action,                   /* packet type (desired action)              */
  560. X     *args,                    /* a pointer to argument list                */
  561. X     nargs;                    /* number of arguments in list               */
  562. X{
  563. X
  564. X    struct MsgPort *replyport, *CreatePort(UBYTE *, long);
  565. X    void DeletePort(struct MsgPort *);
  566. X    struct StandardPacket *packet;
  567. X    LONG count, *pargs, res1;
  568. X
  569. X    replyport = CreatePort(NULL,0L);
  570. X    if( !replyport ) return(0);
  571. X
  572. X    packet = (struct StandardPacket *)AllocMem(
  573. X            (long)sizeof(struct StandardPacket),MEMF_PUBLIC|MEMF_CLEAR);
  574. X    if( !packet )
  575. X    {
  576. X        DeletePort(replyport);
  577. X        return(0);
  578. X    }
  579. X
  580. X    packet->sp_Msg.mn_Node.ln_Name  = (char *)&(packet->sp_Pkt);
  581. X    packet->sp_Pkt.dp_Link          = &(packet->sp_Msg);
  582. X    packet->sp_Pkt.dp_Port          = replyport;
  583. X    packet->sp_Pkt.dp_Type          = action;
  584. X
  585. X    /* copy the args into the packet */
  586. X    pargs = &(packet->sp_Pkt.dp_Arg1);      /* address of 1st argument */
  587. X    for( count=0; count<nargs; count++ )
  588. X        pargs[count] = args[count];
  589. X
  590. X    PutMsg(pid,(struct Message *)packet);   /* send packet */
  591. X
  592. X    WaitPort(replyport);
  593. X    GetMsg(replyport);
  594. X
  595. X    res1 = packet->sp_Pkt.dp_Res1;
  596. X
  597. X    FreeMem((char *)packet,(long)sizeof(*packet));
  598. X    DeletePort(replyport);
  599. X
  600. X    return(res1);
  601. X
  602. X} /* sendpkt() */
  603. END_OF_FILE
  604.   if test 7106 -ne `wc -c <'unzip-5.12/amiga/filedate.c'`; then
  605.     echo shar: \"'unzip-5.12/amiga/filedate.c'\" unpacked with wrong size!
  606.   fi
  607.   # end of 'unzip-5.12/amiga/filedate.c'
  608. fi
  609. if test -f 'unzip-5.12/amiga/stat.c' -a "${1}" != "-c" ; then 
  610.   echo shar: Will not clobber existing file \"'unzip-5.12/amiga/stat.c'\"
  611. else
  612.   echo shar: Extracting \"'unzip-5.12/amiga/stat.c'\" \(7102 characters\)
  613.   sed "s/^X//" >'unzip-5.12/amiga/stat.c' <<'END_OF_FILE'
  614. X/* Here we have a handmade stat() function because Aztec's c.lib stat() */
  615. X/* does not support an st_mode field, which we need... also a chmod().  */
  616. X
  617. X/* This stat() is by Paul Wells, modified by Paul Kienitz. */
  618. X/* for use with Aztec C >= 5.0 and Lattice C <= 4.01  */
  619. X
  620. X#include <exec/types.h>
  621. X#include <exec/memory.h>
  622. X#include <libraries/dos.h>
  623. X#include <libraries/dosextens.h>
  624. X#ifdef AZTEC_C
  625. X#  include <clib/exec_protos.h>
  626. X#  include <clib/dos_protos.h>
  627. X#  include <pragmas/exec_lib.h>
  628. X#  include <pragmas/dos_lib.h>
  629. X#  include "amiga/z-stat.h"             /* fake version of stat.h */
  630. X#else
  631. X#  include <sys/types.h>
  632. X#  include <sys/stat.h>
  633. X#  include <proto/exec.h>
  634. X#  include <proto/dos.h>
  635. X#endif
  636. X
  637. X#ifndef SUCCESS
  638. X#  define SUCCESS (-1)
  639. X#  define FAILURE (0)
  640. X#endif
  641. X
  642. Xextern int stat(char *file,struct stat *buf);
  643. X
  644. Xstat(file,buf)
  645. Xchar *file;
  646. Xstruct stat *buf;
  647. X{
  648. X
  649. X        struct FileInfoBlock *inf;
  650. X        struct FileLock *lock;
  651. X        long ftime;
  652. X
  653. X        if( (lock = (struct FileLock *)Lock(file,SHARED_LOCK))==0 )
  654. X                /* file not found */
  655. X                return(-1);
  656. X
  657. X        if( !(inf = (struct FileInfoBlock *)AllocMem(
  658. X                (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
  659. X        {
  660. X                UnLock((BPTR)lock);
  661. X                return(-1);
  662. X        }
  663. X
  664. X        if( Examine((BPTR)lock,inf)==FAILURE )
  665. X        {
  666. X                FreeMem((char *)inf,(long)sizeof(*inf));
  667. X                UnLock((BPTR)lock);
  668. X                return(-1);
  669. X        }
  670. X
  671. X        /* fill in buf */
  672. X        buf->st_dev         =
  673. X        buf->st_nlink       =
  674. X        buf->st_uid         =
  675. X        buf->st_gid         =
  676. X        buf->st_rdev        = 0;
  677. X        
  678. X        buf->st_ino         = inf->fib_DiskKey;
  679. X        buf->st_blocks      = inf->fib_NumBlocks;
  680. X        buf->st_size        = inf->fib_Size;
  681. X
  682. X        /* now the date.  AmigaDOS has weird datestamps---
  683. X         *      ds_Days is the number of days since 1-1-1978;
  684. X         *      however, as Unix wants date since 1-1-1970...
  685. X         */
  686. X
  687. X        ftime =
  688. X                (inf->fib_Date.ds_Days * 86400 )                +
  689. X                (inf->fib_Date.ds_Minute * 60 )                 +
  690. X                (inf->fib_Date.ds_Tick / TICKS_PER_SECOND )     +
  691. X                (86400 * 8 * 365 )                              +
  692. X                (86400 * 2 );  /* two leap years */
  693. X
  694. X    /*  ftime += timezone;  */
  695. X
  696. X        buf->st_ctime =
  697. X        buf->st_atime =
  698. X        buf->st_mtime = ftime;
  699. X
  700. X        buf->st_mode = (inf->fib_DirEntryType < 0 ? S_IFREG : S_IFDIR);
  701. X
  702. X        /* lastly, throw in the protection bits */
  703. X        buf->st_mode |= ((inf->fib_Protection ^ 0xF) & 0xFF);
  704. X
  705. X        FreeMem((char *)inf, (long)sizeof(*inf));
  706. X        UnLock((BPTR)lock);
  707. X
  708. X        return(0);
  709. X
  710. X}
  711. X
  712. X
  713. X
  714. X/* opendir(), readdir(), closedir() and rmdir() by Paul Kienitz: */
  715. X
  716. Xunsigned short disk_not_mounted;
  717. X
  718. Xstatic DIR *dir_cleanup_list = NULL;    /* for resource tracking */
  719. X
  720. XDIR *opendir(char *path)
  721. X{
  722. X    DIR *dd = AllocMem(sizeof(DIR), MEMF_PUBLIC);
  723. X    if (!dd) return NULL;
  724. X    if (!(dd->d_parentlock = Lock(path, MODE_OLDFILE))) {
  725. X        disk_not_mounted = IoErr() == ERROR_DEVICE_NOT_MOUNTED;
  726. X        FreeMem(dd, sizeof(DIR));
  727. X        return NULL;
  728. X    } else
  729. X        disk_not_mounted = 0;
  730. X    if (!Examine(dd->d_parentlock, &dd->d_fib) || dd->d_fib.fib_EntryType < 0) {
  731. X        UnLock(dd->d_parentlock);
  732. X        FreeMem(dd, sizeof(DIR));
  733. X        return NULL;
  734. X    }
  735. X    dd->d_cleanuplink = dir_cleanup_list;       /* track them resources */
  736. X    if (dir_cleanup_list)
  737. X        dir_cleanup_list->d_cleanupparent = &dd->d_cleanuplink;
  738. X    dd->d_cleanupparent = &dir_cleanup_list;
  739. X    dir_cleanup_list = dd;
  740. X    return dd;
  741. X}
  742. X
  743. Xvoid closedir(DIR *dd)
  744. X{
  745. X    if (dd) {
  746. X        if (dd->d_cleanuplink)
  747. X            dd->d_cleanuplink->d_cleanupparent = dd->d_cleanupparent;
  748. X        *(dd->d_cleanupparent) = dd->d_cleanuplink;
  749. X        if (dd->d_parentlock)
  750. X            UnLock(dd->d_parentlock);
  751. X        FreeMem(dd, sizeof(DIR));
  752. X    }
  753. X}
  754. X
  755. X/* CALL THIS WHEN HANDLING CTRL-C OR OTHER UNEXPECTED EXIT! */
  756. Xvoid close_leftover_open_dirs(void)
  757. X{
  758. X    while (dir_cleanup_list)
  759. X        closedir(dir_cleanup_list);
  760. X}
  761. X
  762. XDIR *readdir(DIR *dd)
  763. X{
  764. X    return (ExNext(dd->d_parentlock, &dd->d_fib) ? dd : NULL);
  765. X}
  766. X
  767. Xint rmdir(char *path)
  768. X{
  769. X    return (DeleteFile(path) ? 0 : IoErr());
  770. X}
  771. X
  772. X
  773. Xint chmod(char *filename, int bits)     /* bits are as for st_mode */
  774. X{
  775. X    long protmask = (bits & 0xFF) ^ 0xF;
  776. X    return !SetProtection(filename, protmask);
  777. X}
  778. X
  779. X
  780. X#ifdef AZTEC_C
  781. X
  782. X/* This here removes unnecessary bulk from the executable with Aztec: */
  783. Xvoid _wb_parse()  { }
  784. X
  785. X/* This here pretends we have time zone support and suchlike when we don't: */
  786. Xint timezone = 0;
  787. Xvoid tzset()  { }
  788. X
  789. X/* fake a unix function that does not apply to amigados: */
  790. Xint umask()  { return 0; }
  791. X
  792. Xint _OSERR;
  793. X
  794. X#  include <signal.h>
  795. X
  796. X/* C library signal() messes up debugging yet adds no actual usefulness */
  797. Xtypedef void (*__signal_return_type)(int);
  798. X__signal_return_type signal()  { return SIG_ERR; }
  799. X
  800. X
  801. X/* The following replaces Aztec's argv-parsing function for compatibility with
  802. Xthe standard AmigaDOS handling of *E, *N, and *".  It also fixes the problem
  803. Xthe standard _cli_parse() has of accepting only lower-ascii characters. */
  804. X
  805. Xint _argc, _arg_len;
  806. Xchar **_argv, *_arg_lin;
  807. X
  808. Xvoid _cli_parse(struct Process *pp, long alen, register UBYTE *aptr)
  809. X{
  810. X    register UBYTE *cp;
  811. X    register struct CommandLineInterface *cli;
  812. X    register short c;
  813. X    register short starred = 0;
  814. X
  815. X    cli = (struct CommandLineInterface *) (pp->pr_CLI << 2);
  816. X    cp = (UBYTE *) (cli->cli_CommandName << 2);
  817. X    _arg_len = cp[0] + alen + 2;
  818. X    if (!(_arg_lin = AllocMem((long) _arg_len, 0L)))
  819. X        return;
  820. X    c = cp[0];
  821. X    strncpy(_arg_lin, cp + 1, c);
  822. X    _arg_lin[c] = 0;
  823. X    for (cp = _arg_lin + c + 1; alen && (*aptr < '\n' || *aptr > '\r'); alen--)
  824. X        *cp++ = *aptr++;
  825. X    *cp = 0;
  826. X    for (_argc = 1, aptr = cp = _arg_lin + c + 1; ; _argc++) {
  827. X        while (*cp == ' ' || *cp == '\t')
  828. X            cp++;
  829. X        if (!*cp)
  830. X            break;
  831. X        if (*cp == '"') {
  832. X            cp++;
  833. X            while (c = *cp++) {
  834. X                if (starred) {
  835. X                    if (c | 0x20 == 'n')
  836. X                        *aptr++ = '\n';
  837. X                    else if (c | 0x20 == 'e')
  838. X                        *aptr++ = 27;
  839. X                    else
  840. X                        *aptr++ = c;
  841. X                    starred = 0;
  842. X                } else if (c == '"') {  
  843. X                    *aptr++ = 0;
  844. X                    break;
  845. X                } else if (c == '*')
  846. X                    starred = 1;
  847. X                else
  848. X                    *aptr++ = c;
  849. X            }
  850. X        } else {
  851. X            while ((c = *cp++) && c != ' ' && c != '\t')
  852. X                *aptr++ = c;
  853. X            *aptr++ = 0;
  854. X        }
  855. X        if (c == 0)
  856. X            --cp;
  857. X    }
  858. X    *aptr = 0;
  859. X    if (!(_argv = AllocMem((_argc + 1) * sizeof(*_argv), 0L))) {
  860. X        _argc = 0;
  861. X        return;
  862. X    }
  863. X    for (c = 0, cp = _arg_lin; c < _argc; c++) {
  864. X        _argv[c] = cp;
  865. X        cp += strlen(cp) + 1;
  866. X    }
  867. X    _argv[c] = NULL;
  868. X}
  869. X
  870. X#endif /* AZTEC_C */
  871. END_OF_FILE
  872.   if test 7102 -ne `wc -c <'unzip-5.12/amiga/stat.c'`; then
  873.     echo shar: \"'unzip-5.12/amiga/stat.c'\" unpacked with wrong size!
  874.   fi
  875.   # end of 'unzip-5.12/amiga/stat.c'
  876. fi
  877. if test -f 'unzip-5.12/mac/macdir.c' -a "${1}" != "-c" ; then 
  878.   echo shar: Will not clobber existing file \"'unzip-5.12/mac/macdir.c'\"
  879. else
  880.   echo shar: Extracting \"'unzip-5.12/mac/macdir.c'\" \(2914 characters\)
  881.   sed "s/^X//" >'unzip-5.12/mac/macdir.c' <<'END_OF_FILE'
  882. X#include    <Errors.h>
  883. X#include    <Files.h>
  884. X#ifndef THINK_C
  885. X#include    <Strings.h>
  886. X#endif
  887. X
  888. X#ifndef FSFCBLen
  889. X#define FSFCBLen    (*(short *)0x3F6)
  890. X#endif
  891. X
  892. X#include    <errno.h>
  893. X#include    <stdlib.h>
  894. X#include    <string.h>
  895. X
  896. X#include    "macdir.h"
  897. X
  898. Xint closedir(dPtr) DIR *dPtr; {
  899. X    free(dPtr);
  900. X
  901. X    return 0;
  902. X}
  903. X
  904. XDIR *opendir(dirName) char *dirName; {
  905. X    int fullPath, pathLen;
  906. X    char *s, pName[256];
  907. X    HParamBlockRec hPB;
  908. X    CInfoPBRec cPB;
  909. X    DIR *dPtr;
  910. X    OSErr err;
  911. X
  912. X    if (dirName == NULL || *dirName == '\0' || (pathLen = strlen(dirName)) > 255) {
  913. X        errno = EINVAL;
  914. X        return NULL;
  915. X    }
  916. X
  917. X    if (FSFCBLen <= 0) {
  918. X        errno = ENOTDIR;
  919. X        return NULL;
  920. X    }
  921. X
  922. X    /* Get information about volume. */
  923. X
  924. X    memset(&hPB, '\0', sizeof(hPB));
  925. X
  926. X    strcpy(pName, dirName);
  927. X
  928. X    if (((s = strchr(pName, ':')) == NULL) || (*pName == ':')) {
  929. X        fullPath = false;
  930. X    } else {
  931. X        *(s + 1) = '\0';
  932. X        c2pstr(pName);
  933. X        hPB.volumeParam.ioVolIndex = -1;
  934. X        fullPath = true;
  935. X    }
  936. X
  937. X    hPB.volumeParam.ioNamePtr = (StringPtr)pName;
  938. X
  939. X    err = PBHGetVInfo(&hPB, 0);
  940. X
  941. X    if ((err != noErr) || (hPB.volumeParam.ioVFSID != 0)) {
  942. X        errno = ENOENT;
  943. X        return NULL;
  944. X    }
  945. X
  946. X    /* Get information about file. */
  947. X
  948. X    memset(&cPB, '\0', sizeof(cPB));
  949. X
  950. X    strcpy(pName, dirName);
  951. X    c2pstr(pName);
  952. X
  953. X    if (fullPath)
  954. X        cPB.hFileInfo.ioVRefNum = hPB.volumeParam.ioVRefNum;
  955. X
  956. X    cPB.hFileInfo.ioNamePtr = (StringPtr)pName;
  957. X
  958. X    err = PBGetCatInfo(&cPB, false);
  959. X
  960. X    if (err != noErr) {
  961. X        errno = (err == fnfErr) ? ENOENT : EIO;
  962. X        return NULL;
  963. X    }
  964. X
  965. X    if (!(cPB.hFileInfo.ioFlAttrib & ioDirMask)) {
  966. X        errno = ENOTDIR;
  967. X        return NULL;
  968. X    }
  969. X
  970. X    /* Get space for, and fill in, DIR structure. */
  971. X
  972. X    if ((dPtr = (DIR *)malloc(sizeof(DIR))) == NULL) {
  973. X        return NULL;
  974. X    }
  975. X
  976. X    dPtr->ioVRefNum = cPB.dirInfo.ioVRefNum;
  977. X    dPtr->ioDrDirID = cPB.dirInfo.ioDrDirID;
  978. X    dPtr->ioFDirIndex = 1;
  979. X    dPtr->flags = 0;
  980. X
  981. X    return dPtr;
  982. X}
  983. X
  984. Xstruct dirent *readdir(dPtr) DIR *dPtr; {
  985. X    struct dirent *dirPtr;
  986. X    CInfoPBRec cPB;
  987. X    char name[32];
  988. X    OSErr err;
  989. X
  990. X    if (dPtr->flags) {
  991. X        return NULL;
  992. X    }
  993. X
  994. X    /* Get information about file. */
  995. X
  996. X    memset(&cPB, '\0', sizeof(cPB));
  997. X
  998. X    cPB.hFileInfo.ioNamePtr = (StringPtr)name;
  999. X    cPB.hFileInfo.ioFDirIndex = dPtr->ioFDirIndex;
  1000. X    cPB.hFileInfo.ioVRefNum = dPtr->ioVRefNum;
  1001. X    cPB.hFileInfo.ioDirID = dPtr->ioDrDirID;
  1002. X
  1003. X    err = PBGetCatInfo(&cPB, false);
  1004. X
  1005. X    if (err != noErr) {
  1006. X        dPtr->flags = 0xff;
  1007. X        errno = (err == fnfErr) ? ENOENT : EIO;
  1008. X        return NULL;
  1009. X    }
  1010. X
  1011. X    p2cstr((StringPtr)name);
  1012. X
  1013. X    dirPtr = &dPtr->currEntry;
  1014. X
  1015. X    dirPtr->d_fileno = dPtr->ioFDirIndex++;
  1016. X    dirPtr->d_namlen = strlen(name);
  1017. X    strcpy(dirPtr->d_name, name);
  1018. X    dirPtr->d_reclen = sizeof(struct dirent) - sizeof(dirPtr->d_name) + dirPtr->d_namlen;
  1019. X
  1020. X    return dirPtr;
  1021. X}
  1022. END_OF_FILE
  1023.   if test 2914 -ne `wc -c <'unzip-5.12/mac/macdir.c'`; then
  1024.     echo shar: \"'unzip-5.12/mac/macdir.c'\" unpacked with wrong size!
  1025.   fi
  1026.   # end of 'unzip-5.12/mac/macdir.c'
  1027. fi
  1028. if test -f 'unzip-5.12/mac/macscreen.c' -a "${1}" != "-c" ; then 
  1029.   echo shar: Will not clobber existing file \"'unzip-5.12/mac/macscreen.c'\"
  1030. else
  1031.   echo shar: Extracting \"'unzip-5.12/mac/macscreen.c'\" \(7587 characters\)
  1032.   sed "s/^X//" >'unzip-5.12/mac/macscreen.c' <<'END_OF_FILE'
  1033. X#include <QuickDraw.h>
  1034. X
  1035. X#include <stdio.h>
  1036. X#include <stdarg.h>
  1037. X#include <string.h>
  1038. X
  1039. X#define bufferSize      1024
  1040. X
  1041. X#define screenWindow    128
  1042. X
  1043. Xstatic Rect scrollRect, pauseRect;
  1044. Xstatic WindowPtr theWindow;
  1045. Xstatic RgnHandle scrollRgn;
  1046. X
  1047. Xstatic short fontHeight, fontWidth, screenHeight, screenWidth;
  1048. Xstatic short currentPosition, maxPosition, pausePosition;
  1049. X
  1050. Xstatic short *screenLength, startLine, endLine;
  1051. Xstatic char *screenImage, **screenLine;
  1052. X
  1053. Xstatic int screenOptions;
  1054. X
  1055. X#define pauseOption     0x0001
  1056. X#define scrollOption    0x0002
  1057. X
  1058. Xvoid screenOpen(char *Title) {
  1059. X    FontInfo fontInfo;
  1060. X    int n;
  1061. X
  1062. X    theWindow = GetNewWindow(screenWindow, nil, (WindowPtr)(-1));
  1063. X
  1064. X    if ((Title != NULL) && (*Title != '\0')) {
  1065. X        c2pstr(Title);
  1066. X        SetWTitle(theWindow, Title);
  1067. X        p2cstr(Title);
  1068. X    }
  1069. X
  1070. X    ShowWindow(theWindow);
  1071. X
  1072. X    SetPort(theWindow);
  1073. X    TextFont(monaco);
  1074. X    TextSize(9);
  1075. X
  1076. X    GetFontInfo(&fontInfo);
  1077. X    fontHeight = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
  1078. X    fontWidth = fontInfo.widMax;
  1079. X
  1080. X    scrollRgn = NewRgn();
  1081. X
  1082. X    screenWidth = (theWindow->portRect.right - theWindow->portRect.left - 10) /
  1083. X        fontWidth;
  1084. X    screenHeight = (theWindow->portRect.bottom - theWindow->portRect.top) /
  1085. X        fontHeight;
  1086. X    maxPosition = screenHeight * fontHeight;
  1087. X    pausePosition = maxPosition - (currentPosition = fontHeight);
  1088. X
  1089. X    SetRect(&scrollRect, theWindow->portRect.left, theWindow->portRect.top + fontInfo.descent,
  1090. X        theWindow->portRect.right, theWindow->portRect.bottom);
  1091. X    SetRect(&pauseRect, theWindow->portRect.left, pausePosition + fontInfo.descent,
  1092. X        theWindow->portRect.right, theWindow->portRect.bottom);
  1093. X
  1094. X    MoveTo(5, currentPosition);
  1095. X
  1096. X    n = (sizeof(char *) + sizeof(short) + screenWidth) * screenHeight;
  1097. X
  1098. X    screenLine = (char **)NewPtr(n);
  1099. X
  1100. X    screenLength = (short *)&screenLine[screenHeight];
  1101. X    screenImage = (char *)&screenLength[screenHeight];
  1102. X
  1103. X    for (n = 0; n < screenHeight; n++) {
  1104. X        screenLine[n] = &screenImage[n * screenWidth];
  1105. X        screenLength[n] = 0;
  1106. X    }
  1107. X
  1108. X    startLine = endLine = 0;
  1109. X
  1110. X    screenOptions = 0;
  1111. X
  1112. X    return;
  1113. X}
  1114. X
  1115. Xvoid screenControl(options, setting) char *options; int setting; {
  1116. X    int n = 0;
  1117. X
  1118. X    while (*options) {
  1119. X        switch (*options) {
  1120. X        case 'p':
  1121. X            n |= pauseOption;
  1122. X            break;
  1123. X        case 's':
  1124. X            n |= scrollOption;
  1125. X            break;
  1126. X        default:
  1127. X            break;
  1128. X        }
  1129. X        options += 1;
  1130. X    }
  1131. X
  1132. X    if (setting == 0)
  1133. X        screenOptions &= (n ^ (-1));
  1134. X    else
  1135. X        screenOptions |= n;
  1136. X
  1137. X    if ((pausePosition = maxPosition - currentPosition) == 0)
  1138. X        pausePosition = maxPosition - fontHeight;
  1139. X
  1140. X    return;
  1141. X}
  1142. X
  1143. Xvoid screenClose(void) {
  1144. X    DisposPtr(screenLine);
  1145. X
  1146. X    DisposeWindow(theWindow);
  1147. X
  1148. X    return;
  1149. X}
  1150. X
  1151. Xvoid screenUpdate(WindowPtr window) {
  1152. X    GrafPort *savePort;
  1153. X    int m, n;
  1154. X
  1155. X    if (window == theWindow) {
  1156. X        BeginUpdate(window);
  1157. X        if (!EmptyRgn(window->visRgn)) {
  1158. X            GetPort(&savePort);
  1159. X            SetPort(window);
  1160. X            n = startLine;
  1161. X            for (m = 1; ; m++) {
  1162. X                MoveTo(5, m * fontHeight);
  1163. X                if (screenLength[n] != 0)
  1164. X                    DrawText(screenLine[n], 0, screenLength[n]);
  1165. X                if (n == endLine) break;
  1166. X                if ((n += 1) == screenHeight) n = 0;
  1167. X            }
  1168. X            SetPort(savePort);
  1169. X        }
  1170. X        EndUpdate(window);
  1171. X    }
  1172. X
  1173. X    return;
  1174. X}
  1175. X
  1176. Xstatic void screenNewline(void) {
  1177. X    MoveTo(5, currentPosition += fontHeight);
  1178. X    if (currentPosition > maxPosition) {
  1179. X        if (screenOptions & scrollOption) {
  1180. X            ScrollRect(&scrollRect, 0, -fontHeight, scrollRgn);
  1181. X            MoveTo(5, currentPosition = maxPosition);
  1182. X            if ((startLine += 1) == screenHeight) startLine = 0;
  1183. X        } else {
  1184. X            ScrollRect(&scrollRect, 0, -maxPosition + fontHeight, scrollRgn);
  1185. X            MoveTo(5, currentPosition = fontHeight + fontHeight);
  1186. X            startLine = endLine;
  1187. X        }
  1188. X    }
  1189. X    pausePosition -= fontHeight;
  1190. X
  1191. X    if ((endLine += 1) == screenHeight) endLine = 0;
  1192. X    screenLength[endLine] = 0;
  1193. X
  1194. X    return;
  1195. X}
  1196. X
  1197. Xstatic char waitChar(void) {
  1198. X    WindowPtr whichWindow;
  1199. X    EventRecord theEvent;
  1200. X
  1201. X    for ( ; ; ) {
  1202. X        SystemTask();
  1203. X        if (GetNextEvent(everyEvent, &theEvent)) {
  1204. X            switch (theEvent.what) {
  1205. X            case keyDown:
  1206. X                if ((theEvent.modifiers & cmdKey) &&
  1207. X                    ((theEvent.message & charCodeMask) == '.'))
  1208. X                    ExitToShell();
  1209. X                return(theEvent.message & charCodeMask);
  1210. X            case mouseDown:
  1211. X                if (FindWindow(theEvent.where, &whichWindow) == inSysWindow)
  1212. X                    SystemClick(&theEvent, whichWindow);
  1213. X                break;
  1214. X            case updateEvt:
  1215. X                screenUpdate((WindowPtr)theEvent.message);
  1216. X                break;
  1217. X            }
  1218. X        }
  1219. X    }
  1220. X}
  1221. X
  1222. Xstatic void screenPause(void) {
  1223. X
  1224. X    if (pausePosition == 0) {
  1225. X        if (screenOptions & pauseOption) {
  1226. X            DrawText("Press any key to continue ...", 0, 29);
  1227. X            memcpy(screenLine[endLine], "Press any key to continue ...", 29);
  1228. X            screenLength[endLine] = 29;
  1229. X
  1230. X            (void)waitChar();
  1231. X
  1232. X            EraseRect(&pauseRect);
  1233. X            MoveTo(5, currentPosition);
  1234. X            screenLength[endLine] = 0;
  1235. X        }
  1236. X
  1237. X        pausePosition = maxPosition - fontHeight;
  1238. X    }
  1239. X
  1240. X    return;
  1241. X}
  1242. X
  1243. Xvoid screenDisplay(char *s) {
  1244. X    GrafPort *savePort;
  1245. X    int m, n;
  1246. X    char *t;
  1247. X
  1248. X    GetPort(&savePort);
  1249. X    SetPort(theWindow);
  1250. X
  1251. X    while (*s) {
  1252. X        screenPause();
  1253. X
  1254. X        for (t = s; (*s) && (*s != '\n') && (*s != '\r'); s++);
  1255. X
  1256. X        if ((n = s - t) > (m = screenWidth - screenLength[endLine])) n = m;
  1257. X
  1258. X        if (n > 0) {
  1259. X            DrawText(t, 0, n);
  1260. X            memcpy(screenLine[endLine] + screenLength[endLine], t, n);
  1261. X            screenLength[endLine] += n;
  1262. X        }
  1263. X
  1264. X        if ((*s == '\n') || (*s == '\r')) {
  1265. X            screenNewline();
  1266. X            s += 1;
  1267. X        }
  1268. X    }
  1269. X
  1270. X    SetPort(savePort);
  1271. X
  1272. X    return;
  1273. X}
  1274. X
  1275. Xvoid screenDump(char *s, long n) {
  1276. X    GrafPort *savePort;
  1277. X    int k, m;
  1278. X    char *t;
  1279. X
  1280. X    GetPort(&savePort);
  1281. X    SetPort(theWindow);
  1282. X
  1283. X    while (n) {
  1284. X        screenPause();
  1285. X
  1286. X        for (t = s; (n) && (*s != '\n') && (*s != '\r'); s++, n--);
  1287. X
  1288. X        if ((k = s - t) > (m = screenWidth - screenLength[endLine])) k = m;
  1289. X
  1290. X        if (k > 0) {
  1291. X            DrawText(t, 0, k);
  1292. X            memcpy(screenLine[endLine] + screenLength[endLine], t, k);
  1293. X            screenLength[endLine] += k;
  1294. X        }
  1295. X
  1296. X        if ((*s == '\n') || (*s == '\r')) {
  1297. X            screenNewline();
  1298. X            s += 1;
  1299. X            n -= 1;
  1300. X        }
  1301. X    }
  1302. X
  1303. X    SetPort(savePort);
  1304. X
  1305. X    return;
  1306. X}
  1307. X
  1308. Xchar *wfgets(char *s, int n, FILE *stream) {
  1309. X    GrafPort *savePort;
  1310. X    char c, *t = s;
  1311. X
  1312. X    GetPort(&savePort);
  1313. X    SetPort(theWindow);
  1314. X
  1315. X    for (n -= 1; (n > 0) && ((c = waitChar()) != '\r'); n -= 1) {
  1316. X        DrawChar(*t++ = c);
  1317. X        if (screenLength[endLine] < screenWidth)
  1318. X            screenLine[endLine][screenLength[endLine]++] = c;
  1319. X    }
  1320. X
  1321. X    if (c == '\r') screenNewline();
  1322. X
  1323. X    *t = '\0';
  1324. X
  1325. X    SetPort(savePort);
  1326. X
  1327. X    return(s);
  1328. X}
  1329. X
  1330. Xvoid wfprintf(FILE *stream, char *format, ...) {
  1331. X    char buffer[bufferSize];
  1332. X    va_list ap;
  1333. X
  1334. X    va_start(ap, format);
  1335. X    vsprintf(buffer, format, ap);
  1336. X    va_end(ap);
  1337. X
  1338. X    screenDisplay(buffer);
  1339. X
  1340. X    return;
  1341. X}
  1342. X
  1343. Xvoid wprintf(char *format, ...) {
  1344. X    char buffer[bufferSize];
  1345. X    va_list ap;
  1346. X
  1347. X    va_start(ap, format);
  1348. X    vsprintf(buffer, format, ap);
  1349. X    va_end(ap);
  1350. X
  1351. X    screenDisplay(buffer);
  1352. X
  1353. X    return;
  1354. X}
  1355. END_OF_FILE
  1356.   if test 7587 -ne `wc -c <'unzip-5.12/mac/macscreen.c'`; then
  1357.     echo shar: \"'unzip-5.12/mac/macscreen.c'\" unpacked with wrong size!
  1358.   fi
  1359.   # end of 'unzip-5.12/mac/macscreen.c'
  1360. fi
  1361. if test -f 'unzip-5.12/mac/rsrc.hqx' -a "${1}" != "-c" ; then 
  1362.   echo shar: Will not clobber existing file \"'unzip-5.12/mac/rsrc.hqx'\"
  1363. else
  1364.   echo shar: Extracting \"'unzip-5.12/mac/rsrc.hqx'\" \(6945 characters\)
  1365.   sed "s/^X//" >'unzip-5.12/mac/rsrc.hqx' <<'END_OF_FILE'
  1366. X(This file must be converted with BinHex 4.0)
  1367. X
  1368. X:%A9ZHQP`,R4SD@jVBbjbFh*M!(*cFQ058d9%!*!)'PGPLJ#3"!%!N!-B)J!!&b)
  1369. X!!!)eFR)T$3N*)#"l$3N*)*!%HLdqE%4TFNP%)$dJF'eT,4&eERTTF#jdD'PZDf-
  1370. XZFR0bB`)!N!0bFh*M8P0&4!%!N!0bFh*M8P0&4!%!!*`"J!#3%UThLmB!N!BD9fP
  1371. XcG#!UF(ST$AX0)#"0B@0*EQC[)#T`E@NJ25"MB@aXEf-S)$%X)(0THQ9[CL!SFh4
  1372. XbG@0d)%eKBdPZCQmT+6X0)#!0)#"TCL!SF'eT+3dJ)(X0)*!%3dPZCQp33P*PBb"
  1373. XMDA"LFMX0)*!%8'&bB@e#E'pMDe*PBb"`BR)l$5!J!*!$8`85J!#3!aK*EQC[,9T
  1374. XTF#Gc)&9ZHQP`)'C[FL"0B@-c5@jQEbeDDA!RFb"9ERTTF#"QEh)JG'KP)%eKBfP
  1375. XZG'pcD#`J3fp`HA*TCfKd)+Na16Nd!*!$4!I!(c!r#(m%I`6r![m#rrk"rS(q3Ia
  1376. X"r#(i'I!(`!!!"m!Im$riIrarr2rqrrlrr[rqrrjrr(rm2rJIm!I!!*!$"`!(!*!
  1377. X$4!I!(r!rq&rd6q5(`S1#J3+$JSI#6q4Ip$ri(r!(`!!!"m!Im$riIrarr2rqrrl
  1378. Xrr[rqrrjrr(rm2rJIm!I!!*!$"`!(!*!$4!I!'I!Kq%(m3Ib"rS(qrrlr![m#I`4
  1379. Xr"$m)(c!(`!!!"m!Im$riIrarr2rqrrlrr[rqrrjrr(rm2rJIm!I!!*!$"`!(!*!
  1380. X$4!I!'$!J#(!FH$cmI[lqrrk3!raqH$a`(#!)'$!(`!!!"m!Im$riIrarr2rqrrl
  1381. Xrr[rqrrjrr(rm2rJIm!I!!*!$"`!(!*!$+!#!!*!)rj!$q`%8$%&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$R!*!&Jrrr"!!",`#3"B$rr`!!!AF!N!@"rrm!!"5U!*!&J[rr"!!"S`#
  1469. X3"B2rr`!!&K!!N!@!rrm!!!([!*!&JIrr!!!"r3#3"B$rr`!!&8)!N!@"rrm!!!+
  1470. X(!*!&J2rr!!!#S!#3"B$rr`!!!RF!N!@"rrm!!!3+!*!&J2rr!!!#`J#3"B$rr`!
  1471. X!"4N!N!@!rrm!!!+h!*!&JIrr!!!&$J#3"B$rr`!!!mB!N!@"rrm!!!9"!*!+"B8
  1472. X!N!@"rrm!!!@+!*!&J2rr!!!0RJ#3"B(rr`!!#Bi!N!@!rrm!!"1Q!*!&JIrr!!!
  1473. X+NJ#3"B$rr`!!%D)!N!@"rrm!!!b@!*!&J2rr!!!0'J#3"!j2GfjPFL"bCA0[GA*
  1474. XMCC%`!:
  1475. END_OF_FILE
  1476.   if test 6945 -ne `wc -c <'unzip-5.12/mac/rsrc.hqx'`; then
  1477.     echo shar: \"'unzip-5.12/mac/rsrc.hqx'\" unpacked with wrong size!
  1478.   fi
  1479.   # end of 'unzip-5.12/mac/rsrc.hqx'
  1480. fi
  1481. if test -f 'unzip-5.12/os2/makefile.os2' -a "${1}" != "-c" ; then 
  1482.   echo shar: Will not clobber existing file \"'unzip-5.12/os2/makefile.os2'\"
  1483. else
  1484.   echo shar: Extracting \"'unzip-5.12/os2/makefile.os2'\" \(7372 characters\)
  1485.   sed "s/^X//" >'unzip-5.12/os2/makefile.os2' <<'END_OF_FILE'
  1486. X# Makefile for UnZip, UnZipSFX and fUnZip                       23 July 1994
  1487. X#
  1488. X# - for Microsoft C, version 6.00 or higher, for use under OS/2 1.x (16-bit)
  1489. X# - for Watcom C/386, version 9.0 or higher, for use under OS/2 2.x (32-bit)
  1490. X# - for IBM C/C++ Set/2, for use under OS/2 2.x (32-bit)
  1491. X# - for Borland C++, for use under OS/2 2.x (32-bit)
  1492. X# - for GNU gcc (emx kit), version 0.8e or higher, for use under OS/2 2.x
  1493. X#
  1494. X# cross-compilation:
  1495. X# - for Microsoft C, version 6.00 or higher, for use under MS-DOS (16-bit)
  1496. X# - for GNU gcc (emx), version 0.8h or higher, for use under MS-DOS (32-bit)
  1497. X
  1498. X# To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
  1499. X# name being "makefile.os2", and it must be in the main unzip directory).
  1500. X
  1501. X# Notes on Microsoft C 6.00 compilation for OS/2:
  1502. X#
  1503. X#   The resulting programs can be used under OS/2 1.x or 2.x protected
  1504. X#   mode only, not under DOS.  A larger stack has to be used for OS/2
  1505. X#   because system calls use more stack than under DOS; 8k is recommended
  1506. X#   by Microsoft.
  1507. X
  1508. X# Notes on IBM C Set/2, Watcom C/386, Borland C++ or emx+gcc compilation:
  1509. X#
  1510. X#   The resulting programs can be used under protected mode of OS/2 2.x
  1511. X#   only, not under OS/2 1.x and not under DOS.
  1512. X#
  1513. X#   The NFLAGS macro is used to work around an optimization bug in the IBM
  1514. X#   C++ Set compiler; this is fixed by CSD #4, so NFLAGS="" can be used for
  1515. X#   all targets below.  We'll leave it as is for this release...
  1516. X#
  1517. X#   For Watcom C/386, edit the os2$(OBJ) target so that os2/os2.c reads
  1518. X#   os2\os2.c instead.  Watcom can't handle forward slashes; gcc can't
  1519. X#   handle backslashes.  We'll see about making this a macro next time...
  1520. X
  1521. Xdefault:
  1522. X    @echo "Enter `$(MAKE) -f makefile.os2 target' with makefile.os2 copied"
  1523. X    @echo "to the main UnZip directory and where target is one of:"
  1524. X    @echo "   msc mscdos ibm ibmdyn ibmdebug ibmprof"
  1525. X    @echo "   watcom borland gcc gccdyn gccdebug gccdos"
  1526. X
  1527. X# MS C 6.00 for OS/2, 16-bit (should figure out way to split unzip/funzip 
  1528. X# compiles so former is always large model and latter always small model...)
  1529. Xmsc:
  1530. X    $(MAKE) -f makefile.os2 all \
  1531. X    CC="cl -nologo -AL -Ocegit -Gs -I. $(FP)" \
  1532. X    CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC $(LOCAL_UNZIP)" \
  1533. X    NFLAGS="" \
  1534. X    LDFLAGS="-Lp -Fe" \
  1535. X    LDFLAGS2="-link /noe" \
  1536. X    OUT="-Fo" \
  1537. X    OBJ=".obj" \
  1538. X    DEF="os2\unzip16.def"
  1539. X
  1540. X# cross-compilation for MS-DOS with MS C 6.00 (same comment as above...formerly;
  1541. X# now unzip is small model again, with [almost] all strings in far memory)
  1542. Xmscdos:
  1543. X    $(MAKE) -f makefile.os2 all \
  1544. X    CC="cl -nologo -AS -Oaict -Gs -I. $(FP)" \
  1545. X    CFLAGS="-Zp1 -W3 $(LOCAL_UNZIP)" \
  1546. X    NFLAGS="" \
  1547. X    LDFLAGS="-F 0c00 -Lr -Fe" \
  1548. X    LDFLAGS2="-link /noe /exe" \
  1549. X    OUT="-Fo" \
  1550. X    OBJ=".obj" \
  1551. X    OBJU2="msdos.obj" \
  1552. X    OBJX2="msdos_.obj"
  1553. X
  1554. X# IBM C Set/2, statically linked runtime
  1555. Xibm:
  1556. X    $(MAKE) -f makefile.os2 all \
  1557. X    CC="icc -Q -O -Gs -I." \
  1558. X    CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \
  1559. X    NFLAGS="-O-" \
  1560. X    LDFLAGS="-Fe" \
  1561. X    LDFLAGS2="" \
  1562. X    OUT="-Fo" \
  1563. X    OBJ=".obj" \
  1564. X    DEF="os2\unzip.def"
  1565. X
  1566. X# IBM C Set/2, dynamically linked runtime
  1567. Xibmdyn:
  1568. X    $(MAKE) -f makefile.os2 all \
  1569. X    CC="icc -Q -O -Gs -Gd -I." \
  1570. X    CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \
  1571. X    NFLAGS="-O-" \
  1572. X    LDFLAGS="-Fe" \
  1573. X    LDFLAGS2="" \
  1574. X    OUT="-Fo" \
  1575. X    OBJ=".obj" \
  1576. X    DEF="os2\unzip.def"
  1577. X
  1578. X# IBM C Set/2, debug version
  1579. Xibmdebug:
  1580. X    $(MAKE) -f makefile.os2 all \
  1581. X    CC="icc -Q -Ti -I." \
  1582. X    CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \
  1583. X    NFLAGS="-O-" \
  1584. X    LDFLAGS="-Fe" \
  1585. X    LDFLAGS2="" \
  1586. X    OUT="-Fo" \
  1587. X    OBJ=".obj" \
  1588. X    DEF="os2\unzip.def"
  1589. X
  1590. X# IBM C Set/2, profiling version for PROFIT
  1591. Xibmprof:
  1592. X    $(MAKE) -f makefile.os2 all \
  1593. X    CC="icc -Q -O -Gs -Gh -Ti -I." \
  1594. X    CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \
  1595. X    NFLAGS="-O-" \
  1596. X    LDFLAGS="-Fe" \
  1597. X    LDFLAGS2="profit.obj" \
  1598. X    OUT="-Fo" \
  1599. X    OBJ=".obj" \
  1600. X    DEF="os2\unzip.def"
  1601. X
  1602. X# Watcom C/386 9.0
  1603. Xwatcom:
  1604. X    $(MAKE) -f makefile.os2 all \
  1605. X    CC="wcl386 -zq -Ox -s -I." \
  1606. X    CFLAGS="-Zp1 -DOS2 $(LOCAL_UNZIP)" \
  1607. X    NFLAGS="" \
  1608. X    LDFLAGS="-k0x40000 -x -Fe=" \
  1609. X    LDFLAGS2="" \
  1610. X    OUT="-Fo" \
  1611. X    OBJ=".obj" \
  1612. X    DEF=""
  1613. X
  1614. X# Borland C++
  1615. Xborland:
  1616. X    $(MAKE) -f makefile.os2 all \
  1617. X    CC="bcc -O -I." \
  1618. X    CFLAGS="-w- -D__cdecl -D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \
  1619. X    NFLAGS="" \
  1620. X    LDFLAGS="-e" \
  1621. X    LDFLAGS2="" \
  1622. X    OUT="-o" \
  1623. X    OBJ=".obj" \
  1624. X    DEF="-sDos2\unzip.def"
  1625. X
  1626. X# emx 0.8f and later, gcc, OMF format, statically linked C runtime and emx
  1627. Xgcc:
  1628. X    $(MAKE) -f makefile.os2 all \
  1629. X    CC="gcc -Zomf -Zsys -O -I." \
  1630. X    CFLAGS="-Wall -DOS2 $(LOCAL_UNZIP)" \
  1631. X    NFLAGS="" \
  1632. X    LDFLAGS="-o ./" \
  1633. X    LDFLAGS2="-s -los2" \
  1634. X    OUT="-o" \
  1635. X    OBJ=".obj" \
  1636. X    DEF="os2/unzip.def"
  1637. X
  1638. X# emx 0.8g and later, gcc, OMF format, dynamically linked C runtime and emx
  1639. X# (for 0.8f or earlier, change -Zmtd to -Zmt)
  1640. Xgccdyn:
  1641. X    $(MAKE) -f makefile.os2 all \
  1642. X    CC="gcc -Zomf -Zmtd -O -I." \
  1643. X    CFLAGS="-Wall -DOS2 $(LOCAL_UNZIP)" \
  1644. X    NFLAGS="" \
  1645. X    LDFLAGS="-o ./" \
  1646. X    LDFLAGS2="-s -los2" \
  1647. X    OUT="-o" \
  1648. X    OBJ=".obj" \
  1649. X    DEF="os2/unzip.def"
  1650. X
  1651. X# emx, gcc, a.out format, with debug info for gdb
  1652. Xgccdebug:
  1653. X    $(MAKE) -f makefile.os2 all \
  1654. X    CC="gcc -g -I." \
  1655. X    CFLAGS="-Wall -DOS2 $(LOCAL_UNZIP)" \
  1656. X    NFLAGS="" \
  1657. X    LDFLAGS="-o ./" \
  1658. X    LDFLAGS2="-los2" \
  1659. X    OUT="-o" \
  1660. X    OBJ=".o"
  1661. X
  1662. X# emx, gcc, a.out format, for MS-DOS
  1663. Xgccdos:
  1664. X    $(MAKE) -f makefile.os2 all \
  1665. X    CC="gcc -O -I." \
  1666. X    CFLAGS="-Wall -DMSDOS $(LOCAL_UNZIP)" \
  1667. X    NFLAGS="" \
  1668. X    LDFLAGS="-o ./" \
  1669. X    LDFLAGS2="-s" \
  1670. X    OUT="-o" \
  1671. X    OBJ=".o" \
  1672. X    OBJU2="msdos.o" \
  1673. X    OBJX2="msdos_.o"
  1674. X
  1675. X# variables
  1676. XOBJU  = unzip$(OBJ) crypt$(OBJ) envargs$(OBJ) explode$(OBJ) \
  1677. X    extract$(OBJ) file_io$(OBJ) inflate$(OBJ) match$(OBJ) \
  1678. X    unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ)
  1679. XOBJU2 = os2$(OBJ)
  1680. XOBJX  = unzip_$(OBJ) crypt$(OBJ) extract_$(OBJ) file_io$(OBJ) \
  1681. X    inflate$(OBJ) match$(OBJ)
  1682. XOBJX2 = os2_$(OBJ)
  1683. XOBJF  = funzip$(OBJ) crypt_$(OBJ) inflate_$(OBJ)
  1684. X
  1685. X.SUFFIXES:    .c $(OBJ)
  1686. X
  1687. X.c$(OBJ):
  1688. X    $(CC) -c $(CFLAGS) $<
  1689. X
  1690. Xall:    unzip.exe funzip.exe unzipsfx.exe
  1691. X#all:    unzipsfx.exe
  1692. X
  1693. Xunzip.exe: $(OBJU) $(OBJU2)
  1694. X    $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(OBJU2) $(LDFLAGS2)
  1695. X
  1696. Xfunzip.exe: $(OBJF)
  1697. X    $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(LDFLAGS2)
  1698. X
  1699. Xunzipsfx.exe:    $(OBJX) $(OBJX2)
  1700. X    $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(OBJX2) $(LDFLAGS2)
  1701. X
  1702. X
  1703. Xenvargs$(OBJ):    envargs.c unzip.h
  1704. Xexplode$(OBJ):    explode.c unzip.h
  1705. Xextract$(OBJ):    extract.c unzip.h crypt.h
  1706. Xfile_io$(OBJ):    file_io.c unzip.h crypt.h tables.h
  1707. Xfunzip$(OBJ):    funzip.c unzip.h crypt.h tables.h
  1708. Xinflate$(OBJ):    inflate.c unzip.h
  1709. Xmatch$(OBJ):    match.c unzip.h
  1710. Xunreduce$(OBJ):    unreduce.c unzip.h
  1711. Xunshrink$(OBJ):    unshrink.c unzip.h
  1712. Xunzip$(OBJ):    unzip.c unzip.h crypt.h version.h
  1713. Xzipinfo$(OBJ):    zipinfo.c unzip.h
  1714. X
  1715. Xmsdos$(OBJ):    msdos/msdos.c unzip.h            # MS-DOS only
  1716. X    $(CC) -c $(CFLAGS) msdos/msdos.c
  1717. X
  1718. Xmsdos_$(OBJ):    msdos/msdos.c unzip.h            # MS-DOS unzipsfx only
  1719. X    $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ msdos/msdos.c
  1720. X
  1721. Xos2$(OBJ):    os2/os2.c unzip.h            # OS/2 only
  1722. X    $(CC) -c $(CFLAGS) os2/os2.c
  1723. X
  1724. Xos2_$(OBJ):    os2/os2.c unzip.h            # OS/2 unzipsfx only
  1725. X    $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2/os2.c
  1726. X
  1727. X# NFLAGS are solely used as work-around for optimization bug in IBM C++ Set
  1728. Xcrypt$(OBJ):    crypt.c unzip.h crypt.h zip.h
  1729. X    $(CC) -c $(CFLAGS) $(NFLAGS) crypt.c
  1730. X
  1731. Xcrypt_$(OBJ):    crypt.c unzip.h zip.h crypt.h        # funzip only
  1732. X    $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ crypt.c
  1733. X
  1734. Xextract_$(OBJ):    extract.c unzip.h crypt.h        # unzipsfx only
  1735. X    $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ extract.c
  1736. X
  1737. Xinflate_$(OBJ):    inflate.c inflate.h unzip.h crypt.h    # funzip only
  1738. X    $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c
  1739. X
  1740. Xunzip_$(OBJ):    unzip.c unzip.h crypt.h version.h    # unzipsfx only
  1741. X    $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c
  1742. END_OF_FILE
  1743.   if test 7372 -ne `wc -c <'unzip-5.12/os2/makefile.os2'`; then
  1744.     echo shar: \"'unzip-5.12/os2/makefile.os2'\" unpacked with wrong size!
  1745.   fi
  1746.   # end of 'unzip-5.12/os2/makefile.os2'
  1747. fi
  1748. if test -f 'unzip-5.12/vms/unzip_cli.help' -a "${1}" != "-c" ; then 
  1749.   echo shar: Will not clobber existing file \"'unzip-5.12/vms/unzip_cli.help'\"
  1750. else
  1751.   echo shar: Extracting \"'unzip-5.12/vms/unzip_cli.help'\" \(8254 characters\)
  1752.   sed "s/^X//" >'unzip-5.12/vms/unzip_cli.help' <<'END_OF_FILE'
  1753. X.!
  1754. X.!  File:    UNZIP_CLI.HELP
  1755. X.!
  1756. X.!  Author:    Hunter Goatley
  1757. X.!
  1758. X.!  Date:    12 Jul 94 (orig. UNZIP.RNH, 23 Oct 91)
  1759. X.!
  1760. X.!  Description:
  1761. X.!
  1762. X.!    TPU-processable source file to produce VMS on-line help for
  1763. X.!    portable UnZip.  Adapted from UNZIP.RNH, originally based on
  1764. X.!    UNZIP.MAN (now UNZIP.DOC).
  1765. X.!
  1766. X.!    To build:
  1767. X.!        $ EDIT /TPU/NOSECTION/NODISPLAY/COMMAND=CVTHELP.TPU UNZIP_CLI.HELP
  1768. X.!        $ REN UNZIP_CLI.RNH UNZIP.RNH
  1769. X.!        $ RUNOFF UNZIP.RNH
  1770. X.!        $ LIBR /HELP/INSERT libr UNZIP
  1771. X.!
  1772. X.!  Modification history:
  1773. X.!
  1774. X.!    02-001        Hunter Goatley        12-JUL-1994 16:59
  1775. X.!        Genesis.
  1776. X.!    02-002        Cave Newt        14-JUL-1994 11:36
  1777. X.!        Fixed /*TEXT options and added/removed various options.
  1778. X.!    02-003        Cave Newt        28-JUL-1994 08:54
  1779. X.!        Removed semicolons from comments and moved /ZIPINFO.
  1780. X.!
  1781. X<INIT>
  1782. X<MAIN>
  1783. XUNZIP
  1784. X
  1785. XUnZip is used to extract files compressed and packaged by Zip (see HELP ZIP
  1786. Xfor information on ZIP).
  1787. X
  1788. XFor a brief help on Zip and Unzip, run each without specifying any
  1789. Xparameters on the command line.
  1790. X
  1791. XUNZIP will list, test, or extract from a ZIP archive.  ZIP archives are commonly
  1792. Xfound on MS-DOS systems; a VMS version of ZIP can also be found here.
  1793. X
  1794. XArchive member extraction is implied by the absence of the -c, -p, -t, -l, -v or
  1795. X-z options.  All archive members are processed unless a filespec is provided to
  1796. Xspecify a subset of the archive members.
  1797. X<FORMAT>
  1798. XUNZIP zipfile [file[,...]] [/qualifiers]
  1799. X
  1800. X.!
  1801. X<TOPIC>
  1802. XParameters
  1803. X
  1804. X<PARAMETER>
  1805. Xzipfile
  1806. X
  1807. X<PTEXT>
  1808. XFile specification for the ZIP archive(s) with optional wildcards. UnZip will
  1809. Xperform actions specified for every zipfile matching the specification.
  1810. XThe default file specification is SYS$DISK:[].ZIP.
  1811. X
  1812. XNote that self-extracting ZIP files are supported; just specify the .EXE
  1813. Xsuffix yourself.
  1814. X<TXETP>
  1815. X
  1816. X<PARAMETER>
  1817. Xfile
  1818. X
  1819. X<PTEXT>
  1820. XAn optional comma-separated list of archive members to be processed;
  1821. Xif no list is given, all archive members are processed.  Expressions
  1822. Xmay be used to match multiple members.  Expressions should be enclosed
  1823. Xin double-quotes to prevent interpretation by DCL.  Multiple filenames
  1824. Xshould be separated by blanks.  Each file specification is similar to
  1825. Xa Unix egrep expression and may contain:
  1826. X
  1827. X<LITERAL>
  1828. X|*       matches a sequence of 0 or more characters
  1829. X|?       matches exactly 1 character
  1830. X|[...]   matches any single character found inside the brackets;
  1831. X|        ranges are specified by a beginning character,
  1832. X|        a hyphen, and an ending character.  If a '!' or '^'
  1833. X|        immediately follows the left bracket, then any character
  1834. X|        not in the given range is matched.
  1835. X<LARETIL>
  1836. X<TXETP>
  1837. X
  1838. X<QUALIFIERS>
  1839. X<QUALIFIER>
  1840. X/ZIPINFO
  1841. X
  1842. X/ZIPINFO
  1843. X
  1844. XDisplays information about the Zip archive and the files contained therein.
  1845. XThis function used to be provided by a separate ZipInfo program.
  1846. X
  1847. XThe following qualifiers may be specified with /ZIPINFO:
  1848. X
  1849. X<LITERAL>
  1850. X|  /SHORT     Short UNIX "ls -l" format (default)
  1851. X|  /MEDIUM    Medium UNIX "ls -l" format
  1852. X|  /LONG      Long UNIX "ls -l" format
  1853. X|  /ONE_LINE  Filenames only, one per line
  1854. X|  /VERBOSE   Verbose, multi-page format
  1855. X|  /HEADER    Print header lines
  1856. X|  /TOTALS    Print totals for files
  1857. X|  /TIMES     Print file times in sortable decimal format
  1858. X<LARETIL>
  1859. X<QUALIFIER>
  1860. X/AUTOTEXT
  1861. X
  1862. X/AUTOTEXT
  1863. X/NOAUTOTEXT
  1864. X
  1865. XAutomatically extracts files marked as "text" (rather than "binary") in
  1866. Xin standard VMS text file format.
  1867. X<QUALIFIER>
  1868. X/BRIEF
  1869. X
  1870. X/BRIEF
  1871. X
  1872. XWhen used with /LIST, specifies that a brief listing of the archive's
  1873. Xcontents is to be displayed.  A brief listing shows the length, date,
  1874. Xtime, and file name for the files in the archive.
  1875. X<QUALIFIER>
  1876. X/CASE_INSENSITIVE
  1877. X
  1878. X/CASE_INSENSITIVE
  1879. X/NOCASE_INSENSITIVE
  1880. X
  1881. XMatch filenames case-insensitively.  (Good default option under VMS.)
  1882. X<QUALIFIER>
  1883. X/COMMENT
  1884. X
  1885. X/COMMENT
  1886. X/NOCOMMENT
  1887. X
  1888. XDisplay the archive comment.
  1889. X<QUALIFIER>
  1890. X/DIRECTORY
  1891. X
  1892. X/DIRECTORY=directory-spec
  1893. X
  1894. XSpecifies the output directory where all the extracted files are to be
  1895. Xplaced.
  1896. X<QUALIFIER>
  1897. X/EXCLUDE
  1898. X
  1899. X/EXCLUDE=file
  1900. X
  1901. XA comma-separated list of files to exclude when extracting files.
  1902. XIf multiple files are specified, the list should be included in
  1903. Xparentheses.
  1904. X
  1905. X<QUALIFIER>
  1906. X/FRESHEN
  1907. X
  1908. X/FRESHEN
  1909. X/NOFRESHEN
  1910. X
  1911. XFreshen existing files; replace if newer.  Does not cause any new files to
  1912. Xbe created.
  1913. X<QUALIFIER>
  1914. X/FULL
  1915. X
  1916. X/FULL
  1917. X
  1918. XWhen used with /LIST, specifies that a full listing of the archive's
  1919. Xcontents is to be displayed.  A full listing shows the length,
  1920. Xcompression method, compressed size, compression ratio, date,
  1921. Xtime, CRC value, and file name for the files in the archive.
  1922. X<QUALIFIER>
  1923. X/JUNK
  1924. X
  1925. X/JUNK
  1926. X/NOJUNK
  1927. X
  1928. XJunk the stored paths (don't recreated the archive's directory
  1929. Xstructure.
  1930. X<QUALIFIER>
  1931. X/LIST
  1932. X
  1933. X/LIST
  1934. X
  1935. XList the contents of the archive.  /BRIEF and /FULL can be used to
  1936. Xspecify the amount of information displayed.  The default is /BRIEF.
  1937. X<QUALIFIER>
  1938. X/LOWERCASE
  1939. X
  1940. X/LOWERCASE
  1941. X/NOLOWERCASE
  1942. X
  1943. XConvert filenames from all-uppercase operating systems to lowercase.  This 
  1944. Xoption has no effect under VMS.
  1945. X<QUALIFIER>
  1946. X/OVERWRITE
  1947. X
  1948. X/OVERWRITE
  1949. X/NOOVERWRITE
  1950. X
  1951. XOverwrite existing files when extracting.
  1952. X<QUALIFIER>
  1953. X/PIPE
  1954. X
  1955. X/PIPE
  1956. X
  1957. XExtract files to SYS$OUTPUT with no informational messages.
  1958. X<QUALIFIER>
  1959. X/QUIET
  1960. X
  1961. X/QUIET
  1962. X
  1963. XPerform operations quietly.  /SUPER_QUIET can be specified to make it
  1964. Xeven quiet.
  1965. X<QUALIFIER>
  1966. X/RESTORE
  1967. X
  1968. X/RESTORE
  1969. X/NORESTORE
  1970. X
  1971. XRestore file owner and protection settings.
  1972. X<QUALIFIER>
  1973. X/SCREEN
  1974. X
  1975. X/SCREEN
  1976. X/NOSCREEN
  1977. X
  1978. XExtracts matching files to SYS$OUTPUT (the terminal).
  1979. X<QUALIFIER>
  1980. X/SUPER_QUIET
  1981. X
  1982. X/SUPER_QUIET
  1983. X
  1984. XPerform operations super-quietly.
  1985. X<QUALIFIER>
  1986. X/TEST
  1987. X
  1988. X/TEST
  1989. X/NOTEST
  1990. X
  1991. XTest archive files.
  1992. X<QUALIFIER>
  1993. X/TEXT
  1994. X
  1995. X/TEXT
  1996. X/NOTEXT
  1997. X
  1998. XExtracts all files in standard VMS text file format.
  1999. X<QUALIFIER>
  2000. X/UPDATE
  2001. X
  2002. X/UPDATE
  2003. X/NOUPDATE
  2004. X
  2005. XUpdate existing files; create new ones if needed.
  2006. X<QUALIFIER>
  2007. X/VERSION
  2008. X
  2009. X/VERSION
  2010. X/NOVERSION
  2011. X
  2012. XRetain VMS file version numbers.
  2013. X
  2014. X<TOPIC>
  2015. XAuthors
  2016. X
  2017. XInfo-ZIP; currently maintained by Greg Roelofs.  VMS support maintained
  2018. Xby Igor Mandrichenko and Hunter Goatley.  Originally based on a program
  2019. Xby Samuel H. Smith.
  2020. X
  2021. XVMS on-line help ported from UNZIP.DOC by Hunter Goatley.
  2022. X
  2023. X<TOPIC>
  2024. XUNIX_Options
  2025. X
  2026. XThe default action of UnZip is to extract all zipfile entries.  The following
  2027. Xoptions and modifiers can be provided:
  2028. X
  2029. X<LITERAL>
  2030. X|   -Z   ZipInfo mode
  2031. X|   -c   extract files to SYS$OUTPUT (terminal)
  2032. X|   -f   freshen existing files (replace if newer); create none
  2033. X|   -l   list archive files (short format)
  2034. X|   -p   extract files to SYS$OUTPUT; no informational messages
  2035. X|   -t   test archive files
  2036. X|   -u   update existing files; create new ones if needed
  2037. X|   -v   list archive files (verbose format)
  2038. X|   -z   display only the archive comment
  2039. X|
  2040. X| MODIFIERS
  2041. X|   -a   auto-extract only text files in standard VMS text file format
  2042. X|   -aa  extract all files as text
  2043. X|   -j   junk paths (don't recreate archive's directory structure)
  2044. X|   -n   never overwrite existing files; don't prompt
  2045. X|   -o   OK to overwrite files without prompting
  2046. X|   -q   perform operations quietly (-qq => even quieter)
  2047. X|   -C   match filenames case-insensitively
  2048. X|   -L   convert filenames to lowercase if created under MS-DOS, VMS, etc.
  2049. X|   -V   retain (VMS) file version numbers
  2050. X|   -X   restore owner/protection info (may require privileges)
  2051. X<LARETIL>
  2052. X
  2053. XNote that uppercase options such as -C, -L, -V, -X and -Z must be specified 
  2054. Xin quotes.  For example:
  2055. X
  2056. X<LITERAL>
  2057. X|  $ unzip "-VX" -a zipfile
  2058. X<LARETIL>
  2059. X
  2060. X.![this should probably be a separate section]:
  2061. XIn addition, default options may be specified via the UNZIP_OPTS logical.
  2062. XFor example, the following will cause UnZip to match filenames without regard
  2063. Xto case, restore owner/protection information and perform all operations at 
  2064. Xquiet-level 1 by default:
  2065. X
  2066. X<LITERAL>
  2067. X|  $ define UNZIP_OPTS "-qCX"
  2068. X<LARETIL>
  2069. X
  2070. XNote that the quotation marks here are required to preserve lowercase options
  2071. X(opposite of the command-line behavior). To negate a default option on the
  2072. Xcommand line, add one or more minus  signs before the option letter, in
  2073. Xaddition to the leading switch character `-':
  2074. X
  2075. X<LITERAL>
  2076. X|  $ unzip --ql zipfile
  2077. X<LARETIL>
  2078. X
  2079. Xor
  2080. X
  2081. X<LITERAL>
  2082. X|  $ unzip -l-q zipfile
  2083. X<LARETIL>
  2084. X
  2085. XAt present it is not possible to decrement an option below zero--that is,
  2086. Xmore than a few minuses have no effect.
  2087. X
  2088. XUNZIP_OPTS may be defined as a symbol rather than a logical, but if both
  2089. Xare defined, the logical is used.
  2090. END_OF_FILE
  2091.   if test 8254 -ne `wc -c <'unzip-5.12/vms/unzip_cli.help'`; then
  2092.     echo shar: \"'unzip-5.12/vms/unzip_cli.help'\" unpacked with wrong size!
  2093.   fi
  2094.   # end of 'unzip-5.12/vms/unzip_cli.help'
  2095. fi
  2096. echo shar: End of archive 17 \(of 20\).
  2097. cp /dev/null ark17isdone
  2098. MISSING=""
  2099. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  2100.     if test ! -f ark${I}isdone ; then
  2101.     MISSING="${MISSING} ${I}"
  2102.     fi
  2103. done
  2104. if test "${MISSING}" = "" ; then
  2105.     echo You have unpacked all 20 archives.
  2106.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2107. else
  2108.     echo You still must unpack the following archives:
  2109.     echo "        " ${MISSING}
  2110. fi
  2111. exit 0
  2112. exit 0 # Just in case...
  2113.