home *** CD-ROM | disk | FTP | other *** search
- From: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
- Newsgroups: comp.sources.misc
- Subject: v44i084: unzip - Info-ZIP portable UnZip, version 5.12, Part19/20
- Date: 18 Sep 1994 23:17:07 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <35j3c3$qs6@sparky.sterling.com>
- X-Md4-Signature: 95464830f482147162e66d3e0da511d2
-
- Submitted-by: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
- Posting-number: Volume 44, Issue 84
- Archive-name: unzip/part19
- Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, COHERENT, AMIGA?, ATARI TOS, SGI, DEC, Cray, Convex, Amdahl, Sun
- Supersedes: unzip50: Volume 31, Issue 104-117
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: unzip-5.12/Contents unzip-5.12/ToDo
- # unzip-5.12/amiga/Contents unzip-5.12/amiga/amiga.h
- # unzip-5.12/amiga/crc_68.a unzip-5.12/amiga/z-stat.h
- # unzip-5.12/crypt.h unzip-5.12/funzip.doc
- # unzip-5.12/human68k/Contents unzip-5.12/human68k/Makefile.gcc
- # unzip-5.12/inflate.h unzip-5.12/mac/Contents
- # unzip-5.12/mac/macdir.h unzip-5.12/mac/macstat.h
- # unzip-5.12/msdos/Borland.fix unzip-5.12/msdos/Contents
- # unzip-5.12/msdos/makefile.bc unzip-5.12/msdos/makefile.msc
- # unzip-5.12/msdos/makefile.tc unzip-5.12/nt/Makefile
- # unzip-5.12/os2/Contents unzip-5.12/os2/zipgrep.cmd
- # unzip-5.12/unix/Contents unzip-5.12/vms/Contents
- # unzip-5.12/vms/clean.com unzip-5.12/vms/make.com
- # unzip-5.12/vms/unz_cld.cld unzip-5.12/zip.h
- # Wrapped by kent@sparky on Sat Sep 17 23:33:50 1994
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 19 (of 20)."'
- if test -f 'unzip-5.12/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/Contents'\" \(2790 characters\)
- sed "s/^X//" >'unzip-5.12/Contents' <<'END_OF_FILE'
- XContents of the UnZip 5.11 archive (the OS-specific subdirectories at the
- Xend contain their own Contents listings):
- X
- X Contents this file
- X README what UnZip is; general information
- X INSTALL how to compile and install UnZip and related utilities
- X Where where Zip/UnZip and encryption/decryption support can be found
- X History.511 new features and fixes in this release
- X ZipPorts Info-ZIP rules and guidelines on contributions to the cause
- X ToDo rough priority list of new features to be added in next release
- X BUGS known bugs, problems, and (possible) other features to be added
- X unzip.doc UnZip manual page, human-readable format
- X unzipsfx.doc UnZipSFX manual page, human-readable format
- X zipinfo.doc ZipInfo manual page, human-readable format
- X funzip.doc fUnZip manual page, human-readable format
- X CONTRIBS list of contributors to UnZip
- X COPYING copyrights and distribution policy
- X file_id.diz BBS-oriented file describing this archive
- X crypt.c dummy decryption routines (required*)
- X crypt.h dummy decryption header file (required*)
- X envargs.c code to read options from UNZIP environment var. (required)
- X explode.c code for exploding (required)
- X extract.c high-level extraction and decryption code (required)
- X file_io.c file manipulation and password code (required)
- X funzip.c filter unzip: extracts from stdin to stdout (pipes)
- X inflate.c code for inflating (required*)
- X inflate.h header file for inflating (required*)
- X match.c pattern-matching code for filename wildcards (required)
- X tables.h static lookup tables used in file_io.c and funzip.c (required*)
- X unreduce.c code for unreducing (required)
- X unshrink.c code for unshrinking (required)
- X unzip.c main UnZip driver code (required)
- X unzip.h main UnZip header file (required*)
- X version.h header with UnZip/UnZipSFX and ZipInfo version info (required)
- X zip.h dummy header for use with crypt.c (required*)
- X zipinfo.c UnZip listing routines, mainly for ZipInfo mode (required)
- X amiga/ support files for compiling under AmigaDOS
- X atari/ support files for compiling under Atari TOS
- X human68k/ support files for compiling under X68000/Human68K
- X mac/ support files for compiling under Macintosh OS
- X msdos/ support files for compiling under MS-DOS
- X nt/ support files for compiling under Windows NT
- X os2/ support files for compiling under OS/2
- X tops20/ support files for compiling under TOPS-20
- X unix/ support files for compiling under Unix
- X vms/ support files for compiling under VMS
- X
- XFiles marked "required*" are also needed to compile fUnZip. The normal
- Xunzip makefile targets now make both unzipsfx and funzip, except in a few
- Xcases; zipinfo is now incorporated into unzip (and invoked with unzip's
- X-Z option or by linking/renaming the executable to "zipinfo[.exe]" or
- X"ii[.exe]").
- END_OF_FILE
- if test 2790 -ne `wc -c <'unzip-5.12/Contents'`; then
- echo shar: \"'unzip-5.12/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/Contents'
- fi
- if test -f 'unzip-5.12/ToDo' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/ToDo'\"
- else
- echo shar: Extracting \"'unzip-5.12/ToDo'\" \(2854 characters\)
- sed "s/^X//" >'unzip-5.12/ToDo' <<'END_OF_FILE'
- X================================
- XFor UnZip 5.1/5.2/6.0/who knows:
- X================================
- X
- XThe Big Plan [original 26 Jan 93]:
- X
- X o extract-to-dir capability
- X
- X DONE.
- X
- X o add wildcard zipfiles
- X
- X DONE.
- X
- X o incorporate zipinfo
- X
- X DONE.
- X
- X o clean up unzip.h
- X
- X DONE.
- X
- X o rewrite to use fwrite/no outbuf
- X
- X DONE.
- X
- X o replace EOL conversion code and make text/binary conversion automatic
- X
- X DONE.
- X
- X o add self-extracting unzip: deflated/stored only, suppress "extra bytes"
- X message, use argv[0] with path search, remove do_wild, etc.
- X
- X DONE.
- X
- X o move all strings to far memory under small-memory OS's, copying
- X back to local memory (slide[] buffer?) only when ready to print
- X
- X DONE, except for possible use of slide[]; os2.c; crypt.c;
- X inflate.c (incomplete trees messages); other decompression
- X routines?; etc.
- X
- X o add -C option for case-insensitivity of filename matching
- X
- X DONE.
- X
- Xfor 5.2:
- X o enable CHECK_EOF and RETURN_SEVERITY by default
- X
- X immediately! (start testing...)
- X
- X o incorporate Scott Maxwell OS/2 DLL mods
- X
- X next
- X
- X o add Unix extra field (GMT modification and status-change times)
- X
- X next
- X
- X o rename all nt/NT stuff to win32/WIN32 (works with Chicago, too...)
- X
- X soon
- X
- X o rewrite to use fread/fseek/no ReadByte/etc. [eventually: test
- X write(bytes) vs. fwrite(words), especially on Crays/Alphas]
- X
- X soon; ReadByte gone already.
- X
- X o incorporate new backfill version of inflate()
- X
- X next after fread/fseek/ReadByte
- X
- X o add multi-part zipfile handling
- X
- X next after that
- X
- X o check NEXTBYTE for EOF in crypt.c, funzip.c and explode.c, too
- X
- X soon
- X
- X o use (simple!) configure script in combination with Unix Makefile
- X
- X someday
- X
- X o add option to force completely non-interactive operation (no queries
- X for overwrite/rename, password, etc.); also allow some sort of non-
- X interactive password provision? (file? command-line? env. variable?)
- X
- X someday?
- X
- X o add ONLY_ZIPINFO compilation for 16-bit compiles
- X
- X later, possibly never
- X
- X o add testing of extra fields (if have CRC)
- X
- X later
- X
- X o change all output so goes through configurable routines (msg(),
- X warn(), err()) for simpler GUI interfacing
- X
- X later
- X
- X o rewrite to allow use as a filter
- X
- X way, way later...
- X
- X o add option to search zipfile contents for a string and print the
- X results? ("zipgrep" option--e.g., unzip -g or unzip -S) (easy for
- X fixed strings, hard for wildcards/true regex's)
- X
- X way, way later, if at all...
- X
- X o add -y "display symlinks" option to zipinfo? various sorting options?
- X (-St date/time, -Sn name)?
- X
- X who knows
- X
- X o add "in-depth" option to zipinfo? (check local headers against
- X central, etc.)--make it a better debugging tool (or just create
- X zipfix)
- X
- X who knows
- X
- X o ports underway: Acorn/RISCos, AOS/VS, ...
- X
- X
- X- allow multiple dir creation with -d option? (Bob Maynard)
- X
- END_OF_FILE
- if test 2854 -ne `wc -c <'unzip-5.12/ToDo'`; then
- echo shar: \"'unzip-5.12/ToDo'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/ToDo'
- fi
- if test -f 'unzip-5.12/amiga/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/Contents'\" \(2025 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/Contents' <<'END_OF_FILE'
- XContents of the "amiga" sub-archive for UnZip 5.11 and later:
- X
- X Contents this file
- X amiga.c Amiga-specific file I/O routines
- X amiga.h Amiga-specific header file
- X filedate.c SetFileDate() clone for OS 1.3, based on Paul Wells' utime()
- X
- X SMakeFile SAS/C makefile for UnZip and fUnZip
- X
- X makefile.azt Aztec C makefile for UnZip and fUnZip
- X stat.c stat() emulation for Aztec
- X z-stat.h "real" stat.h header file for Aztec
- X flate.a assembler version of inflate_codes() (define ASM_INFLATECODES)
- X crc_68.a assembler version of crc_32_tab loop (define ASM_CRC, REGARGS)
- X
- XNotes:
- X
- X Both the routines, flate.a and crc_68.a, require arg passing via registers.
- X
- X To include flate.a, unzip must be built using 16-bit integers.
- X (currently not possible with SAS/C)
- X
- X The DICE makefile has been removed since no one is supporting that
- X compiler anymore.
- X
- X It was discovered on release of UnZip 5.1 that the latest SAS compiler
- X revision (6.50 or 6.51) changed the timezone handling. The result is
- X that UnZip can extract files with the wrong times, usually off by an
- X offset of a few hours which is a function of the how the TZ environment
- X variable is set. Now the TZ variable needs to be set according to the
- X timezone you are in, because the tzname() function operates correctly
- X now (it didn't used to). If you do not set TZ to your current timezone,
- X files will be restored with times corrsponding to CST6, which is US/Central
- X time, the SAS/C default. On the Amiga, the TZ variable cannot utilize
- X the daylight savings time extentions, so don't use them. For example,
- X specify "EST5" instead of "EST5EDT". The latter form will confuse the
- X SAS/C libraries. To set the TZ environment variable, place the following
- X line in your startup sequence:
- X
- X setenv TZ XXXN
- X
- X where XXX is the 3-character timezone notation
- X N is the offset from Greenwich mean time
- X
- X example:
- X
- X setenv TZ PST8 ; for California time
- END_OF_FILE
- if test 2025 -ne `wc -c <'unzip-5.12/amiga/Contents'`; then
- echo shar: \"'unzip-5.12/amiga/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/amiga/Contents'
- fi
- if test -f 'unzip-5.12/amiga/amiga.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/amiga.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/amiga.h'\" \(1126 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/amiga.h' <<'END_OF_FILE'
- X/* amiga.h
- X *
- X * Globular definitions that affect all of AmigaDom.
- X *
- X * Originally included in unzip.h, extracted for simplicity and eeze of
- X * maintenance by John Bush.
- X *
- X * THIS FILE IS #INCLUDE'd by unzip.h
- X *
- X */
- X
- X#include <time.h>
- X
- X
- X#ifdef AZTEC_C /* Manx Aztec C, 5.0 or newer only */
- X# include <clib/dos_protos.h>
- X# include <pragmas/dos_lib.h>
- X# define MODERN
- X# define O_BINARY 0
- X# include "amiga/z-stat.h"
- X# define dirent direct
- X# ifdef ASM_CRC
- X# pragma regcall(CalcCRC(a0,d0,a1,d1))
- X# endif
- X#endif /* AZTEC_C */
- X
- X
- X#if defined(LATTICE) || defined(__SASC) || defined(__SASC_60)
- X# include <sys/types.h>
- X# include <sys/stat.h>
- X# include <sys/dir.h>
- X# include <dos.h>
- X# include <proto/dos.h> /* needed? */
- X# if ( (!defined(O_BINARY)) && defined(O_RAW))
- X# define O_BINARY O_RAW
- X# endif
- X# ifdef ASM_CRC
- X /* PUT SOMETHING HERE TO PASS ARGS IN REGISTERS TO CalcCRC() */
- X# endif
- X#endif /* LATTICE */
- X
- X/* Funkshine Prough Toe Taipes */
- X
- Xint cmptime (struct tm *, struct tm *);
- Xtime_t invlocal (struct tm *);
- XLONG FileDate (char *, time_t[]);
- X
- X#define dup /* needed? */
- END_OF_FILE
- if test 1126 -ne `wc -c <'unzip-5.12/amiga/amiga.h'`; then
- echo shar: \"'unzip-5.12/amiga/amiga.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/amiga/amiga.h'
- fi
- if test -f 'unzip-5.12/amiga/crc_68.a' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/crc_68.a'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/crc_68.a'\" \(1758 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/crc_68.a' <<'END_OF_FILE'
- X; Not copyrighted by Paul Kienitz, 18 Jun 94.
- X;
- X; Return an updated 32 bit CRC value, given the old value and a block of data.
- X; This substitutes for the following lines at the top of flush() in file_io.c
- X; in UnZip, or a similar loop in updcrc() in util.c in Zip:
- X;
- X; register ulg crcval = crc32val;
- X; register ulg n = size;
- X; register uch *p=rawbuf;
- X; while (n--)
- X; crcval = crc_32_tab[((uch)crcval ^ (*p++)) & 0xff] ^ (crcval >> 8);
- X; crc32val = crcval;
- X;
- X; Those lines are replace with this call:
- X;
- X; crc32val = CalcCRC(crc_32_tab, crc32val, rawbuf, size);
- X;
- X; We have here the CalcCRC() code for Amiga. Define REGARGS if you can cause
- X; your compiler to put the four args in the registers A0, D0, A1, D1. I'm not
- X; sure, but I think you should define ATSIGN when using the SAS/C assembler.
- X; I wrote this because I found that, at least with the Aztec compiler, this loop
- X; was occupying about a quarter of the CPU time with UnZip -t commands.
- X
- X xdef _CalcCRC
- X
- Xtemp equr d2
- X
- Xcrc_table equr a0 array of unsigned long
- Xcrcval equr d0 unsigned long initial value
- Xrawbuf equr a1 array of unsigned char
- Xrawbufsize equr d1 unsigned long (count of bytes in rawbuf)
- X
- X
- X IFD REGARGS
- X IFD ATSIGN
- X xdef @CalcCRC
- X@CalcCRC:
- X ELSE
- X_CalcCRC: ; args already in registers as named above
- X ENDC
- X ELSE ; !REGARGS
- X_CalcCRC:
- X move.l 4(sp),crc_table
- X move.l 8(sp),crcval
- X move.l 12(sp),rawbuf
- X move.l 16(sp),rawbufsize
- X ENDC
- X
- X move.l temp,-(sp)
- Xloop:
- X subq.l #1,rawbufsize
- X blt.s done ; we treat it as signed
- X moveq #0,temp
- X move.b (rawbuf)+,temp
- X eor.b crcval,temp
- X lsl.w #2,temp
- X move.l 0(crc_table,temp.w),temp
- X lsr.l #8,crcval
- X eor.l temp,crcval
- X bra.s loop
- Xdone:
- X;;; move.l crcval,d0 ; crcval already is d0
- X move.l (sp)+,temp
- X rts
- END_OF_FILE
- if test 1758 -ne `wc -c <'unzip-5.12/amiga/crc_68.a'`; then
- echo shar: \"'unzip-5.12/amiga/crc_68.a'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/amiga/crc_68.a'
- fi
- if test -f 'unzip-5.12/amiga/z-stat.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/z-stat.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/z-stat.h'\" \(2562 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/z-stat.h' <<'END_OF_FILE'
- X#ifndef __Z_STAT_H
- X#define __Z_STAT_H
- X#define __STAT_H
- X
- X/* Since older versions of the Lattice C compiler for Amiga, and all current */
- X/* versions of the Manx Aztec C compiler for Amiga, either provide no stat() */
- X/* function or provide one inadequate for unzip (Aztec's has no st_mode */
- X/* field), we provide our own stat() function in stat.c by Paul Wells, and */
- X/* this fake stat.h file by Paul Kienitz. Paul Wells originally used the */
- X/* Lattice stat.h but that does not work for Aztec and is not distributable */
- X/* with this package, so I made a separate one. This has to be pulled into */
- X/* unzip.h when compiling an Amiga version, as "amiga/z-stat.h". */
- X
- X/* We also provide here a "struct direct" for use with opendir() & readdir() */
- X/* functions included in amiga/stat.c. If you use amiga/stat.c, this must */
- X/* be included wherever you use either readdir() or stat(). */
- X
- X/* This include file should ONLY be loaded if AZTEC_C is defined, and
- X * you are using the substitute version of stat() from amiga/stat.c.
- X * Bit definitions are based on those in headers for SAS/C v6.0
- X */
- X
- X#include <time.h>
- X
- Xstruct stat {
- X unsigned short st_mode;
- X time_t st_ctime, st_atime, st_mtime;
- X long st_size;
- X long st_ino;
- X long st_blocks;
- X short st_attr, st_dev, st_nlink, st_uid, st_gid, st_rdev;
- X};
- X
- X#define S_IFDIR (1<<11)
- X#define S_IFREG (1<<10)
- X
- X#if 0
- X /* these values here are totally random: */
- X# define S_IFLNK (1<<14)
- X# define S_IFSOCK (1<<13)
- X# define S_IFCHR (1<<8)
- X# define S_IFIFO (1<<7)
- X# define S_IFMT (S_IFDIR|S_IFREG|S_IFCHR|S_IFLNK)
- X#else
- X# define S_IFMT (S_IFDIR|S_IFREG)
- X#endif
- X
- X#define S_IHIDDEN (1<<7)
- X#define S_ISCRIPT (1<<6)
- X#define S_IPURE (1<<5)
- X#define S_IARCHIVE (1<<4)
- X#define S_IREAD (1<<3)
- X#define S_IWRITE (1<<2)
- X#define S_IEXECUTE (1<<1)
- X#define S_IDELETE (1<<0)
- X
- Xint stat(char *name, struct stat *buf);
- X
- X
- X#include <libraries/dos.h>
- X
- Xtypedef struct direct {
- X struct direct *d_cleanuplink,
- X **d_cleanupparent;
- X BPTR d_parentlock;
- X struct FileInfoBlock d_fib;
- X} DIR;
- X#define d_name d_fib.fib_FileName
- X
- Xextern unsigned short disk_not_mounted; /* flag set by opendir() */
- X
- XDIR *opendir(char *);
- Xvoid closedir(DIR *);
- Xvoid close_leftover_open_dirs(void); /* call this if aborted in mid-run */
- XDIR *readdir(DIR *);
- X
- Xint rmdir(char *);
- X
- X# ifdef AZTEC_C
- Xvoid tzset(void);
- Xint chmod(char *filename, int bits);
- X# endif
- X
- X#endif /* __Z_STAT_H */
- END_OF_FILE
- if test 2562 -ne `wc -c <'unzip-5.12/amiga/z-stat.h'`; then
- echo shar: \"'unzip-5.12/amiga/z-stat.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/amiga/z-stat.h'
- fi
- if test -f 'unzip-5.12/crypt.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/crypt.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/crypt.h'\" \(708 characters\)
- sed "s/^X//" >'unzip-5.12/crypt.h' <<'END_OF_FILE'
- X/*
- X crypt.h (dummy version) by Info-ZIP. Last revised: 18 Apr 94
- X
- X This is a non-functional version of Info-ZIP's crypt.h encryption/
- X decryption header file for Zip, ZipCloak, UnZip and fUnZip. This
- X file is not copyrighted and may be distributed without restriction.
- X See the "Where" file for sites from which to obtain the full crypt
- X sources (zcrypt21.zip or later).
- X */
- X
- X#ifndef __crypt_h /* don't include more than once */
- X#define __crypt_h
- X
- X#ifdef CRYPT
- X# undef CRYPT /* dummy version */
- X#endif
- X
- X#define RAND_HEAD_LEN 12 /* needed to compile funzip */
- X
- X#define zencode
- X#define zdecode
- X
- X#define zfwrite fwrite
- X
- X#define echoff(f)
- X#define echon()
- X
- X#endif /* !__crypt_h */
- END_OF_FILE
- if test 708 -ne `wc -c <'unzip-5.12/crypt.h'`; then
- echo shar: \"'unzip-5.12/crypt.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/crypt.h'
- fi
- if test -f 'unzip-5.12/funzip.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/funzip.doc'\"
- else
- echo shar: Extracting \"'unzip-5.12/funzip.doc'\" \(3592 characters\)
- sed "s/^X//" >'unzip-5.12/funzip.doc' <<'END_OF_FILE'
- X
- XFUNZIP(1) USER COMMANDS FUNZIP(1)
- X
- XNAME
- X funzip - filter for extracting from a ZIP archive in a pipe
- X
- XSYNOPSIS
- X [...] | funzip [-password] | [...]
- X
- X funzip [-password] input.zip | [...]
- X
- XARGUMENTS
- X [-password]
- X Optional password to be used if ZIP archive is
- X encrypted. Decryption may not be supported at some
- X sites. See DESCRIPTION for more details.
- X
- XDESCRIPTION
- X funzip acts as a filter; that is, it assumes that a ZIP
- X archive is being piped into standard input, and it extracts
- X the first member from the archive to stdout. If there is an
- X argument, then the input comes from the specified file
- X instead of from stdin. A password for encrypted zip files
- X can be specified on the command line (preceding the file
- X name, if any) by prefixing the password with a dash. Note
- X that this constitutes a security risk on many systems;
- X currently running processes are often visible via simple
- X commands (e.g., ps(1) under Unix), and command-line his-
- X tories can be read. If the first entry of the zip file is
- X encrypted and no password is specified on the command line,
- X then the user is prompted for a password and the password is
- X not echoed on the console.
- X
- X Given the limitation on single-member extraction, funzip is
- X most useful in conjunction with a secondary archiver program
- X such as tar(1). The following section includes an example
- X illustrating this usage in the case of disk backups to tape.
- X
- XEXAMPLES
- X To use funzip to extract the first member file of the
- X archive test.zip and to pipe it into more(1):
- X
- X funzip test.zip | more
- X
- X To use funzip to test the first member file of test.zip (any
- X errors will be reported on standard error):
- X
- X funzip test.zip > /dev/null
- X
- X To use zip and funzip in place of compress(1) and zcat(1)
- X (or gzip(1L) and gzcat(1L)) for tape backups:
- X
- X tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
- X dd if=/dev/nrst0 ibs=8k | funzip | tar xf -
- X
- XInfo-ZIP Last change: 28 Aug 94 (v3.83) 1
- X
- XFUNZIP(1) USER COMMANDS FUNZIP(1)
- X
- X (where, for example, nrst0 is a SCSI tape drive).
- X
- XBUGS
- X When piping an encrypted file into more and allowing funzip
- X to prompt for password, the terminal may sometimes be reset
- X to a non-echo mode. This is apparently due to a race condi-
- X tion between the two programs; funzip changes the terminal
- X mode to non-echo before more reads its state, and more then
- X ``restores'' the terminal to this mode before exiting. To
- X recover, run funzip on the same file but redirect to
- X /dev/null rather than piping into more; after prompting
- X again for the password, funzip will reset the terminal prop-
- X erly.
- X
- X There is presently no way to extract any member but the
- X first from a ZIP archive. This would be useful in the case
- X where a ZIP archive is included within another archive. In
- X the case where the first member is a directory, funzip sim-
- X ply creates the directory and exits.
- X
- X The functionality of funzip should be incorporated into
- X unzip itself (future release).
- X
- XSEE ALSO
- X gzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L),
- X zipinfo(1L), zipnote(1L), zipsplit(1L)
- X
- XAUTHOR
- X Mark Adler (Info-ZIP)
- X
- XInfo-ZIP Last change: 28 Aug 94 (v3.83) 2
- X
- END_OF_FILE
- if test 3592 -ne `wc -c <'unzip-5.12/funzip.doc'`; then
- echo shar: \"'unzip-5.12/funzip.doc'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/funzip.doc'
- fi
- if test -f 'unzip-5.12/human68k/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/human68k/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/human68k/Contents'\" \(411 characters\)
- sed "s/^X//" >'unzip-5.12/human68k/Contents' <<'END_OF_FILE'
- XContents of the "human68k" sub-archive for UnZip 5.1 and later:
- X
- X Contents this file
- X Makefile.gcc (shorter) makefile for GNU C on X68000
- X human68k.c Human68K-specific routines for UnZip
- X options.s TwentyOne option checker (assembler routines) for Human68K
- X
- XNote that options.s contains high-order ASCII characters; it must be
- Xtreated as a binary file when e-mailing or posting via Usenet.
- END_OF_FILE
- if test 411 -ne `wc -c <'unzip-5.12/human68k/Contents'`; then
- echo shar: \"'unzip-5.12/human68k/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/human68k/Contents'
- fi
- if test -f 'unzip-5.12/human68k/Makefile.gcc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/human68k/Makefile.gcc'\"
- else
- echo shar: Extracting \"'unzip-5.12/human68k/Makefile.gcc'\" \(2235 characters\)
- sed "s/^X//" >'unzip-5.12/human68k/Makefile.gcc' <<'END_OF_FILE'
- X# Makefile for UnZip 5.11 and later: Human68K with gcc NIIMI Satoshi
- X#
- X# The original Makefile maybe works fine, but X68000 is too slow
- X# to process it. So I split out needed part.
- X#
- X# Last revised: 10 Jul 94
- X
- XVPATH = HUMAN68K
- X
- XCC = gcc
- XCFLAGS = -Wall -O -I. -fomit-frame-pointer -fstrength-reduce
- XLDFLAGS = -s
- X
- XLIBS = -lsignal -ldos -lmb
- X
- X# UnZipSFX flags
- XXC = -DSFX
- X
- X# fUnZip flags
- XFC = -DFUNZIP
- X
- X# object files
- XOBJS = unzip.o crypt.o envargs.o explode.o extract.o file_io.o inflate.o \
- X match.o unreduce.o unshrink.o zipinfo.o human68k.o options.o
- XOBJX = unzipsfx.o crypt.o extract_.o file_io.o inflate.o match.o human68_.o
- XOBJF = funzip.o crypt_.o inflate_.o
- X
- XUNZIPS = unzip.x unzipsfx.x funzip.x
- X
- X.c.o:
- X $(CC) $(CFLAGS) -I. -c $< -o $@
- X
- X# for debugging
- X.c.s:
- X $(CC) $(CFLAGS) -c $< -o $@
- X
- Xall: unzips
- Xunzips: $(UNZIPS)
- Xdocs: $(DOCS)
- Xunzipsman: unzips docs
- Xunzipsdocs: unzips docs
- X
- Xclean:
- X rm -f $(OBJS) $(OBJF) $(OBJX) $(UNZIPS)
- X
- Xunzip.x: $(OBJS)
- X $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
- X
- Xunzipsfx.x: $(OBJX)
- X $(CC) $(LDFLAGS) -o $@ $(OBJX) $(LIBS)
- X
- Xfunzip.x: $(OBJF)
- X $(CC) $(LDFLAGS) -o $@ $(OBJF) $(LIBS)
- X
- Xcrypt.o: crypt.c unzip.h zip.h crypt.h
- Xenvargs.o: envargs.c unzip.h
- Xexplode.o: explode.c unzip.h
- Xextract.o: extract.c unzip.h crypt.h
- Xfile_io.o: file_io.c unzip.h crypt.h tables.h
- Xfunzip.o: funzip.c unzip.h crypt.h tables.h
- Xinflate.o: inflate.c inflate.h unzip.h
- Xmatch.o: match.c unzip.h
- Xunreduce.o: unreduce.c unzip.h
- Xunshrink.o: unshrink.c unzip.h
- Xunzip.o: unzip.c unzip.h crypt.h version.h
- Xzipinfo.o: zipinfo.c unzip.h
- X
- Xcrypt_.o: crypt.c unzip.h zip.h crypt.h # used by funzip
- X $(CC) $(CFLAGS) $(FC) -c $< -o $@
- X
- Xextract_.o: extract.c unzip.h crypt.h # used by unzipsfx
- X $(CC) $(CFLAGS) $(XC) -c $< -o $@
- X
- Xhuman68k.o: human68k/human68k.c unzip.h
- X $(CC) $(CFLAGS) -I. -c human68k/human68k.c -o $@
- X
- Xhuman68_.o: human68k/human68k.c unzip.h # used by unzipsfx
- X $(CC) $(CFLAGS) $(XC) -I. -c human68k/human68k.c -o $@
- X
- Xinflate_.o: inflate.c inflate.h unzip.h crypt.h # used by funzip
- X $(CC) $(CFLAGS) $(FC) -c $< -o $@
- X
- Xunzipsfx.o: unzip.c unzip.h crypt.h version.h # used by unzipsfx
- X $(CC) $(CFLAGS) $(XC) -c $< -o $@
- X
- Xdiff:
- X -(cd ..; diff -cNr unz51f unz51f-x68k -x GNUmakefile -x "*.[ox]" > unzip68k.dif)
- END_OF_FILE
- if test 2235 -ne `wc -c <'unzip-5.12/human68k/Makefile.gcc'`; then
- echo shar: \"'unzip-5.12/human68k/Makefile.gcc'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/human68k/Makefile.gcc'
- fi
- if test -f 'unzip-5.12/inflate.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/inflate.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/inflate.h'\" \(887 characters\)
- sed "s/^X//" >'unzip-5.12/inflate.h' <<'END_OF_FILE'
- X/* inflate.h for UnZip -- put in the public domain by Mark Adler
- X version c14e, 29 September 1993 */
- X
- X
- X/* You can do whatever you like with this source file, though I would
- X prefer that if you modify it and redistribute it that you include
- X comments to that effect with your name and the date. Thank you.
- X
- X History:
- X vers date who what
- X ---- --------- -------------- ------------------------------------
- X c14 12 Mar 93 M. Adler made inflate.c standalone with the
- X introduction of inflate.h.
- X c14d 28 Aug 93 G. Roelofs replaced flush/FlushOutput with new version
- X c14e 29 Sep 93 G. Roelofs moved everything into unzip.h; added crypt.h
- X */
- X
- X#include "unzip.h" /* provides slide[], typedefs and macros */
- X#ifdef FUNZIP
- X# include "crypt.h" /* provides NEXTBYTE macro for crypt version of funzip */
- X#endif
- END_OF_FILE
- if test 887 -ne `wc -c <'unzip-5.12/inflate.h'`; then
- echo shar: \"'unzip-5.12/inflate.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/inflate.h'
- fi
- if test -f 'unzip-5.12/mac/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/mac/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/mac/Contents'\" \(1060 characters\)
- sed "s/^X//" >'unzip-5.12/mac/Contents' <<'END_OF_FILE'
- XContents of the "mac" sub-archive for UnZip 5.1 and later:
- X
- X Contents this file
- X mac.c Mac-specific filesystem code
- X macdir.c Macintosh Unix-style directory emulation
- X macdir.h header file for directory emulation
- X macscreen.c Macintosh window handling routines
- X macstat.c Macintosh stat() emulation
- X macstat.h header file for stat() emulation
- X macunzip.c Macintosh standalone version main program
- X rsrc.hqx resource file for Macintosh unzip (BinHex)
- X thinkc.hqx Think C project file (BinHex)
- X
- XThe resource file and the Think C project file are in BinHex form because
- Xthey contain Macintosh resource forks (only) and as such can not be simply
- Xstored a normal file on a non-Macintosh system. BinHex form is the
- Xtraditional way for transferring such files via non-Macintosh systems. It's
- Xalso the safest since it uses only printable characters. Both of the ".hqx"
- Xfiles must be converted with BinHex 4.0 (or equivalent) on a Macintosh
- Xsystem prior to attempted use.
- END_OF_FILE
- if test 1060 -ne `wc -c <'unzip-5.12/mac/Contents'`; then
- echo shar: \"'unzip-5.12/mac/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/mac/Contents'
- fi
- if test -f 'unzip-5.12/mac/macdir.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/mac/macdir.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/mac/macdir.h'\" \(780 characters\)
- sed "s/^X//" >'unzip-5.12/mac/macdir.h' <<'END_OF_FILE'
- X/*****************************************************************
- X *
- X * dirent.h
- X *
- X *****************************************************************/
- X
- X#ifndef __DIRENT_H
- X#define __DIRENT_H
- X
- X#include <errno.h>
- X
- X#ifndef ENOTDIR
- X#define ENOTDIR 20
- X#endif
- X
- X#ifndef NAME_MAX
- X#define NAME_MAX 31
- X#endif
- X
- Xstruct dirent {
- X unsigned long d_fileno;
- X short d_reclen;
- X short d_namlen;
- X char d_name[NAME_MAX + 1];
- X};
- X
- Xtypedef struct {
- X short ioFDirIndex;
- X short ioVRefNum;
- X long ioDrDirID;
- X short flags;
- X struct dirent currEntry;
- X} DIR;
- X
- X#define direct dirent
- X
- XDIR *opendir(char *);
- Xstruct dirent *readdir(DIR *);
- Xvoid rewinddir(DIR *);
- Xint closedir(DIR *);
- X#endif
- END_OF_FILE
- if test 780 -ne `wc -c <'unzip-5.12/mac/macdir.h'`; then
- echo shar: \"'unzip-5.12/mac/macdir.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/mac/macdir.h'
- fi
- if test -f 'unzip-5.12/mac/macstat.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/mac/macstat.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/mac/macstat.h'\" \(974 characters\)
- sed "s/^X//" >'unzip-5.12/mac/macstat.h' <<'END_OF_FILE'
- X/*****************************************************************
- X *
- X * stat.h
- X *
- X *****************************************************************/
- X
- X#include <time.h>
- Xextern int macstat(char *path, struct stat *buf, short nVRefNum, long lDirID );
- Xtypedef long dev_t;
- Xtypedef long ino_t;
- Xtypedef long off_t;
- X
- Xstruct stat {
- X dev_t st_dev;
- X ino_t st_ino;
- X unsigned short st_mode;
- X short st_nlink;
- X short st_uid;
- X short st_gid;
- X dev_t st_rdev;
- X off_t st_size;
- X time_t st_atime, st_mtime, st_ctime;
- X long st_blksize;
- X long st_blocks;
- X};
- X
- X#define S_IFMT 0xF000
- X#define S_IFIFO 0x1000
- X#define S_IFCHR 0x2000
- X#define S_IFDIR 0x4000
- X#define S_IFBLK 0x6000
- X#define S_IFREG 0x8000
- X#define S_IFLNK 0xA000
- X#define S_IFSOCK 0xC000
- X#define S_ISUID 0x800
- X#define S_ISGID 0x400
- X#define S_ISVTX 0x200
- X#define S_IREAD 0x100
- X#define S_IWRITE 0x80
- X#define S_IEXEC 0x40
- END_OF_FILE
- if test 974 -ne `wc -c <'unzip-5.12/mac/macstat.h'`; then
- echo shar: \"'unzip-5.12/mac/macstat.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/mac/macstat.h'
- fi
- if test -f 'unzip-5.12/msdos/Borland.fix' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/msdos/Borland.fix'\"
- else
- echo shar: Extracting \"'unzip-5.12/msdos/Borland.fix'\" \(3818 characters\)
- sed "s/^X//" >'unzip-5.12/msdos/Borland.fix' <<'END_OF_FILE'
- XNotes on patching Borland (binary) executables so they'll understand Unix-
- Xstyle, LF-delimited ASCII files (from Onno van der Linden, c/o Frank van
- Xder Linden, vdlinden@fwi.uva.nl).
- X
- X
- X1. The CPP used by TC 2.0 can't handle unix-style (LF-terminated) lines.
- X The CPP used by BC++ 2.0 can.
- X The CPP used by BC++ 3.0 can't handle #if statements with unix-style lines.
- X Fixes for both these problems below (GRR: offset, new byte, old byte).
- X
- X Comparing files \TC\CPP.EXE and \TC\CPP.OLD
- X 00004F25: 0D 0A
- X 00005E3D: 0D 0A
- X 00007916: 0D 0A
- X 000079D6: 0D 0A
- X 00007AC1: 0A 0D
- X 0000D8EE: EC F7
- X 0000D8F1: F7 EC
- X 0000D9EE: EC F7
- X 0000D9F1: F7 EC
- X 0000DC80: 0A 0D
- X 0000DC90: 0A 0D
- X
- X Comparing files \BORLANDC\BIN\CPP.EXE and \BORLANDC\BIN\CPP.OLD
- X 0001D150: 89 75
- X 0001D151: 36 08
- X 0001D152: 30 89
- X 0001D153: 23 36
- X 0001D154: 75 30
- X 0001D155: 04 23
- X 0001D288: 9A 89
- X 0001D289: FF 36
- X 0001D28A: FF 30
- X 0001D28B: 00 23
- X 0001D28C: 00 9A
- X 0001D28E: 0E FF
- X 0001D28F: 30 00
- X 0001D290: 23 00
- X 0001E5A7: 89 8D
- X
- X
- X2. The compilers (tcc 2.0 and bcc 3.0) are both one-pass compilers; i.e.,
- X cpp.exe isn't used when compiling with tcc or bcc. The earlier statements
- X about both cpp's are the same for the builtin preprocesser in the compilers.
- X To fix the unix-style line stuff for the compilers, apply the fixes below.
- X I do have something called bpatch.c which reads in the output of fc /b and
- X changes the executable. If anyone is too lazy to write it himself, just
- X send out a mail.
- X
- X Comparing files TCC.EXE and TCC.OLD
- X 00005E06: BF 88
- X 00005E07: 02 01
- X 00005E0C: 88 BF
- X 00005E0D: 01 02
- X 00006E7C: 0A 0D
- X 00011FF9: 0A 0D
- X 00012059: 0A 0D
- X 00017E6C: 0A 0D
- X 00018181: 0A 0D
- X 000181F6: 0A 0D
- X 00018AC1: 0A 0D
- X 00018B27: 0D 0A
- X 00018BBE: 0A 0D
- X 00018C12: 0A 0D
- X 00018C6A: 0A 0D
- X 0001948A: 0A 0D
- X 000194B7: 0D 0A
- X 00019507: 0A 0D
- X 0001C093: 0A 0D
- X 0001C495: 3C 89
- X 0001C496: 0D 46
- X 0001C497: 74 FC
- X 0001C498: DF 3D
- X 0001C499: FF 0D
- X 0001C49A: 0E 00
- X 0001C49B: 34 75
- X 0001C49C: 50 03
- X 0001C49D: 3C E9
- X 0001C49E: 0A F6
- X 0001C49F: 75 FB
- X 0001C4A0: 03 FF
- X 0001C4A1: E9 0E
- X 0001C4A2: F2 34
- X 0001C4A3: FB 50
- X 0001C4D0: 0A 0D
- X 0001CFA7: 0A 0D
- X 0001CFBA: 0D 0A
- X 0001D007: 0A 0D
- X 0002A13C: 0A 0D
- X 0002A14C: 0A 0D
- X 0002A2B6: EC F7
- X 0002A2B9: F7 EC
- X 0002A3B6: EC F7
- X 0002A3B9: F7 EC
- X 0002A4B6: EC F7
- X 0002A4B9: F7 EC
- X 0002BDC3: 20 21
- X 0002BDC6: 21 20
- X
- X Comparing files BCC.EXE and BCC.OLD
- X 0002B877: 89 75
- X 0002B878: 36 08
- X 0002B879: 5C 89
- X 0002B87A: 5F 36
- X 0002B87B: 75 5C
- X 0002B87C: 04 5F
- X 0002B9AF: 0E 89
- X 0002B9B0: E8 36
- X 0002B9B1: 56 5C
- X 0002B9B2: DC 5F
- X 0002B9B3: FF 90
- X 0002B9B5: 5C E8
- X 0002B9B6: 5F 51
- X 0002B9B7: 90 DC
- X
- X Just an addition: the first one was for the cpp.exe's, the recent one is for
- X the compilers (bcc.exe, tcc.exe). The first one is a bit redundant because
- X cpp.exe is hardly ever used. See it as an attempt to make things complete.
- X
- X
- X3. For those of you who are using NDMAKE45 under MSDOS:
- X version 4.5 predefines the macro's MAKE and MFLAGS as readonly's.
- X So there was no way you could use $(MAKE) with ndmake45.
- X Here are the fc /b's that make things work:
- X
- X Comparing files MAKE45.EXE and MAKE45.OLD
- X 000019C0: 00 03 # MFLAG
- X 000019DC: 00 03 # MAKE
- X 00007BEA: 0A 7E # output of make -p
- X 00007BEB: 00 0A #
- X
- X Comparing files MAKE45L.EXE and MAKE45L.OLD
- X 0000277E: 00 03 # MFLAG
- X 0000279D: 00 03 # MAKE
- X 0000A6A8: 0A 7E # output of make -p
- X 0000A6A9: 00 0A
- X
- END_OF_FILE
- if test 3818 -ne `wc -c <'unzip-5.12/msdos/Borland.fix'`; then
- echo shar: \"'unzip-5.12/msdos/Borland.fix'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/msdos/Borland.fix'
- fi
- if test -f 'unzip-5.12/msdos/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/msdos/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/msdos/Contents'\" \(2323 characters\)
- sed "s/^X//" >'unzip-5.12/msdos/Contents' <<'END_OF_FILE'
- XContents of the "msdos" sub-archive for UnZip 5.11 and later:
- X
- X Contents this file
- X README notes about quirks in MS-DOS executables and compilers
- X msdos.c OS-dependent UnZip routines for MS-DOS
- X makefile.bc makefile for Borland C++ and Turbo C++
- X makefile.msc makefile for Microsoft C and make or nmake
- X makefile.tc makefile for Turbo C and make
- X Borland.fix patches to fix Borland executables for grokking Unix EOLs
- X
- XNotes:
- X
- X(1) As of UnZip 5.1, Borland project files are no longer included. They
- X were not as flexible as the makefiles, and the binary ones caused prob-
- X lems for both the comp.sources.misc moderator and the UnZip maintainer.
- X By way of compensation, what used to be called simply "makefile" has
- X been split into makefile.msc and makefile.tc (the latter for old Turbo C
- X compilers).
- X
- X(2) As of UnZip 5.11, makefile.gcc (for djgpp/GNU make) is no longer provided.
- X Instead use the gcc_dos target in the Unix makefile (unix/Makefile) after
- X copying it to the main UnZip directory. Note that, because of bugs in
- X the MS-DOS port of GNU make, the gcc_dos target does not make use of the
- X MAKE variable; therefore users of other makes (e.g., nmake) will have to
- X edit the target or rename their make utility to "make".
- X
- X(3) The Unix makefile also has an msc_dos target which can be used for MSC 6.0
- X or later, but such use is discouraged and the target may disappear in the
- X future--use makefile.msc instead.
- X
- X(4) For DOS emx+gcc use the gccdos target in the OS/2 makefile.os2. This
- X target has only been tested in cross-compilation from OS/2 to MS-DOS,
- X but it should work under plain MS-DOS with a proper make utility. The
- X resulting executables require emx.exe to run (akin to djgpp's go32.exe).
- X
- X(5) The binary patches in Borland.fix are NOT required; they may be useful
- X if you regularly deal with Unix sources, but casual users should probably
- X make use of an external utility like Rahul Dhesi's FLIP to convert between
- X Unix and DOS/OS2 end-of-line characters. If you know how to patch binary
- X executables, you should be able to figure out how to use these patches.
- X Presumably they don't work for more recent versions of the executables
- X anyway; they'll probably be removed in the next version.
- END_OF_FILE
- if test 2323 -ne `wc -c <'unzip-5.12/msdos/Contents'`; then
- echo shar: \"'unzip-5.12/msdos/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/msdos/Contents'
- fi
- if test -f 'unzip-5.12/msdos/makefile.bc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/msdos/makefile.bc'\"
- else
- echo shar: Extracting \"'unzip-5.12/msdos/makefile.bc'\" \(3487 characters\)
- sed "s/^X//" >'unzip-5.12/msdos/makefile.bc' <<'END_OF_FILE'
- X# Makefile for UnZip(SFX) and fUnZip for Borland C++ 2.x/3.0 and Turbo C++ 1.0
- X# Version: 5.12 and later Alvin Koh, Jim Knoble, Christian Spieler, etc.
- X#
- X# Last revised: 11 Aug 94
- X
- X
- X# for Borland C++ uncomment this and comment out the tcc line:
- XCC = bcc
- X
- X# for Turbo C++ uncomment this and comment out the bcc line:
- X#CC = tcc
- X
- X#TASM = tasm # not used
- X
- X#UNMODEL = s # small model for UnZip and ZipInfo, now that strings moved
- XUNMODEL = l # large model for UnZip (M. Lawler/BC 4.0: _text > 64K w/ "s")
- XFUMODEL = s # always use small model for fUnZip
- X
- X# GNU make doesn't like the return value from "rem"
- X#STRIP=rem
- XSTRIP=echo Ignore this line.
- X# If you don't have LZEXE or PKLITE, get one of them. Then define:
- X#STRIP=lzexe
- X# or
- X#STRIP=pklite
- X# This makes a big difference in .exe size (and possibly load time).
- X
- X
- X# Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
- X# should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
- X# to the declaration of LOC here:
- XLOC = $(LOCAL_UNZIP)
- X
- X
- X# compiler flags
- X
- XCFLAGS = -O -ff- -k- -P-.C -I. $(LOC)
- XUNFLAGS = -m$(UNMODEL) $(CFLAGS)
- XFUFLAGS = -m$(FUMODEL) $(CFLAGS) -K -d
- XLDFLAGS = -lxncd -l-P # for bcc
- X#LDFLAGS = -lxncd # for tcc
- X
- X# implicit rules
- X
- X.c.obj:
- X $(CC) -c $(UNFLAGS) {$< }
- X
- X# list macros
- X
- Xunzip_dependencies = \
- X unzip.obj \
- X crypt.obj \
- X envargs.obj \
- X explode.obj \
- X extract.obj \
- X file_io.obj \
- X inflate.obj \
- X match.obj \
- X unreduce.obj \
- X unshrink.obj \
- X zipinfo.obj \
- X msdos.obj
- X
- Xfunzip_dependencies = \
- X funzip.obj \
- X crypt_.obj \
- X inflate_.obj
- X
- Xunzipsfx_dependencies = \
- X unzip_.obj \
- X crypt.obj \
- X extract_.obj \
- X file_io.obj \
- X inflate.obj \
- X match.obj \
- X msdos_.obj
- X
- X# explicit rules
- X
- Xall: unzip.exe funzip.exe unzipsfx.exe
- X
- Xunzip.exe: $(unzip_dependencies)
- X $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzip.exe @&&|
- Xunzip.obj
- Xcrypt.obj
- Xenvargs.obj
- Xexplode.obj
- Xextract.obj
- Xfile_io.obj
- Xinflate.obj
- Xmatch.obj
- Xunreduce.obj
- Xunshrink.obj
- Xzipinfo.obj
- Xmsdos.obj
- X|
- X $(STRIP) unzip.exe
- X
- Xfunzip.exe: $(funzip_dependencies)
- X $(CC) -m$(FUMODEL) $(LDFLAGS) -efunzip.exe @&&|
- Xfunzip.obj
- Xcrypt_.obj
- Xinflate_.obj
- X|
- X $(STRIP) funzip.exe
- X
- Xunzipsfx.exe: $(unzipsfx_dependencies)
- X $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzipsfx.exe @&&|
- Xunzip_.obj
- Xcrypt.obj
- Xextract_.obj
- Xfile_io.obj
- Xinflate.obj
- Xmatch.obj
- Xmsdos_.obj
- X|
- X $(STRIP) unzipsfx.exe
- X
- X# individual file dependencies
- X
- Xcrypt.obj: crypt.c unzip.h zip.h crypt.h
- Xenvargs.obj: envargs.c unzip.h
- Xexplode.obj: explode.c unzip.h
- Xextract.obj: extract.c unzip.h crypt.h
- Xfile_io.obj: file_io.c unzip.h crypt.h tables.h
- Xinflate.obj: inflate.c inflate.h unzip.h
- Xmatch.obj: match.c unzip.h
- Xunreduce.obj: unreduce.c unzip.h
- Xunshrink.obj: unshrink.c unzip.h
- Xunzip.obj: unzip.c unzip.h crypt.h version.h
- Xzipinfo.obj: zipinfo.c unzip.h
- X
- Xmsdos.obj: msdos/msdos.c unzip.h
- X $(CC) -c $(UNFLAGS) msdos/msdos.c
- X
- Xfunzip.obj: funzip.c unzip.h crypt.h tables.h
- X $(CC) -c $(FUFLAGS) funzip.c
- X
- Xcrypt_.obj: crypt.c unzip.h zip.h crypt.h
- X $(CC) -c $(FUFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
- X
- Xinflate_.obj: inflate.c inflate.h unzip.h crypt.h
- X $(CC) -c $(FUFLAGS) -DFUNZIP -oinflate_.obj inflate.c
- X
- Xunzip_.obj: unzip.c unzip.h crypt.h version.h
- X $(CC) -c $(UNFLAGS) -DSFX -ounzip_.obj unzip.c
- X
- Xextract_.obj: extract.c unzip.h crypt.h
- X $(CC) -c $(UNFLAGS) -DSFX -oextract_.obj extract.c
- X
- Xmsdos_.obj: msdos/msdos.c unzip.h
- X $(CC) -c $(UNFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
- END_OF_FILE
- if test 3487 -ne `wc -c <'unzip-5.12/msdos/makefile.bc'`; then
- echo shar: \"'unzip-5.12/msdos/makefile.bc'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/msdos/makefile.bc'
- fi
- if test -f 'unzip-5.12/msdos/makefile.msc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/msdos/makefile.msc'\"
- else
- echo shar: Extracting \"'unzip-5.12/msdos/makefile.msc'\" \(3972 characters\)
- sed "s/^X//" >'unzip-5.12/msdos/makefile.msc' <<'END_OF_FILE'
- X#------------------------------------------------------------------------------
- X# Makefile for UnZip 5.11 and later Greg Roelofs and others
- X# Version: Microsoft C (5.x and later) 11 August 1994
- X#------------------------------------------------------------------------------
- X
- X# Users of MSC 6/7 and NMAKE can use the Unix Makefile (target msc_dos),
- X# if desired. This makefile works just fine, too, however. OS/2 users
- X# can cross-compile using os2/makefile.os2 (target mscdos). Note that
- X# there is possibly a bug in MSC 6 which screws up funzip (goes into
- X# infinite loop? --this has not been confirmed in over a year...). There
- X# is definitely a bug (internal compiler error) in MSC 6.00 while com-
- X# piling explode.c (fixed in 6.0a, 6.0ax, 6.0ax2, 7.*, 8.*).
- X
- X
- X# GNU make doesn't like the return value from "rem"
- X#STRIP=rem
- XSTRIP=echo Ignore this line.
- X# If you don't have LZEXE or PKLITE, get one of them. Then define:
- X#STRIP=lzexe
- X# or
- X#STRIP=pklite
- X# and remove /e from LDFLAGS. This makes a big difference in
- X# .exe size (and possibly load time).
- X
- X# Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
- X# should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
- X# to the declaration of LOC here:
- XLOC = $(LOCAL_UNZIP)
- X
- X# small model (should work now, but if problems, use L)
- XMODEL=S
- X
- XCC = cl # -Ox does not work for inflate.c
- X# add -G2(3,4) for 286 (386, 486) and/or -FPi87 for 80x87:
- XCFLAGS = -nologo -DMSC $(LOC) -Oait -Gs -I.
- X
- XLD = link
- XLDFLAGS = /nologo/noi/e/st:0x0c00 # remove /e if you have LZEXE or PKLITE
- XLDFLAGS2 = ,$*;
- X
- XOBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
- XOBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj
- XOBJS3 = msdos.obj
- XOBJS = $(OBJS1) $(OBJS2) $(OBJS3)
- X
- XOBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj\
- X msdos_.obj
- X
- XOBJF = funzip.obj crypt_.obj inflate_.obj
- X
- X
- Xdefault: unzip.exe funzip.exe unzipsfx.exe
- X
- X.c.obj:
- X $(CC) -c -A$(MODEL) $(CFLAGS) $*.c
- X
- Xcrypt.obj: crypt.c unzip.h crypt.h zip.h
- X
- Xcrypt_.obj: crypt.c unzip.h crypt.h zip.h
- X $(CC) -c -AS $(CFLAGS) -DFUNZIP -Focrypt_.obj crypt.c
- X
- Xenvargs.obj: envargs.c unzip.h
- X
- Xexplode.obj: explode.c unzip.h
- X
- Xextract.obj: extract.c unzip.h crypt.h
- X
- Xextract_.obj: extract.c unzip.h crypt.h
- X $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Foextract_.obj extract.c
- X
- Xfile_io.obj: file_io.c unzip.h crypt.h tables.h
- X
- Xfunzip.obj: funzip.c unzip.h crypt.h tables.h
- X $(CC) -c -AS $(CFLAGS) funzip.c
- X
- Xinflate.obj: inflate.c unzip.h
- X
- Xinflate_.obj: inflate.c inflate.h unzip.h crypt.h
- X $(CC) -c -AS $(CFLAGS) -DFUNZIP -Foinflate_.obj inflate.c
- X
- Xmatch.obj: match.c unzip.h
- X
- Xmsdos.obj: msdos/msdos.c unzip.h
- X $(CC) -c -A$(MODEL) $(CFLAGS) msdos/msdos.c
- X
- Xmsdos_.obj: msdos/msdos.c unzip.h
- X $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Fomsdos_.obj msdos/msdos.c
- X
- Xunreduce.obj: unreduce.c unzip.h
- X
- Xunshrink.obj: unshrink.c unzip.h
- X
- Xunzip.obj: unzip.c unzip.h crypt.h version.h
- X
- Xunzip_.obj: unzip.c unzip.h crypt.h version.h
- X $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Founzip_.obj unzip.c
- X
- Xzipinfo.obj: zipinfo.c unzip.h
- X
- X
- X# MS make:
- X# -------
- Xunzip.exe: $(OBJS)
- X echo $(OBJS1)+ > unzip.rsp
- X echo $(OBJS2)+ >> unzip.rsp
- X echo $(OBJS3); >> unzip.rsp
- X $(LD) $(LDFLAGS) @unzip.rsp
- X del unzip.rsp
- X $(STRIP) unzip.exe
- X
- X# better makes which know how to deal with 128 char limit on command line:
- X# -----------------------------------------------------------------------
- X#unzip.exe: $(OBJS)
- X# $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
- X# $(STRIP) unzip.exe
- X
- X# both makes:
- X# ----------
- Xfunzip.exe: $(OBJF)
- X $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2)
- X $(STRIP) funzip.exe
- X
- Xunzipsfx.exe: $(OBJX)
- X echo $(OBJX), $@; > unzipsfx.rsp
- X $(LD) $(LDFLAGS) @unzipsfx.rsp
- X del unzipsfx.rsp
- X $(STRIP) unzipsfx.exe
- END_OF_FILE
- if test 3972 -ne `wc -c <'unzip-5.12/msdos/makefile.msc'`; then
- echo shar: \"'unzip-5.12/msdos/makefile.msc'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/msdos/makefile.msc'
- fi
- if test -f 'unzip-5.12/msdos/makefile.tc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/msdos/makefile.tc'\"
- else
- echo shar: Extracting \"'unzip-5.12/msdos/makefile.tc'\" \(3520 characters\)
- sed "s/^X//" >'unzip-5.12/msdos/makefile.tc' <<'END_OF_FILE'
- X#-----------------------------------------------------------------------------
- X# Makefile for UnZip 5.11 and later Jean-loup Gailly
- X# Version: Turbo C (edit and use makefile.bc for Turbo C++) 10 July 1994
- X#-----------------------------------------------------------------------------
- X
- X# GNU make doesn't like the return value from "rem"
- X#STRIP=rem
- XSTRIP=echo Ignore this line.
- X# If you don't have LZEXE or PKLITE, get one of them. Then define:
- X#STRIP=lzexe
- X# or
- X#STRIP=pklite
- X# This makes a big difference in .exe size (and possibly load time).
- X
- X# memory model for UnZip (conflicting reports on whether Turbo C can or
- X# cannot put strings into far memory; for now assume it can and use small
- X# model *with* ZipInfo enabled...if fails, either define NO_ZIPINFO or
- X# use large model) [GRR 940712: sigh, no go--inflate fails. Back to
- X# large model...]
- X#MODEL = s
- XMODEL = l
- X
- XCC = tcc
- XLD = $(CC)
- X
- XUCFLAGS = -m$(MODEL) -O -Z -I. -DFar=
- XULDFLAGS = -m$(MODEL)
- X
- X# funzip is always small-model
- XFCFLAGS = -ms -O -Z -I.
- XFLDFLAGS = -ms
- X
- XLDFLAGS2 =
- X
- XOBJS = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj \
- X inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj msdos.obj
- X
- XOBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj \
- X msdos_.obj
- X
- XOBJF = funzip.obj crypt_.obj inflate_.obj
- X
- Xdefault: unzip.exe funzip.exe unzipsfx.exe
- X
- Xclean:
- X rem Ignore any errors in the following...
- X del *.ob
- X del *.obj
- X del unzip.exe
- X del funzip.exe
- X
- X.c.obj:
- X $(CC) -c $(UCFLAGS) $*.c
- X
- Xcrypt.obj: crypt.c unzip.h crypt.h zip.h
- X
- Xcrypt_.obj: crypt.c unzip.h crypt.h zip.h
- X $(CC) -c $(FCFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
- X
- Xenvargs.obj: envargs.c unzip.h
- X
- Xexplode.obj: explode.c unzip.h
- X
- Xextract.obj: extract.c unzip.h crypt.h
- X
- Xextract_.obj: extract.c unzip.h crypt.h
- X $(CC) -c $(UCFLAGS) -DSFX -oextract_.obj extract.c
- X
- Xfile_io.obj: file_io.c unzip.h crypt.h tables.h
- X
- Xfunzip.obj: funzip.c unzip.h crypt.h tables.h
- X $(CC) -c $(FCFLAGS) funzip.c
- X
- Xinflate_.obj: inflate.c inflate.h unzip.h crypt.h
- X $(CC) -c $(FCFLAGS) -DFUNZIP -oinflate_.obj inflate.c
- X
- Xinflate.obj: inflate.c inflate.h unzip.h
- X
- Xmatch.obj: match.c unzip.h
- X
- Xmsdos.obj: msdos/msdos.c unzip.h
- X $(CC) -c $(UCFLAGS) msdos/msdos.c
- X
- Xmsdos_.obj: msdos/msdos.c unzip.h
- X $(CC) -c $(UCFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
- X
- Xunreduce.obj: unreduce.c unzip.h
- X
- Xunshrink.obj: unshrink.c unzip.h
- X
- Xunzip.obj: unzip.c unzip.h crypt.h version.h
- X
- Xunzip_.obj: unzip.c unzip.h crypt.h version.h
- X $(CC) -c $(UCFLAGS) -DSFX -ounzip_.obj unzip.c
- X
- Xzipinfo.obj: zipinfo.c unzip.h
- X
- X
- X# Turbo Make which cannot deal with the MS-DOS 128 byte limit:
- X# -----------------------------------------------------------
- Xunzip.exe: $(OBJS)
- X rem Ignore any warnings in the following commands:
- X del funzip.ob
- X ren funzip.obj *.ob
- X del crypt_.ob
- X ren crypt_.obj *.ob
- X del inflate_.ob
- X ren inflate_.obj *.ob
- X $(LD) $(ULDFLAGS) -eunzip.exe *.obj
- X ren *.ob *.obj
- X $(STRIP) unzip.exe
- X
- X# better makes which know how to deal with 128 char limit on command line:
- X# -----------------------------------------------------------------------
- X#unzip.exe: $(OBJS)
- X# $(LD) $(ULDFLAGS) $(OBJS) $(LDFLAGS2)
- X# $(STRIP) unzip.exe
- X
- X# both makes:
- X# ----------
- Xfunzip.exe: $(OBJF)
- X $(LD) $(FLDFLAGS) $(OBJF) $(LDFLAGS2)
- X $(STRIP) funzip.exe
- X
- Xunzipsfx.exe: $(OBJX)
- X $(LD) $(ULDFLAGS) $(OBJX) $(LDFLAGS2)
- X rename unzip_.exe unzipsfx.exe
- X $(STRIP) unzipsfx.exe
- END_OF_FILE
- if test 3520 -ne `wc -c <'unzip-5.12/msdos/makefile.tc'`; then
- echo shar: \"'unzip-5.12/msdos/makefile.tc'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/msdos/makefile.tc'
- fi
- if test -f 'unzip-5.12/nt/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/nt/Makefile'\"
- else
- echo shar: Extracting \"'unzip-5.12/nt/Makefile'\" \(2794 characters\)
- sed "s/^X//" >'unzip-5.12/nt/Makefile' <<'END_OF_FILE'
- X# NMAKE Makefile for Windows NT
- X# D. Feinleib 7/92 t-davefe@microsoft.com
- X# H. Gessau 9/93 <henryg@kullmar.kullmar.se>
- X#
- X# Last revised: 10 Jul 94
- X#
- X# Tested with NT SDK, VC++ 1.0 for NT, and DEC C/C++ beta.
- X#
- X# For DEC C/C++, comment out the "cdebug = -Ogityb2" line (or
- X# define debug?). [Jack Stansbury]
- X
- X# Nmake macros for building Windows NT applications
- X# To build with debug info use 'nmake debug=1'
- X!IFNDEF debug
- XNODEBUG=1
- X!ENDIF
- X!include <ntwin32.mak>
- X
- X# object files
- XOBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
- XOBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj nt.obj
- XOBJS = $(OBJS1) $(OBJS2)
- XOBJX1 = unzipsfx.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj
- XOBJX2 = nt_.obj
- XOBJX = $(OBJX1) $(OBJX2)
- XOBJF = funzip.obj crypt_.obj inflate_.obj
- X
- X# cvars = $(cvars) -nologo -DMSDOS -DNO_ASM -J
- Xcvars = $(cvars) -nologo -DNO_ASM -J
- X
- X# Some optimization (if not debugging)
- X!IFDEF NODEBUG
- Xcdebug = -Ogityb2
- X!ENDIF
- X
- X# How to compile sources
- X.c.obj:
- X $(cc) $(cdebug) $(cflags) $(cvars) $<
- X
- X# How to link
- X.obj.exe:
- X $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@
- X
- X
- X# Default target is all the executables
- Xunzips : unzip.exe funzip.exe unzipsfx.exe
- X
- X
- Xunzip.exe: $(OBJS)
- Xunzipsfx.exe: $(OBJX)
- Xfunzip.exe: $(OBJF)
- X
- Xcrypt.obj: crypt.c unzip.h zip.h crypt.h
- Xenvargs.obj: envargs.c unzip.h
- Xexplode.obj: explode.c unzip.h
- Xextract.obj: extract.c unzip.h crypt.h
- Xfile_io.obj: file_io.c unzip.h crypt.h tables.h
- Xfunzip.obj: funzip.c unzip.h crypt.h tables.h
- Xinflate.obj: inflate.c inflate.h unzip.h
- Xmatch.obj: match.c unzip.h
- Xunreduce.obj: unreduce.c unzip.h
- Xunshrink.obj: unshrink.c unzip.h
- Xunzip.obj: unzip.c unzip.h crypt.h version.h
- Xzipinfo.obj: zipinfo.c unzip.h
- X
- Xnt.obj: nt\nt.c unzip.h
- X $(cc) $(cdebug) $(cflags) $(cvars) -I. nt\nt.c
- X
- Xnt_.obj: nt\nt.c unzip.h # unzipsfx only
- X copy nt\nt.c nt_.c
- X $(cc) $(cdebug) $(cflags) $(cvars) -DSFX nt_.c
- X del nt_.c
- X
- Xcrypt_.obj: crypt.c unzip.h zip.h crypt.h # funzip only
- X copy crypt.c crypt_.c
- X $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt_.c
- X del crypt_.c
- X
- Xextract_.obj: extract.c unzip.h crypt.h # unzipsfx only
- X copy extract.c extract_.c
- X $(cc) $(cdebug) $(cflags) $(cvars) -DSFX extract_.c
- X del extract_.c
- X
- Xinflate_.obj: inflate.c inflate.h unzip.h crypt.h # funzip only
- X copy inflate.c inflate_.c
- X $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate_.c
- X del inflate_.c
- X
- Xunzipsfx.obj: unzip.c unzip.h crypt.h version.h # unzipsfx only
- X copy unzip.c unzipsfx.c
- X $(cc) $(cdebug) $(cflags) $(cvars) -DSFX unzipsfx.c
- X del unzipsfx.c
- X
- Xzipinfo_.obj: zipinfo.c unzip.h # unzipsfx only
- X copy zipinfo.c zipinfo_.c
- X $(cc) $(cdebug) $(cflags) $(cvars) -DSFX zipinfo_.c
- X del zipinfo_.c
- X
- Xclean:
- X del /q $(OBJS) unzip.exe $(OBJF) funzip.exe $(OBJX) unzipsfx.exe
- END_OF_FILE
- if test 2794 -ne `wc -c <'unzip-5.12/nt/Makefile'`; then
- echo shar: \"'unzip-5.12/nt/Makefile'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/nt/Makefile'
- fi
- if test -f 'unzip-5.12/os2/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/os2/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/os2/Contents'\" \(613 characters\)
- sed "s/^X//" >'unzip-5.12/os2/Contents' <<'END_OF_FILE'
- XContents of the "os2" sub-archive for UnZip 5.12 and later:
- X
- X Contents this file
- X makefile.os2 makefile for almost every compiler available under OS/2
- X os2.c OS/2-specific support routines
- X unzip16.def OS/2 linker definition file (16-bit)
- X unzip.def OS/2 linker definition file (32-bit)
- X zipgrep.cmd really cool REXX script to search for strings in a zipfile
- X wat_met.dif patch for Watcom C DOS/OS2-1.x versions and Metaware High C++
- X
- XThere is no support for the Zortech or GCC/2 (Michael Johnson/Colin
- XJensen) compilers. emx+gcc is supported. New makefile targets are
- Xwelcome...
- END_OF_FILE
- if test 613 -ne `wc -c <'unzip-5.12/os2/Contents'`; then
- echo shar: \"'unzip-5.12/os2/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/os2/Contents'
- fi
- if test -f 'unzip-5.12/os2/zipgrep.cmd' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/os2/zipgrep.cmd'\"
- else
- echo shar: Extracting \"'unzip-5.12/os2/zipgrep.cmd'\" \(1601 characters\)
- sed "s/^X//" >'unzip-5.12/os2/zipgrep.cmd' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------
- X
- X zipgrep.cmd (ye olde REXX procedure for OS/2)
- X
- X Script to search members of a zipfile for a string or regular expression
- X and print the names of any such members (and, optionally, the matching
- X text). The search is case-insensitive by default.
- X
- X History:
- X original Bourne shell version by Jean-loup Gailly
- X modified by Greg Roelofs for Ultrix (no egrep -i) and zipinfo -1
- X OS/2 REXX script by Greg Roelofs
- X
- X Last modified: 19 Jul 93
- X
- X ---------------------------------------------------------------------------*/
- X
- XPARSE ARG string zipfile members
- X
- Xif (string == '') then do
- X say 'usage: zipgrep search_string zipfile [members...]'
- X say ' Displays the names of zipfile members containing a given string,'
- X say ' in addition to the matching text. This procedure requires unzip'
- X say ' and egrep in the current path, and it is quite slow....'
- X exit 1
- Xend
- X
- X/* doesn't seem to work...
- Xnewq = RXQUEUE("Create",zipgrep_pipe)
- Xoldq = RXQUEUE("Set",newq)
- X */
- X
- X/* flush the queue before starting */
- Xdo QUEUED()
- X PULL junk
- Xend
- X
- X/* GRR: can also add "2>&1" before pipe in following external command */
- X'@unzip -Z1' zipfile members '| rxqueue'
- X
- Xdo while QUEUED() > 0
- X PARSE PULL file
- X '@unzip -p' zipfile file '| egrep -is' string
- X if rc == 0 then do
- X SAY file':'
- X /* can comment out following line if just want filenames */
- X '@unzip -p' zipfile file '| egrep -i' string
- X end
- Xend
- X
- X/*
- Xcall RXQUEUE "Delete",newq
- Xcall RXQUEUE "Set",oldq
- X */
- X
- Xexit 0
- END_OF_FILE
- if test 1601 -ne `wc -c <'unzip-5.12/os2/zipgrep.cmd'`; then
- echo shar: \"'unzip-5.12/os2/zipgrep.cmd'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/os2/zipgrep.cmd'
- fi
- if test -f 'unzip-5.12/unix/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/unix/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/unix/Contents'\" \(640 characters\)
- sed "s/^X//" >'unzip-5.12/unix/Contents' <<'END_OF_FILE'
- XContents of the "unix" sub-archive for UnZip 5.11 and later:
- X
- X Contents this file
- X Makefile makefile for UnZip for various architectures and OS's
- X unix.c Unix-specific support routines
- X unzip.1 UnZip manual page, nroff format
- X unzipsfx.1 UnZipSFX manual page, nroff format
- X zipinfo.1 ZipInfo manual page, nroff format
- X funzip.1 fUnZip manual page, nroff format
- X
- XType "make" or "make help" to get general compile instructions (beyond
- Xthose in the INSTALL file), or "make list" for a list of makefile targets.
- XNote that there are some MS-DOS and cross-compilation targets thrown in
- Xjust to make things more exciting.
- END_OF_FILE
- if test 640 -ne `wc -c <'unzip-5.12/unix/Contents'`; then
- echo shar: \"'unzip-5.12/unix/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/unix/Contents'
- fi
- if test -f 'unzip-5.12/vms/Contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/Contents'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/Contents'\" \(1682 characters\)
- sed "s/^X//" >'unzip-5.12/vms/Contents' <<'END_OF_FILE'
- XContents of the "vms" sub-archive for UnZip 5.12 and later:
- X
- X Contents this file
- X README general VMS info about using UnZip and zipfiles
- X unzip_def.rnh UnZip default help page, RUNOFF format
- X unzip_cli.help UnZip VMSCLI help page, TPU format
- X unzipsfx.hlp UnZipSFX pre-formatted help page
- X cvthelp.tpu TPU macro file to convert .help file to RUNOFF format
- X cmdline.c VMS-style command-line-interface code (if VMSCLI defined)
- X unz_cld.cld more VMS-command-line stuff (if VMSCLI defined)
- X vms.c VMS file manipulation code
- X vms.h VMS header file for UnZip
- X make.com command file to make UnZip with GNU or DEC C on VAX or AXP
- X descrip.mms MMK/MMS makefile for UnZip/ZipInfo and UnZipSFX
- X vmsshare.opt options file used by descrip.mms
- X unzip.opt options file used by descrip.mms and make.com
- X unzipsfx.opt options file used by descrip.mms and make.com
- X clean.com command file to remove .obj and .exe files; used with MMS
- X makesfx.com command file to create self-extracting archives
- X
- XMAKE/VMS is no longer supported since MMK (MMS clone by Matt Madison/MadGoat
- XEnterprises, compatible with descrip.mms) is both free and becoming quite
- Xpopular. MMK is available by anonymous ftp from ftp.spc.edu/ftp.wku.edu and
- Xby mailserver at wkuvx1.wku.edu. Check VMS newsgroups for announcements and
- Xexact location.
- X
- XThe MAKE.COM command file accepts compilation options in a LOCAL_UNZIP
- Xsymbol or logical; the format is "VMSCLI,RETURN_SEVERITY" (for example).
- XDESCRIP.MMS must be edited in order to use special options.
- END_OF_FILE
- if test 1682 -ne `wc -c <'unzip-5.12/vms/Contents'`; then
- echo shar: \"'unzip-5.12/vms/Contents'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/Contents'
- fi
- if test -f 'unzip-5.12/vms/clean.com' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/clean.com'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/clean.com'\" \(803 characters\)
- sed "s/^X//" >'unzip-5.12/vms/clean.com' <<'END_OF_FILE'
- X$!
- X$! Clean.com -- procedure to delete files. It always returns success
- X$! status despite any error or warnings. Also it extracts
- X$! filename from MMS "module=file" format.
- X$!
- X$ on control_y then goto ctly
- X$ if p1.eqs."" then exit 1
- X$ i = -1
- X$scan_list:
- X$ i = i+1
- X$ item = f$elem(i,",",p1)
- X$ if item.eqs."" then goto scan_list
- X$ if item.eqs."," then goto done ! End of list
- X$ item = f$edit(item,"trim") ! Clean of blanks
- X$ wild = f$elem(1,"=",item)
- X$ show sym wild
- X$ if wild.eqs."=" then wild = f$elem(0,"=",item)
- X$ vers = f$parse(wild,,,"version","syntax_only")
- X$ if vers.eqs.";" then wild = wild - ";" + ";*"
- X$scan:
- X$ f = f$search(wild)
- X$ if f.eqs."" then goto scan_list
- X$ on error then goto err
- X$ on warning then goto warn
- X$ delete/log 'f'
- X$warn:
- X$err:
- X$ goto scan
- X$done:
- X$ctly:
- X$ exit 1
- END_OF_FILE
- if test 803 -ne `wc -c <'unzip-5.12/vms/clean.com'`; then
- echo shar: \"'unzip-5.12/vms/clean.com'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/clean.com'
- fi
- if test -f 'unzip-5.12/vms/make.com' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/make.com'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/make.com'\" \(3756 characters\)
- sed "s/^X//" >'unzip-5.12/vms/make.com' <<'END_OF_FILE'
- X$ !
- X$ ! "Makefile" for VMS versions of UnZip/ZipInfo and UnZipSFX
- X$ !
- X$ ! To define additional options, define the global symbol
- X$ ! LOCAL_UNZIP prior to executing MAKE.COM:
- X$ !
- X$ ! $ LOCAL_UNZIP == "VMSCLI,RETURN_SEVERITY,"
- X$ ! $ @MAKE
- X$ !
- X$ ! The trailing "," may be omitted. Valid VMS-specific options
- X$ ! include VMSCLI, VMSWILD, RETURN_SEVERITY and RETURN_CODES; see
- X$ ! the INSTALL file for other options (e.g., CHECK_EOF).
- X$ !
- X$ !
- X$ ! Find out current disk, directory, compiler and options
- X$ !
- X$ my_name = f$env("procedure")
- X$ here = f$parse(my_name,,,"device") + f$parse(my_name,,,"directory")
- X$ if f$type(LOCAL_UNZIP).eqs.""
- X$ then
- X$ local_unzip = ""
- X$ else ! Trim blanks and append comma if missing
- X$ local_unzip = f$edit(local_unzip, "TRIM")
- X$ if f$extract(f$length(local_unzip)-1, 1, local_unzip).nes."," then -
- X local_unzip = local_unzip + ","
- X$ endif
- X$ axp = f$getsyi("HW_MODEL").ge.1024
- X$ if axp
- X$ then
- X$ cc = "cc/standard=vaxc/ansi/nowarnings/include=[]"
- X$ defs = "''local_unzip'MODERN"
- X$ opts = ""
- X$ else
- X$ defs = "''local_unzip'VMS"
- X$ opts = ",[.VMS]VMSSHARE.OPT/OPTIONS"
- X$ if (f$search("SYS$SYSTEM:VAXC.EXE").eqs."" .and. -
- X f$trnlnm("GNU_CC").nes."") .or. (p1.eqs."GCC")
- X$ then
- X$ cc = "gcc"
- X$ opts = "''opts',GNU_CC:[000000]GCCLIB.OLB/LIB"
- X$ else
- X$ cc = "cc"
- X$ endif
- X$ endif
- X$ def = "/define=(''defs')"
- X$ old_ver = f$ver(1) ! Turn echo on to see what's happening
- X$ on error then goto error
- X$ on control_y then goto error
- X$ !
- X$ x = ""
- X$ if f$search("SYS$LIBRARY:SYS$LIB_C.TLB").nes."" then -
- X x = "+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY"
- X$ 'CC'/NOLIST'DEF' /OBJ=UNZIP.OBJ UNZIP.C
- X$ 'CC'/NOLIST'DEF' /OBJ=CRYPT.OBJ CRYPT.C
- X$ 'CC'/NOLIST'DEF' /OBJ=ENVARGS.OBJ ENVARGS.C
- X$ 'CC'/NOLIST'DEF' /OBJ=EXPLODE.OBJ EXPLODE.C
- X$ 'CC'/NOLIST'DEF' /OBJ=EXTRACT.OBJ EXTRACT.C
- X$ 'CC'/NOLIST'DEF' /OBJ=FILE_IO.OBJ FILE_IO.C
- X$ 'CC'/NOLIST'DEF' /OBJ=INFLATE.OBJ INFLATE.C
- X$ 'CC'/NOLIST'DEF' /OBJ=MATCH.OBJ MATCH.C
- X$ 'CC'/NOLIST'DEF' /OBJ=UNREDUCE.OBJ UNREDUCE.C
- X$ 'CC'/NOLIST'DEF' /OBJ=UNSHRINK.OBJ UNSHRINK.C
- X$ 'CC'/NOLIST'DEF' /OBJ=ZIPINFO.OBJ ZIPINFO.C
- X$ 'CC'/INCLUDE=SYS$DISK:[]'DEF' /OBJ=[.VMS]VMS.OBJ; [.VMS]VMS.C'x'
- X$ !
- X$ local_unzip = f$edit(local_unzip,"UPCASE,TRIM")
- X$ if f$locate("VMSCLI",local_unzip).ne.f$length(local_unzip)
- X$ then
- X$ 'CC'/INCLUDE=SYS$DISK:[]'DEF' /OBJ=[.VMS]CMDLINE.OBJ; [.VMS]CMDLINE.C'x'
- X$ 'CC'/INCLUDE=SYS$DISK:[]/DEF=('DEFS',SFX) /OBJ=[.VMS]CMDLINE_.OBJ; -
- X [.VMS]CMDLINE.C'x'
- X$ set command/obj=[.vms]unz_cld.obj [.vms]unz_cld.cld
- X$ cliobjs = ",[.vms]cmdline.obj, [.vms]unz_cld.obj"
- X$ cliobjx = ",[.vms]cmdline_.obj, [.vms]unz_cld.obj"
- X$ set default [.vms]
- X$ edit/tpu/nosection/nodisplay/command=cvthelp.tpu unzip_cli.help
- X$ set default [-]
- X$ runoff/out=unzip.hlp [.vms]unzip_cli.rnh
- X$ else
- X$ cliobjs = ""
- X$ cliobjx = ""
- X$ runoff/out=unzip.hlp [.vms]unzip_def.rnh
- X$ endif
- X$ !
- X$ LINK /NOTRACE/EXE=UNZIP.EXE unzip.obj;, crypt.obj;, envargs.obj;, -
- X explode.obj;, extract.obj;, file_io.obj;, inflate.obj;, match.obj;, -
- X unreduce.obj;, unshrink.obj;, zipinfo.obj;, [.VMS]vms.obj; -
- X 'cliobjs' 'opts', [.VMS]unzip.opt/opt
- X$ !
- X$ 'CC'/DEF=('DEFS',SFX)/NOLIST /OBJ=UNZIPSFX.OBJ UNZIP.C
- X$ 'CC'/DEF=('DEFS',SFX)/NOLIST /OBJ=EXTRACT_.OBJ EXTRACT.C
- X$ 'CC'/DEF=('DEFS',SFX)/INCLUDE=SYS$DISK:[] /OBJ=[.VMS]VMS_.OBJ; [.VMS]VMS.C'x'
- X$ LINK /NOTRACE/EXE=UNZIPSFX.EXE unzipsfx.obj;, crypt.obj;, extract_.obj;, -
- X file_io.obj;, inflate.obj;, match.obj;, [.VMS]vms_.obj; -
- X 'cliobjx' 'opts', [.VMS]unzipsfx.opt/opt
- X$ !
- X$ ! Next line: put similar lines (full pathname for unzip.exe) in
- X$ ! login.com. Remember to include the leading "$" before disk name.
- X$ !
- X$! unzip == "$''here'unzip.exe" ! set up symbol to use unzip
- X$! zipinfo == "$''here'unzip.exe ""-Z""" ! set up symbol to use zipinfo
- X$ !
- X$error:
- X$ tmp = f$ver(old_ver)
- X$ exit
- END_OF_FILE
- if test 3756 -ne `wc -c <'unzip-5.12/vms/make.com'`; then
- echo shar: \"'unzip-5.12/vms/make.com'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/make.com'
- fi
- if test -f 'unzip-5.12/vms/unz_cld.cld' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/unz_cld.cld'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/unz_cld.cld'\" \(1711 characters\)
- sed "s/^X//" >'unzip-5.12/vms/unz_cld.cld' <<'END_OF_FILE'
- X Module VMS_UNZIP_CLD
- X Ident "01-000"
- X
- XDefine Verb UNZIP
- X Parameter P1, Label=ZIPFILE, Prompt="Zip file"
- X Parameter P2, Label=INFILE, VALUE(LIST), Prompt="Files to UnZip"
- X Qualifier TEXT, Negatable
- X Qualifier AUTOTEXT, Negatable
- X Qualifier SCREEN, Negatable
- X Qualifier DIRECTORY, VALUE(REQUIRED,TYPE=$FILE), Nonnegatable
- X Qualifier FRESHEN, Negatable
- X Qualifier JUNK, Negatable
- X Qualifier LIST, Nonnegatable
- X Qualifier BRIEF, Nonnegatable, Default
- X Qualifier FULL, Nonnegatable
- X Qualifier OVERWRITE, Negatable
- X Qualifier QUIET, Nonnegatable
- X Qualifier SUPER_QUIET, Nonnegatable
- X Qualifier TEST, Negatable
- X Qualifier TYPE, Nonnegatable
- X Qualifier PIPE, Nonnegatable
- X Qualifier UPPERCASE, Negatable
- X Qualifier UPDATE, Negatable
- X Qualifier VERSION, Negatable
- X Qualifier VERBOSE, Nonnegatable
- X Qualifier RESTORE, Negatable
- X Qualifier COMMENT, Negatable
- X Qualifier EXCLUDE, VALUE(LIST), Nonnegatable
- X Qualifier CASE_INSENSITIVE, Negatable
- X Qualifier LOWERCASE, Negatable
- X Qualifier YYZ, NonNegatable, Default
- X Qualifier ZIPINFO, Syntax=INFORMATION, NonNegatable
- X DisAllow BRIEF and FULL
- X DisAllow DIRECTORY and SCREEN
- X
- XDefine Type COMMENTS_KEYWORDS
- X Keyword ZIP_FILE, DEFAULT
- X Keyword FILES
- X
- XDefine Syntax INFORMATION
- X Parameter P1, Label=ZIPFILE, Prompt="Zip file"
- X Parameter P2, Label=INFILE, VALUE(LIST), Prompt="Files to display"
- X Qualifier ZIPINFO, NonNegatable, Default
- X Qualifier SHORT, Nonnegatable
- X Qualifier MEDIUM, Nonnegatable
- X Qualifier LONG, Nonnegatable
- X Qualifier VERBOSE, Nonnegatable
- X Qualifier HEADER, Nonnegatable
- X Qualifier COMMENT, Nonnegatable
- X Qualifier TOTALS, Nonnegatable
- X Qualifier TIMES, Nonnegatable
- X Qualifier EXCLUDE, VALUE(LIST), Nonnegatable
- X Qualifier ONE_LINE, Nonnegatable
- END_OF_FILE
- if test 1711 -ne `wc -c <'unzip-5.12/vms/unz_cld.cld'`; then
- echo shar: \"'unzip-5.12/vms/unz_cld.cld'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/unz_cld.cld'
- fi
- if test -f 'unzip-5.12/zip.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/zip.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/zip.h'\" \(442 characters\)
- sed "s/^X//" >'unzip-5.12/zip.h' <<'END_OF_FILE'
- X/* This is a dummy zip.h to allow crypt.c from Zip to compile for UnZip */
- X
- X#ifndef __zip_h /* don't include more than once */
- X#define __zip_h
- X
- X#include "unzip.h"
- X
- X#define decrypt_member decrypt /* for compatibility with zcrypt20 */
- X#define local static
- X#define CRC32(c, b) (crc_32_tab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
- X
- X#ifdef FUNZIP
- X extern ulg near crc_32_tab[];
- X#else
- X extern ulg *crc_32_tab;
- X#endif
- X
- X#endif /* !__zip_h */
- END_OF_FILE
- if test 442 -ne `wc -c <'unzip-5.12/zip.h'`; then
- echo shar: \"'unzip-5.12/zip.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/zip.h'
- fi
- echo shar: End of archive 19 \(of 20\).
- cp /dev/null ark19isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 20 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-