home *** CD-ROM | disk | FTP | other *** search
- From: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
- Newsgroups: comp.sources.misc
- Subject: v44i082: unzip - Info-ZIP portable UnZip, version 5.12, Part17/20
- Date: 18 Sep 1994 23:16:56 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <35j3bo$qrc@sparky.sterling.com>
- X-Md4-Signature: d614ddcf5f0ea61b237fecdedbf92556
-
- Submitted-by: zip-bugs@wkuvx1.wku.edu (Info-ZIP group)
- Posting-number: Volume 44, Issue 82
- Archive-name: unzip/part17
- 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/CONTRIBS unzip-5.12/COPYING
- # unzip-5.12/amiga/filedate.c unzip-5.12/amiga/stat.c
- # unzip-5.12/mac/macdir.c unzip-5.12/mac/macscreen.c
- # unzip-5.12/mac/rsrc.hqx unzip-5.12/os2/makefile.os2
- # unzip-5.12/vms/unzip_cli.help
- # Wrapped by kent@sparky on Sat Sep 17 23:33:47 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 17 (of 20)."'
- if test -f 'unzip-5.12/CONTRIBS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/CONTRIBS'\"
- else
- echo shar: Extracting \"'unzip-5.12/CONTRIBS'\" \(8435 characters\)
- sed "s/^X//" >'unzip-5.12/CONTRIBS' <<'END_OF_FILE'
- XThis is a partial list of contributors to Info-ZIP UnZip and the code upon
- Xwhich it is based. Others have also contributed, and if you are among them,
- Xplease let us know (don't be shy!). Everyone who contributed via the Info-
- XZIP digest *should* now be listed here, but oversights are quite possible.
- X
- X Mark Adler decryption, inflate, explode, funzip code; misc. casts
- X Steve Alpert VMS rms.h bugfix
- X Glenn Andrews MS-DOS makefiles; prototyping bugfix; bogus main() fix
- X Joel Aycock descrip.mms bugfix
- X Eric Baatz Borland version() info
- X Charles Bailey VMS_SEVERITY fix; VMSWILD () extension
- X Audrey Beck Where info for AOL OS/2 forum
- X Mike Bernardi Unix makefile entry
- X James Birdsall extract.c/makefile/NT stuff, etc.; awesome beta tester
- X Allan Bjorklund in misc.c
- X Denise Blakeley Unix makefile entry
- X Wim Bonner original OS/2 port; Unix makefile entry
- X Paul Borman BSD/386 (BSDI) fixes; Unix makefile entry
- X Rodney Brown stdin-/dev/null bugfix; VMS error levels
- X John Bush first full Amiga port; FileDate; Amiga fixes; etc.
- X Valter Cavecchia Unix makefile entry
- X John Cowan mods to original match.c; other stuff?
- X Frank da Cruz xxu.c, on which original mapname.c was based
- X Bill Davidsen -q(q); mapname stuff; envargs; Xenix stuff; etc.
- X Matt "Doc" D'Errico AIX stuff, Unix makefile entry
- X Kim DeVaughn Unix makefile entry
- X Arjan de Vet various things, but I don't remember exactly what...
- X James Dugal ZMEM stuff; unshrink bugfix; file perms stuff; etc.
- X Jim Dumser -z stuff; umask bugfixes; opendir/Borland fix; etc.
- X Mark Edwards mapname.c, misc.c fixes; Unix makefile entry
- X Gershon Elber Unix makefile entry
- X Bruce Evans Unix makefile entry
- X David Feinleib Windows NT port
- X David Fenyes Unix makefile entry
- X Greg Flint Unix makefile entry
- X Jeffrey Foy OS/2 stuff(?); [CP/M]
- X Mike Freeman VMS GCC makefiles; VMS fixes; etc.
- X Kevin Fritz Borland bugfixes; etc.
- X Jean-loup Gailly decryption code; ReadByte replacement; much nagging :-)
- X Forrest Gehrke Unix makefile entry
- X Tim Geibelhaus Unix makefile entry
- X Henry Gessau flush/Fwrite/outcnt fixes; new NT port
- X Christian Ghisler inflate tweaks
- X Filip Gieszczykiewicz Unix makefile entry
- X Hunter Goatley VMSCLI interface; VMS help/RUNOFF; list maintainer
- X Michael Graff Unix makefile entry
- X Richard H. Gumpertz Unix makefile entry
- X Steve Hanna Macintosh stuff
- X Mark Hanning-Lee docs corrections, Unix Makefile fix
- X Robert Heath Windows port (WizUnZip)
- X Dave Heiland new usage screen
- X Ron Henderson -a bugfix
- X Chris Herborth new Atari port; Atari fixes
- X Phil Howard Unix makefile entry
- X Joe Isuzu Unix makefile entry
- X Aubrey Jaffer pixel, v7 targets
- X Graham Jenkins Sequent Dynix/ptx bugfix
- X Peter Jones Unix makefile entry
- X Larry Jones ZMEM stuff; unimplod bugfix; etc.
- X Warren Jones MKS bugfix
- X Kjetil J{\o}rgenson ln/copy misc_.c Makefile bugfix; OSF/1 fix; NetBSD fix
- X Bruce Kahn DOS floppy detection?; Unix makefile entry
- X Bob Kemp NOTINT16 rewrite; Unix makefile entry
- X J. Kercheval filmatch.c, on which second match.c was based
- X Paul Kienitz continuing general Amiga porting; Aztec C support; ASM
- X Mike Kincer AIX "ps2" bugfix
- X David Kirschbaum mapname port; general-purpose meddling; Python jokes
- X Paul Klahr Regulus port
- X Jim Knoble Turbo C++ makefile fix
- X Alvin Koh Borland C++ bugfixes
- X Karel Kubat Linux strncasecmp bugfix
- X Bo Kullmar -z code; bugfixes: umask, do_string, BSD time; etc.
- X Michael Lawler Borland version() info
- X Johnny Lee Macintosh port; Win3.1 port; far strings/small model
- X Marty Leisner man pages fonts; install-target fixes
- X Daniel Lewart AIX stuff; compiler warnings
- X John Limpert Unix makefile entry
- X Hogan Long Borland preprocessor bugfix
- X Mike Long Unix Makefile installation bugfix
- X Warner Losh in misc.c
- X Dave Lovelace Data General AOS/VS port
- X Tony Luu NT timezone bugfix
- X Igor Mandrichenko vms.c; many improvements and VMS modifications
- X Javier Manero file_io.c bugfix; MS-DOS version() bugfix
- X Paul Manno makefile.tc fixes
- X Fulvio Marino revised UnZip and ZipInfo man pages; Makefile entry
- X Carl Mascott original Unix port
- X Rafal Maszkowski Convex unzip.h fixes; Unix makefile entry
- X Peter Mauzey Unix makefile entry
- X Scott Maxwell version.h; OS/2 DLL port [coming soon!]
- X Bob Maynard 16-bit OS/2 pathname bugfix
- X Randy McCaskile Unix makefile entry
- X Gene McManus -o code
- X Joe Meadows file.c, on which VMSmunch.c (timestamps) was based
- X Jason Merrill Sequent patches
- X Tom Metro corrupted-zipfile handler bugfix
- X Ricky Mobley Unix makefile entry
- X Navin Modi Unix makefile entry
- X Paul Motsuk Borland _rtl_chmod() fix
- X Anthony Naggs MS-DOS error handling stuff
- X NIIMI Satoshi Human68k port
- X Mike O'Carroll early OS/2 stuff
- X "Moby" Dick O'Connor Unix makefile entry
- X Thomas Opheys Watcom C stat() bugfix
- X Humberto Ortiz-Zuazaga Linux port; permissions bugfix; missing declarations
- X Rafael Pappalardo Convex CRYPT bugfix; Convex Makefile entry, useful info
- X Trevor Paquette Unix makefile entry
- X Keith Petersen Pyramid fixes; former Info-ZIP list maintainer
- X Alan Phillips Unix makefile entry
- X Art Pina C Set/2 crypt.c optimization bug
- X Piet W. Plomp nice fix for msc_dos Makefile target
- X Clint Pulley Unix makefile entry
- X Antonio Querubin, Jr. descrip.mms (VMS makefile)
- X Alistair Rae Encore preprocessor bugfix
- X David Robinson MSC 6.0 stat() bugfix
- X Jochen Roderburg floating-point BSD4_4 fix
- X Greg Roelofs maintainer; ZipInfo; orig VMS port; SFX; unshrink; etc.
- X Kai Uwe Rommel "real" OS/2 port; many new compilers; bugfixes; etc.
- X Paul Roub first self-extracting code
- X Steve Salisbury NT fixes; dual-mode SFX instructions; variable INBUFSIZ
- X Georg Sassen Amiga DICE compiler port
- X Jon Saxton date formats, OS/2 fixes
- X Tom Schmidt Unix makefile entry
- X Hugh Schmidt VMS stuff
- X Martin Schulz original Atari port, symlinks bugfix
- X Charles Scripter various bug reports and bugfixes
- X Chris Seaman Unix time stuff
- X Richard Seay MS-DOS Quick C makefile
- X Alex Sergejew file_io.c, stat(), Makefile fixes; Down Under jokes :-)
- X Jim Seymour Borland OS/2 fixes
- X Timur Shaporev inflate optimizations
- X Fred Smith Coherent 4.0 fixes
- X Samuel H. Smith original unzip code (Pascal and C) for MS-DOS
- X Christian Spieler performance tweaks; VMS and other fixes
- X Cliff Stanford file_io.c umask bug
- X Jack Stansbury DEC Alpha NT makefile fix
- X Jim Steiner Unix makefile entry
- X Richard Stephen Unix makefile entry
- X Brian Tillman "Where" file VMS correction
- X Onno van der Linden many fixes, esp. Intel Unix and 386 DOS
- X Jim Van Zandt one of original man pages
- X Geraldo Veiga Pyramid strrchr/rindex
- X Erik-Jan Vens Unix makefile entry
- X Antoine Verheijen new Mac port; Mac fixes; MTS/EBCDIC stuff; etc.
- X Rich Wales former Info-ZIP moderator and zip guy; MKS stuff
- X Frank Wancho original TOPS-20 port
- X Paul Weiss unzipsfx bugfix
- X Paul Wells original Amiga port for SAS/C and Lattice C (?)
- X Mark Wright Netware 3.11 NLM port
- X Randy Wright Unix makefile entry
- X Meiwei Wu open() return bugfix
- X Martin Zinser VMS .hlp file for unzipsfx; MAKESFX.COM command file
- END_OF_FILE
- if test 8435 -ne `wc -c <'unzip-5.12/CONTRIBS'`; then
- echo shar: \"'unzip-5.12/CONTRIBS'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/CONTRIBS'
- fi
- if test -f 'unzip-5.12/COPYING' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/COPYING'\"
- else
- echo shar: Extracting \"'unzip-5.12/COPYING'\" \(8192 characters\)
- sed "s/^X//" >'unzip-5.12/COPYING' <<'END_OF_FILE'
- X__________________________________________________________________________
- X
- X This is the Info-ZIP file COPYING (for UnZip), last updated 10 Aug 94.
- X__________________________________________________________________________
- X
- X There are currently three explicit copyrights on portions of UnZip
- X code (at least, of which Info-ZIP is aware): the original Sam Smith
- X copyright on unzip 2.0, upon which Info-ZIP's UnZip 3.0 was based;
- X Igor Mandrichenko's copyright on his routines in vms.c; and Greg
- X Roelofs' copyright on the new version of unshrink.c. In addition,
- X Mark Adler has placed inflate.h, inflate.c, explode.c and funzip.c
- X into the public domain; i.e., these files may be used without any
- X restrictions beyond those of simple courtesy (credit where it's due).
- X All of these are discussed immediately below; the Frequently Asked
- X Questions regarding (re)distribution of Zip and UnZip are near the
- X end of this file.
- X__________________________________________________________________________
- X
- X The original unzip source code has been extensively modified and
- X mostly rewritten (changes include random zipfile access rather than
- X sequential; replacement of unimplode() with explode(); replacement
- X of output routines; addition of inflate(), wildcards, filename-
- X mapping, text translation, ...; etc.). As far as we can tell, the
- X only remaining code which is substantially similar to Mr. Smith's
- X is that in the files unreduce.c and the old version of unshrink.c
- X (although even those have been modified), to which the following
- X copyright therefore applies:
- X
- X * Copyright 1989 Samuel H. Smith; All rights reserved
- X *
- X * Do not distribute modified versions without my permission.
- X * Do not remove or alter this notice or any other copyright notice.
- X * If you use this in your own program you must distribute source code.
- X * Do not use any of this in a commercial product.
- X
- X Regarding the first stipulation, Mr. Smith was finally tracked down
- X in southern California [Samuel H. Smith, The Tool Shop, P.O. Box 8808,
- X Panorama City, CA 91412-4808, (818) 891-4228 (voice), (818) 891-6780
- X (BBS, 2400 baud, free access)] [ADDITIONAL NOTE, July 1994: he's
- X moved again, as of mid-May 1994; these numbers are no longer correct]:
- X
- X "He says that he thought that whoever contacted him understood that
- X he has no objection to the Info-ZIP group's inclusion of his code.
- X His primary concern is that it remain freely distributable, he said."
- X
- X Info-ZIP is indebted and grateful to Mr. Smith; we hope he finds our
- X contributions as useful as we have his.
- X
- X Note that the third and fourth stipulations still apply to any com-
- X pany which wishes to incorporate the unreduce and/or "old" unshrink
- X code into its products; if you wish to do so, you must contact Mr.
- X Smith regarding licensing.
- X
- X
- X The following copyright applies to most of the VMS code in vms.c,
- X distributed with UnZip versions 4.2 and later:
- X
- X * Copyright (C) 1992 Igor Mandrichenko.
- X * Permission is granted to any individual or institution to use,
- X * copy, or redistribute this software so long as all of the orig-
- X * inal files are included unmodified, that it is not sold for
- X * profit, and that this copyright notice is retained.
- X
- X
- X The following copyright applies to the new version of "unshrink" in
- X unshrink.c, distributed with UnZip versions 5.11 and later:
- X
- X * Copyright (C) 1994 Greg Roelofs.
- X * Permission is granted to any individual/institution/corporate
- X * entity to use, copy, redistribute or modify this software for
- X * any purpose whatsoever, subject to the conditions noted in the
- X * Frequently Asked Questions section below, plus one additional
- X * condition: namely, that my name remain attached to the source
- X * code. (Other names may, of course, be added as modifications
- X * are made.) Corporate legal staff (like at IBM :-) ) who have
- X * problems understanding this can contact me through zip-bugs...
- X
- X
- X The remaining code was written by many people associated with the
- X Info-ZIP group, with large contributions from (but not limited to):
- X Mark Adler (inflate, explode, funzip), Kai Uwe Rommel (OS/2), John
- X Bush and Paul Kienitz (Amiga), Antoine Verheijen (Macintosh), Hunter
- X Goatley (more VMS) and Greg Roelofs (lots of stuff). See the file
- X CONTRIBS in the source distribution for a much more complete list of
- X contributors. As noted above, Mark Adler's inflate.[ch], explode.c
- X and funzip.c are in the public domain. As for the remaining code,
- X while it may not be explicitly copyrighted, we do request that no
- X one else try to copyright it, either. In other words, use it with
- X our blessings, but it's still our code. (You can consider that an
- X implicit copyright if it makes you feel better. :-) ) Thank you!
- X__________________________________________________________________________
- X
- X Frequently Asked Questions about distributing Zip and UnZip:
- X
- X
- X Q. Can I distribute Zip and UnZip sources and/or executables?
- X
- X A. You may redistribute the latest official distributions without
- X any modification, and without even asking us for permission.
- X [Note that an "executable distribution" includes documentation,
- X even if it's in a separate zipfile; plain executables do NOT
- X count.] You can charge for the cost of the media (CDROM, disk-
- X ettes, etc.) and a small copying fee. Distributed archives
- X should follow the naming conventions used in the Where file.
- X If you want to distribute modified versions please contact us
- X at zip-bugs@wkuvx1.wku.edu first. You must not distribute beta
- X versions without explicit permission to do so.
- X
- X
- X Q. Can I use the executables of Zip and UnZip to distribute my
- X software?
- X
- X A. Yes, so long as it is clear that Zip and UnZip are not being
- X sold, that the source code is freely available, and that there
- X are no extra or hidden charges resulting from its use by or in-
- X clusion with the commercial product. Here is an example of a
- X suitable notice:
- X
- X NOTE: <Product> is packaged on this CD using Info-ZIP's
- X compression utility. The installation program uses UnZip
- X to read zip files from the CD. Info-ZIP's software (Zip,
- X UnZip and related utilities) is free and can be obtained
- X as source code or executables from various bulletin board
- X services and anonymous-ftp sites, including CompuServe's
- X IBMPRO forum and ftp.uu.net:/pub/archiving/zip/*.
- X
- X
- X Q. Can I use the source code of Zip and UnZip in my commercial
- X application?
- X
- X A. Yes, so long as you include in your product an acknowledgment
- X and an offer of the original compression sources for free or for
- X a small copying fee, and make clear that there are no extra or
- X hidden charges resulting from the use of the compression code by
- X your product (see below for an example). The acknowledgment should
- X appear in at least one piece of human-readable documentation (e.g.,
- X a README file or man page), although additionally putting it in
- X the executable(s) is OK, too. In other words, you are allowed to
- X sell only your own work, not ours--and we'd like a little credit.
- X [Note the additional restrictions above on the code in unreduce.c,
- X unshrink.c and vms.c.] Contact us at zip-bugs@wkuvx1.wku.edu if
- X you have special requirements. We also like to know when our code
- X is being used, but we don't require that.
- X
- X <Product> incorporates compression code by the Info-ZIP group.
- X There are no extra charges or costs due to the use of this code,
- X and the original compression sources are freely available from
- X CompuServe in the IBMPRO forum and by anonymous ftp from the
- X Internet site ftp.uu.net:/pub/archiving/zip. We will also, upon
- X request, mail you the full sources on a 3.5" MSDOS-format disk-
- X ette for the cost of mailing. Send $2.00 to <address> and ..."
- X
- X__________________________________________________________________________
- X
- END_OF_FILE
- if test 8192 -ne `wc -c <'unzip-5.12/COPYING'`; then
- echo shar: \"'unzip-5.12/COPYING'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/COPYING'
- fi
- if test -f 'unzip-5.12/amiga/filedate.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/filedate.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/filedate.c'\" \(7106 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/filedate.c' <<'END_OF_FILE'
- X/***********************/
- X/* Function filedate() */
- X/***********************/
- X
- X/* FileDate() (originally utime.c), by Paul Wells. Modified by John Bush
- X * and others (see also sendpkt() comments, below); NewtWare SetFileDate()
- X * clone cheaply ripped off from utime().
- X */
- X
- X/* HISTORY/CHANGES
- X * 2 Sep 92, Greg Roelofs, Original coding.
- X * 6 Sep 92, John Bush, Incorporated into UnZip 5.1
- X * 6 Sep 92, John Bush, Interlude "FileDate()" defined, which calls or
- X * redefines SetFileDate() depending upon AMIGADOS2 definition.
- X * 11 Oct 92, John Bush, Eliminated AMIGADOS2 switch by determining
- X * revision via OpenLibrary() call. Now only one version of
- X * the program runs on both platforms (1.3.x vs. 2.x)
- X * 11 Oct 92, John Bush, Merged with Zip version and changed arg passing
- X * to take time_t input instead of struct DateStamp.
- X * Arg passing made to conform with utime().
- X * 22 Nov 92, Paul Kienitz, fixed includes for Aztec and cleaned up some
- X * lint-ish errors; simplified test for AmigaDOS version.
- X */
- X
- X/* DESCRIPTION
- X * This routine chooses between 2 methods to set the file date on AMIGA.
- X * Since AmigaDOS 2.x came out, SetFileDate() was available in ROM (v.36
- X * and higher). Under AmigaDOS 1.3.x (less than v.36 ROM), SetFileDate()
- X * must be accomplished by constructing a message packet and sending it
- X * to the file system handler of the file to be stamped.
- X *
- X * The system's ROM version is extracted from the external system Library
- X * base.
- X *
- X * NOTE: although argument passing conforms with utime(), note the
- X * following differences:
- X * - Return value is boolean success/failure.
- X * - If a structure or array is passed, only the first value
- X * is used, which *may* correspond to date accessed and not
- X * date modified.
- X */
- X
- X#include <string.h>
- X#include <time.h>
- X#include <errno.h>
- X#include <stdio.h>
- X
- X#include <exec/types.h>
- X#include <exec/memory.h>
- X#include <exec/libraries.h>
- X#include <libraries/dos.h>
- X#include <libraries/dosextens.h>
- X
- X#ifdef AZTEC_C
- X extern int timezone;
- X void tzset(void);
- X# include <clib/exec_protos.h>
- X# include <clib/dos_protos.h>
- X# include <pragmas/exec_lib.h>
- X# include <pragmas/dos_lib.h>
- X# define ESRCH ENOENT
- X# define EOSERR EIO
- X#endif
- X
- X#if defined(LATTICE) || defined(__SASC)
- X# include <proto/exec.h>
- X# include <proto/dos.h>
- X#endif
- X
- Xextern int _OSERR;
- X
- X#ifndef SUCCESS
- X# define SUCCESS (-1L)
- X# define FAILURE 0L
- X#endif
- X
- X#define ReqVers 36L /* required library version for SetFileDate() */
- X
- Xextern struct Library *SysBase;
- X
- XLONG FileDate (char *filename, time_t u[]);
- X
- X/* =============================================================== */
- X
- XLONG FileDate(filename, u)
- X char *filename;
- X time_t u[];
- X{
- X LONG SetFileDate(UBYTE *filename, struct DateStamp *pDate);
- X LONG sendpkt(struct MsgPort *pid, LONG action, LONG *args, LONG nargs);
- X struct MsgPort *taskport;
- X struct FileLock *dirlock, *lock;
- X struct FileInfoBlock *fib;
- X LONG pktargs[4];
- X UBYTE *ptr;
- X long ret;
- X
- X struct DateStamp pDate;
- X time_t mtime;
- X
- X tzset();
- X mtime=u[0]-timezone;
- X
- X#ifdef DEBUG
- X fprintf (stderr,"Entry to FileDate(): mtime=%s\n",ctime(&mtime));
- X#endif
- X
- X/* magic number = 2922 = 8 years + 2 leaps between 1970 - 1978 */
- X
- X pDate.ds_Days = (mtime / 86400L) - 2922L;
- X mtime = mtime % 86400L;
- X pDate.ds_Minute = mtime / 60L;
- X mtime = mtime % 60L;
- X pDate.ds_Tick = mtime * TICKS_PER_SECOND;
- X
- X#ifdef DEBUG
- X fprintf (stderr,"In FileDate(): Days=%ld Minutes=%ld Ticks=%ld\n",
- X pDate.ds_Days,pDate.ds_Minute,pDate.ds_Tick);
- X#endif
- X
- X if (SysBase->lib_Version >= ReqVers) {
- X return (SetFileDate(filename,&pDate)); /* native routine at 2.0+ */
- X }
- X else /* !(SysBase->lib_Version >=ReqVers) */
- X {
- X if( !(taskport = (struct MsgPort *)DeviceProc(filename)) )
- X {
- X errno = ESRCH; /* no such process */
- X _OSERR = IoErr();
- X return FAILURE;
- X }
- X
- X if( !(lock = (struct FileLock *)Lock(filename,SHARED_LOCK)) )
- X {
- X errno = ENOENT; /* no such file */
- X _OSERR = IoErr();
- X return FAILURE;
- X }
- X
- X if( !(fib = (struct FileInfoBlock *)AllocMem(
- X (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
- X {
- X errno = ENOMEM; /* insufficient memory */
- X UnLock((BPTR)lock);
- X return FAILURE;
- X }
- X
- X if( Examine((BPTR)lock,fib)==FAILURE )
- X {
- X errno = EOSERR; /* operating system error */
- X _OSERR = IoErr();
- X UnLock((BPTR)lock);
- X FreeMem((char *)fib,(long)sizeof(*fib));
- X return FAILURE;
- X }
- X
- X dirlock = (struct FileLock *)ParentDir((BPTR)lock);
- X ptr = (UBYTE *)AllocMem(64L,MEMF_PUBLIC);
- X strcpy((ptr+1),fib->fib_FileName);
- X *ptr = strlen(fib->fib_FileName);
- X FreeMem((char *)fib,(long)sizeof(*fib));
- X UnLock((BPTR)lock);
- X
- X /* now fill in argument array */
- X
- X pktargs[0] = 0;
- X pktargs[1] = (LONG)dirlock;
- X pktargs[2] = (LONG)&ptr[0] >> 2;
- X pktargs[3] = (LONG)&pDate;
- X
- X errno = ret = sendpkt(taskport,ACTION_SET_DATE,pktargs,4L);
- X
- X FreeMem(ptr,64L);
- X UnLock((BPTR)dirlock);
- X
- X return SUCCESS;
- X } /* ?(SysBase->lib_Version >= ReqVers) */
- X} /* FileDate() */
- X
- X/* LOW LEVEL SUPPORT ROUTINES */
- X
- X/* sendpkt.c
- X * by A. Finkel, P. Lindsay, C. Sheppner
- X * returns Res1 of the reply packet
- X */
- X/*
- X#include <exec/types.h>
- X#include <exec/memory.h>
- X#include <libraries/dos.h>
- X#include <libraries/dosextens.h>
- X#include <proto/exec.h>
- X#include <proto/dos.h>
- X*/
- X
- XLONG sendpkt(pid,action,args,nargs)
- Xstruct MsgPort *pid; /* process identifier (handler message port) */
- XLONG action, /* packet type (desired action) */
- X *args, /* a pointer to argument list */
- X nargs; /* number of arguments in list */
- X{
- X
- X struct MsgPort *replyport, *CreatePort(UBYTE *, long);
- X void DeletePort(struct MsgPort *);
- X struct StandardPacket *packet;
- X LONG count, *pargs, res1;
- X
- X replyport = CreatePort(NULL,0L);
- X if( !replyport ) return(0);
- X
- X packet = (struct StandardPacket *)AllocMem(
- X (long)sizeof(struct StandardPacket),MEMF_PUBLIC|MEMF_CLEAR);
- X if( !packet )
- X {
- X DeletePort(replyport);
- X return(0);
- X }
- X
- X packet->sp_Msg.mn_Node.ln_Name = (char *)&(packet->sp_Pkt);
- X packet->sp_Pkt.dp_Link = &(packet->sp_Msg);
- X packet->sp_Pkt.dp_Port = replyport;
- X packet->sp_Pkt.dp_Type = action;
- X
- X /* copy the args into the packet */
- X pargs = &(packet->sp_Pkt.dp_Arg1); /* address of 1st argument */
- X for( count=0; count<nargs; count++ )
- X pargs[count] = args[count];
- X
- X PutMsg(pid,(struct Message *)packet); /* send packet */
- X
- X WaitPort(replyport);
- X GetMsg(replyport);
- X
- X res1 = packet->sp_Pkt.dp_Res1;
- X
- X FreeMem((char *)packet,(long)sizeof(*packet));
- X DeletePort(replyport);
- X
- X return(res1);
- X
- X} /* sendpkt() */
- END_OF_FILE
- if test 7106 -ne `wc -c <'unzip-5.12/amiga/filedate.c'`; then
- echo shar: \"'unzip-5.12/amiga/filedate.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/amiga/filedate.c'
- fi
- if test -f 'unzip-5.12/amiga/stat.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/amiga/stat.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/amiga/stat.c'\" \(7102 characters\)
- sed "s/^X//" >'unzip-5.12/amiga/stat.c' <<'END_OF_FILE'
- X/* Here we have a handmade stat() function because Aztec's c.lib stat() */
- X/* does not support an st_mode field, which we need... also a chmod(). */
- X
- X/* This stat() is by Paul Wells, modified by Paul Kienitz. */
- X/* for use with Aztec C >= 5.0 and Lattice C <= 4.01 */
- X
- X#include <exec/types.h>
- X#include <exec/memory.h>
- X#include <libraries/dos.h>
- X#include <libraries/dosextens.h>
- X#ifdef AZTEC_C
- X# include <clib/exec_protos.h>
- X# include <clib/dos_protos.h>
- X# include <pragmas/exec_lib.h>
- X# include <pragmas/dos_lib.h>
- X# include "amiga/z-stat.h" /* fake version of stat.h */
- X#else
- X# include <sys/types.h>
- X# include <sys/stat.h>
- X# include <proto/exec.h>
- X# include <proto/dos.h>
- X#endif
- X
- X#ifndef SUCCESS
- X# define SUCCESS (-1)
- X# define FAILURE (0)
- X#endif
- X
- Xextern int stat(char *file,struct stat *buf);
- X
- Xstat(file,buf)
- Xchar *file;
- Xstruct stat *buf;
- X{
- X
- X struct FileInfoBlock *inf;
- X struct FileLock *lock;
- X long ftime;
- X
- X if( (lock = (struct FileLock *)Lock(file,SHARED_LOCK))==0 )
- X /* file not found */
- X return(-1);
- X
- X if( !(inf = (struct FileInfoBlock *)AllocMem(
- X (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
- X {
- X UnLock((BPTR)lock);
- X return(-1);
- X }
- X
- X if( Examine((BPTR)lock,inf)==FAILURE )
- X {
- X FreeMem((char *)inf,(long)sizeof(*inf));
- X UnLock((BPTR)lock);
- X return(-1);
- X }
- X
- X /* fill in buf */
- X buf->st_dev =
- X buf->st_nlink =
- X buf->st_uid =
- X buf->st_gid =
- X buf->st_rdev = 0;
- X
- X buf->st_ino = inf->fib_DiskKey;
- X buf->st_blocks = inf->fib_NumBlocks;
- X buf->st_size = inf->fib_Size;
- X
- X /* now the date. AmigaDOS has weird datestamps---
- X * ds_Days is the number of days since 1-1-1978;
- X * however, as Unix wants date since 1-1-1970...
- X */
- X
- X ftime =
- X (inf->fib_Date.ds_Days * 86400 ) +
- X (inf->fib_Date.ds_Minute * 60 ) +
- X (inf->fib_Date.ds_Tick / TICKS_PER_SECOND ) +
- X (86400 * 8 * 365 ) +
- X (86400 * 2 ); /* two leap years */
- X
- X /* ftime += timezone; */
- X
- X buf->st_ctime =
- X buf->st_atime =
- X buf->st_mtime = ftime;
- X
- X buf->st_mode = (inf->fib_DirEntryType < 0 ? S_IFREG : S_IFDIR);
- X
- X /* lastly, throw in the protection bits */
- X buf->st_mode |= ((inf->fib_Protection ^ 0xF) & 0xFF);
- X
- X FreeMem((char *)inf, (long)sizeof(*inf));
- X UnLock((BPTR)lock);
- X
- X return(0);
- X
- X}
- X
- X
- X
- X/* opendir(), readdir(), closedir() and rmdir() by Paul Kienitz: */
- X
- Xunsigned short disk_not_mounted;
- X
- Xstatic DIR *dir_cleanup_list = NULL; /* for resource tracking */
- X
- XDIR *opendir(char *path)
- X{
- X DIR *dd = AllocMem(sizeof(DIR), MEMF_PUBLIC);
- X if (!dd) return NULL;
- X if (!(dd->d_parentlock = Lock(path, MODE_OLDFILE))) {
- X disk_not_mounted = IoErr() == ERROR_DEVICE_NOT_MOUNTED;
- X FreeMem(dd, sizeof(DIR));
- X return NULL;
- X } else
- X disk_not_mounted = 0;
- X if (!Examine(dd->d_parentlock, &dd->d_fib) || dd->d_fib.fib_EntryType < 0) {
- X UnLock(dd->d_parentlock);
- X FreeMem(dd, sizeof(DIR));
- X return NULL;
- X }
- X dd->d_cleanuplink = dir_cleanup_list; /* track them resources */
- X if (dir_cleanup_list)
- X dir_cleanup_list->d_cleanupparent = &dd->d_cleanuplink;
- X dd->d_cleanupparent = &dir_cleanup_list;
- X dir_cleanup_list = dd;
- X return dd;
- X}
- X
- Xvoid closedir(DIR *dd)
- X{
- X if (dd) {
- X if (dd->d_cleanuplink)
- X dd->d_cleanuplink->d_cleanupparent = dd->d_cleanupparent;
- X *(dd->d_cleanupparent) = dd->d_cleanuplink;
- X if (dd->d_parentlock)
- X UnLock(dd->d_parentlock);
- X FreeMem(dd, sizeof(DIR));
- X }
- X}
- X
- X/* CALL THIS WHEN HANDLING CTRL-C OR OTHER UNEXPECTED EXIT! */
- Xvoid close_leftover_open_dirs(void)
- X{
- X while (dir_cleanup_list)
- X closedir(dir_cleanup_list);
- X}
- X
- XDIR *readdir(DIR *dd)
- X{
- X return (ExNext(dd->d_parentlock, &dd->d_fib) ? dd : NULL);
- X}
- X
- Xint rmdir(char *path)
- X{
- X return (DeleteFile(path) ? 0 : IoErr());
- X}
- X
- X
- Xint chmod(char *filename, int bits) /* bits are as for st_mode */
- X{
- X long protmask = (bits & 0xFF) ^ 0xF;
- X return !SetProtection(filename, protmask);
- X}
- X
- X
- X#ifdef AZTEC_C
- X
- X/* This here removes unnecessary bulk from the executable with Aztec: */
- Xvoid _wb_parse() { }
- X
- X/* This here pretends we have time zone support and suchlike when we don't: */
- Xint timezone = 0;
- Xvoid tzset() { }
- X
- X/* fake a unix function that does not apply to amigados: */
- Xint umask() { return 0; }
- X
- Xint _OSERR;
- X
- X# include <signal.h>
- X
- X/* C library signal() messes up debugging yet adds no actual usefulness */
- Xtypedef void (*__signal_return_type)(int);
- X__signal_return_type signal() { return SIG_ERR; }
- X
- X
- X/* The following replaces Aztec's argv-parsing function for compatibility with
- Xthe standard AmigaDOS handling of *E, *N, and *". It also fixes the problem
- Xthe standard _cli_parse() has of accepting only lower-ascii characters. */
- X
- Xint _argc, _arg_len;
- Xchar **_argv, *_arg_lin;
- X
- Xvoid _cli_parse(struct Process *pp, long alen, register UBYTE *aptr)
- X{
- X register UBYTE *cp;
- X register struct CommandLineInterface *cli;
- X register short c;
- X register short starred = 0;
- X
- X cli = (struct CommandLineInterface *) (pp->pr_CLI << 2);
- X cp = (UBYTE *) (cli->cli_CommandName << 2);
- X _arg_len = cp[0] + alen + 2;
- X if (!(_arg_lin = AllocMem((long) _arg_len, 0L)))
- X return;
- X c = cp[0];
- X strncpy(_arg_lin, cp + 1, c);
- X _arg_lin[c] = 0;
- X for (cp = _arg_lin + c + 1; alen && (*aptr < '\n' || *aptr > '\r'); alen--)
- X *cp++ = *aptr++;
- X *cp = 0;
- X for (_argc = 1, aptr = cp = _arg_lin + c + 1; ; _argc++) {
- X while (*cp == ' ' || *cp == '\t')
- X cp++;
- X if (!*cp)
- X break;
- X if (*cp == '"') {
- X cp++;
- X while (c = *cp++) {
- X if (starred) {
- X if (c | 0x20 == 'n')
- X *aptr++ = '\n';
- X else if (c | 0x20 == 'e')
- X *aptr++ = 27;
- X else
- X *aptr++ = c;
- X starred = 0;
- X } else if (c == '"') {
- X *aptr++ = 0;
- X break;
- X } else if (c == '*')
- X starred = 1;
- X else
- X *aptr++ = c;
- X }
- X } else {
- X while ((c = *cp++) && c != ' ' && c != '\t')
- X *aptr++ = c;
- X *aptr++ = 0;
- X }
- X if (c == 0)
- X --cp;
- X }
- X *aptr = 0;
- X if (!(_argv = AllocMem((_argc + 1) * sizeof(*_argv), 0L))) {
- X _argc = 0;
- X return;
- X }
- X for (c = 0, cp = _arg_lin; c < _argc; c++) {
- X _argv[c] = cp;
- X cp += strlen(cp) + 1;
- X }
- X _argv[c] = NULL;
- X}
- X
- X#endif /* AZTEC_C */
- END_OF_FILE
- if test 7102 -ne `wc -c <'unzip-5.12/amiga/stat.c'`; then
- echo shar: \"'unzip-5.12/amiga/stat.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/amiga/stat.c'
- fi
- if test -f 'unzip-5.12/mac/macdir.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/mac/macdir.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/mac/macdir.c'\" \(2914 characters\)
- sed "s/^X//" >'unzip-5.12/mac/macdir.c' <<'END_OF_FILE'
- X#include <Errors.h>
- X#include <Files.h>
- X#ifndef THINK_C
- X#include <Strings.h>
- X#endif
- X
- X#ifndef FSFCBLen
- X#define FSFCBLen (*(short *)0x3F6)
- X#endif
- X
- X#include <errno.h>
- X#include <stdlib.h>
- X#include <string.h>
- X
- X#include "macdir.h"
- X
- Xint closedir(dPtr) DIR *dPtr; {
- X free(dPtr);
- X
- X return 0;
- X}
- X
- XDIR *opendir(dirName) char *dirName; {
- X int fullPath, pathLen;
- X char *s, pName[256];
- X HParamBlockRec hPB;
- X CInfoPBRec cPB;
- X DIR *dPtr;
- X OSErr err;
- X
- X if (dirName == NULL || *dirName == '\0' || (pathLen = strlen(dirName)) > 255) {
- X errno = EINVAL;
- X return NULL;
- X }
- X
- X if (FSFCBLen <= 0) {
- X errno = ENOTDIR;
- X return NULL;
- X }
- X
- X /* Get information about volume. */
- X
- X memset(&hPB, '\0', sizeof(hPB));
- X
- X strcpy(pName, dirName);
- X
- X if (((s = strchr(pName, ':')) == NULL) || (*pName == ':')) {
- X fullPath = false;
- X } else {
- X *(s + 1) = '\0';
- X c2pstr(pName);
- X hPB.volumeParam.ioVolIndex = -1;
- X fullPath = true;
- X }
- X
- X hPB.volumeParam.ioNamePtr = (StringPtr)pName;
- X
- X err = PBHGetVInfo(&hPB, 0);
- X
- X if ((err != noErr) || (hPB.volumeParam.ioVFSID != 0)) {
- X errno = ENOENT;
- X return NULL;
- X }
- X
- X /* Get information about file. */
- X
- X memset(&cPB, '\0', sizeof(cPB));
- X
- X strcpy(pName, dirName);
- X c2pstr(pName);
- X
- X if (fullPath)
- X cPB.hFileInfo.ioVRefNum = hPB.volumeParam.ioVRefNum;
- X
- X cPB.hFileInfo.ioNamePtr = (StringPtr)pName;
- X
- X err = PBGetCatInfo(&cPB, false);
- X
- X if (err != noErr) {
- X errno = (err == fnfErr) ? ENOENT : EIO;
- X return NULL;
- X }
- X
- X if (!(cPB.hFileInfo.ioFlAttrib & ioDirMask)) {
- X errno = ENOTDIR;
- X return NULL;
- X }
- X
- X /* Get space for, and fill in, DIR structure. */
- X
- X if ((dPtr = (DIR *)malloc(sizeof(DIR))) == NULL) {
- X return NULL;
- X }
- X
- X dPtr->ioVRefNum = cPB.dirInfo.ioVRefNum;
- X dPtr->ioDrDirID = cPB.dirInfo.ioDrDirID;
- X dPtr->ioFDirIndex = 1;
- X dPtr->flags = 0;
- X
- X return dPtr;
- X}
- X
- Xstruct dirent *readdir(dPtr) DIR *dPtr; {
- X struct dirent *dirPtr;
- X CInfoPBRec cPB;
- X char name[32];
- X OSErr err;
- X
- X if (dPtr->flags) {
- X return NULL;
- X }
- X
- X /* Get information about file. */
- X
- X memset(&cPB, '\0', sizeof(cPB));
- X
- X cPB.hFileInfo.ioNamePtr = (StringPtr)name;
- X cPB.hFileInfo.ioFDirIndex = dPtr->ioFDirIndex;
- X cPB.hFileInfo.ioVRefNum = dPtr->ioVRefNum;
- X cPB.hFileInfo.ioDirID = dPtr->ioDrDirID;
- X
- X err = PBGetCatInfo(&cPB, false);
- X
- X if (err != noErr) {
- X dPtr->flags = 0xff;
- X errno = (err == fnfErr) ? ENOENT : EIO;
- X return NULL;
- X }
- X
- X p2cstr((StringPtr)name);
- X
- X dirPtr = &dPtr->currEntry;
- X
- X dirPtr->d_fileno = dPtr->ioFDirIndex++;
- X dirPtr->d_namlen = strlen(name);
- X strcpy(dirPtr->d_name, name);
- X dirPtr->d_reclen = sizeof(struct dirent) - sizeof(dirPtr->d_name) + dirPtr->d_namlen;
- X
- X return dirPtr;
- X}
- END_OF_FILE
- if test 2914 -ne `wc -c <'unzip-5.12/mac/macdir.c'`; then
- echo shar: \"'unzip-5.12/mac/macdir.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/mac/macdir.c'
- fi
- if test -f 'unzip-5.12/mac/macscreen.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/mac/macscreen.c'\"
- else
- echo shar: Extracting \"'unzip-5.12/mac/macscreen.c'\" \(7587 characters\)
- sed "s/^X//" >'unzip-5.12/mac/macscreen.c' <<'END_OF_FILE'
- X#include <QuickDraw.h>
- X
- X#include <stdio.h>
- X#include <stdarg.h>
- X#include <string.h>
- X
- X#define bufferSize 1024
- X
- X#define screenWindow 128
- X
- Xstatic Rect scrollRect, pauseRect;
- Xstatic WindowPtr theWindow;
- Xstatic RgnHandle scrollRgn;
- X
- Xstatic short fontHeight, fontWidth, screenHeight, screenWidth;
- Xstatic short currentPosition, maxPosition, pausePosition;
- X
- Xstatic short *screenLength, startLine, endLine;
- Xstatic char *screenImage, **screenLine;
- X
- Xstatic int screenOptions;
- X
- X#define pauseOption 0x0001
- X#define scrollOption 0x0002
- X
- Xvoid screenOpen(char *Title) {
- X FontInfo fontInfo;
- X int n;
- X
- X theWindow = GetNewWindow(screenWindow, nil, (WindowPtr)(-1));
- X
- X if ((Title != NULL) && (*Title != '\0')) {
- X c2pstr(Title);
- X SetWTitle(theWindow, Title);
- X p2cstr(Title);
- X }
- X
- X ShowWindow(theWindow);
- X
- X SetPort(theWindow);
- X TextFont(monaco);
- X TextSize(9);
- X
- X GetFontInfo(&fontInfo);
- X fontHeight = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
- X fontWidth = fontInfo.widMax;
- X
- X scrollRgn = NewRgn();
- X
- X screenWidth = (theWindow->portRect.right - theWindow->portRect.left - 10) /
- X fontWidth;
- X screenHeight = (theWindow->portRect.bottom - theWindow->portRect.top) /
- X fontHeight;
- X maxPosition = screenHeight * fontHeight;
- X pausePosition = maxPosition - (currentPosition = fontHeight);
- X
- X SetRect(&scrollRect, theWindow->portRect.left, theWindow->portRect.top + fontInfo.descent,
- X theWindow->portRect.right, theWindow->portRect.bottom);
- X SetRect(&pauseRect, theWindow->portRect.left, pausePosition + fontInfo.descent,
- X theWindow->portRect.right, theWindow->portRect.bottom);
- X
- X MoveTo(5, currentPosition);
- X
- X n = (sizeof(char *) + sizeof(short) + screenWidth) * screenHeight;
- X
- X screenLine = (char **)NewPtr(n);
- X
- X screenLength = (short *)&screenLine[screenHeight];
- X screenImage = (char *)&screenLength[screenHeight];
- X
- X for (n = 0; n < screenHeight; n++) {
- X screenLine[n] = &screenImage[n * screenWidth];
- X screenLength[n] = 0;
- X }
- X
- X startLine = endLine = 0;
- X
- X screenOptions = 0;
- X
- X return;
- X}
- X
- Xvoid screenControl(options, setting) char *options; int setting; {
- X int n = 0;
- X
- X while (*options) {
- X switch (*options) {
- X case 'p':
- X n |= pauseOption;
- X break;
- X case 's':
- X n |= scrollOption;
- X break;
- X default:
- X break;
- X }
- X options += 1;
- X }
- X
- X if (setting == 0)
- X screenOptions &= (n ^ (-1));
- X else
- X screenOptions |= n;
- X
- X if ((pausePosition = maxPosition - currentPosition) == 0)
- X pausePosition = maxPosition - fontHeight;
- X
- X return;
- X}
- X
- Xvoid screenClose(void) {
- X DisposPtr(screenLine);
- X
- X DisposeWindow(theWindow);
- X
- X return;
- X}
- X
- Xvoid screenUpdate(WindowPtr window) {
- X GrafPort *savePort;
- X int m, n;
- X
- X if (window == theWindow) {
- X BeginUpdate(window);
- X if (!EmptyRgn(window->visRgn)) {
- X GetPort(&savePort);
- X SetPort(window);
- X n = startLine;
- X for (m = 1; ; m++) {
- X MoveTo(5, m * fontHeight);
- X if (screenLength[n] != 0)
- X DrawText(screenLine[n], 0, screenLength[n]);
- X if (n == endLine) break;
- X if ((n += 1) == screenHeight) n = 0;
- X }
- X SetPort(savePort);
- X }
- X EndUpdate(window);
- X }
- X
- X return;
- X}
- X
- Xstatic void screenNewline(void) {
- X MoveTo(5, currentPosition += fontHeight);
- X if (currentPosition > maxPosition) {
- X if (screenOptions & scrollOption) {
- X ScrollRect(&scrollRect, 0, -fontHeight, scrollRgn);
- X MoveTo(5, currentPosition = maxPosition);
- X if ((startLine += 1) == screenHeight) startLine = 0;
- X } else {
- X ScrollRect(&scrollRect, 0, -maxPosition + fontHeight, scrollRgn);
- X MoveTo(5, currentPosition = fontHeight + fontHeight);
- X startLine = endLine;
- X }
- X }
- X pausePosition -= fontHeight;
- X
- X if ((endLine += 1) == screenHeight) endLine = 0;
- X screenLength[endLine] = 0;
- X
- X return;
- X}
- X
- Xstatic char waitChar(void) {
- X WindowPtr whichWindow;
- X EventRecord theEvent;
- X
- X for ( ; ; ) {
- X SystemTask();
- X if (GetNextEvent(everyEvent, &theEvent)) {
- X switch (theEvent.what) {
- X case keyDown:
- X if ((theEvent.modifiers & cmdKey) &&
- X ((theEvent.message & charCodeMask) == '.'))
- X ExitToShell();
- X return(theEvent.message & charCodeMask);
- X case mouseDown:
- X if (FindWindow(theEvent.where, &whichWindow) == inSysWindow)
- X SystemClick(&theEvent, whichWindow);
- X break;
- X case updateEvt:
- X screenUpdate((WindowPtr)theEvent.message);
- X break;
- X }
- X }
- X }
- X}
- X
- Xstatic void screenPause(void) {
- X
- X if (pausePosition == 0) {
- X if (screenOptions & pauseOption) {
- X DrawText("Press any key to continue ...", 0, 29);
- X memcpy(screenLine[endLine], "Press any key to continue ...", 29);
- X screenLength[endLine] = 29;
- X
- X (void)waitChar();
- X
- X EraseRect(&pauseRect);
- X MoveTo(5, currentPosition);
- X screenLength[endLine] = 0;
- X }
- X
- X pausePosition = maxPosition - fontHeight;
- X }
- X
- X return;
- X}
- X
- Xvoid screenDisplay(char *s) {
- X GrafPort *savePort;
- X int m, n;
- X char *t;
- X
- X GetPort(&savePort);
- X SetPort(theWindow);
- X
- X while (*s) {
- X screenPause();
- X
- X for (t = s; (*s) && (*s != '\n') && (*s != '\r'); s++);
- X
- X if ((n = s - t) > (m = screenWidth - screenLength[endLine])) n = m;
- X
- X if (n > 0) {
- X DrawText(t, 0, n);
- X memcpy(screenLine[endLine] + screenLength[endLine], t, n);
- X screenLength[endLine] += n;
- X }
- X
- X if ((*s == '\n') || (*s == '\r')) {
- X screenNewline();
- X s += 1;
- X }
- X }
- X
- X SetPort(savePort);
- X
- X return;
- X}
- X
- Xvoid screenDump(char *s, long n) {
- X GrafPort *savePort;
- X int k, m;
- X char *t;
- X
- X GetPort(&savePort);
- X SetPort(theWindow);
- X
- X while (n) {
- X screenPause();
- X
- X for (t = s; (n) && (*s != '\n') && (*s != '\r'); s++, n--);
- X
- X if ((k = s - t) > (m = screenWidth - screenLength[endLine])) k = m;
- X
- X if (k > 0) {
- X DrawText(t, 0, k);
- X memcpy(screenLine[endLine] + screenLength[endLine], t, k);
- X screenLength[endLine] += k;
- X }
- X
- X if ((*s == '\n') || (*s == '\r')) {
- X screenNewline();
- X s += 1;
- X n -= 1;
- X }
- X }
- X
- X SetPort(savePort);
- X
- X return;
- X}
- X
- Xchar *wfgets(char *s, int n, FILE *stream) {
- X GrafPort *savePort;
- X char c, *t = s;
- X
- X GetPort(&savePort);
- X SetPort(theWindow);
- X
- X for (n -= 1; (n > 0) && ((c = waitChar()) != '\r'); n -= 1) {
- X DrawChar(*t++ = c);
- X if (screenLength[endLine] < screenWidth)
- X screenLine[endLine][screenLength[endLine]++] = c;
- X }
- X
- X if (c == '\r') screenNewline();
- X
- X *t = '\0';
- X
- X SetPort(savePort);
- X
- X return(s);
- X}
- X
- Xvoid wfprintf(FILE *stream, char *format, ...) {
- X char buffer[bufferSize];
- X va_list ap;
- X
- X va_start(ap, format);
- X vsprintf(buffer, format, ap);
- X va_end(ap);
- X
- X screenDisplay(buffer);
- X
- X return;
- X}
- X
- Xvoid wprintf(char *format, ...) {
- X char buffer[bufferSize];
- X va_list ap;
- X
- X va_start(ap, format);
- X vsprintf(buffer, format, ap);
- X va_end(ap);
- X
- X screenDisplay(buffer);
- X
- X return;
- X}
- END_OF_FILE
- if test 7587 -ne `wc -c <'unzip-5.12/mac/macscreen.c'`; then
- echo shar: \"'unzip-5.12/mac/macscreen.c'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/mac/macscreen.c'
- fi
- if test -f 'unzip-5.12/mac/rsrc.hqx' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/mac/rsrc.hqx'\"
- else
- echo shar: Extracting \"'unzip-5.12/mac/rsrc.hqx'\" \(6945 characters\)
- sed "s/^X//" >'unzip-5.12/mac/rsrc.hqx' <<'END_OF_FILE'
- X(This file must be converted with BinHex 4.0)
- X
- X:%A9ZHQP`,R4SD@jVBbjbFh*M!(*cFQ058d9%!*!)'PGPLJ#3"!%!N!-B)J!!&b)
- X!!!)eFR)T$3N*)#"l$3N*)*!%HLdqE%4TFNP%)$dJF'eT,4&eERTTF#jdD'PZDf-
- XZFR0bB`)!N!0bFh*M8P0&4!%!N!0bFh*M8P0&4!%!!*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ip-5.12/os2/makefile.os2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/os2/makefile.os2'\"
- else
- echo shar: Extracting \"'unzip-5.12/os2/makefile.os2'\" \(7372 characters\)
- sed "s/^X//" >'unzip-5.12/os2/makefile.os2' <<'END_OF_FILE'
- X# Makefile for UnZip, UnZipSFX and fUnZip 23 July 1994
- X#
- X# - for Microsoft C, version 6.00 or higher, for use under OS/2 1.x (16-bit)
- X# - for Watcom C/386, version 9.0 or higher, for use under OS/2 2.x (32-bit)
- X# - for IBM C/C++ Set/2, for use under OS/2 2.x (32-bit)
- X# - for Borland C++, for use under OS/2 2.x (32-bit)
- X# - for GNU gcc (emx kit), version 0.8e or higher, for use under OS/2 2.x
- X#
- X# cross-compilation:
- X# - for Microsoft C, version 6.00 or higher, for use under MS-DOS (16-bit)
- X# - for GNU gcc (emx), version 0.8h or higher, for use under MS-DOS (32-bit)
- X
- X# To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
- X# name being "makefile.os2", and it must be in the main unzip directory).
- X
- X# Notes on Microsoft C 6.00 compilation for OS/2:
- X#
- X# The resulting programs can be used under OS/2 1.x or 2.x protected
- X# mode only, not under DOS. A larger stack has to be used for OS/2
- X# because system calls use more stack than under DOS; 8k is recommended
- X# by Microsoft.
- X
- X# Notes on IBM C Set/2, Watcom C/386, Borland C++ or emx+gcc compilation:
- X#
- X# The resulting programs can be used under protected mode of OS/2 2.x
- X# only, not under OS/2 1.x and not under DOS.
- X#
- X# The NFLAGS macro is used to work around an optimization bug in the IBM
- X# C++ Set compiler; this is fixed by CSD #4, so NFLAGS="" can be used for
- X# all targets below. We'll leave it as is for this release...
- X#
- X# For Watcom C/386, edit the os2$(OBJ) target so that os2/os2.c reads
- X# os2\os2.c instead. Watcom can't handle forward slashes; gcc can't
- X# handle backslashes. We'll see about making this a macro next time...
- X
- Xdefault:
- X @echo "Enter `$(MAKE) -f makefile.os2 target' with makefile.os2 copied"
- X @echo "to the main UnZip directory and where target is one of:"
- X @echo " msc mscdos ibm ibmdyn ibmdebug ibmprof"
- X @echo " watcom borland gcc gccdyn gccdebug gccdos"
- X
- X# MS C 6.00 for OS/2, 16-bit (should figure out way to split unzip/funzip
- X# compiles so former is always large model and latter always small model...)
- Xmsc:
- X $(MAKE) -f makefile.os2 all \
- X CC="cl -nologo -AL -Ocegit -Gs -I. $(FP)" \
- X CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-Lp -Fe" \
- X LDFLAGS2="-link /noe" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X DEF="os2\unzip16.def"
- X
- X# cross-compilation for MS-DOS with MS C 6.00 (same comment as above...formerly;
- X# now unzip is small model again, with [almost] all strings in far memory)
- Xmscdos:
- X $(MAKE) -f makefile.os2 all \
- X CC="cl -nologo -AS -Oaict -Gs -I. $(FP)" \
- X CFLAGS="-Zp1 -W3 $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-F 0c00 -Lr -Fe" \
- X LDFLAGS2="-link /noe /exe" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X OBJU2="msdos.obj" \
- X OBJX2="msdos_.obj"
- X
- X# IBM C Set/2, statically linked runtime
- Xibm:
- X $(MAKE) -f makefile.os2 all \
- X CC="icc -Q -O -Gs -I." \
- X CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="-O-" \
- X LDFLAGS="-Fe" \
- X LDFLAGS2="" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X DEF="os2\unzip.def"
- X
- X# IBM C Set/2, dynamically linked runtime
- Xibmdyn:
- X $(MAKE) -f makefile.os2 all \
- X CC="icc -Q -O -Gs -Gd -I." \
- X CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="-O-" \
- X LDFLAGS="-Fe" \
- X LDFLAGS2="" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X DEF="os2\unzip.def"
- X
- X# IBM C Set/2, debug version
- Xibmdebug:
- X $(MAKE) -f makefile.os2 all \
- X CC="icc -Q -Ti -I." \
- X CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="-O-" \
- X LDFLAGS="-Fe" \
- X LDFLAGS2="" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X DEF="os2\unzip.def"
- X
- X# IBM C Set/2, profiling version for PROFIT
- Xibmprof:
- X $(MAKE) -f makefile.os2 all \
- X CC="icc -Q -O -Gs -Gh -Ti -I." \
- X CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="-O-" \
- X LDFLAGS="-Fe" \
- X LDFLAGS2="profit.obj" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X DEF="os2\unzip.def"
- X
- X# Watcom C/386 9.0
- Xwatcom:
- X $(MAKE) -f makefile.os2 all \
- X CC="wcl386 -zq -Ox -s -I." \
- X CFLAGS="-Zp1 -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-k0x40000 -x -Fe=" \
- X LDFLAGS2="" \
- X OUT="-Fo" \
- X OBJ=".obj" \
- X DEF=""
- X
- X# Borland C++
- Xborland:
- X $(MAKE) -f makefile.os2 all \
- X CC="bcc -O -I." \
- X CFLAGS="-w- -D__cdecl -D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-e" \
- X LDFLAGS2="" \
- X OUT="-o" \
- X OBJ=".obj" \
- X DEF="-sDos2\unzip.def"
- X
- X# emx 0.8f and later, gcc, OMF format, statically linked C runtime and emx
- Xgcc:
- X $(MAKE) -f makefile.os2 all \
- X CC="gcc -Zomf -Zsys -O -I." \
- X CFLAGS="-Wall -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-o ./" \
- X LDFLAGS2="-s -los2" \
- X OUT="-o" \
- X OBJ=".obj" \
- X DEF="os2/unzip.def"
- X
- X# emx 0.8g and later, gcc, OMF format, dynamically linked C runtime and emx
- X# (for 0.8f or earlier, change -Zmtd to -Zmt)
- Xgccdyn:
- X $(MAKE) -f makefile.os2 all \
- X CC="gcc -Zomf -Zmtd -O -I." \
- X CFLAGS="-Wall -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-o ./" \
- X LDFLAGS2="-s -los2" \
- X OUT="-o" \
- X OBJ=".obj" \
- X DEF="os2/unzip.def"
- X
- X# emx, gcc, a.out format, with debug info for gdb
- Xgccdebug:
- X $(MAKE) -f makefile.os2 all \
- X CC="gcc -g -I." \
- X CFLAGS="-Wall -DOS2 $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-o ./" \
- X LDFLAGS2="-los2" \
- X OUT="-o" \
- X OBJ=".o"
- X
- X# emx, gcc, a.out format, for MS-DOS
- Xgccdos:
- X $(MAKE) -f makefile.os2 all \
- X CC="gcc -O -I." \
- X CFLAGS="-Wall -DMSDOS $(LOCAL_UNZIP)" \
- X NFLAGS="" \
- X LDFLAGS="-o ./" \
- X LDFLAGS2="-s" \
- X OUT="-o" \
- X OBJ=".o" \
- X OBJU2="msdos.o" \
- X OBJX2="msdos_.o"
- X
- X# variables
- XOBJU = unzip$(OBJ) crypt$(OBJ) envargs$(OBJ) explode$(OBJ) \
- X extract$(OBJ) file_io$(OBJ) inflate$(OBJ) match$(OBJ) \
- X unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ)
- XOBJU2 = os2$(OBJ)
- XOBJX = unzip_$(OBJ) crypt$(OBJ) extract_$(OBJ) file_io$(OBJ) \
- X inflate$(OBJ) match$(OBJ)
- XOBJX2 = os2_$(OBJ)
- XOBJF = funzip$(OBJ) crypt_$(OBJ) inflate_$(OBJ)
- X
- X.SUFFIXES: .c $(OBJ)
- X
- X.c$(OBJ):
- X $(CC) -c $(CFLAGS) $<
- X
- Xall: unzip.exe funzip.exe unzipsfx.exe
- X#all: unzipsfx.exe
- X
- Xunzip.exe: $(OBJU) $(OBJU2)
- X $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(OBJU2) $(LDFLAGS2)
- X
- Xfunzip.exe: $(OBJF)
- X $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(LDFLAGS2)
- X
- Xunzipsfx.exe: $(OBJX) $(OBJX2)
- X $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(OBJX2) $(LDFLAGS2)
- X
- X
- 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 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 # MS-DOS only
- X $(CC) -c $(CFLAGS) msdos/msdos.c
- X
- Xmsdos_$(OBJ): msdos/msdos.c unzip.h # MS-DOS unzipsfx only
- X $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ msdos/msdos.c
- X
- Xos2$(OBJ): os2/os2.c unzip.h # OS/2 only
- X $(CC) -c $(CFLAGS) os2/os2.c
- X
- Xos2_$(OBJ): os2/os2.c unzip.h # OS/2 unzipsfx only
- X $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2/os2.c
- X
- X# NFLAGS are solely used as work-around for optimization bug in IBM C++ Set
- Xcrypt$(OBJ): crypt.c unzip.h crypt.h zip.h
- X $(CC) -c $(CFLAGS) $(NFLAGS) crypt.c
- X
- Xcrypt_$(OBJ): crypt.c unzip.h zip.h crypt.h # funzip only
- X $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ crypt.c
- X
- Xextract_$(OBJ): extract.c unzip.h crypt.h # unzipsfx only
- X $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ extract.c
- X
- Xinflate_$(OBJ): inflate.c inflate.h unzip.h crypt.h # funzip only
- X $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c
- X
- Xunzip_$(OBJ): unzip.c unzip.h crypt.h version.h # unzipsfx only
- X $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c
- END_OF_FILE
- if test 7372 -ne `wc -c <'unzip-5.12/os2/makefile.os2'`; then
- echo shar: \"'unzip-5.12/os2/makefile.os2'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/os2/makefile.os2'
- fi
- if test -f 'unzip-5.12/vms/unzip_cli.help' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unzip-5.12/vms/unzip_cli.help'\"
- else
- echo shar: Extracting \"'unzip-5.12/vms/unzip_cli.help'\" \(8254 characters\)
- sed "s/^X//" >'unzip-5.12/vms/unzip_cli.help' <<'END_OF_FILE'
- X.!
- X.! File: UNZIP_CLI.HELP
- X.!
- X.! Author: Hunter Goatley
- X.!
- X.! Date: 12 Jul 94 (orig. UNZIP.RNH, 23 Oct 91)
- X.!
- X.! Description:
- X.!
- X.! TPU-processable source file to produce VMS on-line help for
- X.! portable UnZip. Adapted from UNZIP.RNH, originally based on
- X.! UNZIP.MAN (now UNZIP.DOC).
- X.!
- X.! To build:
- X.! $ EDIT /TPU/NOSECTION/NODISPLAY/COMMAND=CVTHELP.TPU UNZIP_CLI.HELP
- X.! $ REN UNZIP_CLI.RNH UNZIP.RNH
- X.! $ RUNOFF UNZIP.RNH
- X.! $ LIBR /HELP/INSERT libr UNZIP
- X.!
- X.! Modification history:
- X.!
- X.! 02-001 Hunter Goatley 12-JUL-1994 16:59
- X.! Genesis.
- X.! 02-002 Cave Newt 14-JUL-1994 11:36
- X.! Fixed /*TEXT options and added/removed various options.
- X.! 02-003 Cave Newt 28-JUL-1994 08:54
- X.! Removed semicolons from comments and moved /ZIPINFO.
- X.!
- X<INIT>
- X<MAIN>
- XUNZIP
- X
- XUnZip is used to extract files compressed and packaged by Zip (see HELP ZIP
- Xfor information on ZIP).
- X
- XFor a brief help on Zip and Unzip, run each without specifying any
- Xparameters on the command line.
- X
- 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
- 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.
- X<FORMAT>
- XUNZIP zipfile [file[,...]] [/qualifiers]
- X
- X.!
- X<TOPIC>
- XParameters
- X
- X<PARAMETER>
- Xzipfile
- X
- X<PTEXT>
- XFile specification for the ZIP archive(s) with optional wildcards. UnZip will
- Xperform actions specified for every zipfile matching the specification.
- XThe default file specification is SYS$DISK:[].ZIP.
- X
- XNote that self-extracting ZIP files are supported; just specify the .EXE
- Xsuffix yourself.
- X<TXETP>
- X
- X<PARAMETER>
- Xfile
- X
- X<PTEXT>
- XAn optional comma-separated list of archive members to be processed;
- Xif no list is given, all archive members are processed. Expressions
- Xmay be used to match multiple members. Expressions should be enclosed
- Xin double-quotes to prevent interpretation by DCL. Multiple filenames
- Xshould be separated by blanks. Each file specification is similar to
- Xa Unix egrep expression and may contain:
- X
- 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<LARETIL>
- X<TXETP>
- X
- X<QUALIFIERS>
- X<QUALIFIER>
- X/ZIPINFO
- X
- X/ZIPINFO
- X
- XDisplays information about the Zip archive and the files contained therein.
- XThis function used to be provided by a separate ZipInfo program.
- X
- XThe following qualifiers may be specified with /ZIPINFO:
- X
- X<LITERAL>
- X| /SHORT Short UNIX "ls -l" format (default)
- X| /MEDIUM Medium UNIX "ls -l" format
- X| /LONG Long UNIX "ls -l" format
- X| /ONE_LINE Filenames only, one per line
- X| /VERBOSE Verbose, multi-page format
- X| /HEADER Print header lines
- X| /TOTALS Print totals for files
- X| /TIMES Print file times in sortable decimal format
- X<LARETIL>
- X<QUALIFIER>
- X/AUTOTEXT
- X
- X/AUTOTEXT
- X/NOAUTOTEXT
- X
- XAutomatically extracts files marked as "text" (rather than "binary") in
- Xin standard VMS text file format.
- X<QUALIFIER>
- X/BRIEF
- X
- X/BRIEF
- X
- XWhen used with /LIST, specifies that a brief listing of the archive's
- Xcontents is to be displayed. A brief listing shows the length, date,
- Xtime, and file name for the files in the archive.
- X<QUALIFIER>
- X/CASE_INSENSITIVE
- X
- X/CASE_INSENSITIVE
- X/NOCASE_INSENSITIVE
- X
- XMatch filenames case-insensitively. (Good default option under VMS.)
- X<QUALIFIER>
- X/COMMENT
- X
- X/COMMENT
- X/NOCOMMENT
- X
- XDisplay the archive comment.
- X<QUALIFIER>
- X/DIRECTORY
- X
- X/DIRECTORY=directory-spec
- X
- XSpecifies the output directory where all the extracted files are to be
- Xplaced.
- X<QUALIFIER>
- X/EXCLUDE
- X
- X/EXCLUDE=file
- X
- XA comma-separated list of files to exclude when extracting files.
- XIf multiple files are specified, the list should be included in
- Xparentheses.
- X
- X<QUALIFIER>
- X/FRESHEN
- X
- X/FRESHEN
- X/NOFRESHEN
- X
- XFreshen existing files; replace if newer. Does not cause any new files to
- Xbe created.
- X<QUALIFIER>
- X/FULL
- X
- X/FULL
- X
- XWhen used with /LIST, specifies that a full listing of the archive's
- Xcontents is to be displayed. A full listing shows the length,
- Xcompression method, compressed size, compression ratio, date,
- Xtime, CRC value, and file name for the files in the archive.
- X<QUALIFIER>
- X/JUNK
- X
- X/JUNK
- X/NOJUNK
- X
- XJunk the stored paths (don't recreated the archive's directory
- Xstructure.
- X<QUALIFIER>
- X/LIST
- X
- X/LIST
- X
- XList the contents of the archive. /BRIEF and /FULL can be used to
- Xspecify the amount of information displayed. The default is /BRIEF.
- X<QUALIFIER>
- X/LOWERCASE
- X
- X/LOWERCASE
- X/NOLOWERCASE
- X
- XConvert filenames from all-uppercase operating systems to lowercase. This
- Xoption has no effect under VMS.
- X<QUALIFIER>
- X/OVERWRITE
- X
- X/OVERWRITE
- X/NOOVERWRITE
- X
- XOverwrite existing files when extracting.
- X<QUALIFIER>
- X/PIPE
- X
- X/PIPE
- X
- XExtract files to SYS$OUTPUT with no informational messages.
- X<QUALIFIER>
- X/QUIET
- X
- X/QUIET
- X
- XPerform operations quietly. /SUPER_QUIET can be specified to make it
- Xeven quiet.
- X<QUALIFIER>
- X/RESTORE
- X
- X/RESTORE
- X/NORESTORE
- X
- XRestore file owner and protection settings.
- X<QUALIFIER>
- X/SCREEN
- X
- X/SCREEN
- X/NOSCREEN
- X
- XExtracts matching files to SYS$OUTPUT (the terminal).
- X<QUALIFIER>
- X/SUPER_QUIET
- X
- X/SUPER_QUIET
- X
- XPerform operations super-quietly.
- X<QUALIFIER>
- X/TEST
- X
- X/TEST
- X/NOTEST
- X
- XTest archive files.
- X<QUALIFIER>
- X/TEXT
- X
- X/TEXT
- X/NOTEXT
- X
- XExtracts all files in standard VMS text file format.
- X<QUALIFIER>
- X/UPDATE
- X
- X/UPDATE
- X/NOUPDATE
- X
- XUpdate existing files; create new ones if needed.
- X<QUALIFIER>
- X/VERSION
- X
- X/VERSION
- X/NOVERSION
- X
- XRetain VMS file version numbers.
- X
- X<TOPIC>
- XAuthors
- X
- 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
- XVMS on-line help ported from UNZIP.DOC by Hunter Goatley.
- X
- X<TOPIC>
- XUNIX_Options
- X
- XThe default action of UnZip is to extract all zipfile entries. The following
- Xoptions and modifiers can be provided:
- X
- X<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|
- X| MODIFIERS
- X| -a auto-extract only 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 MS-DOS, VMS, etc.
- X| -V retain (VMS) file version numbers
- X| -X restore owner/protection info (may require privileges)
- X<LARETIL>
- X
- XNote that uppercase options such as -C, -L, -V, -X and -Z must be specified
- Xin quotes. For example:
- X
- X<LITERAL>
- X| $ unzip "-VX" -a zipfile
- X<LARETIL>
- X
- 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 match filenames without regard
- Xto case, restore owner/protection information and perform all operations at
- Xquiet-level 1 by default:
- X
- X<LITERAL>
- X| $ define UNZIP_OPTS "-qCX"
- X<LARETIL>
- X
- XNote that the quotation marks here are required to preserve lowercase options
- X(opposite of the command-line behavior). To negate a default option on the
- Xcommand line, add one or more minus signs before the option letter, in
- Xaddition to the leading switch character `-':
- X
- X<LITERAL>
- X| $ unzip --ql zipfile
- X<LARETIL>
- X
- Xor
- X
- X<LITERAL>
- X| $ unzip -l-q zipfile
- X<LARETIL>
- X
- XAt present it is not possible to decrement an option below zero--that is,
- Xmore than a few minuses have no effect.
- X
- XUNZIP_OPTS may be defined as a symbol rather than a logical, but if both
- Xare defined, the logical is used.
- END_OF_FILE
- if test 8254 -ne `wc -c <'unzip-5.12/vms/unzip_cli.help'`; then
- echo shar: \"'unzip-5.12/vms/unzip_cli.help'\" unpacked with wrong size!
- fi
- # end of 'unzip-5.12/vms/unzip_cli.help'
- fi
- echo shar: End of archive 17 \(of 20\).
- cp /dev/null ark17isdone
- 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...
-