home *** CD-ROM | disk | FTP | other *** search
- From: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
- Newsgroups: comp.sources.misc
- Subject: v44i083: unzip - Info-ZIP portable UnZip, version 5.12, Part18/20
- Date: 18 Sep 1994 23:17:01 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <35j3bt$qro@sparky.sterling.com>
- X-Md4-Signature: 1aee4ead345db0e5b7a110a0cfc34bbd
-
- Submitted-by: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
- Posting-number: Volume 44, Issue 83
- Archive-name: unzip/part18
- 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/BUGS unzip-5.12/History.512
- # unzip-5.12/amiga/SMakeFile unzip-5.12/envargs.c
- # unzip-5.12/os2/unzip16.def unzip-5.12/tables.h
- # unzip-5.12/tops20/tops20.c unzip-5.12/unix/funzip.1
- # unzip-5.12/unreduce.c unzip-5.12/vms/README
- # unzip-5.12/vms/cvthelp.tpu unzip-5.12/vms/descrip.mms
- # unzip-5.12/vms/unzip_def.rnh
- # Wrapped by kent@sparky on Sat Sep 17 23:33:48 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 18 (of 20)."'
- if test -f 'unzip-5.12/BUGS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/BUGS'\"
- else
- echo shar: Extracting \"'unzip-5.12/BUGS'\" \(4786 characters\)
- sed "s/^X//" >'unzip-5.12/BUGS' <<'END_OF_FILE'
- XBogus bugs (not our fault!):
- X---------------------------
- X
- X By far THE BIGGEST source of bug reports to Info-ZIP/zip-bugs is the
- X incorrect transfer of zipfiles (or of the UnZip executable itself).
- X ALWAYS TRANSFER IN BINARY MODE! This includes ftp transfers and *both*
- X ends of a Kermit connection ("set file type binary"). If your copy
- X isn't exactly the same size as the original, you made a mistake.
- X
- X Another common source of errors such as "compression method 8 not sup-
- X ported" is the existence of an old version of UnZip somewhere in your
- X path. Make sure you're using the version you think you're using; give
- X the full path explicitly if necessary. Executing "unzip" without any
- X options will print a help screen, at the top of which is the UnZip
- X version number and release date; and executing "unzip -v" without any
- X zipfile or other options will give information about what compiler was
- X used, the target operating system, any special UnZip options, and the
- X date of compilation--only for version 5.11 and later, though! (Also,
- X under Unix C shell and some Bourne shells, "which unzip" will print
- X the path of the unzip you're actually using. Under OS/2 and MS-DOS,
- X whch21gr.zip [on SimTel mirror sites] will do the same thing; in addi-
- X tion, "which -a unzip" will show *all* copies of unzip in your path.)
- X
- X
- XBugs (real and/or imagined):
- X---------------------------
- X
- X - MKS Korn shell: unzip assumes the MKS-style command-line environment
- X options are relevant to it, but this is not the case if unzip was called
- X by another program (e.g., from a .BAT file). A fix for this exists for
- X Borland compilers but not for MSC, Watcom, djgpp, etc.
- X - OS/2: for paths with one long component, the .LONGNAME EA may be saved for
- X all components (waste of disk space): how to check??
- X - VMS: for extracting to other directories, only the VMS-style "-d [.foo]"
- X format is accepted; "-d foo" should also be allowed. Long filenames are
- X not automatically truncated to 39.39. Even with -o specified, the user
- X is queried before overwriting; without -o, there are two levels of query.
- X - Novell Netware: Netware drives may clear the archive bit on extracted
- X files under OS/2 and/or MS-DOS. UnZip always *tries* to set the archive
- X bit, however. [pynq@uchicago, 940527]
- X - DEC Ultrix: on long zipfiles, unzip will sometimes fail (bad CRC, not always
- X reproducible); this is apparently due either to a hardware bug (cache mem)
- X or OS bug (page faults?) [Igor, Jean-loup, bottom of BUGS.long]
- X - Pyramid: USE_FWRITE causes CRC errors (???) [Kevin]
- X - funzip/more/decryption/no-echo bug: race condition(?) causes terminal to
- X be "reset" to no-echo state
- X - directory dates/times (special Unix perms?) not restored
- X - Macintosh (100200), Atari (020000) external file attributes not interpreted
- X correctly (both unzip and zipinfo)
- X - pkbug error: zipfile with incorrect csize and/or ucsize--check for end of
- X compressed (csize) data in uncompression routines:
- X unreduce.c: while (((outpos + outcnt) < ucsize) && (!zipeof)) {
- X [James Birdsall, Mark, bottom of BUGS.long]
- X - OS/2: directory EAs not restored if directory exists [Kai Uwe, KG27515@uark]
- X (subsequent note: no way to determine which EAs are newer ==> cannot
- X restore without user input)
- X - MS-DOS: Borland executables don't allow other than 80-column, 25/43/50-line
- X screen modes (Borland bug) [Michael Stillwell]
- X
- X
- XFeatures (possible and/or definite):
- X-----------------------------------
- X
- X - put man pages in more "proper" nroff format
- X - ignore case for internal filename match on non-Unix systems, unless file-
- X specs enclosed in single quotes
- X - save/extract Unix mtime/ctime/atime/UID/GID info (Unix extra field)
- X - modify to decompress input stream if part of a pipe, but continue using
- X central directory if not (BIG job!)--extended local header capability
- X - add zipinfo option(s) to sort alphabetically, by date/time, in reverse, etc.
- X - add "near" to global vars [Steve Salisbury, 92.4.21]
- X - modify set_file_time routines to share common code (macro?)
- X - when listing filenames, use '?' for non-printables? [Thomas Wolff, 92.6.1]
- X - add zipinfo "in-depth" option? (check local vs. central filenames, etc.)
- X - create zipcat program to concatenate zipfiles
- X - assembly-language routines?
- X - VM/CMS version (Walter Moore, Phil Howard, Chua Kong Sian, others)
- X - add -oo option (overwrite and override)? no user queries (if bad password,
- X skip file; if disk full, take default action; if VMS special on non-VMS,
- X unpack anyway; etc.)
- X - add -Q[Q[Q]] option (quiet mode on comments, cautions, warnings and errors)?
- X forget -oo, or make synonym? Default level -Q?
- X - add OS/2 .INF format helpfiles for UnZip and ZipInfo?
- END_OF_FILE
- if test 4786 -ne `wc -c <'unzip-5.12/BUGS'`; then
- echo shar: \"'unzip-5.12/BUGS'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/BUGS'
- fi
- if test -f 'unzip-5.12/History.512' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/History.512'\"
- else
- echo shar: Extracting \"'unzip-5.12/History.512'\" \(4654 characters\)
- sed "s/^X//" >'unzip-5.12/History.512' <<'END_OF_FILE'
- XUnZip, version 5.12, 28 August 1994
- X
- XNew features, you betcha:
- X
- X5.12a:
- X - added zipinfo patch for empty space within zipfile (Novell/PKZIP bug); moved
- X newzip variable out of crypt.[ch] [CN]
- X - MS-DOS, OS/2: added EMX, EMXOPT, GO32 and GO32TMP environment-variable info
- X to unzip -v output [CN]
- X - OS/2: replaced watcom.dif with wat_met.dif (support for Metaware C++ as
- X well as 16/32-bit Watcom) [Kai Uwe]
- X5.12b:
- X - added another acknowledgment example to COPYING [CN]
- X - VMS: modified VMSWILD to use () instead of [] for sets; had been disallowed
- X entirely [Charles Bailey, CN]
- X - VMS: added .hlp file for unzipsfx and MAKESFX.COM script [Martin Zinser]
- X5.12c:
- X - MS-DOS: updated README with djgpp 1.12 and QEMM 7.04 info [CN, Kevin
- X Fritz]
- X - added timezone-debugging code to file_io.c (define DEBUG_TIME) [CN]
- X - MS-DOS: updated gcc_dos Makefile target and README to include notes about
- X GNU make and djgpp timezone bugs [CN]
- X - changed "unzip -v" to print only version*100 if -qqqq (or greater) [CN]
- X - changed all putc/putchar calls to PUTC macro for future DLL use [CN]
- X - Unix, NT: changed all local printf/fprintf calls to macros; deleted a bunch
- X of OS/2 stuff in nt.c [CN]
- X - updated README to note Kevin's finding: 32-bit DOS UnZip *faster* than
- X PKUNZIP on most archives...whoa. [CN, Keven F]
- X - added SFX_EXDIR option to allow use of -d in UnZipSFX [CN]
- X5.12d:
- X - Mac: updated version numbers in *.hqx files [Antoine]
- X - MS-DOS: added _gcc_dos_new sub-target to unix/Makefile, to be used when
- X djgpp 1.12m1 is released (new coff2exe -g option) [CN]
- X - added AOL info to Where file [Audrey Beck, CN]
- X - removed obsolete DEBUG_STRUC code [CN]
- X - added regulus target and zstat() function [Paul Klahr, CN]
- X - updated docs, version numbers for release [CN]
- X - VMS: last(!) Ident and clean: tweaks [Igor, Christian, Hunter]
- X5.12e:
- X - Unix: changed "strip" to "$(STRIP)" for easier debugging [Marty Leisner]
- X - MS-DOS: updated msdos/README with djgpp 1.12m1 timezone fixes info [CN]
- X
- XBugs fixed:
- X
- X5.12a:
- X - ifdef'd two unused string variables in non-crypt extract.c [CN]
- X - put newzip back into crypt.h: CRYPT not yet defined in unzip.h [CN]
- X - fixed unzipsfx bug: first filespec ignored [Paul Weiss, CN]
- X - updated unzipsfx man page to note problem with "foo -x *.c" [CN, Paul Weiss]
- X5.12b:
- X - VMS: updated Where file entry for VMS ftp sites [Brian Tillman, Hunter]
- X - updated README.CR and INSTALL to note that zipcloak is for zip sources only
- X [CN, Richard Lloyd]
- X - fixed -d bug w.r.t. extraction to / (all but VMS, TOPS-20) [CN, Piet]
- X - Amiga, Mac, etc.: fixed non-OLD_EXDIR bug [CN]
- X - OS/2, MS-DOS: removed left-over EMX,EMXOPT notes [CN]
- X - VMS: fixed VMS_SEVERITY return values [Charles Bailey]
- X - VMS: fixed(?) MAKE.COM to check for DEC C and use VAXC option [CN, Hunter]
- X5.12c:
- X - VMS: fixed various descrip.mms bugs [Christian Spieler]
- X - MS-DOS: added LOCAL_UNZIP support to makefile.msc and makefile.bc;
- X fixed MED_MEM typo in unzip.h [Christian]
- X - moved extern declaration of CompiledWith[] from unzip.h into local files
- X (avoid VMS warnings) [CN, Christian]
- X - fixed one overlooked fprintf/FPRINTF macro in unzip.h [CN]
- X - VMS: fixed /DIRECTORY bug; fixed __DEBUG__ stuff in descrip.mms [Igor]
- X - VMS: tweaked RETURN_SEVERITY levels some more [CN, Christian, Igor, Rodney]
- X - documented -b option in unzip.1 and UnZipSFX usage line [CN]
- X - fixed a bunch of broken Trace() statements in extract.c [Christian]
- X5.12c2:
- X - VMS: real fix for do_wild() bug [Christian]
- X5.12d:
- X - swapped two PUTC's for a PRINTF in zipinfo.c [CN]
- X - VMS: removed incorrect Where file info [Hunter]
- X - VMS: fixed do_wild() and descrip.mms again [Christian, CN]
- X - MS-DOS: updated INSTALL and Makefile to note problems with long command
- X lines and LOCAL_UNZIP [Piet, CN]
- X - VMS: fixed make.com [Rodney, Hunter, CN, Christian]
- X - VMS: fixed cmdline.c double usage() bug with unzipsfx, VMSCLI [Rodney, CN]
- X - VMS: added lots of typecasts and fixed some initializers for DEC C; added
- X a newline to an inflate.c debug line [Christian]
- X - MS-DOS: improved gcc_dos target's creation of empty zipinfo file via FIND
- X instead of COPY [Jean-loup, Kai Uwe]
- X - added some more typecasts [CN, Kai Uwe]
- X5.12e:
- X - fixed explode.c comment (long-lost patch from Feb 93, blush...) [Mark]
- X - VMS: fixed makefiles for unzipsfx+VMSCLI [CN, Hunter]
- X
- X==================
- X
- XThese changes occurred in beta versions 5.12a to 5.12e. This list may have
- Xleft out some bugfixes and even some features...the brain cell is going,
- Xfolks (as Mark would say). Apologies, etc.
- X
- XGreg Roelofs (a.k.a. Cave Newt)
- END_OF_FILE
- if test 4654 -ne `wc -c <'unzip-5.12/History.512'`; then
- echo shar: \"'unzip-5.12/History.512'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/History.512'
- fi
- if test -f 'unzip-5.12/amiga/SMakeFile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/SMakeFile'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/SMakeFile'\" \(4286 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/SMakeFile' <<'END_OF_FILE'
- X#===========================================================================
- X# Makefile for UnZip, ZipInfo & fUnZip: AMIGA SAS/C Version 6.x
- X# Version: 5.11 9 July 1993
- X#===========================================================================
- X# John Bush <john.bush@east.sun.com> last modified: 10 Jul 94
- X#---------------------------------------------------------------------------
- X
- X#####################
- X# MACRO DEFINITIONS #
- X#####################
- X
- X# Compiler and loader debug flags. Uncomment as needed. Recomment when done.
- X#
- X# CDBG = DEBUG=L DEF=DEBUG
- X# LDBG = ADDSYM
- X# LMAP = MAP AMIGA/UNZIP.MAP
- X
- X# Compiler definitions
- X#
- XCC = sc
- X#
- XOPT = OPT OPTINL OPTINLOCAL OPTTIME OPTCOMP=5 OPTDEP=5 OPTRDEP=5
- X#
- X# Choose one DATAOPTS & SASLIB. NOTE! only DATA=FAR is known to work!
- X#
- XDATAOPTS = DATA=FAR # link with SCNB.lib
- XSASLIB = scnb
- X# DATAOPTS = DATA=FAR SINT # link with SCSNB.lib [not working yet!]
- X# SASLIB = scsnb
- X# DATAOPTS = DATA=NEAR # link with SC.lib
- X# SASLIB = sc
- X#
- XCDEFINES = DEF=AMIGA DEF=PROTO
- XCOPTIONS = $(DATAOPTS) NOSTKCHK STRMERGE CPU=ANY CODE=NEAR NMINC UNSCHAR
- XCOPTIONS = $(COPTIONS) ERRORREXX NOERRORCONSOLE NOICONS
- X#
- XCFLAGS = $(CDEFINES) $(COPTIONS) $(CDBG) $(OPT)
- X
- X# Linker definitions
- X# See SASLIB definition above
- X#
- XLD = slink
- XLDFLAGS = FROM LIB:c.o
- XLDFLAGS2 = NOICONS $(LDBG) $(LMAP)
- XLIBFLAGS = LIB LIB:$(SASLIB).lib+LIB:amiga.lib
- X
- X# UnZip Objects
- X#
- XOBJS1 = unzip.o crypt.o envargs.o explode.o extract.o file_io.o
- XOBJS2 = inflate.o match.o unreduce.o unshrink.o zipinfo.o
- XOBJSA = amiga.o
- XOBJS = $(OBJS1) $(OBJS2) $(OBJSA)
- XLOBJS = $(OBJS)
- X
- X# UnZipSFX Objects
- XOBJX = unzip_x.o crypt.o extract_x.o file_io.o inflate.o match.o amiga_x.o
- X
- X# fUnZip Objects
- XOBJF = funzip.o crypt_f.o inflate_f.o
- X
- X# Output targets
- XUNZIPS = unzip unzipsfx funzip
- X
- X# Temp filename for object lists to load using linker "WITH" command.
- XOBJLIST = ram:OBJLIST.TMP
- X
- X#######################################
- X# DEFAULT TARGET AND PROCESSING RULES #
- X#######################################
- X
- Xall: $(UNZIPS)
- X
- X.c.o :
- X $(CC) $(CFLAGS) OBJNAME=$@ $*.c
- X
- X
- X#########################
- X# Final output targets. #
- X#########################
- X
- X# NOTE: When generating MAP files, don't make "all" because only the last
- X# map generated will be the one that remains after this is finished.
- X# Or, put specific MAP statements in below for each.
- X
- Xunzip: $(OBJS)
- X echo "$(OBJS)" >$(OBJLIST)
- X $(LD) TO UnZip $(LDFLAGS) WITH $(OBJLIST) $(LIBFLAGS) $(LDFLAGS2)
- X
- Xunzipsfx: $(OBJX)
- X echo "$(OBJX)" >$(OBJLIST)
- X $(LD) TO UnZipSFX $(LDFLAGS) WITH $(OBJLIST) $(LIBFLAGS) $(LDFLAGS2)
- X
- Xfunzip: $(OBJF)
- X echo "$(OBJF)" >$(OBJLIST)
- X $(LD) TO fUnZip $(LDFLAGS) WITH $(OBJLIST) $(LIBFLAGS) $(LDFLAGS2)
- X
- Xclean:
- X -delete >nil: $(OBJS1)
- X -delete >nil: $(OBJS2)
- X -delete >nil: $(OBJSA)
- X -delete >nil: $(OBJF)
- X
- Xspotless: clean
- X -delete >nil: UnZip UnZipSFX fUnZip
- X
- X# special rules for objects used in UnZipSFX and fUnZip
- X#
- Xunzip_x.o: unzip.c unzip.h version.h
- X $(CC) DEF=SFX $(CFLAGS) OBJNAME=unzip_x.o unzip.c
- X
- Xextract_x.o: extract.c unzip.h crypt.h
- X $(CC) DEF=SFX $(CFLAGS) OBJNAME=extract_x.o extract.c
- X
- Xamiga_x.o: amiga/amiga.c amiga/amiga.h
- X $(CC) DEF=SFX $(CFLAGS) OBJNAME=amiga_x.o amiga/amiga.c
- X
- Xcrypt_f.o: crypt.c unzip.h zip.h crypt.h
- X $(CC) DEF=FUNZIP $(CFLAGS) OBJNAME=crypt_f.o crypt.c
- X
- Xinflate_f.o: inflate.c inflate.h unzip.h crypt.h
- X $(CC) DEF=FUNZIP $(CFLAGS) OBJNAME=inflate_f.o inflate.c
- X
- X# objects common to all revisions/ports:
- 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
- Xshared.o: shared.c unzip.h
- Xunreduce.o: unreduce.c unzip.h
- Xunshrink.o: unshrink.c unzip.h
- Xunzip.o: unzip.c unzip.h version.h
- Xzipinfo.o: zipinfo.c unzip.h
- X
- X
- X# objects specific to Amiga
- Xamiga.o: amiga/amiga.c amiga/amiga.h
- X
- END_OF_FILE
- if test 4286 -ne `wc -c <'unzip-5.12/amiga/SMakeFile'`; then
- echo shar: \"'unzip-5.12/amiga/SMakeFile'\" unpacked with wrong size!
- fi
- chmod +x 'unzip-5.12/amiga/SMakeFile'
- # end of 'unzip-5.12/amiga/SMakeFile'
- fi
- if test -f 'unzip-5.12/envargs.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/envargs.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/envargs.c'\" \(6181 characters\)
- sed "s/^X//" >'unzip-5.12/envargs.c' <<'END_OF_FILE'
- X/*----------------------------------------------------------------*
- X | envargs - add default options from environment to command line
- X |----------------------------------------------------------------
- X | Author: Bill Davidsen, original 10/13/91, revised 23 Oct 1991.
- X | This program is in the public domain.
- X |----------------------------------------------------------------
- X | Minor program notes:
- X | 1. Yes, the indirection is a tad complex
- X | 2. Parenthesis were added where not needed in some cases
- X | to make the action of the code less obscure.
- X | 3. Set tabsize to four to make this pretty
- X |----------------------------------------------------------------
- X | UnZip notes: 24 May 92 ("v1.4"):
- X | 1. #include "unzip.h" for prototypes (24 May 92)
- X | 2. changed ch to type char (24 May 92)
- X | 3. added an ifdef to avoid Borland warnings (24 May 92)
- X | 4. included Rich Wales' mksargs() routine (for MS-DOS, maybe
- X | OS/2? NT?) (4 Dec 93)
- X | 5. added alternate-variable string envstr2 (21 Apr 94)
- X *----------------------------------------------------------------*/
- X
- X
- X#include "unzip.h"
- X
- Xstatic int count_args __((char *));
- Xstatic void mem_err __((void));
- X
- X#if (defined(SCCS) && !defined(lint)) /* causes warnings: annoying */
- X static char *SCCSid = "@(#)envargs.c 1.3 23 Oct 1991";
- X#endif
- X
- Xstatic char Far NoMemArguments[] = "envargs: can't get memory for arguments";
- X
- X
- X
- Xvoid envargs(Pargc, Pargv, envstr, envstr2)
- X int *Pargc;
- X char ***Pargv, *envstr, *envstr2;
- X{
- X char *getenv();
- X char *envptr; /* value returned by getenv */
- X char *bufptr; /* copy of env info */
- X int argc = 0; /* internal arg count */
- X char ch; /* spare temp value */
- X char **argv; /* internal arg vector */
- X char **argvect; /* copy of vector address */
- X
- X /* see if anything in either of valid environment variables */
- X if ((envptr = getenv(envstr)) == (char *)NULL || *envptr == 0)
- X if ((envptr = getenv(envstr2)) == (char *)NULL || *envptr == 0)
- X return;
- X
- X /* count the args so we can allocate room for them */
- X argc = count_args(envptr);
- X bufptr = (char *)malloc(1+strlen(envptr));
- X if (bufptr == (char *)NULL)
- X mem_err();
- X strcpy(bufptr, envptr);
- X
- X /* allocate a vector large enough for all args */
- X argv = (char **)malloc((argc+*Pargc+1)*sizeof(char *));
- X if (argv == (char **)NULL)
- X mem_err();
- X argvect = argv;
- X
- X /* copy the program name first, that's always true */
- X *(argv++) = *((*Pargv)++);
- X
- X /* copy the environment args next, may be changed */
- X do {
- X *(argv++) = bufptr;
- X /* skip the arg and any trailing blanks */
- X while (((ch = *bufptr) != '\0') && ch != ' ')
- X ++bufptr;
- X if (ch == ' ')
- X *(bufptr++) = '\0';
- X while (((ch = *bufptr) != '\0') && ch == ' ')
- X ++bufptr;
- X } while (ch);
- X
- X /* now save old argc and copy in the old args */
- X argc += *Pargc;
- X while (--(*Pargc))
- X *(argv++) = *((*Pargv)++);
- X
- X /* finally, add a NULL after the last arg, like UNIX */
- X *argv = (char *)NULL;
- X
- X /* save the values and return */
- X *Pargv = argvect;
- X *Pargc = argc;
- X}
- X
- X
- X
- Xstatic int count_args(s)
- X char *s;
- X{
- X int count = 0;
- X char ch;
- X
- X do {
- X /* count and skip args */
- X ++count;
- X while (((ch = *s) != '\0') && ch != ' ')
- X ++s;
- X while (((ch = *s) != '\0') && ch == ' ')
- X ++s;
- X } while (ch);
- X
- X return count;
- X}
- X
- X
- X
- Xstatic void mem_err()
- X{
- X perror(LoadFarString(NoMemArguments));
- X exit(2);
- X}
- X
- X
- X
- X#ifdef TEST
- X
- Xmain(argc, argv)
- X int argc;
- X char **argv;
- X{
- X int i;
- X
- X printf("Orig argv: %p\n", argv);
- X dump_args(argc, argv);
- X envargs(&argc, &argv, "ENVTEST");
- X printf(" New argv: %p\n", argv);
- X dump_args(argc, argv);
- X}
- X
- X
- X
- Xdump_args(argc, argv)
- X int argc;
- X char *argv[];
- X{
- X int i;
- X
- X printf("\nDump %d args:\n", argc);
- X for (i = 0; i < argc; ++i)
- X printf("%3d %s\n", i, argv[i]);
- X}
- X
- X#endif /* TEST */
- X
- X
- X
- X#ifdef MSDOS /* DOS_OS2? DOS_NT_OS2? */
- X
- X/*
- X * void mksargs(int *argcp, char ***argvp)
- X *
- X * Substitutes the extended command line argument list produced by
- X * the MKS Korn Shell in place of the command line info from DOS.
- X *
- X * The MKS shell gets around DOS's 128-byte limit on the length of
- X * a command line by passing the "real" command line in the envi-
- X * ronment. The "real" arguments are flagged by prepending a tilde
- X * (~) to each one.
- X *
- X * This "mksargs" routine creates a new argument list by scanning
- X * the environment from the beginning, looking for strings begin-
- X * ning with a tilde character. The new list replaces the original
- X * "argv" (pointed to by "argvp"), and the number of arguments
- X * in the new list replaces the original "argc" (pointed to by
- X * "argcp").
- X *
- X * Rich Wales
- X */
- Xvoid mksargs(argcp, argvp)
- X int *argcp;
- X char ***argvp;
- X{
- X#ifndef MSC /* declared differently in MSC 7.0 headers, at least */
- X extern char **environ; /* environment */
- X#endif
- X char **envp; /* pointer into environment */
- X char **newargv; /* new argument list */
- X char **argp; /* pointer into new arg list */
- X int newargc; /* new argument count */
- X
- X /* sanity check */
- X if (environ == NULL || argcp == NULL || argvp == NULL || *argvp == NULL)
- X return;
- X
- X /* find out how many environment arguments there are */
- X for (envp = environ, newargc = 0; *envp != NULL && (*envp)[0] == '~';
- X envp++, newargc++)
- X ;
- X if (newargc == 0)
- X return; /* no environment arguments */
- X
- X /* set up new argument list */
- X newargv = (char **) malloc(sizeof(char **) * (newargc+1));
- X if (newargv == NULL)
- X return; /* malloc failed */
- X
- X for (argp = newargv, envp = environ; *envp != NULL && (*envp)[0] == '~';
- X *argp++ = &(*envp++)[1])
- X ;
- X *argp = NULL; /* null-terminate the list */
- X
- X /* substitute new argument list in place of old one */
- X *argcp = newargc;
- X *argvp = newargv;
- X}
- X
- X#endif /* MSDOS */
- END_OF_FILE
- if test 6181 -ne `wc -c <'unzip-5.12/envargs.c'`; then
- echo shar: \"'unzip-5.12/envargs.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/envargs.c'
- fi
- if test -f 'unzip-5.12/os2/unzip16.def' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/os2/unzip16.def'\"
- else
- echo shar: Extracting \"'unzip-5.12/os2/unzip16.def'\" \(106 characters\)
- sed "s/^X//" >'unzip-5.12/os2/unzip16.def' <<'END_OF_FILE'
- XNAME WINDOWCOMPAT NEWFILES
- XDESCRIPTION 'The world-famous Info-ZIP unarchiving utilities'
- XSTACKSIZE 0x2000
- END_OF_FILE
- if test 106 -ne `wc -c <'unzip-5.12/os2/unzip16.def'`; then
- echo shar: \"'unzip-5.12/os2/unzip16.def'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/os2/unzip16.def'
- fi
- if test -f 'unzip-5.12/tables.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/tables.h'\"
- else
- echo shar: Extracting \"'unzip-5.12/tables.h'\" \(6079 characters\)
- sed "s/^X//" >'unzip-5.12/tables.h' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------
- X
- X tables.h
- X
- X This file contains only the 32-bit CRC table and the EBCDIC translation
- X table used in fUnZip and in UnZip's file_io.c; they're in a separate file
- X because they are rather big and ugly and because they get in the way dur-
- X ing editing. This file can be included in no more than ONE source file
- X per executable, of course.
- X
- X ---------------------------------------------------------------------------*/
- X
- X
- X#ifdef FUNZIP
- X
- X/* Table of CRC-32's of all single-byte values (made by makecrc.c) */
- Xulg near crc_32_tab[] = {
- X 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
- X 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
- X 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
- X 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
- X 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
- X 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
- X 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
- X 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
- X 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
- X 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
- X 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
- X 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
- X 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
- X 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
- X 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
- X 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
- X 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
- X 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
- X 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
- X 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
- X 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
- X 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
- X 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
- X 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
- X 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
- X 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
- X 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
- X 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
- X 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
- X 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
- X 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
- X 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
- X 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
- X 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
- X 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
- X 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
- X 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
- X 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
- X 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
- X 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
- X 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
- X 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
- X 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
- X 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
- X 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
- X 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
- X 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
- X 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
- X 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
- X 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
- X 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
- X 0x2d02ef8dL
- X};
- X
- X#endif /* FUNZIP */
- X
- X
- X
- X#ifdef EBCDIC
- X
- X/*
- X * This is the MTS ASCII->EBCDIC translation table. It provides a 1-1
- X * translation from ISO 8859/1 8-bit ASCII to IBM Code Page 37 EBCDIC.
- X */
- X
- Xunsigned char ebcdic[] =
- X{
- X 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f,
- X 0x16, 0x05, 0x25, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- X 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26,
- X 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f,
- X 0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d,
- X 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61,
- X 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- X 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f,
- X 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- X 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,
- X 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6,
- X 0xe7, 0xe8, 0xe9, 0xba, 0xe0, 0xbb, 0xb0, 0x6d,
- X 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- X 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
- X 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
- X 0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x07,
- X 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17,
- X 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b,
- X 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08,
- X 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff,
- X 0x41, 0xaa, 0x4a, 0xb1, 0x9f, 0xb2, 0x6a, 0xb5,
- X 0xbd, 0xb4, 0x9a, 0x8a, 0x5f, 0xca, 0xaf, 0xbc,
- X 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3,
- X 0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab,
- X 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68,
- X 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77,
- X 0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf,
- X 0x80, 0xfd, 0xfe, 0xfb, 0xfc, 0xad, 0xae, 0x59,
- X 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48,
- X 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57,
- X 0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1,
- X 0x70, 0xdd, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf
- X};
- X
- X#endif /* EBCDIC */
- END_OF_FILE
- if test 6079 -ne `wc -c <'unzip-5.12/tables.h'`; then
- echo shar: \"'unzip-5.12/tables.h'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/tables.h'
- fi
- if test -f 'unzip-5.12/tops20/tops20.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/tops20/tops20.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/tops20/tops20.c'\" \(5608 characters\)
- sed "s/^X//" >'unzip-5.12/tops20/tops20.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------
- X
- X tops20.c
- X
- X TOPS20-specific routines for use with Info-ZIP's UnZip 5.1 and later.
- X
- X Contains: mapattr()
- X close_outfile()
- X version()
- X upper()
- X enquote()
- X dequote()
- X fnlegal()
- X
- X (not yet ported: do_wild(), mapname(), checkdir(), ...)
- X
- X ---------------------------------------------------------------------------*/
- X
- X
- X#include "unzip.h"
- X
- X
- X/**********************/
- X/* Function mapattr() */
- X/**********************/
- X
- Xint mapattr() /* just like Unix except no umask() */
- X{
- X ulg tmp = crec.external_file_attributes;
- X
- X switch (pInfo->hostnum) {
- X case UNIX_:
- X case VMS_:
- X pInfo->file_attr = (unsigned)(tmp >> 16);
- X break;
- X case AMIGA_:
- X tmp = (unsigned)(tmp>>1 & 7); /* Amiga RWE bits */
- X pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp);
- X break;
- X case FS_FAT_: /* MSDOS half of attributes should always be correct */
- X case FS_HPFS_:
- X case FS_NTFS_:
- X case MAC_:
- X case ATARI_:
- X case TOPS20_:
- X default:
- X tmp = !(tmp & 1) << 1; /* read-only bit --> write perms bits */
- X pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp);
- X break;
- X#if 0
- X case ATARI_:
- X case TOPS20_:
- X default:
- X pInfo->file_attr = 0666;
- X break;
- X#endif
- X } /* end switch (host-OS-created-by) */
- X
- X return 0;
- X
- X} /* end function mapattr() */
- X
- X
- X
- X
- X
- X/****************************/
- X/* Function close_outfile() */
- X/****************************/
- X
- Xvoid close_outfile()
- X{
- X# define JSYS_CLASS 0070000000000
- X# define FLD(val,mask) (((unsigned)(val)*((mask)&(-(mask))))&(mask))
- X# define _DEFJS(name,class) (FLD(class,JSYS_CLASS) | (monsym(name)&0777777))
- X# define IDTIM _DEFJS("IDTIM%", 1)
- X# define SFTAD _DEFJS("SFTAD%", 0)
- X# define YRBASE 1900
- X int ablock[5], tblock[2];
- X int yr, mo, dy, hh, mm, ss;
- X char temp[100];
- X unsigned tad;
- X
- X
- X /* dissect the date */
- X yr = ((lrec.last_mod_file_date >> 9) & 0x7f) + (1980 - YRBASE);
- X mo = (lrec.last_mod_file_date >> 5) & 0x0f;
- X dy = lrec.last_mod_file_date & 0x1f;
- X
- X /* dissect the time */
- X hh = (lrec.last_mod_file_time >> 11) & 0x1f;
- X mm = (lrec.last_mod_file_time >> 5) & 0x3f;
- X ss = (lrec.last_mod_file_time & 0x1f) * 2;
- X
- X sprintf(temp, "%02d/%02d/%02d %02d:%02d:%02d", mo, dy, yr, hh, mm, ss);
- X
- X ablock[1] = (int)(temp - 1);
- X ablock[2] = 0;
- X if (!jsys(IDTIM, ablock)) {
- X fprintf(stderr, "error: IDTIM failure for %s\n", filename);
- X fclose(outfile);
- X return;
- X }
- X
- X tad = ablock[2];
- X tblock[0] = tad;
- X tblock[1] = tad;
- X tblock[2] = -1;
- X
- X ablock[1] = fcntl(fileno(outfile), F_GETSYSFD, 0); /* _uffd[outfd]->uf_ch */
- X ablock[2] = (int) tblock;
- X ablock[3] = 3;
- X if (!jsys(SFTAD, ablock))
- X fprintf(stderr, "error: can't set the time for %s\n", filename);
- X
- X fclose(outfile);
- X
- X} /* end function close_outfile() */
- X
- X
- X
- X
- X
- X#ifndef SFX
- X
- X/************************/
- X/* Function version() */
- X/************************/
- X
- Xvoid version()
- X{
- X extern char Far CompiledWith[];
- X#if 0
- X char buf[40];
- X#endif
- X
- X printf(LoadFarString(CompiledWith),
- X
- X#ifdef __GNUC__
- X "gcc ", __VERSION__,
- X#else
- X# if 0
- X "cc ", (sprintf(buf, " version %d", _RELEASE), buf),
- X# else
- X# ifdef __COMPILER_KCC__
- X "KCC", "",
- X# else
- X "unknown compiler", "",
- X# endif
- X# endif
- X#endif
- X
- X "TOPS-20",
- X
- X#if defined(foobar) || defined(FOOBAR)
- X " (Foo BAR)", /* OS version or hardware */
- X#else
- X "",
- X#endif /* Foo BAR */
- X
- X#ifdef __DATE__
- X " on ", __DATE__
- X#else
- X "", ""
- X#endif
- X );
- X
- X} /* end function version() */
- X
- X#endif /* !SFX */
- X
- X
- X
- X
- X
- X/**********************/
- X/* Function upper() */
- X/**********************/
- X
- Xint upper(s) /* returns s in uppercase */
- X char *s; /* string to be uppercased */
- X{
- X for (; *s; ++s)
- X *s = toupper(*s);
- X}
- X
- X
- X
- X
- X
- X/************************/
- X/* Function enquote() */
- X/************************/
- X
- Xint enquote(s) /* calls dequote(s) to normalize string, then */
- X char *s; /* inserts ^Vs before otherwise illegal characters */
- X{ /* in s, assuming that s is a TOPS-20 filename */
- X char d[100];
- X char *p, *q;
- X char c;
- X
- X if (s && *s) {
- X dequote(s);
- X p = s - 1;
- X q = d - 1;
- X while (c = *++p) {
- X if (!fnlegal(c))
- X *++q = '\026';
- X *++q = c;
- X }
- X *++q = '\0';
- X strcpy(s, d);
- X }
- X return 0;
- X}
- X
- X
- X
- X
- X
- X/************************/
- X/* Function dequote() */
- X/************************/
- X
- Xint dequote(s) /* returns s without ^Vs */
- X char *s; /* string to be dequoted */
- X{
- X char d[100];
- X char *p, *q;
- X int c;
- X
- X if (s && *s) {
- X p = s - 1;
- X q = d - 1;
- X while (c = *++p)
- X if (c != '\026')
- X *++q = c;
- X *++q = '\0';
- X strcpy(s, d);
- X }
- X return 0;
- X}
- X
- X
- X
- X
- X
- X/************************/
- X/* Function fnlegal() */
- X/************************/
- X
- Xint fnlegal(c) /* returns TRUE if c is a member of the */
- X char c; /* legal character set for filenames */
- X{
- X char *q;
- X static char *legals = {"$%**-<>>AZ[[]]__az"};
- X
- X q = legals;
- X while (*q)
- X if (c < *q++)
- X break;
- X else if (c <= *q++)
- X return TRUE;
- X
- X return FALSE;
- X}
- END_OF_FILE
- if test 5608 -ne `wc -c <'unzip-5.12/tops20/tops20.c'`; then
- echo shar: \"'unzip-5.12/tops20/tops20.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/tops20/tops20.c'
- fi
- if test -f 'unzip-5.12/unix/funzip.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/unix/funzip.1'\"
- else
- echo shar: Extracting \"'unzip-5.12/unix/funzip.1'\" \(4441 characters\)
- sed "s/^X//" >'unzip-5.12/unix/funzip.1' <<'END_OF_FILE'
- X.\" Info-ZIP grants permission to any individual or institution to use, copy,
- X.\" or redistribute this software, so long as: (1) all of the original files
- X.\" are included; (2) it is not sold for profit; and (3) this notice is re-
- X.\" tained. See the UnZip COPYING file for details.
- X.\"
- X.\" funzip.1 by Greg Roelofs and others.
- X.\"
- X.\" =========================================================================
- X.\" define .Y macro (for user-command examples; normal Courier font):
- X.de Y
- X.ft CW
- X.in +4n
- X.nf
- X\&\\$1
- X.ft
- X.in
- X.fi
- X..
- X.\" =========================================================================
- X.TH FUNZIP 1 "28 Aug 94 (v3.83)"
- X.SH NAME
- Xfunzip \- filter for extracting from a ZIP archive in a pipe
- X.\" =========================================================================
- X.SH SYNOPSIS
- X[.\|.\|.] |\ \ \fBfunzip\fP [\fB\-password\fP]\ \ | [.\|.\|.]
- X.LP
- X\fBfunzip\fP [\fB\-password\fP] \fIinput.zip\fP\ \ | [.\|.\|.]
- X.\" =========================================================================
- X.SH ARGUMENTS
- X.IP [\fI\-password\fP]
- XOptional password to be used if ZIP archive is encrypted. Decryption
- Xmay not be supported at some sites. See DESCRIPTION for more details.
- X.PD
- X.\" =========================================================================
- X.SH DESCRIPTION
- X.I funzip
- Xacts as a filter; that is, it assumes that a ZIP archive is being piped into
- Xstandard input, and it extracts the first member from the archive to stdout.
- XIf there is an argument, then the input comes from the specified file
- Xinstead of from stdin. A password for encrypted zip files can be specified
- Xon the command line (preceding the file name, if any) by prefixing the
- Xpassword with a dash. Note that this constitutes a security risk on many
- Xsystems; currently running processes are often visible via simple commands
- X(e.g., \fIps\fP(1) under Unix), and command-line histories can be read.
- XIf the first entry of the zip file is encrypted and
- Xno password is specified on the command line, then the user is prompted for
- Xa password and the password is not echoed on the console.
- X.LP
- XGiven the limitation on single-member extraction, \fIfunzip\fP is most
- Xuseful in conjunction with a secondary archiver program such as \fItar\fP(1).
- XThe following section includes an example illustrating this usage in the
- Xcase of disk backups to tape.
- X.PD
- X.\" =========================================================================
- X.SH EXAMPLES
- XTo use \fIfunzip\fP to extract the first member file of the archive test.zip
- Xand to pipe it into \fImore\fP(1):
- X.LP
- X.Y "funzip test.zip | more"
- X.LP
- XTo use \fIfunzip\fP to test the first member file of test.zip (any errors
- Xwill be reported on standard error):
- X.LP
- X.Y "funzip test.zip > /dev/null"
- X.LP
- XTo use \fIzip\fP and \fIfunzip\fP in place of \fIcompress\fP(1) and
- X\fIzcat\fP(1) (or \fIgzip\fP(1L) and \fIgzcat\fP(1L)) for tape backups:
- X.LP
- X.PD 0
- X.Y "tar cf \- . | zip \-7 | dd of=/dev/nrst0 obs=8k"
- X.Y "dd if=/dev/nrst0 ibs=8k | funzip | tar xf \-"
- X.PD
- X.LP
- X(where, for example, nrst0 is a SCSI tape drive).
- X.PD
- X.\" =========================================================================
- X.SH BUGS
- XWhen piping an encrypted file into \fImore\fP and allowing \fIfunzip\fP
- Xto prompt for password, the terminal may sometimes be reset to a non-echo
- Xmode. This is apparently due to a race condition between the two programs;
- X\fIfunzip\fP changes the terminal mode to non-echo before \fImore\fP reads
- Xits state, and \fImore\fP then ``restores'' the terminal to this mode before
- Xexiting. To recover, run \fIfunzip\fP on the same file but redirect to
- X/dev/null rather than piping into more; after prompting again for the
- Xpassword, \fIfunzip\fP will reset the terminal properly.
- X.LP
- XThere is presently no way to extract any member but the first from a ZIP
- Xarchive. This would be useful in the case where a ZIP archive is included
- Xwithin another archive. In the case where the first member is a directory,
- X\fIfunzip\fP simply creates the directory and exits.
- X.LP
- XThe functionality of \fIfunzip\fP should be incorporated into \fIunzip\fP
- Xitself (future release).
- X.PD
- X.\" =========================================================================
- X.SH SEE ALSO
- X\fIgzip\fP(1L), \fIunzip\fP(1L), \fIunzipsfx\fP(1L), \fIzip\fP(1L),
- X\fIzipcloak\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L)
- X.PD
- X.\" =========================================================================
- X.SH AUTHOR
- XMark Adler (Info-ZIP)
- END_OF_FILE
- if test 4441 -ne `wc -c <'unzip-5.12/unix/funzip.1'`; then
- echo shar: \"'unzip-5.12/unix/funzip.1'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/unix/funzip.1'
- fi
- if test -f 'unzip-5.12/unreduce.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/unreduce.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/unreduce.c'\" \(5772 characters\)
- sed "s/^X//" >'unzip-5.12/unreduce.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------
- X
- X unreduce.c
- X
- X The Reducing algorithm is actually a combination of two distinct algorithms.
- X The first algorithm compresses repeated byte sequences, and the second al-
- X gorithm takes the compressed stream from the first algorithm and applies a
- X probabilistic compression method.
- X
- X ---------------------------------------------------------------------------*/
- X
- X
- X#include "unzip.h"
- X
- X
- X/**************************************/
- X/* UnReduce Defines, Typedefs, etc. */
- X/**************************************/
- X
- X#define DLE 144
- X
- Xtypedef uch f_array[64]; /* for followers[256][64] */
- X
- Xstatic void LoadFollowers __((void));
- X
- X
- X
- X/*******************************/
- X/* UnReduce Global Variables */
- X/*******************************/
- X
- X#if defined(MALLOC_WORK) || defined(MTS)
- X f_array *followers; /* shared work space */
- X#else
- X f_array *followers = (f_array *) (slide + 0x4000);
- X#endif
- X
- Xuch Slen[256];
- Xint factor;
- X
- Xint L_table[] =
- X{0, 0x7f, 0x3f, 0x1f, 0x0f};
- X
- Xint D_shift[] =
- X{0, 0x07, 0x06, 0x05, 0x04};
- Xint D_mask[] =
- X{0, 0x01, 0x03, 0x07, 0x0f};
- X
- Xint B_table[] =
- X{8, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5,
- X 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6,
- X 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- X 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
- X 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- X 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- X 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- X 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- X 8, 8, 8, 8};
- X
- X
- X
- X
- X
- X/*************************/
- X/* Function unreduce() */
- X/*************************/
- X
- Xvoid unreduce() /* expand probabilistically reduced data */
- X{
- X register int lchar = 0;
- X int nchar;
- X int ExState = 0;
- X int V = 0;
- X int Len = 0;
- X long s = ucsize; /* number of bytes left to decompress */
- X unsigned w = 0; /* position in output window slide[] */
- X unsigned u = 1; /* true if slide[] unflushed */
- X
- X
- X#if defined(MALLOC_WORK) || defined(MTS)
- X followers = (f_array *)(slide + 0x4000);
- X#endif
- X
- X factor = lrec.compression_method - 1;
- X LoadFollowers();
- X
- X while (s > 0 /* && (!zipeof) */) {
- X if (Slen[lchar] == 0)
- X READBITS(8, nchar) /* ; */
- X else {
- X READBITS(1, nchar) /* ; */
- X if (nchar != 0)
- X READBITS(8, nchar) /* ; */
- X else {
- X int follower;
- X int bitsneeded = B_table[Slen[lchar]];
- X
- X READBITS(bitsneeded, follower) /* ; */
- X nchar = followers[lchar][follower];
- X }
- X }
- X /* expand the resulting byte */
- X switch (ExState) {
- X
- X case 0:
- X if (nchar != DLE) {
- X s--;
- X slide[w++] = (uch)nchar;
- X if (w == 0x4000) {
- X flush(slide, w, 0);
- X w = u = 0;
- X }
- X }
- X else
- X ExState = 1;
- X break;
- X
- X case 1:
- X if (nchar != 0) {
- X V = nchar;
- X Len = V & L_table[factor];
- X if (Len == L_table[factor])
- X ExState = 2;
- X else
- X ExState = 3;
- X } else {
- X s--;
- X slide[w++] = DLE;
- X if (w == 0x4000)
- X {
- X flush(slide, w, 0);
- X w = u = 0;
- X }
- X ExState = 0;
- X }
- X break;
- X
- X case 2:{
- X Len += nchar;
- X ExState = 3;
- X }
- X break;
- X
- X case 3:{
- X register unsigned e;
- X register unsigned n = Len + 3;
- X register unsigned d = w - ((((V >> D_shift[factor]) &
- X D_mask[factor]) << 8) + nchar + 1);
- X
- X s -= n;
- X do {
- X n -= (e = (e = 0x4000 - ((d &= 0x3fff) > w ? d : w)) > n ?
- X n : e);
- X if (u && w <= d)
- X {
- X memzero(slide + w, e);
- X w += e;
- X d += e;
- X }
- X else
- X if (w - d < e) /* (assume unsigned comparison) */
- X do { /* slow to avoid memcpy() overlap */
- X slide[w++] = slide[d++];
- X } while (--e);
- X else
- X {
- X memcpy(slide + w, slide + d, e);
- X w += e;
- X d += e;
- X }
- X if (w == 0x4000)
- X {
- X flush(slide, w, 0);
- X w = u = 0;
- X }
- X } while (n);
- X
- X ExState = 0;
- X }
- X break;
- X }
- X
- X /* store character for next iteration */
- X lchar = nchar;
- X }
- X
- X /* flush out slide */
- X flush(slide, w, 0);
- X}
- X
- X
- X
- X
- X
- X/******************************/
- X/* Function LoadFollowers() */
- X/******************************/
- X
- Xstatic void LoadFollowers()
- X{
- X register int x;
- X register int i;
- X
- X for (x = 255; x >= 0; x--) {
- X READBITS(6, Slen[x]) /* ; */
- X for (i = 0; (uch)i < Slen[x]; i++)
- X READBITS(8, followers[x][i]) /* ; */
- X }
- X}
- END_OF_FILE
- if test 5772 -ne `wc -c <'unzip-5.12/unreduce.c'`; then
- echo shar: \"'unzip-5.12/unreduce.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/unreduce.c'
- fi
- if test -f 'unzip-5.12/vms/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/README'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/README'\" \(4831 characters\)
- sed "s/^X//" >'unzip-5.12/vms/README' <<'END_OF_FILE'
- Xvms/README for UnZip 5.12 and later, 25 Aug 94
- X----------------------------------------------
- X
- XNotes about using UnZip and zipfiles under VMS (see INSTALL for instructions
- Xon compiling):
- X
- X - Install UnZip as foreign symbol by adding this to login.com:
- X $ unzip == "$disk:[dir]unzip.exe"
- X $ zipinfo == "$disk:[dir]unzip.exe -Z"
- X where "disk" and "dir" are location of UnZip executable; the "$" before
- X the disk name is important. Some people, including the author, prefer
- X a short alias such as "ii" instead of "zipinfo"; edit to taste.
- X
- X - Optionally install UnZipSFX for use with the MAKESFX.COM command file:
- X $ unzipsfx :== disk:[dir]unzipsfx.exe
- X Thereafter an archive "foo.zip" may be converted to "foo.exe" simply by
- X typing "@makesfx foo" (assuming MAKESFX.COM is in the current directory).
- X Note that there is *no* leading "$" in this case.
- X
- X - After proper installation, the default version of UnZip is invoked just
- X as in Unix or MS-DOS: "unzip -opts archive files". The hyphen ('-') is
- X the switch character, not the slash ('/') as in native VMS commands. An
- X alternative is available if VMSCLI is defined during compilation; this
- X version does provide a native VMS-style command interface (e.g., /ZIPINFO
- X instead of -Z). Both versions accept the command "unzip -v", which can
- X be used to check whether VMSCLI was defined or not; but an even simpler
- X method is to type "unzip" and look at the help screen. Note that options
- X placed in an environment variable (UNZIP_OPTS) must be of the short, hy-
- X phenated form regardless of how UnZip was compiled.
- X
- X - VMS (or the C compiler) translates all command-line text to lowercase
- X unless it is quoted, making some options and/or filenames not work as
- X intended. For example:
- X unzip -V zipfile vms/README
- X is tranlated to
- X unzip -v zipfile vms/readme
- X which may not match the contents of the zipfile and definitely won't
- X extract the file with its version number as intended. This can be
- X avoided by use of the -C option (/CASE_INSENSITIVE) or by enclosing
- X the uppercase stuff in quotes:
- X unzip "-V" zipfile "vms/README"
- X Note that quoting the whole line probably won't work, since it would
- X be interpreted as a single argument by the C library.
- X
- X - Wildcards which refer to files internal to the archive behave like Unix
- X wildcards, not VMS ones (assuming UnZip was not compiled with VMSWILD
- X defined). This is both a matter of consistency (see above) and power--
- X full Unix regular expressions are supported, so that one can specify
- X "all .c and .h files which start with a, b, c or d and do not have a 2
- X before the dot" as "[a-d]*[^2].[ch]". Of course, "*.[ch]" is a much more
- X common wildcard specification, but the power is there if you need it.
- X Note that "*" matches zipfile directory separators ('/'), too. If UnZip
- X *was* compiled with VMSWILD defined (do "unzip -v" to check), the single-
- X character wildcard is "%" rather than "?", and character sets (ranges)
- X are delimited with () instead of [] (for example, "*.(ch)").
- X
- X - Created files get whatever permissions were stored in the archive (mapped
- X to VMS and/or masked with your default permissions, depending on the
- X originating operating system), but created directories additionally in-
- X herit the (possibly more restrictive) permissions of the parent directory.
- X And obviously things won't work if you don't have permission to write to
- X the extraction directory.
- X
- X - When transferring files, particularly via Kermit, pay attention to the
- X settings! In particular, zipfiles must be transferred in some binary
- X mode, which is NOT Kermit's default mode, and this mode must usually be
- X set on BOTH sides of the transfer (e.g., both VAX and PC). See the notes
- X below for details.
- X
- X
- X
- X
- XFrom Info-ZIP Digest (Wed, 6 Nov 1991), Volume 91, Issue 290:
- X
- X Date: Tue, 5 Nov 91 15:31 CDT
- X From: Hugh Schmidt <HUGH@macc.wisc.edu>
- X
- X ****************************************************
- X *** VMS ZIP and PKZIP compatibility using KERMIT ***
- X ****************************************************
- X
- X Many use Procomm's kermit to transfer zipped files between PC and VMS
- X VAX. The following VMS kermit settings make VMS Zip/UnZip compatible
- X with PC Zip/UnZip or PKZIP/PKUNZIP:
- X VMS kermit Procomm kermit
- X ------------------- --------------------
- X Uploading PC zipfile to VMS: set file type fixed set file type binary
- X Downloading VMS zipfile to PC: set file type block set file type binary
- X
- X "Block I/O lets you bypass the VMS RMS record-processing capabilities
- X entirely", (Guide to VMS file applications, Section 8.5). The kermit
- X guys must have known this!
- END_OF_FILE
- if test 4831 -ne `wc -c <'unzip-5.12/vms/README'`; then
- echo shar: \"'unzip-5.12/vms/README'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/README'
- fi
- if test -f 'unzip-5.12/vms/cvthelp.tpu' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/cvthelp.tpu'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/cvthelp.tpu'\" \(4377 characters\)
- sed "s/^X//" >'unzip-5.12/vms/cvthelp.tpu' <<'END_OF_FILE'
- X! TITLE CVTHELP.TPU
- X! IDENT 01-000
- X!
- X!++
- X!
- X! Program: CVTHELP.TPU
- X!
- X! Author: Hunter Goatley
- X!
- X! Date: January 12, 1992
- X!
- X! Purpose: Convert .HELP files to RUNOFF .RNH files. Substitutes
- X! RUNOFF commands for tags imbedded in the .HELP file.
- X!
- X! Calling sequence:
- X!
- X! $ EDIT/TPU/NOJOURNAL/NODISPLAY/COMMAND=CVTHELP file.HELP
- X!
- X! Modified by:
- X!
- X! 01-000 Hunter Goatley 12-JAN-1992 15:15
- X! Original version.
- X!
- X!--
- XProcedure eve_convert_help
- XLocal temp
- X ,x
- X ;
- X
- X qualifier_level := 0;
- X hg$substitute_topic(current_buffer, "<MAIN>", ".indent-3", "1");
- X hg$substitute_topic(current_buffer, "<QUALIFIER>", ".sk;.indent-3", "");
- X hg$substitute_topic(current_buffer, "<TOPIC>", ".indent-3", "2");
- X hg$substitute_topic(current_buffer, "<SUBTOPIC>", ".indent-3", "3");
- X hg$substitute_topic(current_buffer, "<SUBSUBTOPIC>", ".indent-3", "4");
- X hg$substitute_comment(current_buffer,"<QUALIFIERS>",".indent-3;2 Qualifiers");
- X hg$substitute_comment(current_buffer,"<PARAMETER>",".indent-2");
- X hg$substitute_comment(current_buffer,"<PTEXT>",".lm+3");
- X hg$substitute_comment(current_buffer,"<TXETP>",".lm-3");
- X hg$substitute_comment(current_buffer,"<ETEXT>",".lm+4");
- X hg$substitute_comment(current_buffer,"<TXETE>",".lm-4");
- X hg$substitute_comment(current_buffer,"<INIT>",".noflags;.lm3;.rm70");
- X hg$substitute_comment(current_buffer,"<LITERAL>",".lm+4;.literal");
- X hg$substitute_comment(current_buffer,"<LARETIL>",".end literal;.lm-4");
- X hg$substitute_comment(current_buffer,"<DOT1LIST>",'.list 1,"o"');
- X hg$substitute_comment(current_buffer,"<DOT0LIST>",'.list 0,"o"');
- X hg$substitute_comment(current_buffer,"<ENTRY>",".le");
- X hg$substitute_comment(current_buffer,"<TSIL>",".end list");
- X hg$substitute_comment(current_buffer,"<CENTER>",".center");
- X hg$substitute_comment(current_buffer,"<FORMAT>",".sk;.indent2");
- X hg$substitute_comment(current_buffer,"<NOTE>",".note");
- X hg$substitute_comment(current_buffer,"<ETON>",".end note");
- X hg$substitute_comment(current_buffer, LINE_BEGIN & LINE_END,".sk");
- X hg$substitute_comment(current_buffer, LINE_BEGIN & "|", "");
- X
- XEndProcedure; ! eve_convert_help
- X
- XProcedure hg$substitute_comment (the_buffer, target, new)
- XLocal temp
- X ,save_pos
- X ,x
- X ;
- X on_error;
- X endon_error;
- X
- X save_pos := mark(none);
- X position(beginning_of(the_buffer));
- X loop
- X x := search(target, forward);
- X exitif x = 0;
- X position (x);
- X erase_character(length(x));
- X copy_text(new);
- X endloop;
- X
- X position(save_pos);
- X
- XEndProcedure; ! hg$substitute_comment
- X
- XProcedure hg$substitute_topic (the_buffer, target, new, level)
- XLocal temp
- X ,save_pos
- X ,x
- X ;
- X on_error;
- X endon_error;
- X
- X save_pos := mark(none);
- X position(beginning_of(the_buffer));
- X loop
- X x := search(target, forward);
- X exitif x = 0;
- X position (x);
- X erase_character(length(x));
- X move_vertical(-1);
- X if (length(current_line) = 0)
- X then copy_text("|");
- X endif;
- X move_vertical(1);
- X copy_text(".!------------------------------------------------------");
- X split_line;
- X copy_text(new);
- X move_horizontal(-current_offset);
- X move_vertical(1);
- X if level <> "" then
- X copy_text(level + " ");
- X! else
- X! if qualifier_level = 0
- X! then
- X! copy_text("2 Qualifiers");
- X! split_line; split_line;
- X! copy_text(new); split_line;
- X! qualifier_level := 1;
- X! endif;
- X endif;
- X move_horizontal(-current_offset);
- X move_vertical(1);
- X if length(current_line) = 0
- X then
- X if (target = "<MAIN>") OR (target = "<TOPIC>")
- X OR (target = "<SUBTOPIC>") or (target = "<SUBSUBTOPIC>")
- X then copy_text(".br");
- X else copy_text(".sk");
- X endif;
- X endif;
- X endloop;
- X
- X position(save_pos);
- X
- XEndProcedure; ! hg$substitute_topic
- X
- X!===============================================================================
- XProcedure tpu$init_procedure
- XLocal temp
- X ,orig_filespec
- X ,f
- X ;
- X
- X on_error
- X endon_error;
- X
- X !Prompt user for information
- X
- X orig_filespec := get_info(command_line, "file_name");
- X if orig_filespec = ""
- X then
- X message("No .HELP file given");
- X quit;
- X endif;
- X f := file_parse(orig_filespec, ".HELP"); !Add .LIS ending
- X
- X ! Create a buffer and window for editing
- X
- X main_buf := create_buffer ("MAIN",f);
- X set (eob_text, main_buf, "[End of buffer]");
- X
- X position (beginning_of(main_buf));
- X
- X eve_convert_help;
- X
- X f := file_parse(orig_filespec,"","",NAME);
- X
- X write_file (main_buf, f+".RNH");
- X
- X quit;
- XEndProcedure; !TPU$INIT_PROCEDURE
- X
- Xtpu$init_procedure;
- END_OF_FILE
- if test 4377 -ne `wc -c <'unzip-5.12/vms/cvthelp.tpu'`; then
- echo shar: \"'unzip-5.12/vms/cvthelp.tpu'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/cvthelp.tpu'
- fi
- if test -f 'unzip-5.12/vms/descrip.mms' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/descrip.mms'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/descrip.mms'\" \(5400 characters\)
- sed "s/^X//" >'unzip-5.12/vms/descrip.mms' <<'END_OF_FILE'
- X!==========================================================================
- X! MMS description file for UnZip/UnZipSFX 5.12 26 Aug 94
- X!==========================================================================
- X!
- X! To build UnZip that uses shared libraries, edit the USER CUSTOMIZATION
- X! lines below to taste, then do
- X! mms
- X! or
- X! mmk
- X! if you use Matt's Make (free MMS-compatible make utility).
- X!
- X! (One-time users will find it easier to use the MAKE.COM command file,
- X! which generates both UnZip and UnZipSFX. Just type "@[.VMS]MAKE", or
- X! "@[.VMS]MAKE GCC" if you want to use GNU C.)
- X
- X! To build UnZip without shared libraries,
- X! mms noshare
- X
- X! To delete all .OBJ, .EXE and .HLP files,
- X! mms clean
- X
- XDO_THE_BUILD :
- X @ decc = f$search("SYS$SYSTEM:DECC$COMPILER.EXE").nes.""
- X @ axp = f$getsyi("HW_MODEL").ge.1024
- X @ macro = ""
- X @ if axp.or.decc then macro = "/MACRO=("
- X @ if decc then macro = macro + "__DECC__=1,"
- X @ if axp then macro = macro + "__ALPHA__=1,"
- X @ if macro.nes."" then macro = f$extract(0,f$length(macro)-1,macro)+ ")"
- X $(MMS)$(MMSQUALIFIERS)'macro' default
- X
- X.IFDEF EXE
- X.ELSE
- XEXE = .EXE
- XOBJ = .OBJ
- XOLB = .OLB
- X.ENDIF
- X
- X!!!!!!!!!!!!!!!!!!!!!!!!!!! USER CUSTOMIZATION !!!!!!!!!!!!!!!!!!!!!!!!!!!!
- X! uncomment the following line if you want the VMS CLI$ interface:
- X!VMSCLI = VMSCLI,
- X
- X! add VMSWILD, RETURN_CODES, RETURN_SEVERITY, and/or any other optional
- X! macros (except VMSCLI, above) to the following line for a custom version:
- XCOMMON_DEFS =
- X!!!!!!!!!!!!!!!!!!!!!!!! END OF USER CUSTOMIZATION !!!!!!!!!!!!!!!!!!!!!!!!
- X
- XCC = cc
- X
- X.IFDEF __ALPHA__
- XCC_OPTIONS = /STANDARD=VAXC/ANSI/NOWARNINGS/INCLUDE=[]
- XCC_DEFS = MODERN,
- XOPTFILE =
- XOPTIONS =
- X.ELSE
- X.IFDEF __DECC__
- XCC_OPTIONS = /STANDARD=VAXC/ANSI/NOWARNINGS/INCLUDE=[]
- XCC_DEFS = MODERN,
- X.ELSE
- XCC_OPTIONS = /INCLUDE=[]
- XCC_DEFS =
- X.ENDIF
- XOPTFILE = ,[.vms]vmsshare.opt
- XOPTIONS = $(OPTFILE)/OPTIONS
- X.ENDIF
- X
- X.IFDEF __DEBUG__
- XCDEB = /DEBUG/NOOPTIMIZE
- XLDEB = /DEBUG
- X.ELSE
- XCDEB =
- XLDEB = /NOTRACE
- X.ENDIF
- X
- XCFLAGS_SFX = $(CFLAGS) $(CC_OPTIONS) $(CDEB) -
- X /def=($(CC_DEFS) $(COMMON_DEFS) $(VMSCLI) SFX, VMS)
- XCFLAGS = $(CFLAGS) $(CC_OPTIONS) $(CDEB) -
- X /def=($(CC_DEFS) $(COMMON_DEFS) $(VMSCLI) VMS)
- X
- XLINKFLAGS = $(LDEB)
- X
- X
- XCOMMON_OBJS = 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 VMS=[.vms]vms$(OBJ)
- X
- X.IFDEF VMSCLI
- XOBJS = $(COMMON_OBJS),-
- X VMS_UNZIP_CLD=[.vms]unz_cld$(OBJ),-
- X VMS_UNZIP_CMDLINE=[.vms]cmdline$(OBJ)
- XOBJX = UNZIP=unzipsfx$(OBJ),-
- X VMS_UNZIP_CLD=[.vms]unz_cld$(OBJ),-
- X VMS_UNZIP_CMDLINE=cmdline_$(OBJ),-
- X crypt$(OBJ),-
- X EXTRACT=extract_$(OBJ),-
- X file_io$(OBJ),-
- X inflate$(OBJ),-
- X match$(OBJ),-
- X VMS=[.vms]vms_$(OBJ)
- X.ELSE
- XOBJS = $(COMMON_OBJS)
- XOBJX = UNZIP=unzipsfx$(OBJ),-
- X crypt$(OBJ),-
- X EXTRACT=extract_$(OBJ),-
- X file_io$(OBJ),-
- X inflate$(OBJ),-
- X match$(OBJ),-
- X VMS=[.vms]vms_$(OBJ)
- X.ENDIF
- X
- Xdefault : unzip$(EXE) unzipsfx$(EXE) unzip.hlp
- X @ ! Do nothing.
- X
- Xunzip$(EXE) : UNZIP$(OLB)($(OBJS))$(OPTFILE)
- X $(LINK)$(LINKFLAGS) UNZIP$(OLB)/INCLUDE=UNZIP/LIBRARY$(OPTIONS), -
- X [.vms]unzip.opt/OPT
- X
- Xunzipsfx$(EXE) : UNZIPSFX$(OLB)($(OBJX))$(OPTFILE)
- X $(LINK)$(LINKFLAGS) UNZIPSFX$(OLB)/INCLUDE=UNZIP/LIBRARY$(OPTIONS), -
- X [.vms]unzipsfx.opt/OPT
- X
- Xnoshare : $(OBJS)
- X $(LINK) /EXE=$(MMS$TARGET) $(OBJS),SYS$LIBRARY:VAXCRTL.OLB/LIB, -
- X [.vms]unzip.opt/OPT
- X
- Xclean :
- X ! delete *.obj;*, *.olb;*, unzip$(exe);*, unzipsfx$(exe);*, -
- X ! unzip.hlp;*, [.vms]*.obj;*, [.vms]unzip.rnh;*
- X @[.vms]clean "$(OBJS)"
- X @[.vms]clean "$(OBJX)"
- X @[.vms]clean unzip$(olb),unzipsfx$(olb)
- X @[.vms]clean unzip$(exe),unzipsfx$(exe)
- X @[.vms]clean unzip.hlp,[.vms]unzip.rnh
- 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
- Xunzip.hlp : [.vms]unzip.rnh
- Xzipinfo$(OBJ) : zipinfo.c unzip.h
- X[.vms]cmdline$(OBJ) : [.vms]cmdline.c version.h
- X[.vms]unz_cld$(OBJ) : [.vms]unz_cld.cld
- X
- Xcmdline_$(OBJ) : [.vms]cmdline.c version.h
- X $(CC) $(CFLAGS_SFX) /INCLUDE=SYS$DISK:[] /OBJ=$(MMS$TARGET) [.vms]cmdline.c
- X
- Xextract_$(OBJ) : extract.c unzip.h crypt.h
- X $(CC) $(CFLAGS_SFX) /OBJ=$(MMS$TARGET) extract.c
- X
- Xunzipsfx$(OBJ) : unzip.c unzip.h crypt.h version.h
- X $(CC) $(CFLAGS_SFX) /OBJ=$(MMS$TARGET) unzip.c
- X
- X[.vms]vms$(OBJ) : [.vms]vms.c [.vms]vms.h unzip.h
- X @ x = ""
- X @ if f$search("SYS$LIBRARY:SYS$LIB_C.TLB").nes."" then x = "+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY"
- X $(CC) $(CFLAGS) /INCLUDE=SYS$DISK:[] /OBJ=$(MMS$TARGET) [.vms]vms.c'x'
- X
- X[.vms]vms_$(OBJ) : [.vms]vms.c [.vms]vms.h unzip.h
- X @ x = ""
- X @ if f$search("SYS$LIBRARY:SYS$LIB_C.TLB").nes."" then x = "+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY"
- X $(CC) $(CFLAGS_SFX) /INCLUDE=SYS$DISK:[] /OBJ=$(MMS$TARGET) [.vms]vms.c'x'
- X
- X
- X.IFDEF VMSCLI
- X
- X[.vms]unzip.rnh : [.vms]unzip_cli.help
- X @ set default [.vms]
- X edit/tpu/nosection/nodisplay/command=cvthelp.tpu unzip_cli.help
- X rename unzip_cli.rnh unzip.rnh
- X @ set default [-]
- X
- X.ELSE
- X
- X[.vms]unzip.rnh : [.vms]unzip_def.rnh
- X copy [.vms]unzip_def.rnh [.vms]unzip.rnh
- X
- X.ENDIF
- END_OF_FILE
- if test 5400 -ne `wc -c <'unzip-5.12/vms/descrip.mms'`; then
- echo shar: \"'unzip-5.12/vms/descrip.mms'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/descrip.mms'
- fi
- if test -f 'unzip-5.12/vms/unzip_def.rnh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/unzip_def.rnh'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/unzip_def.rnh'\" \(5977 characters\)
- sed "s/^X//" >'unzip-5.12/vms/unzip_def.rnh' <<'END_OF_FILE'
- X.!
- X.! File: UNZIP_DEF.RNH
- X.!
- X.! Author: Hunter Goatley
- X.!
- X.! Date: October 23, 1991
- X.!
- X.! Description:
- X.!
- X.! RUNOFF source file for VMS on-line help for portable UnZip.
- X.! Adapted from UNZIP.MAN (now UNZIP.DOC).
- X.!
- X.! To build: $ REN UNZIP_DEF.RNH UNZIP.RNH
- X.! $ RUNOFF UNZIP.RNH
- X.! $ LIBR/HELP/INSERT libr UNZIP
- X.!
- X.! Modification history:
- X.!
- X.! 01-001 Hunter Goatley 23-OCT-1991 09:21
- X.! Genesis.
- X.! 01-002 Cave Newt 16-MAR-1992 22:37
- X.! Updated for UnZip 4.2.
- X.! 01-003 Igor Mandrichenko 23-MAY-1992 22:14
- X.! Added -X option to command syntax.
- X.! 01-004 Cave Newt 24-MAY-1992 13:30
- X.! Added UNZIP_OPTS environment variable help.
- X.! 01-005 Igor Mandrichenko 14-DEC-1993 18:55
- X.! Modified for UnZip V5.1
- X.! 01-006 Cave Newt 21-DEC-1993 12:38
- X.! Added -x option and cleaned up.
- X.! 01-007 Cave Newt 14-JUL-1994 09:45
- X.! Added -Z, -C and -L options, removed -U, minor clean-up.
- X.! 01-008 Cave Newt 28-JUL-1994 08:57
- X.! Removed semi-colons from comments.
- X.!
- X.noflags
- X.lm4 .rm72
- X.indent -4
- X1 UNZIP
- X.br
- XUnZip is used to extract files compressed and packaged by Zip (see HELP ZIP
- Xfor information on ZIP).
- X.sk
- XFor a brief help on Zip and Unzip, run each without specifying any
- Xparameters on the command line.
- X.sk
- XUNZIP will list, test, or extract from a ZIP archive. ZIP archives are commonly
- Xfound on MS-DOS systems; a VMS version of ZIP can also be found here.
- X.sk
- XArchive member extraction is implied by the absence of the -c, -p, -t, -l, -v or
- X-z options. All archive members are processed unless a filespec is provided to
- Xspecify a subset of the archive members.
- XFormat:
- X.sk;.lm+1;.literal
- XUNZIP [-cflptuvxz[ajnoqCLVX]] file[.zip] [list] [-x xlist] [-d out_dir]
- X.end literal;.lm-1
- X.!------------------------------------------------------------------------------
- X.indent -4
- X2 Parameters
- X.sk;.indent -4
- Xfile[.zip]
- X.sk
- XFile specification for the ZIP archive(s) with optional wildcards. UnZip will
- Xperform actions specified for every zipfile matching the specification.
- XDefault file specification is SYS$DISK:[].ZIP.
- XNote that self-extracting ZIP files are supported; just specify the .EXE
- Xsuffix yourself.
- X.sk;.indent -4
- X[list]
- X.sk
- XAn optional list of archive members to be processed; if no list is given, all
- Xarchive members are processed. Expressions may be
- Xused to match multiple members. Expressions should be enclosed in double-quotes
- Xto prevent interpretation by DCL. Multiple filenames should be separated by
- Xblanks. Each file specification is similar to a Unix egrep expression and may
- Xcontain:
- X.sk
- X.literal
- X * matches a sequence of 0 or more characters
- X ? matches exactly 1 character
- X [...] matches any single character found inside the brackets;
- X ranges are specified by a beginning character,
- X a hyphen, and an ending character. If a '!' or '^'
- X immediately follows the left bracket, then any character
- X not in the given range is matched.
- X.end literal
- X.sk
- X.sk;.indent -4
- X[-x xlist]
- X.sk
- XAn optional list of archive members to be excluded from processing. The xlist
- Xoverrides any files included in the normal list.
- X.sk;.indent -4
- X[-d out_dir]
- X.sk
- XOptional directory specification to be used as target root directory
- Xfor files to be extracted. Directory should be specified in "[.foo]"
- Xformat rather than "foo.dir" or "foo/" format.
- X.!------------------------------------------------------------------------------
- X.indent -4
- X2 Options
- X.br
- XThe default action of UnZip is to extract all zipfile entries. The following
- Xoptions and modifiers can be provided:
- X.sk;.literal
- X -Z ZipInfo mode
- X -c extract files to SYS$OUTPUT (terminal)
- X -f freshen existing files (replace if newer); create none
- X -l list archive files (short format)
- X -p extract files to SYS$OUTPUT; no informational messages
- X -t test archive files
- X -u update existing files; create new ones if needed
- X -v list archive files (verbose format)
- X -z display only the archive comment
- X.end literal;.sk;.literal
- X MODIFIERS
- X -a extract text files in standard VMS text file format
- X -aa extract all files as text
- X -j junk paths (don't recreate archive's directory structure)
- X -n never overwrite existing files; don't prompt
- X -o OK to overwrite files without prompting
- X -q perform operations quietly (-qq => even quieter)
- X -C match filenames case-insensitively
- X -L convert filenames to lowercase if created under DOS, VMS, etc.
- X -V retain (VMS) file version numbers
- X -X restore owner/protection info (may require privileges)
- X.end literal;.sk
- XNote that uppercase options (-C, -L, -V and -X) must be specified in quotes.
- XFor example:
- X.sk;.literal
- X unzip "-VX" -a zipfile
- X.end literal;.sk
- X.![this should probably be a separate section]:
- XIn addition, default options may be specified via the UNZIP_OPTS logical.
- XFor example, the following will cause UnZip to restore owner/protection
- Xinformation and perform all operations at quiet-level 1 by default:
- X.sk;.literal
- X define UNZIP_OPTS "-qX"
- X.end literal;.sk
- XNote that the quotation marks here are required to preserve lowercase options
- X(opposite of the command-line behavior).
- XTo negate a default option on the command line, add one or more minus
- Xsigns before the option letter, in addition to the leading switch character
- X`-':
- X.sk;.literal
- X unzip --ql zipfile
- X.end literal
- Xor
- X.literal
- X unzip -l-q zipfile
- X.end literal;.sk
- XAt present it is not possible to decrement an option below zero--that is,
- Xmore than a few minuses have no effect.
- X.sk
- XUNZIP_OPTS may be defined as a symbol rather than a logical, but if both
- Xare defined, the logical is used.
- X.!-----------------------------------------------------------------------------
- X.indent -4
- X2 Authors
- X.br
- XInfo-ZIP; currently maintained by Greg Roelofs. VMS support maintained
- Xby Igor Mandrichenko and Hunter Goatley. Originally based on a program
- Xby Samuel H. Smith.
- X.sk
- XVMS on-line help ported from UNZIP.DOC by Hunter Goatley.
- END_OF_FILE
- if test 5977 -ne `wc -c <'unzip-5.12/vms/unzip_def.rnh'`; then
- echo shar: \"'unzip-5.12/vms/unzip_def.rnh'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/unzip_def.rnh'
- fi
- echo shar: End of archive 18 \(of 20\).
- cp /dev/null ark18isdone
- 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...
-