home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume44 / unzip / part19 < 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: v44i084:  unzip - Info-ZIP portable UnZip, version 5.12, Part19/20
  4. Date: 18 Sep 1994 23:17:07 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <35j3c3$qs6@sparky.sterling.com>
  9. X-Md4-Signature: 95464830f482147162e66d3e0da511d2
  10.  
  11. Submitted-by: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
  12. Posting-number: Volume 44, Issue 84
  13. Archive-name: unzip/part19
  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/Contents unzip-5.12/ToDo
  22. #   unzip-5.12/amiga/Contents unzip-5.12/amiga/amiga.h
  23. #   unzip-5.12/amiga/crc_68.a unzip-5.12/amiga/z-stat.h
  24. #   unzip-5.12/crypt.h unzip-5.12/funzip.doc
  25. #   unzip-5.12/human68k/Contents unzip-5.12/human68k/Makefile.gcc
  26. #   unzip-5.12/inflate.h unzip-5.12/mac/Contents
  27. #   unzip-5.12/mac/macdir.h unzip-5.12/mac/macstat.h
  28. #   unzip-5.12/msdos/Borland.fix unzip-5.12/msdos/Contents
  29. #   unzip-5.12/msdos/makefile.bc unzip-5.12/msdos/makefile.msc
  30. #   unzip-5.12/msdos/makefile.tc unzip-5.12/nt/Makefile
  31. #   unzip-5.12/os2/Contents unzip-5.12/os2/zipgrep.cmd
  32. #   unzip-5.12/unix/Contents unzip-5.12/vms/Contents
  33. #   unzip-5.12/vms/clean.com unzip-5.12/vms/make.com
  34. #   unzip-5.12/vms/unz_cld.cld unzip-5.12/zip.h
  35. # Wrapped by kent@sparky on Sat Sep 17 23:33:50 1994
  36. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  37. echo If this archive is complete, you will see the following message:
  38. echo '          "shar: End of archive 19 (of 20)."'
  39. if test -f 'unzip-5.12/Contents' -a "${1}" != "-c" ; then 
  40.   echo shar: Will not clobber existing file \"'unzip-5.12/Contents'\"
  41. else
  42.   echo shar: Extracting \"'unzip-5.12/Contents'\" \(2790 characters\)
  43.   sed "s/^X//" >'unzip-5.12/Contents' <<'END_OF_FILE'
  44. XContents of the UnZip 5.11 archive (the OS-specific subdirectories at the
  45. Xend contain their own Contents listings):
  46. X
  47. X  Contents    this file
  48. X  README    what UnZip is; general information
  49. X  INSTALL    how to compile and install UnZip and related utilities
  50. X  Where        where Zip/UnZip and encryption/decryption support can be found
  51. X  History.511    new features and fixes in this release
  52. X  ZipPorts    Info-ZIP rules and guidelines on contributions to the cause
  53. X  ToDo        rough priority list of new features to be added in next release
  54. X  BUGS        known bugs, problems, and (possible) other features to be added
  55. X  unzip.doc    UnZip manual page, human-readable format
  56. X  unzipsfx.doc    UnZipSFX manual page, human-readable format
  57. X  zipinfo.doc    ZipInfo manual page, human-readable format
  58. X  funzip.doc    fUnZip manual page, human-readable format
  59. X  CONTRIBS    list of contributors to UnZip
  60. X  COPYING    copyrights and distribution policy
  61. X  file_id.diz    BBS-oriented file describing this archive
  62. X  crypt.c    dummy decryption routines (required*)
  63. X  crypt.h    dummy decryption header file (required*)
  64. X  envargs.c    code to read options from UNZIP environment var. (required)
  65. X  explode.c    code for exploding (required)
  66. X  extract.c    high-level extraction and decryption code (required)
  67. X  file_io.c    file manipulation and password code (required)
  68. X  funzip.c     filter unzip:  extracts from stdin to stdout (pipes)
  69. X  inflate.c    code for inflating (required*)
  70. X  inflate.h    header file for inflating (required*)
  71. X  match.c    pattern-matching code for filename wildcards (required)
  72. X  tables.h    static lookup tables used in file_io.c and funzip.c (required*)
  73. X  unreduce.c    code for unreducing (required)
  74. X  unshrink.c    code for unshrinking (required)
  75. X  unzip.c    main UnZip driver code (required)
  76. X  unzip.h    main UnZip header file (required*)
  77. X  version.h    header with UnZip/UnZipSFX and ZipInfo version info (required)
  78. X  zip.h        dummy header for use with crypt.c (required*)
  79. X  zipinfo.c    UnZip listing routines, mainly for ZipInfo mode (required)
  80. X  amiga/    support files for compiling under AmigaDOS
  81. X  atari/    support files for compiling under Atari TOS
  82. X  human68k/    support files for compiling under X68000/Human68K
  83. X  mac/        support files for compiling under Macintosh OS
  84. X  msdos/    support files for compiling under MS-DOS
  85. X  nt/        support files for compiling under Windows NT
  86. X  os2/        support files for compiling under OS/2
  87. X  tops20/    support files for compiling under TOPS-20
  88. X  unix/        support files for compiling under Unix
  89. X  vms/        support files for compiling under VMS
  90. X
  91. XFiles marked "required*" are also needed to compile fUnZip.  The normal
  92. Xunzip makefile targets now make both unzipsfx and funzip, except in a few 
  93. Xcases; zipinfo is now incorporated into unzip (and invoked with unzip's 
  94. X-Z option or by linking/renaming the executable to "zipinfo[.exe]" or 
  95. X"ii[.exe]").
  96. END_OF_FILE
  97.   if test 2790 -ne `wc -c <'unzip-5.12/Contents'`; then
  98.     echo shar: \"'unzip-5.12/Contents'\" unpacked with wrong size!
  99.   fi
  100.   # end of 'unzip-5.12/Contents'
  101. fi
  102. if test -f 'unzip-5.12/ToDo' -a "${1}" != "-c" ; then 
  103.   echo shar: Will not clobber existing file \"'unzip-5.12/ToDo'\"
  104. else
  105.   echo shar: Extracting \"'unzip-5.12/ToDo'\" \(2854 characters\)
  106.   sed "s/^X//" >'unzip-5.12/ToDo' <<'END_OF_FILE'
  107. X================================
  108. XFor UnZip 5.1/5.2/6.0/who knows:
  109. X================================
  110. X
  111. XThe Big Plan [original 26 Jan 93]:
  112. X
  113. X   o extract-to-dir capability
  114. X
  115. X    DONE.
  116. X
  117. X   o add wildcard zipfiles
  118. X
  119. X    DONE.
  120. X
  121. X   o incorporate zipinfo
  122. X
  123. X    DONE.
  124. X
  125. X   o clean up unzip.h
  126. X
  127. X    DONE.
  128. X
  129. X   o rewrite to use fwrite/no outbuf
  130. X
  131. X    DONE.
  132. X
  133. X   o replace EOL conversion code and make text/binary conversion automatic
  134. X
  135. X    DONE.
  136. X
  137. X   o add self-extracting unzip:  deflated/stored only, suppress "extra bytes"
  138. X     message, use argv[0] with path search, remove do_wild, etc.
  139. X
  140. X    DONE.
  141. X
  142. X   o move all strings to far memory under small-memory OS's, copying
  143. X     back to local memory (slide[] buffer?) only when ready to print
  144. X
  145. X    DONE, except for possible use of slide[]; os2.c; crypt.c;
  146. X    inflate.c (incomplete trees messages); other decompression
  147. X    routines?; etc.
  148. X
  149. X   o add -C option for case-insensitivity of filename matching
  150. X
  151. X    DONE.
  152. X
  153. Xfor 5.2:
  154. X   o enable CHECK_EOF and RETURN_SEVERITY by default
  155. X
  156. X    immediately! (start testing...)
  157. X
  158. X   o incorporate Scott Maxwell OS/2 DLL mods
  159. X
  160. X    next
  161. X
  162. X   o add Unix extra field (GMT modification and status-change times)
  163. X
  164. X    next
  165. X
  166. X   o rename all nt/NT stuff to win32/WIN32 (works with Chicago, too...)
  167. X
  168. X    soon
  169. X
  170. X   o rewrite to use fread/fseek/no ReadByte/etc.  [eventually: test
  171. X     write(bytes) vs. fwrite(words), especially on Crays/Alphas]
  172. X
  173. X    soon; ReadByte gone already.
  174. X
  175. X   o incorporate new backfill version of inflate()
  176. X
  177. X    next after fread/fseek/ReadByte
  178. X
  179. X   o add multi-part zipfile handling
  180. X
  181. X    next after that
  182. X
  183. X   o check NEXTBYTE for EOF in crypt.c, funzip.c and explode.c, too
  184. X
  185. X    soon
  186. X
  187. X   o use (simple!) configure script in combination with Unix Makefile
  188. X
  189. X    someday
  190. X
  191. X   o add option to force completely non-interactive operation (no queries
  192. X     for overwrite/rename, password, etc.); also allow some sort of non-
  193. X     interactive password provision?  (file? command-line? env. variable?)
  194. X
  195. X    someday?
  196. X
  197. X   o add ONLY_ZIPINFO compilation for 16-bit compiles
  198. X
  199. X    later, possibly never
  200. X
  201. X   o add testing of extra fields (if have CRC)
  202. X
  203. X    later
  204. X
  205. X   o change all output so goes through configurable routines (msg(),
  206. X     warn(), err()) for simpler GUI interfacing
  207. X
  208. X    later
  209. X
  210. X   o rewrite to allow use as a filter
  211. X
  212. X    way, way later...
  213. X
  214. X   o add option to search zipfile contents for a string and print the
  215. X     results? ("zipgrep" option--e.g., unzip -g or unzip -S) (easy for
  216. X     fixed strings, hard for wildcards/true regex's)
  217. X
  218. X    way, way later, if at all...
  219. X
  220. X   o add -y "display symlinks" option to zipinfo?  various sorting options?
  221. X     (-St date/time, -Sn name)?
  222. X
  223. X    who knows
  224. X
  225. X   o add "in-depth" option to zipinfo? (check local headers against
  226. X     central, etc.)--make it a better debugging tool (or just create
  227. X     zipfix)
  228. X
  229. X    who knows
  230. X
  231. X   o ports underway:  Acorn/RISCos, AOS/VS, ...
  232. X
  233. X
  234. X- allow multiple dir creation with -d option?  (Bob Maynard)
  235. X
  236. END_OF_FILE
  237.   if test 2854 -ne `wc -c <'unzip-5.12/ToDo'`; then
  238.     echo shar: \"'unzip-5.12/ToDo'\" unpacked with wrong size!
  239.   fi
  240.   # end of 'unzip-5.12/ToDo'
  241. fi
  242. if test -f 'unzip-5.12/amiga/Contents' -a "${1}" != "-c" ; then 
  243.   echo shar: Will not clobber existing file \"'unzip-5.12/amiga/Contents'\"
  244. else
  245.   echo shar: Extracting \"'unzip-5.12/amiga/Contents'\" \(2025 characters\)
  246.   sed "s/^X//" >'unzip-5.12/amiga/Contents' <<'END_OF_FILE'
  247. XContents of the "amiga" sub-archive for UnZip 5.11 and later:
  248. X
  249. X  Contents      this file
  250. X  amiga.c       Amiga-specific file I/O routines
  251. X  amiga.h       Amiga-specific header file
  252. X  filedate.c    SetFileDate() clone for OS 1.3, based on Paul Wells' utime()
  253. X
  254. X  SMakeFile     SAS/C makefile for UnZip and fUnZip
  255. X
  256. X  makefile.azt  Aztec C makefile for UnZip and fUnZip
  257. X  stat.c        stat() emulation for Aztec
  258. X  z-stat.h      "real" stat.h header file for Aztec
  259. X  flate.a       assembler version of inflate_codes() (define ASM_INFLATECODES)
  260. X  crc_68.a      assembler version of crc_32_tab loop (define ASM_CRC, REGARGS)
  261. X
  262. XNotes:
  263. X
  264. X  Both the routines, flate.a and crc_68.a, require arg passing via registers.
  265. X
  266. X  To include flate.a, unzip must be built using 16-bit integers.
  267. X  (currently not possible with SAS/C)
  268. X
  269. X  The DICE makefile has been removed since no one is supporting that
  270. X  compiler anymore.
  271. X
  272. X  It was discovered on release of UnZip 5.1 that the latest SAS compiler
  273. X  revision (6.50 or 6.51) changed the timezone handling.   The result is
  274. X  that UnZip can extract files with the wrong times, usually off by an
  275. X  offset of a few hours which is a function of the how the TZ environment
  276. X  variable is set.  Now the TZ variable needs to be set according to the
  277. X  timezone you are in, because the tzname() function operates correctly
  278. X  now (it didn't used to).  If you do not set TZ to your current timezone,
  279. X  files will be restored with times corrsponding to CST6, which is US/Central
  280. X  time, the SAS/C default.  On the Amiga, the TZ variable cannot utilize
  281. X  the daylight savings time extentions, so don't use them.  For example,
  282. X  specify "EST5" instead of "EST5EDT".  The latter form will confuse the 
  283. X  SAS/C libraries.  To set the TZ environment variable, place the following
  284. X  line in your startup sequence:
  285. X
  286. X         setenv TZ XXXN
  287. X
  288. X            where XXX is the 3-character timezone notation
  289. X                    N is the offset from Greenwich mean time
  290. X
  291. X  example:
  292. X
  293. X         setenv TZ PST8  ; for California time
  294. END_OF_FILE
  295.   if test 2025 -ne `wc -c <'unzip-5.12/amiga/Contents'`; then
  296.     echo shar: \"'unzip-5.12/amiga/Contents'\" unpacked with wrong size!
  297.   fi
  298.   # end of 'unzip-5.12/amiga/Contents'
  299. fi
  300. if test -f 'unzip-5.12/amiga/amiga.h' -a "${1}" != "-c" ; then 
  301.   echo shar: Will not clobber existing file \"'unzip-5.12/amiga/amiga.h'\"
  302. else
  303.   echo shar: Extracting \"'unzip-5.12/amiga/amiga.h'\" \(1126 characters\)
  304.   sed "s/^X//" >'unzip-5.12/amiga/amiga.h' <<'END_OF_FILE'
  305. X/* amiga.h
  306. X *
  307. X * Globular definitions that affect all of AmigaDom.
  308. X *
  309. X * Originally included in unzip.h, extracted for simplicity and eeze of
  310. X * maintenance by John Bush.
  311. X *
  312. X * THIS FILE IS #INCLUDE'd by unzip.h 
  313. X *
  314. X */
  315. X
  316. X#include <time.h>
  317. X
  318. X
  319. X#ifdef AZTEC_C                   /* Manx Aztec C, 5.0 or newer only */
  320. X#  include <clib/dos_protos.h>
  321. X#  include <pragmas/dos_lib.h>
  322. X#  define MODERN
  323. X#  define O_BINARY 0
  324. X#  include "amiga/z-stat.h"
  325. X#  define dirent direct
  326. X#  ifdef ASM_CRC
  327. X#    pragma regcall(CalcCRC(a0,d0,a1,d1))
  328. X#  endif
  329. X#endif /* AZTEC_C */
  330. X
  331. X
  332. X#if defined(LATTICE) || defined(__SASC) || defined(__SASC_60)
  333. X#  include <sys/types.h>         
  334. X#  include <sys/stat.h>
  335. X#  include <sys/dir.h>
  336. X#  include <dos.h>
  337. X#  include <proto/dos.h>  /* needed? */
  338. X#  if ( (!defined(O_BINARY)) && defined(O_RAW))
  339. X#    define O_BINARY O_RAW
  340. X#  endif
  341. X#  ifdef ASM_CRC
  342. X     /* PUT SOMETHING HERE TO PASS ARGS IN REGISTERS TO CalcCRC() */
  343. X#  endif
  344. X#endif /* LATTICE */
  345. X
  346. X/* Funkshine Prough Toe Taipes */
  347. X
  348. Xint cmptime (struct tm *, struct tm *);
  349. Xtime_t invlocal (struct tm *);
  350. XLONG FileDate (char *, time_t[]);
  351. X
  352. X#define dup  /* needed? */
  353. END_OF_FILE
  354.   if test 1126 -ne `wc -c <'unzip-5.12/amiga/amiga.h'`; then
  355.     echo shar: \"'unzip-5.12/amiga/amiga.h'\" unpacked with wrong size!
  356.   fi
  357.   # end of 'unzip-5.12/amiga/amiga.h'
  358. fi
  359. if test -f 'unzip-5.12/amiga/crc_68.a' -a "${1}" != "-c" ; then 
  360.   echo shar: Will not clobber existing file \"'unzip-5.12/amiga/crc_68.a'\"
  361. else
  362.   echo shar: Extracting \"'unzip-5.12/amiga/crc_68.a'\" \(1758 characters\)
  363.   sed "s/^X//" >'unzip-5.12/amiga/crc_68.a' <<'END_OF_FILE'
  364. X; Not copyrighted by Paul Kienitz, 18 Jun 94.
  365. X;
  366. X; Return an updated 32 bit CRC value, given the old value and a block of data.
  367. X; This substitutes for the following lines at the top of flush() in file_io.c
  368. X; in UnZip, or a similar loop in updcrc() in util.c in Zip:
  369. X;
  370. X;    register ulg crcval = crc32val;
  371. X;    register ulg n = size;
  372. X;    register uch *p=rawbuf;
  373. X;    while (n--)
  374. X;        crcval = crc_32_tab[((uch)crcval ^ (*p++)) & 0xff] ^ (crcval >> 8);
  375. X;    crc32val = crcval;
  376. X;
  377. X; Those lines are replace with this call:
  378. X;
  379. X;    crc32val = CalcCRC(crc_32_tab, crc32val, rawbuf, size);
  380. X;
  381. X; We have here the CalcCRC() code for Amiga.  Define REGARGS if you can cause
  382. X; your compiler to put the four args in the registers A0, D0, A1, D1.  I'm not
  383. X; sure, but I think you should define ATSIGN when using the SAS/C assembler.
  384. X; I wrote this because I found that, at least with the Aztec compiler, this loop
  385. X; was occupying about a quarter of the CPU time with UnZip -t commands.
  386. X
  387. X    xdef    _CalcCRC
  388. X
  389. Xtemp        equr    d2
  390. X
  391. Xcrc_table    equr    a0    array of unsigned long
  392. Xcrcval        equr    d0    unsigned long initial value
  393. Xrawbuf        equr    a1    array of unsigned char
  394. Xrawbufsize    equr    d1    unsigned long (count of bytes in rawbuf)
  395. X
  396. X
  397. X    IFD    REGARGS
  398. X      IFD    ATSIGN
  399. X      xdef    @CalcCRC
  400. X@CalcCRC:
  401. X      ELSE
  402. X_CalcCRC:            ; args already in registers as named above
  403. X      ENDC
  404. X    ELSE    ; !REGARGS
  405. X_CalcCRC:
  406. X    move.l    4(sp),crc_table
  407. X    move.l    8(sp),crcval
  408. X    move.l    12(sp),rawbuf
  409. X    move.l    16(sp),rawbufsize
  410. X    ENDC
  411. X
  412. X    move.l    temp,-(sp)
  413. Xloop:
  414. X    subq.l    #1,rawbufsize
  415. X    blt.s    done            ; we treat it as signed
  416. X    moveq    #0,temp
  417. X    move.b    (rawbuf)+,temp
  418. X    eor.b    crcval,temp
  419. X    lsl.w    #2,temp
  420. X    move.l    0(crc_table,temp.w),temp
  421. X    lsr.l    #8,crcval
  422. X    eor.l    temp,crcval
  423. X    bra.s    loop
  424. Xdone:
  425. X;;;    move.l    crcval,d0        ; crcval already is d0
  426. X    move.l    (sp)+,temp
  427. X    rts
  428. END_OF_FILE
  429.   if test 1758 -ne `wc -c <'unzip-5.12/amiga/crc_68.a'`; then
  430.     echo shar: \"'unzip-5.12/amiga/crc_68.a'\" unpacked with wrong size!
  431.   fi
  432.   # end of 'unzip-5.12/amiga/crc_68.a'
  433. fi
  434. if test -f 'unzip-5.12/amiga/z-stat.h' -a "${1}" != "-c" ; then 
  435.   echo shar: Will not clobber existing file \"'unzip-5.12/amiga/z-stat.h'\"
  436. else
  437.   echo shar: Extracting \"'unzip-5.12/amiga/z-stat.h'\" \(2562 characters\)
  438.   sed "s/^X//" >'unzip-5.12/amiga/z-stat.h' <<'END_OF_FILE'
  439. X#ifndef __Z_STAT_H
  440. X#define __Z_STAT_H
  441. X#define __STAT_H
  442. X
  443. X/* Since older versions of the Lattice C compiler for Amiga, and all current */
  444. X/* versions of the Manx Aztec C compiler for Amiga, either provide no stat() */
  445. X/* function or provide one inadequate for unzip (Aztec's has no st_mode      */
  446. X/* field), we provide our own stat() function in stat.c by Paul Wells, and   */
  447. X/* this fake stat.h file by Paul Kienitz.  Paul Wells originally used the    */
  448. X/* Lattice stat.h but that does not work for Aztec and is not distributable  */
  449. X/* with this package, so I made a separate one.  This has to be pulled into  */
  450. X/* unzip.h when compiling an Amiga version, as "amiga/z-stat.h".             */
  451. X
  452. X/* We also provide here a "struct direct" for use with opendir() & readdir() */
  453. X/* functions included in amiga/stat.c.  If you use amiga/stat.c, this must   */
  454. X/* be included wherever you use either readdir() or stat().                  */
  455. X
  456. X/* This include file should ONLY be loaded if AZTEC_C is defined, and
  457. X * you are using the substitute version of stat() from amiga/stat.c.
  458. X * Bit definitions are based on those in headers for SAS/C v6.0
  459. X */
  460. X
  461. X#include <time.h>
  462. X
  463. Xstruct stat {
  464. X    unsigned short st_mode;
  465. X    time_t st_ctime, st_atime, st_mtime;
  466. X    long st_size;
  467. X    long st_ino;
  468. X    long st_blocks;
  469. X    short st_attr, st_dev, st_nlink, st_uid, st_gid, st_rdev;
  470. X};
  471. X
  472. X#define S_IFDIR  (1<<11)
  473. X#define S_IFREG  (1<<10)
  474. X
  475. X#if 0
  476. X   /* these values here are totally random: */
  477. X#  define S_IFLNK  (1<<14)
  478. X#  define S_IFSOCK (1<<13)
  479. X#  define S_IFCHR  (1<<8)
  480. X#  define S_IFIFO  (1<<7)
  481. X#  define S_IFMT   (S_IFDIR|S_IFREG|S_IFCHR|S_IFLNK)
  482. X#else
  483. X#  define S_IFMT   (S_IFDIR|S_IFREG)
  484. X#endif
  485. X
  486. X#define S_IHIDDEN    (1<<7)
  487. X#define S_ISCRIPT    (1<<6)
  488. X#define S_IPURE      (1<<5)
  489. X#define S_IARCHIVE   (1<<4)
  490. X#define S_IREAD      (1<<3)
  491. X#define S_IWRITE     (1<<2)
  492. X#define S_IEXECUTE   (1<<1)
  493. X#define S_IDELETE    (1<<0)
  494. X
  495. Xint stat(char *name, struct stat *buf);
  496. X
  497. X
  498. X#include <libraries/dos.h>
  499. X
  500. Xtypedef struct direct {
  501. X    struct direct       *d_cleanuplink,
  502. X                       **d_cleanupparent;
  503. X    BPTR                 d_parentlock;
  504. X    struct FileInfoBlock d_fib;
  505. X} DIR;
  506. X#define                  d_name  d_fib.fib_FileName
  507. X
  508. Xextern unsigned short disk_not_mounted;         /* flag set by opendir() */
  509. X
  510. XDIR *opendir(char *);
  511. Xvoid closedir(DIR *);
  512. Xvoid close_leftover_open_dirs(void);    /* call this if aborted in mid-run */
  513. XDIR *readdir(DIR *);
  514. X
  515. Xint rmdir(char *);
  516. X
  517. X#  ifdef AZTEC_C
  518. Xvoid tzset(void);
  519. Xint chmod(char *filename, int bits);
  520. X#  endif
  521. X
  522. X#endif /* __Z_STAT_H */
  523. END_OF_FILE
  524.   if test 2562 -ne `wc -c <'unzip-5.12/amiga/z-stat.h'`; then
  525.     echo shar: \"'unzip-5.12/amiga/z-stat.h'\" unpacked with wrong size!
  526.   fi
  527.   # end of 'unzip-5.12/amiga/z-stat.h'
  528. fi
  529. if test -f 'unzip-5.12/crypt.h' -a "${1}" != "-c" ; then 
  530.   echo shar: Will not clobber existing file \"'unzip-5.12/crypt.h'\"
  531. else
  532.   echo shar: Extracting \"'unzip-5.12/crypt.h'\" \(708 characters\)
  533.   sed "s/^X//" >'unzip-5.12/crypt.h' <<'END_OF_FILE'
  534. X/*
  535. X   crypt.h (dummy version) by Info-ZIP.      Last revised:  18 Apr 94
  536. X
  537. X   This is a non-functional version of Info-ZIP's crypt.h encryption/
  538. X   decryption header file for Zip, ZipCloak, UnZip and fUnZip.  This
  539. X   file is not copyrighted and may be distributed without restriction.
  540. X   See the "Where" file for sites from which to obtain the full crypt
  541. X   sources (zcrypt21.zip or later).
  542. X */
  543. X
  544. X#ifndef __crypt_h   /* don't include more than once */
  545. X#define __crypt_h
  546. X
  547. X#ifdef CRYPT
  548. X#  undef CRYPT      /* dummy version */
  549. X#endif
  550. X
  551. X#define RAND_HEAD_LEN  12    /* needed to compile funzip */
  552. X
  553. X#define zencode
  554. X#define zdecode
  555. X
  556. X#define zfwrite  fwrite
  557. X
  558. X#define echoff(f)
  559. X#define echon()
  560. X
  561. X#endif /* !__crypt_h */
  562. END_OF_FILE
  563.   if test 708 -ne `wc -c <'unzip-5.12/crypt.h'`; then
  564.     echo shar: \"'unzip-5.12/crypt.h'\" unpacked with wrong size!
  565.   fi
  566.   # end of 'unzip-5.12/crypt.h'
  567. fi
  568. if test -f 'unzip-5.12/funzip.doc' -a "${1}" != "-c" ; then 
  569.   echo shar: Will not clobber existing file \"'unzip-5.12/funzip.doc'\"
  570. else
  571.   echo shar: Extracting \"'unzip-5.12/funzip.doc'\" \(3592 characters\)
  572.   sed "s/^X//" >'unzip-5.12/funzip.doc' <<'END_OF_FILE'
  573. X
  574. XFUNZIP(1)                USER COMMANDS                  FUNZIP(1)
  575. X
  576. XNAME
  577. X     funzip - filter for extracting from a ZIP archive in a pipe
  578. X
  579. XSYNOPSIS
  580. X     [...]  |  funzip [-password]  |  [...]
  581. X
  582. X     funzip [-password] input.zip  |  [...]
  583. X
  584. XARGUMENTS
  585. X     [-password]
  586. X          Optional  password  to  be  used  if  ZIP  archive   is
  587. X          encrypted.   Decryption  may  not  be supported at some
  588. X          sites.  See DESCRIPTION for more details.
  589. X
  590. XDESCRIPTION
  591. X     funzip acts as a filter; that is,  it  assumes  that  a  ZIP
  592. X     archive  is being piped into standard input, and it extracts
  593. X     the first member from the archive to stdout.  If there is an
  594. X     argument,  then  the  input  comes  from  the specified file
  595. X     instead of from stdin.  A password for encrypted  zip  files
  596. X     can  be  specified  on  the command line (preceding the file
  597. X     name, if any) by prefixing the password with a  dash.   Note
  598. X     that  this  constitutes  a  security  risk  on many systems;
  599. X     currently running processes are  often  visible  via  simple
  600. X     commands  (e.g.,  ps(1)  under  Unix), and command-line his-
  601. X     tories can be read.  If the first entry of the zip  file  is
  602. X     encrypted  and no password is specified on the command line,
  603. X     then the user is prompted for a password and the password is
  604. X     not echoed on the console.
  605. X
  606. X     Given the limitation on single-member extraction, funzip  is
  607. X     most useful in conjunction with a secondary archiver program
  608. X     such as tar(1).  The following section includes  an  example
  609. X     illustrating this usage in the case of disk backups to tape.
  610. X
  611. XEXAMPLES
  612. X     To use funzip to  extract  the  first  member  file  of  the
  613. X     archive test.zip and to pipe it into more(1):
  614. X
  615. X         funzip test.zip | more
  616. X
  617. X     To use funzip to test the first member file of test.zip (any
  618. X     errors will be reported on standard error):
  619. X
  620. X         funzip test.zip > /dev/null
  621. X
  622. X     To use zip and funzip in place of  compress(1)  and  zcat(1)
  623. X     (or gzip(1L) and gzcat(1L)) for tape backups:
  624. X
  625. X         tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
  626. X         dd if=/dev/nrst0 ibs=8k | funzip | tar xf -
  627. X
  628. XInfo-ZIP         Last change: 28 Aug 94 (v3.83)                 1
  629. X
  630. XFUNZIP(1)                USER COMMANDS                  FUNZIP(1)
  631. X
  632. X     (where, for example, nrst0 is a SCSI tape drive).
  633. X
  634. XBUGS
  635. X     When piping an encrypted file into more and allowing  funzip
  636. X     to  prompt for password, the terminal may sometimes be reset
  637. X     to a non-echo mode.  This is apparently due to a race condi-
  638. X     tion  between  the two programs; funzip changes the terminal
  639. X     mode to non-echo before more reads its state, and more  then
  640. X     ``restores''  the  terminal to this mode before exiting.  To
  641. X     recover, run  funzip  on  the  same  file  but  redirect  to
  642. X     /dev/null  rather  than  piping  into  more; after prompting
  643. X     again for the password, funzip will reset the terminal prop-
  644. X     erly.
  645. X
  646. X     There is presently no way to  extract  any  member  but  the
  647. X     first  from a ZIP archive.  This would be useful in the case
  648. X     where a ZIP archive is included within another archive.   In
  649. X     the  case where the first member is a directory, funzip sim-
  650. X     ply creates the directory and exits.
  651. X
  652. X     The functionality of  funzip  should  be  incorporated  into
  653. X     unzip itself (future release).
  654. X
  655. XSEE ALSO
  656. X     gzip(1L), unzip(1L),  unzipsfx(1L),  zip(1L),  zipcloak(1L),
  657. X     zipinfo(1L), zipnote(1L), zipsplit(1L)
  658. X
  659. XAUTHOR
  660. X     Mark Adler (Info-ZIP)
  661. X
  662. XInfo-ZIP         Last change: 28 Aug 94 (v3.83)                 2
  663. X
  664. END_OF_FILE
  665.   if test 3592 -ne `wc -c <'unzip-5.12/funzip.doc'`; then
  666.     echo shar: \"'unzip-5.12/funzip.doc'\" unpacked with wrong size!
  667.   fi
  668.   # end of 'unzip-5.12/funzip.doc'
  669. fi
  670. if test -f 'unzip-5.12/human68k/Contents' -a "${1}" != "-c" ; then 
  671.   echo shar: Will not clobber existing file \"'unzip-5.12/human68k/Contents'\"
  672. else
  673.   echo shar: Extracting \"'unzip-5.12/human68k/Contents'\" \(411 characters\)
  674.   sed "s/^X//" >'unzip-5.12/human68k/Contents' <<'END_OF_FILE'
  675. XContents of the "human68k" sub-archive for UnZip 5.1 and later:
  676. X
  677. X  Contents       this file
  678. X  Makefile.gcc   (shorter) makefile for GNU C on X68000
  679. X  human68k.c     Human68K-specific routines for UnZip
  680. X  options.s      TwentyOne option checker (assembler routines) for Human68K
  681. X
  682. XNote that options.s contains high-order ASCII characters; it must be
  683. Xtreated as a binary file when e-mailing or posting via Usenet.
  684. END_OF_FILE
  685.   if test 411 -ne `wc -c <'unzip-5.12/human68k/Contents'`; then
  686.     echo shar: \"'unzip-5.12/human68k/Contents'\" unpacked with wrong size!
  687.   fi
  688.   # end of 'unzip-5.12/human68k/Contents'
  689. fi
  690. if test -f 'unzip-5.12/human68k/Makefile.gcc' -a "${1}" != "-c" ; then 
  691.   echo shar: Will not clobber existing file \"'unzip-5.12/human68k/Makefile.gcc'\"
  692. else
  693.   echo shar: Extracting \"'unzip-5.12/human68k/Makefile.gcc'\" \(2235 characters\)
  694.   sed "s/^X//" >'unzip-5.12/human68k/Makefile.gcc' <<'END_OF_FILE'
  695. X# Makefile for UnZip 5.11 and later:  Human68K with gcc        NIIMI Satoshi
  696. X#
  697. X# The original Makefile maybe works fine, but X68000 is too slow
  698. X# to process it.  So I split out needed part.
  699. X#
  700. X# Last revised:  10 Jul 94
  701. X
  702. XVPATH = HUMAN68K
  703. X
  704. XCC = gcc
  705. XCFLAGS = -Wall -O -I. -fomit-frame-pointer -fstrength-reduce
  706. XLDFLAGS = -s
  707. X
  708. XLIBS = -lsignal -ldos -lmb
  709. X
  710. X# UnZipSFX flags
  711. XXC = -DSFX
  712. X
  713. X# fUnZip flags
  714. XFC = -DFUNZIP
  715. X
  716. X# object files
  717. XOBJS = unzip.o crypt.o envargs.o explode.o extract.o file_io.o inflate.o \
  718. X    match.o unreduce.o unshrink.o zipinfo.o human68k.o options.o
  719. XOBJX = unzipsfx.o crypt.o extract_.o file_io.o inflate.o match.o human68_.o
  720. XOBJF = funzip.o crypt_.o inflate_.o
  721. X
  722. XUNZIPS = unzip.x unzipsfx.x funzip.x
  723. X
  724. X.c.o:
  725. X    $(CC) $(CFLAGS) -I. -c $< -o $@
  726. X
  727. X# for debugging
  728. X.c.s:
  729. X    $(CC) $(CFLAGS) -c $< -o $@
  730. X
  731. Xall:        unzips
  732. Xunzips:        $(UNZIPS)
  733. Xdocs:        $(DOCS)
  734. Xunzipsman:    unzips docs
  735. Xunzipsdocs:    unzips docs
  736. X
  737. Xclean:
  738. X    rm -f $(OBJS) $(OBJF) $(OBJX) $(UNZIPS)
  739. X
  740. Xunzip.x: $(OBJS)
  741. X    $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  742. X
  743. Xunzipsfx.x: $(OBJX)
  744. X    $(CC) $(LDFLAGS) -o $@ $(OBJX) $(LIBS)
  745. X
  746. Xfunzip.x: $(OBJF)
  747. X    $(CC) $(LDFLAGS) -o $@ $(OBJF) $(LIBS)
  748. X
  749. Xcrypt.o:    crypt.c unzip.h zip.h crypt.h
  750. Xenvargs.o:    envargs.c unzip.h
  751. Xexplode.o:    explode.c unzip.h
  752. Xextract.o:    extract.c unzip.h crypt.h
  753. Xfile_io.o:    file_io.c unzip.h crypt.h tables.h
  754. Xfunzip.o:    funzip.c unzip.h crypt.h tables.h
  755. Xinflate.o:    inflate.c inflate.h unzip.h
  756. Xmatch.o:    match.c unzip.h
  757. Xunreduce.o:    unreduce.c unzip.h
  758. Xunshrink.o:    unshrink.c unzip.h
  759. Xunzip.o:    unzip.c unzip.h crypt.h version.h
  760. Xzipinfo.o:    zipinfo.c unzip.h
  761. X
  762. Xcrypt_.o:    crypt.c unzip.h zip.h crypt.h        # used by funzip
  763. X    $(CC) $(CFLAGS) $(FC) -c $< -o $@
  764. X
  765. Xextract_.o:    extract.c unzip.h crypt.h        # used by unzipsfx
  766. X    $(CC) $(CFLAGS) $(XC) -c $< -o $@
  767. X
  768. Xhuman68k.o:    human68k/human68k.c unzip.h
  769. X    $(CC) $(CFLAGS) -I. -c human68k/human68k.c -o $@
  770. X
  771. Xhuman68_.o:    human68k/human68k.c unzip.h        # used by unzipsfx
  772. X    $(CC) $(CFLAGS) $(XC) -I. -c human68k/human68k.c -o $@
  773. X
  774. Xinflate_.o:    inflate.c inflate.h unzip.h crypt.h    # used by funzip
  775. X    $(CC) $(CFLAGS) $(FC) -c $< -o $@
  776. X
  777. Xunzipsfx.o:    unzip.c unzip.h crypt.h version.h    # used by unzipsfx
  778. X    $(CC) $(CFLAGS) $(XC) -c $< -o $@
  779. X
  780. Xdiff:
  781. X    -(cd ..; diff -cNr unz51f unz51f-x68k -x GNUmakefile -x "*.[ox]" > unzip68k.dif)
  782. END_OF_FILE
  783.   if test 2235 -ne `wc -c <'unzip-5.12/human68k/Makefile.gcc'`; then
  784.     echo shar: \"'unzip-5.12/human68k/Makefile.gcc'\" unpacked with wrong size!
  785.   fi
  786.   # end of 'unzip-5.12/human68k/Makefile.gcc'
  787. fi
  788. if test -f 'unzip-5.12/inflate.h' -a "${1}" != "-c" ; then 
  789.   echo shar: Will not clobber existing file \"'unzip-5.12/inflate.h'\"
  790. else
  791.   echo shar: Extracting \"'unzip-5.12/inflate.h'\" \(887 characters\)
  792.   sed "s/^X//" >'unzip-5.12/inflate.h' <<'END_OF_FILE'
  793. X/* inflate.h for UnZip -- put in the public domain by Mark Adler
  794. X   version c14e, 29 September 1993 */
  795. X
  796. X
  797. X/* You can do whatever you like with this source file, though I would
  798. X   prefer that if you modify it and redistribute it that you include
  799. X   comments to that effect with your name and the date.  Thank you.
  800. X
  801. X   History:
  802. X   vers    date          who           what
  803. X   ----  ---------  --------------  ------------------------------------
  804. X    c14  12 Mar 93  M. Adler        made inflate.c standalone with the
  805. X                        introduction of inflate.h.
  806. X    c14d 28 Aug 93  G. Roelofs      replaced flush/FlushOutput with new version
  807. X    c14e 29 Sep 93  G. Roelofs      moved everything into unzip.h; added crypt.h
  808. X */
  809. X
  810. X#include "unzip.h"     /* provides slide[], typedefs and macros */
  811. X#ifdef FUNZIP
  812. X#  include "crypt.h"   /* provides NEXTBYTE macro for crypt version of funzip */
  813. X#endif
  814. END_OF_FILE
  815.   if test 887 -ne `wc -c <'unzip-5.12/inflate.h'`; then
  816.     echo shar: \"'unzip-5.12/inflate.h'\" unpacked with wrong size!
  817.   fi
  818.   # end of 'unzip-5.12/inflate.h'
  819. fi
  820. if test -f 'unzip-5.12/mac/Contents' -a "${1}" != "-c" ; then 
  821.   echo shar: Will not clobber existing file \"'unzip-5.12/mac/Contents'\"
  822. else
  823.   echo shar: Extracting \"'unzip-5.12/mac/Contents'\" \(1060 characters\)
  824.   sed "s/^X//" >'unzip-5.12/mac/Contents' <<'END_OF_FILE'
  825. XContents of the "mac" sub-archive for UnZip 5.1 and later:
  826. X
  827. X  Contents          this file
  828. X  mac.c             Mac-specific filesystem code
  829. X  macdir.c          Macintosh Unix-style directory emulation
  830. X  macdir.h          header file for directory emulation
  831. X  macscreen.c       Macintosh window handling routines
  832. X  macstat.c         Macintosh stat() emulation
  833. X  macstat.h         header file for stat() emulation
  834. X  macunzip.c        Macintosh standalone version main program
  835. X  rsrc.hqx          resource file for Macintosh unzip (BinHex)
  836. X  thinkc.hqx        Think C project file (BinHex)
  837. X
  838. XThe resource file and the Think C project file are in BinHex form because
  839. Xthey contain Macintosh resource forks (only) and as such can not be simply
  840. Xstored a normal file on a non-Macintosh system.  BinHex form is the
  841. Xtraditional way for transferring such files via non-Macintosh systems.  It's
  842. Xalso the safest since it uses only printable characters.  Both of the ".hqx"
  843. Xfiles must be converted with BinHex 4.0 (or equivalent) on a Macintosh
  844. Xsystem prior to attempted use.
  845. END_OF_FILE
  846.   if test 1060 -ne `wc -c <'unzip-5.12/mac/Contents'`; then
  847.     echo shar: \"'unzip-5.12/mac/Contents'\" unpacked with wrong size!
  848.   fi
  849.   # end of 'unzip-5.12/mac/Contents'
  850. fi
  851. if test -f 'unzip-5.12/mac/macdir.h' -a "${1}" != "-c" ; then 
  852.   echo shar: Will not clobber existing file \"'unzip-5.12/mac/macdir.h'\"
  853. else
  854.   echo shar: Extracting \"'unzip-5.12/mac/macdir.h'\" \(780 characters\)
  855.   sed "s/^X//" >'unzip-5.12/mac/macdir.h' <<'END_OF_FILE'
  856. X/*****************************************************************
  857. X *
  858. X *                dirent.h
  859. X *
  860. X *****************************************************************/
  861. X
  862. X#ifndef __DIRENT_H
  863. X#define __DIRENT_H
  864. X
  865. X#include <errno.h>
  866. X
  867. X#ifndef ENOTDIR
  868. X#define ENOTDIR     20
  869. X#endif
  870. X
  871. X#ifndef NAME_MAX
  872. X#define NAME_MAX    31
  873. X#endif
  874. X
  875. Xstruct dirent {
  876. X    unsigned long   d_fileno;
  877. X    short           d_reclen;
  878. X    short           d_namlen;
  879. X    char            d_name[NAME_MAX + 1];
  880. X};
  881. X
  882. Xtypedef struct {
  883. X    short           ioFDirIndex;
  884. X    short           ioVRefNum;
  885. X    long            ioDrDirID;
  886. X    short           flags;
  887. X    struct dirent   currEntry;
  888. X} DIR;
  889. X
  890. X#define direct dirent
  891. X
  892. XDIR *opendir(char *);
  893. Xstruct dirent *readdir(DIR *);
  894. Xvoid rewinddir(DIR *);
  895. Xint closedir(DIR *);
  896. X#endif
  897. END_OF_FILE
  898.   if test 780 -ne `wc -c <'unzip-5.12/mac/macdir.h'`; then
  899.     echo shar: \"'unzip-5.12/mac/macdir.h'\" unpacked with wrong size!
  900.   fi
  901.   # end of 'unzip-5.12/mac/macdir.h'
  902. fi
  903. if test -f 'unzip-5.12/mac/macstat.h' -a "${1}" != "-c" ; then 
  904.   echo shar: Will not clobber existing file \"'unzip-5.12/mac/macstat.h'\"
  905. else
  906.   echo shar: Extracting \"'unzip-5.12/mac/macstat.h'\" \(974 characters\)
  907.   sed "s/^X//" >'unzip-5.12/mac/macstat.h' <<'END_OF_FILE'
  908. X/*****************************************************************
  909. X *
  910. X *                stat.h
  911. X *
  912. X *****************************************************************/
  913. X
  914. X#include <time.h>
  915. Xextern int macstat(char *path, struct stat *buf, short nVRefNum, long lDirID );
  916. Xtypedef long dev_t;
  917. Xtypedef long ino_t;
  918. Xtypedef long off_t;
  919. X
  920. Xstruct stat {
  921. X    dev_t    st_dev;
  922. X    ino_t    st_ino;
  923. X    unsigned short    st_mode;
  924. X    short    st_nlink;
  925. X    short    st_uid;
  926. X    short    st_gid;
  927. X    dev_t    st_rdev;
  928. X    off_t    st_size;
  929. X    time_t   st_atime, st_mtime, st_ctime;
  930. X    long     st_blksize;
  931. X    long     st_blocks;
  932. X};
  933. X
  934. X#define S_IFMT     0xF000
  935. X#define S_IFIFO    0x1000
  936. X#define S_IFCHR    0x2000
  937. X#define S_IFDIR    0x4000
  938. X#define S_IFBLK    0x6000
  939. X#define S_IFREG    0x8000
  940. X#define S_IFLNK    0xA000
  941. X#define S_IFSOCK   0xC000
  942. X#define S_ISUID    0x800
  943. X#define S_ISGID    0x400
  944. X#define S_ISVTX    0x200
  945. X#define S_IREAD    0x100
  946. X#define S_IWRITE   0x80
  947. X#define S_IEXEC    0x40
  948. END_OF_FILE
  949.   if test 974 -ne `wc -c <'unzip-5.12/mac/macstat.h'`; then
  950.     echo shar: \"'unzip-5.12/mac/macstat.h'\" unpacked with wrong size!
  951.   fi
  952.   # end of 'unzip-5.12/mac/macstat.h'
  953. fi
  954. if test -f 'unzip-5.12/msdos/Borland.fix' -a "${1}" != "-c" ; then 
  955.   echo shar: Will not clobber existing file \"'unzip-5.12/msdos/Borland.fix'\"
  956. else
  957.   echo shar: Extracting \"'unzip-5.12/msdos/Borland.fix'\" \(3818 characters\)
  958.   sed "s/^X//" >'unzip-5.12/msdos/Borland.fix' <<'END_OF_FILE'
  959. XNotes on patching Borland (binary) executables so they'll understand Unix-
  960. Xstyle, LF-delimited ASCII files (from Onno van der Linden, c/o Frank van
  961. Xder Linden, vdlinden@fwi.uva.nl).
  962. X
  963. X
  964. X1. The CPP used by TC 2.0 can't handle unix-style (LF-terminated) lines.
  965. X   The CPP used by BC++ 2.0 can.
  966. X   The CPP used by BC++ 3.0 can't handle #if statements with unix-style lines.
  967. X   Fixes for both these problems below (GRR:  offset, new byte, old byte).
  968. X
  969. X     Comparing files \TC\CPP.EXE and \TC\CPP.OLD
  970. X     00004F25: 0D 0A
  971. X     00005E3D: 0D 0A
  972. X     00007916: 0D 0A
  973. X     000079D6: 0D 0A
  974. X     00007AC1: 0A 0D
  975. X     0000D8EE: EC F7
  976. X     0000D8F1: F7 EC
  977. X     0000D9EE: EC F7
  978. X     0000D9F1: F7 EC
  979. X     0000DC80: 0A 0D
  980. X     0000DC90: 0A 0D
  981. X
  982. X     Comparing files \BORLANDC\BIN\CPP.EXE and \BORLANDC\BIN\CPP.OLD
  983. X     0001D150: 89 75
  984. X     0001D151: 36 08
  985. X     0001D152: 30 89
  986. X     0001D153: 23 36
  987. X     0001D154: 75 30
  988. X     0001D155: 04 23
  989. X     0001D288: 9A 89
  990. X     0001D289: FF 36
  991. X     0001D28A: FF 30
  992. X     0001D28B: 00 23
  993. X     0001D28C: 00 9A
  994. X     0001D28E: 0E FF
  995. X     0001D28F: 30 00
  996. X     0001D290: 23 00
  997. X     0001E5A7: 89 8D
  998. X
  999. X
  1000. X2. The compilers (tcc 2.0 and bcc 3.0) are both one-pass compilers; i.e.,
  1001. X   cpp.exe isn't used when compiling with tcc or bcc.  The earlier statements
  1002. X   about both cpp's are the same for the builtin preprocesser in the compilers.
  1003. X   To fix the unix-style line stuff for the compilers, apply the fixes below.
  1004. X   I do have something called bpatch.c which reads in the output of fc /b and
  1005. X   changes the executable.  If anyone is too lazy to write it himself, just
  1006. X   send out a mail.
  1007. X
  1008. X     Comparing files TCC.EXE and TCC.OLD
  1009. X     00005E06: BF 88
  1010. X     00005E07: 02 01
  1011. X     00005E0C: 88 BF
  1012. X     00005E0D: 01 02
  1013. X     00006E7C: 0A 0D
  1014. X     00011FF9: 0A 0D
  1015. X     00012059: 0A 0D
  1016. X     00017E6C: 0A 0D
  1017. X     00018181: 0A 0D
  1018. X     000181F6: 0A 0D
  1019. X     00018AC1: 0A 0D
  1020. X     00018B27: 0D 0A
  1021. X     00018BBE: 0A 0D
  1022. X     00018C12: 0A 0D
  1023. X     00018C6A: 0A 0D
  1024. X     0001948A: 0A 0D
  1025. X     000194B7: 0D 0A
  1026. X     00019507: 0A 0D
  1027. X     0001C093: 0A 0D
  1028. X     0001C495: 3C 89
  1029. X     0001C496: 0D 46
  1030. X     0001C497: 74 FC
  1031. X     0001C498: DF 3D
  1032. X     0001C499: FF 0D
  1033. X     0001C49A: 0E 00
  1034. X     0001C49B: 34 75
  1035. X     0001C49C: 50 03
  1036. X     0001C49D: 3C E9
  1037. X     0001C49E: 0A F6
  1038. X     0001C49F: 75 FB
  1039. X     0001C4A0: 03 FF
  1040. X     0001C4A1: E9 0E
  1041. X     0001C4A2: F2 34
  1042. X     0001C4A3: FB 50
  1043. X     0001C4D0: 0A 0D
  1044. X     0001CFA7: 0A 0D
  1045. X     0001CFBA: 0D 0A
  1046. X     0001D007: 0A 0D
  1047. X     0002A13C: 0A 0D
  1048. X     0002A14C: 0A 0D
  1049. X     0002A2B6: EC F7
  1050. X     0002A2B9: F7 EC
  1051. X     0002A3B6: EC F7
  1052. X     0002A3B9: F7 EC
  1053. X     0002A4B6: EC F7
  1054. X     0002A4B9: F7 EC
  1055. X     0002BDC3: 20 21
  1056. X     0002BDC6: 21 20
  1057. X     
  1058. X     Comparing files BCC.EXE and BCC.OLD
  1059. X     0002B877: 89 75
  1060. X     0002B878: 36 08
  1061. X     0002B879: 5C 89
  1062. X     0002B87A: 5F 36
  1063. X     0002B87B: 75 5C
  1064. X     0002B87C: 04 5F
  1065. X     0002B9AF: 0E 89
  1066. X     0002B9B0: E8 36
  1067. X     0002B9B1: 56 5C
  1068. X     0002B9B2: DC 5F
  1069. X     0002B9B3: FF 90
  1070. X     0002B9B5: 5C E8
  1071. X     0002B9B6: 5F 51
  1072. X     0002B9B7: 90 DC
  1073. X     
  1074. X   Just an addition: the first one was for the cpp.exe's, the recent one is for
  1075. X   the compilers (bcc.exe, tcc.exe).  The first one is a bit redundant because
  1076. X   cpp.exe is hardly ever used.  See it as an attempt to make things complete.
  1077. X
  1078. X
  1079. X3. For those of you who are using NDMAKE45 under MSDOS:
  1080. X   version 4.5 predefines the macro's MAKE and MFLAGS as readonly's.
  1081. X   So there was no way you could use $(MAKE) with ndmake45.
  1082. X   Here are the fc /b's that make things work:
  1083. X
  1084. X     Comparing files MAKE45.EXE and MAKE45.OLD
  1085. X     000019C0: 00 03   # MFLAG
  1086. X     000019DC: 00 03   # MAKE
  1087. X     00007BEA: 0A 7E   # output of make -p
  1088. X     00007BEB: 00 0A   #
  1089. X
  1090. X     Comparing files MAKE45L.EXE and MAKE45L.OLD
  1091. X     0000277E: 00 03   # MFLAG
  1092. X     0000279D: 00 03   # MAKE
  1093. X     0000A6A8: 0A 7E   # output of make -p
  1094. X     0000A6A9: 00 0A
  1095. X
  1096. END_OF_FILE
  1097.   if test 3818 -ne `wc -c <'unzip-5.12/msdos/Borland.fix'`; then
  1098.     echo shar: \"'unzip-5.12/msdos/Borland.fix'\" unpacked with wrong size!
  1099.   fi
  1100.   # end of 'unzip-5.12/msdos/Borland.fix'
  1101. fi
  1102. if test -f 'unzip-5.12/msdos/Contents' -a "${1}" != "-c" ; then 
  1103.   echo shar: Will not clobber existing file \"'unzip-5.12/msdos/Contents'\"
  1104. else
  1105.   echo shar: Extracting \"'unzip-5.12/msdos/Contents'\" \(2323 characters\)
  1106.   sed "s/^X//" >'unzip-5.12/msdos/Contents' <<'END_OF_FILE'
  1107. XContents of the "msdos" sub-archive for UnZip 5.11 and later:
  1108. X
  1109. X  Contents       this file
  1110. X  README         notes about quirks in MS-DOS executables and compilers
  1111. X  msdos.c        OS-dependent UnZip routines for MS-DOS
  1112. X  makefile.bc    makefile for Borland C++ and Turbo C++
  1113. X  makefile.msc   makefile for Microsoft C and make or nmake
  1114. X  makefile.tc    makefile for Turbo C and make
  1115. X  Borland.fix    patches to fix Borland executables for grokking Unix EOLs
  1116. X
  1117. XNotes:
  1118. X
  1119. X(1) As of UnZip 5.1, Borland project files are no longer included.  They
  1120. X    were not as flexible as the makefiles, and the binary ones caused prob-
  1121. X    lems for both the comp.sources.misc moderator and the UnZip maintainer.
  1122. X    By way of compensation, what used to be called simply "makefile" has
  1123. X    been split into makefile.msc and makefile.tc (the latter for old Turbo C
  1124. X    compilers).
  1125. X
  1126. X(2) As of UnZip 5.11, makefile.gcc (for djgpp/GNU make) is no longer provided.
  1127. X    Instead use the gcc_dos target in the Unix makefile (unix/Makefile) after
  1128. X    copying it to the main UnZip directory.  Note that, because of bugs in
  1129. X    the MS-DOS port of GNU make, the gcc_dos target does not make use of the
  1130. X    MAKE variable; therefore users of other makes (e.g., nmake) will have to
  1131. X    edit the target or rename their make utility to "make".
  1132. X
  1133. X(3) The Unix makefile also has an msc_dos target which can be used for MSC 6.0
  1134. X    or later, but such use is discouraged and the target may disappear in the
  1135. X    future--use makefile.msc instead.
  1136. X
  1137. X(4) For DOS emx+gcc use the gccdos target in the OS/2 makefile.os2.  This
  1138. X    target has only been tested in cross-compilation from OS/2 to MS-DOS,
  1139. X    but it should work under plain MS-DOS with a proper make utility.  The
  1140. X    resulting executables require emx.exe to run (akin to djgpp's go32.exe).
  1141. X
  1142. X(5) The binary patches in Borland.fix are NOT required; they may be useful
  1143. X    if you regularly deal with Unix sources, but casual users should probably
  1144. X    make use of an external utility like Rahul Dhesi's FLIP to convert between
  1145. X    Unix and DOS/OS2 end-of-line characters.  If you know how to patch binary
  1146. X    executables, you should be able to figure out how to use these patches.
  1147. X    Presumably they don't work for more recent versions of the executables
  1148. X    anyway; they'll probably be removed in the next version.
  1149. END_OF_FILE
  1150.   if test 2323 -ne `wc -c <'unzip-5.12/msdos/Contents'`; then
  1151.     echo shar: \"'unzip-5.12/msdos/Contents'\" unpacked with wrong size!
  1152.   fi
  1153.   # end of 'unzip-5.12/msdos/Contents'
  1154. fi
  1155. if test -f 'unzip-5.12/msdos/makefile.bc' -a "${1}" != "-c" ; then 
  1156.   echo shar: Will not clobber existing file \"'unzip-5.12/msdos/makefile.bc'\"
  1157. else
  1158.   echo shar: Extracting \"'unzip-5.12/msdos/makefile.bc'\" \(3487 characters\)
  1159.   sed "s/^X//" >'unzip-5.12/msdos/makefile.bc' <<'END_OF_FILE'
  1160. X# Makefile for UnZip(SFX) and fUnZip for Borland C++ 2.x/3.0 and Turbo C++ 1.0
  1161. X# Version: 5.12 and later        Alvin Koh, Jim Knoble, Christian Spieler, etc.
  1162. X#
  1163. X# Last revised:  11 Aug 94
  1164. X
  1165. X
  1166. X# for Borland C++ uncomment this and comment out the tcc line:
  1167. XCC = bcc
  1168. X
  1169. X# for Turbo C++ uncomment this and comment out the bcc line:
  1170. X#CC = tcc
  1171. X
  1172. X#TASM = tasm    # not used
  1173. X
  1174. X#UNMODEL = s     # small model for UnZip and ZipInfo, now that strings moved
  1175. XUNMODEL = l     # large model for UnZip (M. Lawler/BC 4.0:  _text > 64K w/ "s")
  1176. XFUMODEL = s     # always use small model for fUnZip
  1177. X
  1178. X#    GNU make doesn't like the return value from "rem"
  1179. X#STRIP=rem
  1180. XSTRIP=echo  Ignore this line.  
  1181. X#    If you don't have LZEXE or PKLITE, get one of them. Then define:
  1182. X#STRIP=lzexe
  1183. X#    or
  1184. X#STRIP=pklite
  1185. X#    This makes a big difference in .exe size (and possibly load time).
  1186. X
  1187. X
  1188. X#    Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
  1189. X#    should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
  1190. X#    to the declaration of LOC here:
  1191. XLOC = $(LOCAL_UNZIP)
  1192. X
  1193. X
  1194. X# compiler flags
  1195. X
  1196. XCFLAGS = -O -ff- -k- -P-.C -I. $(LOC)
  1197. XUNFLAGS = -m$(UNMODEL) $(CFLAGS)
  1198. XFUFLAGS = -m$(FUMODEL) $(CFLAGS) -K -d
  1199. XLDFLAGS = -lxncd -l-P          # for bcc
  1200. X#LDFLAGS = -lxncd        # for tcc
  1201. X
  1202. X# implicit rules
  1203. X
  1204. X.c.obj:
  1205. X    $(CC) -c $(UNFLAGS) {$< }
  1206. X
  1207. X# list macros
  1208. X
  1209. Xunzip_dependencies = \
  1210. X    unzip.obj \
  1211. X    crypt.obj \
  1212. X    envargs.obj \
  1213. X    explode.obj \
  1214. X    extract.obj \
  1215. X    file_io.obj \
  1216. X    inflate.obj \
  1217. X    match.obj \
  1218. X    unreduce.obj \
  1219. X    unshrink.obj \
  1220. X    zipinfo.obj \
  1221. X    msdos.obj
  1222. X
  1223. Xfunzip_dependencies = \
  1224. X    funzip.obj \
  1225. X    crypt_.obj \
  1226. X    inflate_.obj
  1227. X
  1228. Xunzipsfx_dependencies = \
  1229. X    unzip_.obj \
  1230. X    crypt.obj \
  1231. X    extract_.obj \
  1232. X    file_io.obj \
  1233. X    inflate.obj \
  1234. X    match.obj \
  1235. X    msdos_.obj
  1236. X
  1237. X# explicit rules
  1238. X
  1239. Xall:    unzip.exe funzip.exe unzipsfx.exe
  1240. X
  1241. Xunzip.exe:      $(unzip_dependencies)
  1242. X    $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzip.exe @&&|
  1243. Xunzip.obj
  1244. Xcrypt.obj
  1245. Xenvargs.obj
  1246. Xexplode.obj
  1247. Xextract.obj
  1248. Xfile_io.obj
  1249. Xinflate.obj
  1250. Xmatch.obj
  1251. Xunreduce.obj
  1252. Xunshrink.obj
  1253. Xzipinfo.obj
  1254. Xmsdos.obj
  1255. X|
  1256. X    $(STRIP) unzip.exe
  1257. X
  1258. Xfunzip.exe:    $(funzip_dependencies)
  1259. X    $(CC) -m$(FUMODEL) $(LDFLAGS) -efunzip.exe @&&|
  1260. Xfunzip.obj
  1261. Xcrypt_.obj
  1262. Xinflate_.obj
  1263. X|
  1264. X    $(STRIP) funzip.exe
  1265. X
  1266. Xunzipsfx.exe:      $(unzipsfx_dependencies)
  1267. X    $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzipsfx.exe @&&|
  1268. Xunzip_.obj
  1269. Xcrypt.obj
  1270. Xextract_.obj
  1271. Xfile_io.obj
  1272. Xinflate.obj
  1273. Xmatch.obj
  1274. Xmsdos_.obj
  1275. X|
  1276. X    $(STRIP) unzipsfx.exe
  1277. X
  1278. X# individual file dependencies
  1279. X
  1280. Xcrypt.obj:      crypt.c unzip.h zip.h crypt.h
  1281. Xenvargs.obj:    envargs.c unzip.h
  1282. Xexplode.obj:    explode.c unzip.h
  1283. Xextract.obj:    extract.c unzip.h crypt.h
  1284. Xfile_io.obj:    file_io.c unzip.h crypt.h tables.h
  1285. Xinflate.obj:    inflate.c inflate.h unzip.h
  1286. Xmatch.obj:      match.c unzip.h
  1287. Xunreduce.obj:   unreduce.c unzip.h
  1288. Xunshrink.obj:   unshrink.c unzip.h
  1289. Xunzip.obj:      unzip.c unzip.h crypt.h version.h
  1290. Xzipinfo.obj:    zipinfo.c unzip.h
  1291. X
  1292. Xmsdos.obj:      msdos/msdos.c unzip.h
  1293. X    $(CC) -c $(UNFLAGS) msdos/msdos.c
  1294. X
  1295. Xfunzip.obj:     funzip.c unzip.h crypt.h tables.h
  1296. X    $(CC) -c $(FUFLAGS) funzip.c
  1297. X
  1298. Xcrypt_.obj:     crypt.c unzip.h zip.h crypt.h
  1299. X    $(CC) -c $(FUFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  1300. X
  1301. Xinflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  1302. X    $(CC) -c $(FUFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  1303. X
  1304. Xunzip_.obj:     unzip.c unzip.h crypt.h version.h
  1305. X    $(CC) -c $(UNFLAGS) -DSFX -ounzip_.obj unzip.c
  1306. X
  1307. Xextract_.obj:   extract.c unzip.h crypt.h
  1308. X    $(CC) -c $(UNFLAGS) -DSFX -oextract_.obj extract.c
  1309. X
  1310. Xmsdos_.obj:     msdos/msdos.c unzip.h
  1311. X    $(CC) -c $(UNFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
  1312. END_OF_FILE
  1313.   if test 3487 -ne `wc -c <'unzip-5.12/msdos/makefile.bc'`; then
  1314.     echo shar: \"'unzip-5.12/msdos/makefile.bc'\" unpacked with wrong size!
  1315.   fi
  1316.   # end of 'unzip-5.12/msdos/makefile.bc'
  1317. fi
  1318. if test -f 'unzip-5.12/msdos/makefile.msc' -a "${1}" != "-c" ; then 
  1319.   echo shar: Will not clobber existing file \"'unzip-5.12/msdos/makefile.msc'\"
  1320. else
  1321.   echo shar: Extracting \"'unzip-5.12/msdos/makefile.msc'\" \(3972 characters\)
  1322.   sed "s/^X//" >'unzip-5.12/msdos/makefile.msc' <<'END_OF_FILE'
  1323. X#------------------------------------------------------------------------------
  1324. X# Makefile for UnZip 5.11 and later                     Greg Roelofs and others
  1325. X# Version:  Microsoft C (5.x and later)                          11 August 1994
  1326. X#------------------------------------------------------------------------------
  1327. X
  1328. X# Users of MSC 6/7 and NMAKE can use the Unix Makefile (target msc_dos),
  1329. X# if desired.  This makefile works just fine, too, however.  OS/2 users
  1330. X# can cross-compile using os2/makefile.os2 (target mscdos).  Note that
  1331. X# there is possibly a bug in MSC 6 which screws up funzip (goes into
  1332. X# infinite loop? --this has not been confirmed in over a year...).  There
  1333. X# is definitely a bug (internal compiler error) in MSC 6.00 while com-
  1334. X# piling explode.c (fixed in 6.0a, 6.0ax, 6.0ax2, 7.*, 8.*).
  1335. X
  1336. X
  1337. X#    GNU make doesn't like the return value from "rem"
  1338. X#STRIP=rem
  1339. XSTRIP=echo  Ignore this line.  
  1340. X#    If you don't have LZEXE or PKLITE, get one of them. Then define:
  1341. X#STRIP=lzexe
  1342. X#    or
  1343. X#STRIP=pklite
  1344. X#    and remove /e from LDFLAGS.  This makes a big difference in
  1345. X#    .exe size (and possibly load time).
  1346. X
  1347. X#    Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
  1348. X#    should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
  1349. X#    to the declaration of LOC here:
  1350. XLOC = $(LOCAL_UNZIP) 
  1351. X
  1352. X# small model (should work now, but if problems, use L)
  1353. XMODEL=S
  1354. X
  1355. XCC = cl        # -Ox does not work for inflate.c
  1356. X# add -G2(3,4) for 286 (386, 486) and/or -FPi87 for 80x87:
  1357. XCFLAGS = -nologo -DMSC $(LOC) -Oait -Gs -I.
  1358. X
  1359. XLD = link
  1360. XLDFLAGS = /nologo/noi/e/st:0x0c00   # remove /e if you have LZEXE or PKLITE
  1361. XLDFLAGS2 = ,$*;
  1362. X
  1363. XOBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
  1364. XOBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj
  1365. XOBJS3 = msdos.obj
  1366. XOBJS = $(OBJS1) $(OBJS2) $(OBJS3)
  1367. X
  1368. XOBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj\
  1369. X  msdos_.obj
  1370. X
  1371. XOBJF = funzip.obj crypt_.obj inflate_.obj
  1372. X
  1373. X
  1374. Xdefault:        unzip.exe funzip.exe unzipsfx.exe
  1375. X
  1376. X.c.obj:
  1377. X        $(CC) -c -A$(MODEL) $(CFLAGS) $*.c
  1378. X
  1379. Xcrypt.obj:        crypt.c unzip.h crypt.h zip.h
  1380. X
  1381. Xcrypt_.obj:       crypt.c unzip.h crypt.h zip.h
  1382. X    $(CC) -c -AS $(CFLAGS) -DFUNZIP -Focrypt_.obj crypt.c
  1383. X
  1384. Xenvargs.obj:      envargs.c unzip.h
  1385. X
  1386. Xexplode.obj:      explode.c unzip.h
  1387. X
  1388. Xextract.obj:      extract.c unzip.h crypt.h
  1389. X
  1390. Xextract_.obj:     extract.c unzip.h crypt.h
  1391. X        $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Foextract_.obj extract.c
  1392. X
  1393. Xfile_io.obj:      file_io.c unzip.h crypt.h tables.h
  1394. X
  1395. Xfunzip.obj:       funzip.c unzip.h crypt.h tables.h
  1396. X        $(CC) -c -AS $(CFLAGS) funzip.c
  1397. X
  1398. Xinflate.obj:      inflate.c unzip.h
  1399. X
  1400. Xinflate_.obj:     inflate.c inflate.h unzip.h crypt.h
  1401. X    $(CC) -c -AS $(CFLAGS) -DFUNZIP -Foinflate_.obj inflate.c
  1402. X
  1403. Xmatch.obj:        match.c unzip.h
  1404. X
  1405. Xmsdos.obj:        msdos/msdos.c unzip.h
  1406. X        $(CC) -c -A$(MODEL) $(CFLAGS) msdos/msdos.c
  1407. X
  1408. Xmsdos_.obj:       msdos/msdos.c unzip.h
  1409. X        $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Fomsdos_.obj msdos/msdos.c
  1410. X
  1411. Xunreduce.obj:     unreduce.c unzip.h
  1412. X
  1413. Xunshrink.obj:     unshrink.c unzip.h
  1414. X
  1415. Xunzip.obj:        unzip.c unzip.h crypt.h version.h
  1416. X
  1417. Xunzip_.obj:       unzip.c unzip.h crypt.h version.h
  1418. X        $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Founzip_.obj unzip.c
  1419. X
  1420. Xzipinfo.obj:      zipinfo.c unzip.h
  1421. X
  1422. X
  1423. X# MS make:
  1424. X# -------
  1425. Xunzip.exe:      $(OBJS)
  1426. X    echo $(OBJS1)+ > unzip.rsp
  1427. X    echo $(OBJS2)+ >> unzip.rsp
  1428. X    echo $(OBJS3); >> unzip.rsp
  1429. X    $(LD) $(LDFLAGS) @unzip.rsp
  1430. X    del unzip.rsp
  1431. X    $(STRIP) unzip.exe
  1432. X
  1433. X# better makes which know how to deal with 128 char limit on command line:
  1434. X# -----------------------------------------------------------------------
  1435. X#unzip.exe:     $(OBJS)
  1436. X#    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  1437. X#    $(STRIP) unzip.exe
  1438. X
  1439. X# both makes:
  1440. X# ----------
  1441. Xfunzip.exe:     $(OBJF)
  1442. X    $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2)
  1443. X    $(STRIP) funzip.exe
  1444. X
  1445. Xunzipsfx.exe:     $(OBJX)
  1446. X    echo $(OBJX), $@; > unzipsfx.rsp
  1447. X    $(LD) $(LDFLAGS) @unzipsfx.rsp
  1448. X    del unzipsfx.rsp
  1449. X    $(STRIP) unzipsfx.exe
  1450. END_OF_FILE
  1451.   if test 3972 -ne `wc -c <'unzip-5.12/msdos/makefile.msc'`; then
  1452.     echo shar: \"'unzip-5.12/msdos/makefile.msc'\" unpacked with wrong size!
  1453.   fi
  1454.   # end of 'unzip-5.12/msdos/makefile.msc'
  1455. fi
  1456. if test -f 'unzip-5.12/msdos/makefile.tc' -a "${1}" != "-c" ; then 
  1457.   echo shar: Will not clobber existing file \"'unzip-5.12/msdos/makefile.tc'\"
  1458. else
  1459.   echo shar: Extracting \"'unzip-5.12/msdos/makefile.tc'\" \(3520 characters\)
  1460.   sed "s/^X//" >'unzip-5.12/msdos/makefile.tc' <<'END_OF_FILE'
  1461. X#-----------------------------------------------------------------------------
  1462. X# Makefile for UnZip 5.11 and later                           Jean-loup Gailly
  1463. X# Version:  Turbo C (edit and use makefile.bc for Turbo C++)      10 July 1994
  1464. X#-----------------------------------------------------------------------------
  1465. X
  1466. X#    GNU make doesn't like the return value from "rem"
  1467. X#STRIP=rem
  1468. XSTRIP=echo  Ignore this line.  
  1469. X#    If you don't have LZEXE or PKLITE, get one of them. Then define:
  1470. X#STRIP=lzexe
  1471. X#    or
  1472. X#STRIP=pklite
  1473. X#    This makes a big difference in .exe size (and possibly load time).
  1474. X
  1475. X# memory model for UnZip (conflicting reports on whether Turbo C can or
  1476. X# cannot put strings into far memory; for now assume it can and use small
  1477. X# model *with* ZipInfo enabled...if fails, either define NO_ZIPINFO or
  1478. X# use large model)   [GRR 940712:  sigh, no go--inflate fails.  Back to
  1479. X# large model...]
  1480. X#MODEL = s
  1481. XMODEL = l
  1482. X
  1483. XCC = tcc
  1484. XLD = $(CC)
  1485. X
  1486. XUCFLAGS = -m$(MODEL) -O -Z -I. -DFar=
  1487. XULDFLAGS = -m$(MODEL)
  1488. X
  1489. X# funzip is always small-model
  1490. XFCFLAGS = -ms -O -Z -I.
  1491. XFLDFLAGS = -ms
  1492. X
  1493. XLDFLAGS2 =
  1494. X
  1495. XOBJS = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj \
  1496. X    inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj msdos.obj
  1497. X
  1498. XOBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj \
  1499. X    msdos_.obj
  1500. X
  1501. XOBJF = funzip.obj crypt_.obj inflate_.obj
  1502. X
  1503. Xdefault:        unzip.exe funzip.exe unzipsfx.exe
  1504. X
  1505. Xclean:
  1506. X    rem Ignore any errors in the following...
  1507. X    del *.ob
  1508. X    del *.obj
  1509. X    del unzip.exe
  1510. X    del funzip.exe
  1511. X
  1512. X.c.obj:
  1513. X        $(CC) -c $(UCFLAGS) $*.c
  1514. X
  1515. Xcrypt.obj:      crypt.c unzip.h crypt.h zip.h
  1516. X
  1517. Xcrypt_.obj:     crypt.c unzip.h crypt.h zip.h
  1518. X    $(CC) -c $(FCFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  1519. X
  1520. Xenvargs.obj:    envargs.c unzip.h
  1521. X
  1522. Xexplode.obj:    explode.c unzip.h
  1523. X
  1524. Xextract.obj:    extract.c unzip.h crypt.h
  1525. X
  1526. Xextract_.obj:   extract.c unzip.h crypt.h
  1527. X    $(CC) -c $(UCFLAGS) -DSFX -oextract_.obj extract.c
  1528. X
  1529. Xfile_io.obj:    file_io.c unzip.h crypt.h tables.h
  1530. X
  1531. Xfunzip.obj:     funzip.c unzip.h crypt.h tables.h
  1532. X    $(CC) -c $(FCFLAGS) funzip.c
  1533. X
  1534. Xinflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  1535. X    $(CC) -c $(FCFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  1536. X
  1537. Xinflate.obj:    inflate.c inflate.h unzip.h
  1538. X
  1539. Xmatch.obj:      match.c unzip.h
  1540. X
  1541. Xmsdos.obj:      msdos/msdos.c unzip.h
  1542. X        $(CC) -c $(UCFLAGS) msdos/msdos.c
  1543. X
  1544. Xmsdos_.obj:     msdos/msdos.c unzip.h
  1545. X    $(CC) -c $(UCFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
  1546. X
  1547. Xunreduce.obj:   unreduce.c unzip.h
  1548. X
  1549. Xunshrink.obj:   unshrink.c unzip.h
  1550. X
  1551. Xunzip.obj:      unzip.c unzip.h crypt.h version.h
  1552. X
  1553. Xunzip_.obj:     unzip.c unzip.h crypt.h version.h
  1554. X    $(CC) -c $(UCFLAGS) -DSFX -ounzip_.obj unzip.c
  1555. X
  1556. Xzipinfo.obj:    zipinfo.c unzip.h
  1557. X
  1558. X
  1559. X# Turbo Make which cannot deal with the MS-DOS 128 byte limit:
  1560. X# -----------------------------------------------------------
  1561. Xunzip.exe: $(OBJS)
  1562. X    rem   Ignore any warnings in the following commands:
  1563. X    del funzip.ob
  1564. X    ren funzip.obj *.ob
  1565. X    del crypt_.ob
  1566. X    ren crypt_.obj *.ob
  1567. X    del inflate_.ob
  1568. X    ren inflate_.obj *.ob
  1569. X    $(LD) $(ULDFLAGS) -eunzip.exe *.obj
  1570. X    ren *.ob *.obj
  1571. X    $(STRIP) unzip.exe
  1572. X
  1573. X# better makes which know how to deal with 128 char limit on command line:
  1574. X# -----------------------------------------------------------------------
  1575. X#unzip.exe:     $(OBJS)
  1576. X#    $(LD) $(ULDFLAGS) $(OBJS) $(LDFLAGS2)
  1577. X#    $(STRIP) unzip.exe
  1578. X
  1579. X# both makes:
  1580. X# ----------
  1581. Xfunzip.exe:     $(OBJF)
  1582. X    $(LD) $(FLDFLAGS) $(OBJF) $(LDFLAGS2)
  1583. X    $(STRIP) funzip.exe
  1584. X
  1585. Xunzipsfx.exe:     $(OBJX)
  1586. X    $(LD) $(ULDFLAGS) $(OBJX) $(LDFLAGS2)
  1587. X    rename unzip_.exe unzipsfx.exe
  1588. X    $(STRIP) unzipsfx.exe
  1589. END_OF_FILE
  1590.   if test 3520 -ne `wc -c <'unzip-5.12/msdos/makefile.tc'`; then
  1591.     echo shar: \"'unzip-5.12/msdos/makefile.tc'\" unpacked with wrong size!
  1592.   fi
  1593.   # end of 'unzip-5.12/msdos/makefile.tc'
  1594. fi
  1595. if test -f 'unzip-5.12/nt/Makefile' -a "${1}" != "-c" ; then 
  1596.   echo shar: Will not clobber existing file \"'unzip-5.12/nt/Makefile'\"
  1597. else
  1598.   echo shar: Extracting \"'unzip-5.12/nt/Makefile'\" \(2794 characters\)
  1599.   sed "s/^X//" >'unzip-5.12/nt/Makefile' <<'END_OF_FILE'
  1600. X# NMAKE Makefile for Windows NT
  1601. X#   D. Feinleib 7/92 t-davefe@microsoft.com
  1602. X#   H. Gessau 9/93 <henryg@kullmar.kullmar.se>
  1603. X#
  1604. X# Last revised:  10 Jul 94
  1605. X#
  1606. X# Tested with NT SDK, VC++ 1.0 for NT, and DEC C/C++ beta.
  1607. X#
  1608. X# For DEC C/C++, comment out the "cdebug = -Ogityb2" line (or 
  1609. X# define debug?).  [Jack Stansbury]
  1610. X
  1611. X# Nmake macros for building Windows NT applications
  1612. X# To build with debug info use 'nmake debug=1'
  1613. X!IFNDEF debug
  1614. XNODEBUG=1
  1615. X!ENDIF
  1616. X!include <ntwin32.mak>
  1617. X
  1618. X# object files
  1619. XOBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
  1620. XOBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj nt.obj
  1621. XOBJS  = $(OBJS1) $(OBJS2)
  1622. XOBJX1 = unzipsfx.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj
  1623. XOBJX2 = nt_.obj
  1624. XOBJX  = $(OBJX1) $(OBJX2)
  1625. XOBJF  = funzip.obj crypt_.obj inflate_.obj
  1626. X
  1627. X# cvars = $(cvars) -nologo -DMSDOS -DNO_ASM -J
  1628. Xcvars = $(cvars) -nologo -DNO_ASM -J
  1629. X
  1630. X# Some optimization (if not debugging)
  1631. X!IFDEF NODEBUG
  1632. Xcdebug = -Ogityb2
  1633. X!ENDIF
  1634. X
  1635. X# How to compile sources
  1636. X.c.obj:
  1637. X    $(cc) $(cdebug) $(cflags) $(cvars) $<
  1638. X
  1639. X# How to link
  1640. X.obj.exe:
  1641. X    $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@
  1642. X
  1643. X
  1644. X# Default target is all the executables
  1645. Xunzips : unzip.exe funzip.exe unzipsfx.exe
  1646. X
  1647. X
  1648. Xunzip.exe:    $(OBJS)
  1649. Xunzipsfx.exe:    $(OBJX)
  1650. Xfunzip.exe:    $(OBJF)
  1651. X
  1652. Xcrypt.obj:    crypt.c unzip.h zip.h crypt.h
  1653. Xenvargs.obj:    envargs.c unzip.h
  1654. Xexplode.obj:    explode.c unzip.h
  1655. Xextract.obj:    extract.c unzip.h crypt.h
  1656. Xfile_io.obj:    file_io.c unzip.h crypt.h tables.h
  1657. Xfunzip.obj:    funzip.c unzip.h crypt.h tables.h
  1658. Xinflate.obj:    inflate.c inflate.h unzip.h
  1659. Xmatch.obj:    match.c unzip.h
  1660. Xunreduce.obj:    unreduce.c unzip.h
  1661. Xunshrink.obj:    unshrink.c unzip.h
  1662. Xunzip.obj:    unzip.c unzip.h crypt.h version.h
  1663. Xzipinfo.obj:    zipinfo.c unzip.h
  1664. X
  1665. Xnt.obj:     nt\nt.c unzip.h
  1666. X    $(cc) $(cdebug) $(cflags) $(cvars) -I. nt\nt.c
  1667. X    
  1668. Xnt_.obj:     nt\nt.c unzip.h                    # unzipsfx only
  1669. X    copy nt\nt.c nt_.c
  1670. X    $(cc) $(cdebug) $(cflags) $(cvars) -DSFX nt_.c
  1671. X    del nt_.c
  1672. X    
  1673. Xcrypt_.obj:    crypt.c unzip.h zip.h crypt.h            # funzip only
  1674. X    copy crypt.c crypt_.c
  1675. X    $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt_.c
  1676. X    del crypt_.c
  1677. X
  1678. Xextract_.obj:    extract.c unzip.h crypt.h            # unzipsfx only
  1679. X    copy extract.c extract_.c
  1680. X    $(cc) $(cdebug) $(cflags) $(cvars) -DSFX extract_.c
  1681. X    del extract_.c
  1682. X
  1683. Xinflate_.obj:    inflate.c inflate.h unzip.h crypt.h        # funzip only
  1684. X    copy inflate.c inflate_.c
  1685. X    $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate_.c
  1686. X    del inflate_.c
  1687. X
  1688. Xunzipsfx.obj:    unzip.c unzip.h    crypt.h version.h        # unzipsfx only
  1689. X    copy unzip.c unzipsfx.c
  1690. X    $(cc) $(cdebug) $(cflags) $(cvars) -DSFX unzipsfx.c
  1691. X    del unzipsfx.c
  1692. X  
  1693. Xzipinfo_.obj:    zipinfo.c unzip.h                # unzipsfx only
  1694. X    copy zipinfo.c zipinfo_.c
  1695. X    $(cc) $(cdebug) $(cflags) $(cvars) -DSFX zipinfo_.c
  1696. X    del zipinfo_.c
  1697. X  
  1698. Xclean:
  1699. X    del /q $(OBJS) unzip.exe $(OBJF) funzip.exe $(OBJX) unzipsfx.exe
  1700. END_OF_FILE
  1701.   if test 2794 -ne `wc -c <'unzip-5.12/nt/Makefile'`; then
  1702.     echo shar: \"'unzip-5.12/nt/Makefile'\" unpacked with wrong size!
  1703.   fi
  1704.   # end of 'unzip-5.12/nt/Makefile'
  1705. fi
  1706. if test -f 'unzip-5.12/os2/Contents' -a "${1}" != "-c" ; then 
  1707.   echo shar: Will not clobber existing file \"'unzip-5.12/os2/Contents'\"
  1708. else
  1709.   echo shar: Extracting \"'unzip-5.12/os2/Contents'\" \(613 characters\)
  1710.   sed "s/^X//" >'unzip-5.12/os2/Contents' <<'END_OF_FILE'
  1711. XContents of the "os2" sub-archive for UnZip 5.12 and later:
  1712. X
  1713. X  Contents      this file
  1714. X  makefile.os2  makefile for almost every compiler available under OS/2
  1715. X  os2.c         OS/2-specific support routines
  1716. X  unzip16.def   OS/2 linker definition file (16-bit)
  1717. X  unzip.def     OS/2 linker definition file (32-bit)
  1718. X  zipgrep.cmd   really cool REXX script to search for strings in a zipfile
  1719. X  wat_met.dif   patch for Watcom C DOS/OS2-1.x versions and Metaware High C++
  1720. X
  1721. XThere is no support for the Zortech or GCC/2 (Michael Johnson/Colin
  1722. XJensen) compilers.  emx+gcc is supported.  New makefile targets are
  1723. Xwelcome...
  1724. END_OF_FILE
  1725.   if test 613 -ne `wc -c <'unzip-5.12/os2/Contents'`; then
  1726.     echo shar: \"'unzip-5.12/os2/Contents'\" unpacked with wrong size!
  1727.   fi
  1728.   # end of 'unzip-5.12/os2/Contents'
  1729. fi
  1730. if test -f 'unzip-5.12/os2/zipgrep.cmd' -a "${1}" != "-c" ; then 
  1731.   echo shar: Will not clobber existing file \"'unzip-5.12/os2/zipgrep.cmd'\"
  1732. else
  1733.   echo shar: Extracting \"'unzip-5.12/os2/zipgrep.cmd'\" \(1601 characters\)
  1734.   sed "s/^X//" >'unzip-5.12/os2/zipgrep.cmd' <<'END_OF_FILE'
  1735. X/*---------------------------------------------------------------------------
  1736. X
  1737. X   zipgrep.cmd  (ye olde REXX procedure for OS/2)
  1738. X
  1739. X   Script to search members of a zipfile for a string or regular expression
  1740. X   and print the names of any such members (and, optionally, the matching
  1741. X   text).  The search is case-insensitive by default.
  1742. X
  1743. X   History:
  1744. X     original Bourne shell version by Jean-loup Gailly
  1745. X     modified by Greg Roelofs for Ultrix (no egrep -i) and zipinfo -1
  1746. X     OS/2 REXX script by Greg Roelofs
  1747. X
  1748. X   Last modified:  19 Jul 93
  1749. X
  1750. X  ---------------------------------------------------------------------------*/
  1751. X
  1752. XPARSE ARG string zipfile members
  1753. X
  1754. Xif (string == '') then do
  1755. X    say 'usage:  zipgrep search_string zipfile [members...]'
  1756. X    say '   Displays the names of zipfile members containing a given string,'
  1757. X    say '   in addition to the matching text.  This procedure requires unzip'
  1758. X    say '   and egrep in the current path, and it is quite slow....'
  1759. X    exit 1
  1760. Xend
  1761. X
  1762. X/* doesn't seem to work...
  1763. Xnewq = RXQUEUE("Create",zipgrep_pipe)
  1764. Xoldq = RXQUEUE("Set",newq)
  1765. X */
  1766. X
  1767. X/* flush the queue before starting */
  1768. Xdo QUEUED()
  1769. X    PULL junk
  1770. Xend
  1771. X
  1772. X/* GRR:  can also add "2>&1" before pipe in following external command */
  1773. X'@unzip -Z1' zipfile members '| rxqueue'
  1774. X
  1775. Xdo while QUEUED() > 0
  1776. X    PARSE PULL file
  1777. X    '@unzip -p' zipfile file '| egrep -is' string
  1778. X    if rc == 0 then do
  1779. X        SAY file':'
  1780. X        /* can comment out following line if just want filenames */
  1781. X        '@unzip -p' zipfile file '| egrep -i' string
  1782. X    end
  1783. Xend
  1784. X
  1785. X/*
  1786. Xcall RXQUEUE "Delete",newq
  1787. Xcall RXQUEUE "Set",oldq
  1788. X */
  1789. X
  1790. Xexit 0
  1791. END_OF_FILE
  1792.   if test 1601 -ne `wc -c <'unzip-5.12/os2/zipgrep.cmd'`; then
  1793.     echo shar: \"'unzip-5.12/os2/zipgrep.cmd'\" unpacked with wrong size!
  1794.   fi
  1795.   # end of 'unzip-5.12/os2/zipgrep.cmd'
  1796. fi
  1797. if test -f 'unzip-5.12/unix/Contents' -a "${1}" != "-c" ; then 
  1798.   echo shar: Will not clobber existing file \"'unzip-5.12/unix/Contents'\"
  1799. else
  1800.   echo shar: Extracting \"'unzip-5.12/unix/Contents'\" \(640 characters\)
  1801.   sed "s/^X//" >'unzip-5.12/unix/Contents' <<'END_OF_FILE'
  1802. XContents of the "unix" sub-archive for UnZip 5.11 and later:
  1803. X
  1804. X  Contents      this file
  1805. X  Makefile      makefile for UnZip for various architectures and OS's
  1806. X  unix.c        Unix-specific support routines
  1807. X  unzip.1    UnZip manual page, nroff format
  1808. X  unzipsfx.1    UnZipSFX manual page, nroff format
  1809. X  zipinfo.1    ZipInfo manual page, nroff format
  1810. X  funzip.1     fUnZip manual page, nroff format
  1811. X
  1812. XType "make" or "make help" to get general compile instructions (beyond
  1813. Xthose in the INSTALL file), or "make list" for a list of makefile targets.
  1814. XNote that there are some MS-DOS and cross-compilation targets thrown in
  1815. Xjust to make things more exciting.
  1816. END_OF_FILE
  1817.   if test 640 -ne `wc -c <'unzip-5.12/unix/Contents'`; then
  1818.     echo shar: \"'unzip-5.12/unix/Contents'\" unpacked with wrong size!
  1819.   fi
  1820.   # end of 'unzip-5.12/unix/Contents'
  1821. fi
  1822. if test -f 'unzip-5.12/vms/Contents' -a "${1}" != "-c" ; then 
  1823.   echo shar: Will not clobber existing file \"'unzip-5.12/vms/Contents'\"
  1824. else
  1825.   echo shar: Extracting \"'unzip-5.12/vms/Contents'\" \(1682 characters\)
  1826.   sed "s/^X//" >'unzip-5.12/vms/Contents' <<'END_OF_FILE'
  1827. XContents of the "vms" sub-archive for UnZip 5.12 and later:
  1828. X
  1829. X  Contents            this file
  1830. X  README              general VMS info about using UnZip and zipfiles
  1831. X  unzip_def.rnh       UnZip default help page, RUNOFF format
  1832. X  unzip_cli.help      UnZip VMSCLI help page, TPU format
  1833. X  unzipsfx.hlp        UnZipSFX pre-formatted help page
  1834. X  cvthelp.tpu         TPU macro file to convert .help file to RUNOFF format
  1835. X  cmdline.c           VMS-style command-line-interface code (if VMSCLI defined)
  1836. X  unz_cld.cld         more VMS-command-line stuff (if VMSCLI defined)
  1837. X  vms.c               VMS file manipulation code
  1838. X  vms.h               VMS header file for UnZip
  1839. X  make.com            command file to make UnZip with GNU or DEC C on VAX or AXP
  1840. X  descrip.mms         MMK/MMS makefile for UnZip/ZipInfo and UnZipSFX
  1841. X  vmsshare.opt        options file used by descrip.mms
  1842. X  unzip.opt           options file used by descrip.mms and make.com
  1843. X  unzipsfx.opt        options file used by descrip.mms and make.com
  1844. X  clean.com           command file to remove .obj and .exe files; used with MMS
  1845. X  makesfx.com         command file to create self-extracting archives
  1846. X
  1847. XMAKE/VMS is no longer supported since MMK (MMS clone by Matt Madison/MadGoat
  1848. XEnterprises, compatible with descrip.mms) is both free and becoming quite 
  1849. Xpopular.  MMK is available by anonymous ftp from ftp.spc.edu/ftp.wku.edu and 
  1850. Xby mailserver at wkuvx1.wku.edu.  Check VMS newsgroups for announcements and 
  1851. Xexact location.
  1852. X
  1853. XThe MAKE.COM command file accepts compilation options in a LOCAL_UNZIP 
  1854. Xsymbol or logical; the format is "VMSCLI,RETURN_SEVERITY" (for example).
  1855. XDESCRIP.MMS must be edited in order to use special options.
  1856. END_OF_FILE
  1857.   if test 1682 -ne `wc -c <'unzip-5.12/vms/Contents'`; then
  1858.     echo shar: \"'unzip-5.12/vms/Contents'\" unpacked with wrong size!
  1859.   fi
  1860.   # end of 'unzip-5.12/vms/Contents'
  1861. fi
  1862. if test -f 'unzip-5.12/vms/clean.com' -a "${1}" != "-c" ; then 
  1863.   echo shar: Will not clobber existing file \"'unzip-5.12/vms/clean.com'\"
  1864. else
  1865.   echo shar: Extracting \"'unzip-5.12/vms/clean.com'\" \(803 characters\)
  1866.   sed "s/^X//" >'unzip-5.12/vms/clean.com' <<'END_OF_FILE'
  1867. X$!
  1868. X$!    Clean.com --    procedure to delete files. It always returns success
  1869. X$!            status despite any error or warnings. Also it extracts
  1870. X$!            filename from MMS "module=file" format.
  1871. X$!
  1872. X$ on control_y then goto ctly
  1873. X$ if p1.eqs."" then exit 1
  1874. X$ i = -1
  1875. X$scan_list:
  1876. X$    i = i+1
  1877. X$    item = f$elem(i,",",p1)
  1878. X$    if item.eqs."" then goto scan_list
  1879. X$    if item.eqs."," then goto done        ! End of list
  1880. X$    item = f$edit(item,"trim")        ! Clean of blanks
  1881. X$    wild = f$elem(1,"=",item)
  1882. X$    show sym wild
  1883. X$    if wild.eqs."=" then wild = f$elem(0,"=",item)
  1884. X$    vers = f$parse(wild,,,"version","syntax_only")
  1885. X$    if vers.eqs.";" then wild = wild - ";" + ";*"
  1886. X$scan:
  1887. X$        f = f$search(wild)
  1888. X$        if f.eqs."" then goto scan_list
  1889. X$        on error then goto err
  1890. X$        on warning then goto warn
  1891. X$        delete/log 'f'
  1892. X$warn:
  1893. X$err:
  1894. X$        goto scan
  1895. X$done:
  1896. X$ctly:
  1897. X$    exit 1
  1898. END_OF_FILE
  1899.   if test 803 -ne `wc -c <'unzip-5.12/vms/clean.com'`; then
  1900.     echo shar: \"'unzip-5.12/vms/clean.com'\" unpacked with wrong size!
  1901.   fi
  1902.   # end of 'unzip-5.12/vms/clean.com'
  1903. fi
  1904. if test -f 'unzip-5.12/vms/make.com' -a "${1}" != "-c" ; then 
  1905.   echo shar: Will not clobber existing file \"'unzip-5.12/vms/make.com'\"
  1906. else
  1907.   echo shar: Extracting \"'unzip-5.12/vms/make.com'\" \(3756 characters\)
  1908.   sed "s/^X//" >'unzip-5.12/vms/make.com' <<'END_OF_FILE'
  1909. X$ !
  1910. X$ !    "Makefile" for VMS versions of UnZip/ZipInfo and UnZipSFX
  1911. X$ !
  1912. X$ !    To define additional options, define the global symbol
  1913. X$ !    LOCAL_UNZIP prior to executing MAKE.COM:
  1914. X$ !
  1915. X$ !        $ LOCAL_UNZIP == "VMSCLI,RETURN_SEVERITY,"
  1916. X$ !        $ @MAKE
  1917. X$ !
  1918. X$ !    The trailing "," may be omitted.  Valid VMS-specific options
  1919. X$ !    include VMSCLI, VMSWILD, RETURN_SEVERITY and RETURN_CODES; see
  1920. X$ !    the INSTALL file for other options (e.g., CHECK_EOF).
  1921. X$ !
  1922. X$ !
  1923. X$ ! Find out current disk, directory, compiler and options
  1924. X$ !
  1925. X$ my_name = f$env("procedure")
  1926. X$ here = f$parse(my_name,,,"device") + f$parse(my_name,,,"directory")
  1927. X$ if f$type(LOCAL_UNZIP).eqs.""
  1928. X$ then
  1929. X$    local_unzip = ""
  1930. X$ else    ! Trim blanks and append comma if missing
  1931. X$    local_unzip = f$edit(local_unzip, "TRIM")
  1932. X$    if f$extract(f$length(local_unzip)-1, 1, local_unzip).nes."," then -
  1933. X        local_unzip = local_unzip + ","
  1934. X$ endif
  1935. X$ axp = f$getsyi("HW_MODEL").ge.1024
  1936. X$ if axp
  1937. X$ then
  1938. X$    cc = "cc/standard=vaxc/ansi/nowarnings/include=[]"
  1939. X$    defs = "''local_unzip'MODERN"
  1940. X$    opts = ""
  1941. X$ else
  1942. X$    defs = "''local_unzip'VMS"
  1943. X$    opts = ",[.VMS]VMSSHARE.OPT/OPTIONS"
  1944. X$    if (f$search("SYS$SYSTEM:VAXC.EXE").eqs."" .and. -
  1945. X        f$trnlnm("GNU_CC").nes."") .or. (p1.eqs."GCC")
  1946. X$    then
  1947. X$        cc = "gcc"
  1948. X$        opts = "''opts',GNU_CC:[000000]GCCLIB.OLB/LIB"
  1949. X$    else
  1950. X$        cc = "cc"
  1951. X$    endif
  1952. X$ endif
  1953. X$ def = "/define=(''defs')"
  1954. X$ old_ver = f$ver(1)    ! Turn echo on to see what's happening
  1955. X$ on error then goto error
  1956. X$ on control_y then goto error
  1957. X$ !
  1958. X$ x = ""
  1959. X$ if f$search("SYS$LIBRARY:SYS$LIB_C.TLB").nes."" then -
  1960. X    x = "+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY"
  1961. X$ 'CC'/NOLIST'DEF' /OBJ=UNZIP.OBJ UNZIP.C
  1962. X$ 'CC'/NOLIST'DEF' /OBJ=CRYPT.OBJ CRYPT.C
  1963. X$ 'CC'/NOLIST'DEF' /OBJ=ENVARGS.OBJ ENVARGS.C
  1964. X$ 'CC'/NOLIST'DEF' /OBJ=EXPLODE.OBJ EXPLODE.C
  1965. X$ 'CC'/NOLIST'DEF' /OBJ=EXTRACT.OBJ EXTRACT.C
  1966. X$ 'CC'/NOLIST'DEF' /OBJ=FILE_IO.OBJ FILE_IO.C
  1967. X$ 'CC'/NOLIST'DEF' /OBJ=INFLATE.OBJ INFLATE.C
  1968. X$ 'CC'/NOLIST'DEF' /OBJ=MATCH.OBJ MATCH.C
  1969. X$ 'CC'/NOLIST'DEF' /OBJ=UNREDUCE.OBJ UNREDUCE.C
  1970. X$ 'CC'/NOLIST'DEF' /OBJ=UNSHRINK.OBJ UNSHRINK.C
  1971. X$ 'CC'/NOLIST'DEF' /OBJ=ZIPINFO.OBJ ZIPINFO.C
  1972. X$ 'CC'/INCLUDE=SYS$DISK:[]'DEF' /OBJ=[.VMS]VMS.OBJ; [.VMS]VMS.C'x'
  1973. X$ !
  1974. X$ local_unzip = f$edit(local_unzip,"UPCASE,TRIM")
  1975. X$ if f$locate("VMSCLI",local_unzip).ne.f$length(local_unzip)
  1976. X$ then
  1977. X$    'CC'/INCLUDE=SYS$DISK:[]'DEF' /OBJ=[.VMS]CMDLINE.OBJ; [.VMS]CMDLINE.C'x'
  1978. X$    'CC'/INCLUDE=SYS$DISK:[]/DEF=('DEFS',SFX) /OBJ=[.VMS]CMDLINE_.OBJ; -
  1979. X        [.VMS]CMDLINE.C'x'
  1980. X$    set command/obj=[.vms]unz_cld.obj [.vms]unz_cld.cld
  1981. X$    cliobjs = ",[.vms]cmdline.obj, [.vms]unz_cld.obj"
  1982. X$    cliobjx = ",[.vms]cmdline_.obj, [.vms]unz_cld.obj"
  1983. X$    set default [.vms]
  1984. X$     edit/tpu/nosection/nodisplay/command=cvthelp.tpu unzip_cli.help
  1985. X$    set default [-]
  1986. X$    runoff/out=unzip.hlp [.vms]unzip_cli.rnh
  1987. X$ else
  1988. X$    cliobjs = ""
  1989. X$    cliobjx = ""
  1990. X$    runoff/out=unzip.hlp [.vms]unzip_def.rnh
  1991. X$ endif
  1992. X$ !
  1993. X$ LINK /NOTRACE/EXE=UNZIP.EXE unzip.obj;, crypt.obj;, envargs.obj;, -
  1994. X    explode.obj;, extract.obj;, file_io.obj;, inflate.obj;, match.obj;, -
  1995. X    unreduce.obj;, unshrink.obj;, zipinfo.obj;, [.VMS]vms.obj; -
  1996. X    'cliobjs' 'opts', [.VMS]unzip.opt/opt
  1997. X$ !
  1998. X$ 'CC'/DEF=('DEFS',SFX)/NOLIST /OBJ=UNZIPSFX.OBJ UNZIP.C
  1999. X$ 'CC'/DEF=('DEFS',SFX)/NOLIST /OBJ=EXTRACT_.OBJ EXTRACT.C
  2000. X$ 'CC'/DEF=('DEFS',SFX)/INCLUDE=SYS$DISK:[] /OBJ=[.VMS]VMS_.OBJ; [.VMS]VMS.C'x'
  2001. X$ LINK /NOTRACE/EXE=UNZIPSFX.EXE unzipsfx.obj;, crypt.obj;, extract_.obj;, -
  2002. X    file_io.obj;, inflate.obj;, match.obj;, [.VMS]vms_.obj; -
  2003. X    'cliobjx' 'opts', [.VMS]unzipsfx.opt/opt
  2004. X$ !
  2005. X$ ! Next line:  put similar lines (full pathname for unzip.exe) in
  2006. X$ ! login.com.  Remember to include the leading "$" before disk name.
  2007. X$ !
  2008. X$! unzip == "$''here'unzip.exe"        ! set up symbol to use unzip
  2009. X$! zipinfo == "$''here'unzip.exe ""-Z"""    ! set up symbol to use zipinfo
  2010. X$ !
  2011. X$error:
  2012. X$ tmp = f$ver(old_ver)
  2013. X$ exit
  2014. END_OF_FILE
  2015.   if test 3756 -ne `wc -c <'unzip-5.12/vms/make.com'`; then
  2016.     echo shar: \"'unzip-5.12/vms/make.com'\" unpacked with wrong size!
  2017.   fi
  2018.   # end of 'unzip-5.12/vms/make.com'
  2019. fi
  2020. if test -f 'unzip-5.12/vms/unz_cld.cld' -a "${1}" != "-c" ; then 
  2021.   echo shar: Will not clobber existing file \"'unzip-5.12/vms/unz_cld.cld'\"
  2022. else
  2023.   echo shar: Extracting \"'unzip-5.12/vms/unz_cld.cld'\" \(1711 characters\)
  2024.   sed "s/^X//" >'unzip-5.12/vms/unz_cld.cld' <<'END_OF_FILE'
  2025. X    Module        VMS_UNZIP_CLD
  2026. X    Ident        "01-000"
  2027. X
  2028. XDefine    Verb        UNZIP
  2029. X    Parameter    P1, Label=ZIPFILE, Prompt="Zip file"
  2030. X    Parameter    P2, Label=INFILE, VALUE(LIST), Prompt="Files to UnZip"
  2031. X    Qualifier    TEXT, Negatable
  2032. X    Qualifier    AUTOTEXT, Negatable
  2033. X    Qualifier    SCREEN, Negatable
  2034. X    Qualifier    DIRECTORY, VALUE(REQUIRED,TYPE=$FILE), Nonnegatable
  2035. X    Qualifier    FRESHEN, Negatable
  2036. X    Qualifier    JUNK, Negatable
  2037. X    Qualifier    LIST, Nonnegatable
  2038. X    Qualifier    BRIEF, Nonnegatable, Default
  2039. X    Qualifier    FULL, Nonnegatable
  2040. X    Qualifier    OVERWRITE, Negatable
  2041. X    Qualifier    QUIET, Nonnegatable
  2042. X    Qualifier    SUPER_QUIET, Nonnegatable
  2043. X    Qualifier    TEST, Negatable
  2044. X    Qualifier    TYPE, Nonnegatable
  2045. X    Qualifier    PIPE, Nonnegatable
  2046. X    Qualifier    UPPERCASE, Negatable
  2047. X    Qualifier    UPDATE, Negatable
  2048. X    Qualifier    VERSION, Negatable
  2049. X    Qualifier    VERBOSE, Nonnegatable
  2050. X    Qualifier    RESTORE, Negatable
  2051. X    Qualifier    COMMENT, Negatable
  2052. X    Qualifier    EXCLUDE, VALUE(LIST), Nonnegatable
  2053. X    Qualifier    CASE_INSENSITIVE, Negatable
  2054. X    Qualifier    LOWERCASE, Negatable
  2055. X    Qualifier    YYZ, NonNegatable, Default
  2056. X    Qualifier    ZIPINFO, Syntax=INFORMATION, NonNegatable
  2057. X    DisAllow    BRIEF and FULL
  2058. X    DisAllow    DIRECTORY and SCREEN
  2059. X
  2060. XDefine    Type        COMMENTS_KEYWORDS
  2061. X    Keyword        ZIP_FILE, DEFAULT
  2062. X    Keyword        FILES
  2063. X
  2064. XDefine Syntax INFORMATION
  2065. X    Parameter    P1, Label=ZIPFILE, Prompt="Zip file"
  2066. X    Parameter    P2, Label=INFILE, VALUE(LIST), Prompt="Files to display"
  2067. X    Qualifier    ZIPINFO, NonNegatable, Default
  2068. X    Qualifier    SHORT, Nonnegatable
  2069. X    Qualifier    MEDIUM, Nonnegatable
  2070. X    Qualifier    LONG, Nonnegatable
  2071. X    Qualifier    VERBOSE, Nonnegatable
  2072. X    Qualifier    HEADER, Nonnegatable
  2073. X    Qualifier    COMMENT, Nonnegatable
  2074. X    Qualifier    TOTALS, Nonnegatable
  2075. X    Qualifier    TIMES, Nonnegatable
  2076. X    Qualifier    EXCLUDE, VALUE(LIST), Nonnegatable
  2077. X    Qualifier    ONE_LINE, Nonnegatable
  2078. END_OF_FILE
  2079.   if test 1711 -ne `wc -c <'unzip-5.12/vms/unz_cld.cld'`; then
  2080.     echo shar: \"'unzip-5.12/vms/unz_cld.cld'\" unpacked with wrong size!
  2081.   fi
  2082.   # end of 'unzip-5.12/vms/unz_cld.cld'
  2083. fi
  2084. if test -f 'unzip-5.12/zip.h' -a "${1}" != "-c" ; then 
  2085.   echo shar: Will not clobber existing file \"'unzip-5.12/zip.h'\"
  2086. else
  2087.   echo shar: Extracting \"'unzip-5.12/zip.h'\" \(442 characters\)
  2088.   sed "s/^X//" >'unzip-5.12/zip.h' <<'END_OF_FILE'
  2089. X/* This is a dummy zip.h to allow crypt.c from Zip to compile for UnZip */
  2090. X
  2091. X#ifndef __zip_h   /* don't include more than once */
  2092. X#define __zip_h
  2093. X
  2094. X#include "unzip.h"
  2095. X
  2096. X#define decrypt_member decrypt  /* for compatibility with zcrypt20 */
  2097. X#define local static
  2098. X#define CRC32(c, b)    (crc_32_tab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
  2099. X
  2100. X#ifdef FUNZIP
  2101. X   extern ulg near crc_32_tab[];
  2102. X#else
  2103. X   extern ulg *crc_32_tab;
  2104. X#endif
  2105. X
  2106. X#endif /* !__zip_h */
  2107. END_OF_FILE
  2108.   if test 442 -ne `wc -c <'unzip-5.12/zip.h'`; then
  2109.     echo shar: \"'unzip-5.12/zip.h'\" unpacked with wrong size!
  2110.   fi
  2111.   # end of 'unzip-5.12/zip.h'
  2112. fi
  2113. echo shar: End of archive 19 \(of 20\).
  2114. cp /dev/null ark19isdone
  2115. MISSING=""
  2116. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  2117.     if test ! -f ark${I}isdone ; then
  2118.     MISSING="${MISSING} ${I}"
  2119.     fi
  2120. done
  2121. if test "${MISSING}" = "" ; then
  2122.     echo You have unpacked all 20 archives.
  2123.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2124. else
  2125.     echo You still must unpack the following archives:
  2126.     echo "        " ${MISSING}
  2127. fi
  2128. exit 0
  2129. exit 0 # Just in case...
  2130.