home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-23 | 59.3 KB | 1,425 lines |
- Newsgroups: comp.sources.misc
- Path: sparky!kent
- From: zip-bugs@cs.ucla.edu (Info-ZIP group)
- Subject: v31i110: unzip50 - Info-ZIP portable UnZip, version 5.0, Part07/14
- Message-ID: <1992Aug24.025543.24754@sparky.imd.sterling.com>
- Followup-To: comp.sources.d
- X-Md4-Signature: 5fd69f93d9b9caced342163d5aebe6b7
- Sender: kent@sparky.imd.sterling.com (Kent Landfield)
- Organization: Sterling Software
- References: <csm-v31i104=unzip50.215137@sparky.IMD.Sterling.COM>
- Date: Mon, 24 Aug 1992 02:55:43 GMT
- Approved: kent@sparky.imd.sterling.com
- Lines: 1410
-
- Submitted-by: zip-bugs@cs.ucla.edu (Info-ZIP group)
- Posting-number: Volume 31, Issue 110
- Archive-name: unzip50/part07
- Supersedes: unzip: Volume 29, Issue 31-42
- Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, COHERENT AMIGA?, !ATARI, symlink, SGI, DEC, Cray, Convex, Amdahl, Sun
-
- #! /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".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: MAC/macfile.c MAC/thinkc.hqx VMS/vmsshare.opt zipinfo.c.A
- # Wrapped by kent@sparky on Sun Aug 23 21:09:33 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 7 (of 14)."'
- if test -f 'MAC/macfile.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MAC/macfile.c'\"
- else
- echo shar: Extracting \"'MAC/macfile.c'\" \(6797 characters\)
- sed "s/^X//" >'MAC/macfile.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------
- X
- X macfile.c
- X
- X This source file is used by the mac port to support commands not available
- X directly on the Mac, i.e. mkdir().
- X It also helps determine if we're running on a Mac with HFS and a disk
- X formatted for HFS (HFS - Hierarchical File System; compared to its predecessor,
- X MFS - Macintosh File System).
- X
- X ---------------------------------------------------------------------------*/
- X
- X#include "unzip.h"
- X
- X#ifdef MACOS
- X#ifndef FSFCBLen
- X#define FSFCBLen (*(short *)0x3F6)
- X#endif
- X
- Xstatic short wAppVRefNum;
- Xstatic long lAppDirID;
- Xint hfsflag; /* set if disk has hierarchical file system */
- X
- Xstatic int IsHFSDisk(short wRefNum)
- X{
- X /* get info about the specified volume */
- X if (hfsflag == true) {
- X HParamBlockRec hpbr;
- X Str255 temp;
- X short wErr;
- X
- X hpbr.volumeParam.ioCompletion = 0;
- X hpbr.volumeParam.ioNamePtr = temp;
- X hpbr.volumeParam.ioVRefNum = wRefNum;
- X hpbr.volumeParam.ioVolIndex = 0;
- X wErr = PBHGetVInfo(&hpbr, 0);
- X
- X if (wErr == noErr && hpbr.volumeParam.ioVFSID == 0
- X && hpbr.volumeParam.ioVSigWord == 0x4244) {
- X return true;
- X }
- X }
- X
- X return false;
- X} /* IsHFSDisk */
- X
- Xvoid macfstest(int vrefnum)
- X{
- X Str255 st;
- X
- X /* is this machine running HFS file system? */
- X if (FSFCBLen <= 0) {
- X hfsflag = false;
- X }
- X else
- X {
- X hfsflag = true;
- X }
- X
- X /* get the file's volume reference number and directory ID */
- X if (hfsflag == true) {
- X WDPBRec wdpb;
- X OSErr err = noErr;
- X
- X if (vrefnum != 0) {
- X wdpb.ioCompletion = false;
- X wdpb.ioNamePtr = st;
- X wdpb.ioWDIndex = 0;
- X wdpb.ioVRefNum = vrefnum;
- X err = PBHGetVol(&wdpb, false);
- X
- X if (err == noErr) {
- X wAppVRefNum = wdpb.ioWDVRefNum;
- X lAppDirID = wdpb.ioWDDirID;
- X }
- X }
- X
- X /* is the disk we're using formatted for HFS? */
- X hfsflag = IsHFSDisk(wAppVRefNum);
- X }
- X
- X return;
- X} /* mactest */
- X
- Xint macmkdir(char *path, short nVRefNum, long lDirID)
- X{
- X OSErr err = -1;
- X
- X if (path != 0 && strlen(path)<256 && hfsflag == true) {
- X HParamBlockRec hpbr;
- X Str255 st;
- X
- X CtoPstr(path);
- X if ((nVRefNum == 0) && (lDirID == 0))
- X {
- X hpbr.fileParam.ioNamePtr = st;
- X hpbr.fileParam.ioCompletion = NULL;
- X err = PBHGetVol((WDPBPtr)&hpbr, false);
- X nVRefNum = hpbr.wdParam.ioWDVRefNum;
- X lDirID = hpbr.wdParam.ioWDDirID;
- X }
- X else
- X {
- X err = noErr;
- X }
- X if (err == noErr) {
- X hpbr.fileParam.ioCompletion = NULL;
- X hpbr.fileParam.ioVRefNum = nVRefNum;
- X hpbr.fileParam.ioDirID = lDirID;
- X hpbr.fileParam.ioNamePtr = (StringPtr)path;
- X err = PBDirCreate(&hpbr, false);
- X }
- X PtoCstr(path);
- X }
- X
- X return (int)err;
- X} /* mkdir */
- X
- Xvoid ResolveMacVol(short nVRefNum, short *pnVRefNum, long *plDirID, StringPtr pst)
- X{
- X if (hfsflag)
- X {
- X WDPBRec wdpbr;
- X Str255 st;
- X OSErr err;
- X
- X wdpbr.ioCompletion = (ProcPtr)NULL;
- X wdpbr.ioNamePtr = st;
- X wdpbr.ioVRefNum = nVRefNum;
- X wdpbr.ioWDIndex = 0;
- X wdpbr.ioWDProcID = 0;
- X wdpbr.ioWDVRefNum = 0;
- X err = PBGetWDInfo( &wdpbr, false );
- X if ( err == noErr )
- X {
- X if (pnVRefNum)
- X *pnVRefNum = wdpbr.ioWDVRefNum;
- X if (plDirID)
- X *plDirID = wdpbr.ioWDDirID;
- X if (pst)
- X BlockMove( st, pst, st[0]+1 );
- X }
- X }
- X else
- X {
- X if (pnVRefNum)
- X *pnVRefNum = nVRefNum;
- X if (plDirID)
- X *plDirID = 0;
- X if (pst)
- X *pst = 0;
- X }
- X}
- X
- Xshort macopen(char *sz, short nFlags, short nVRefNum, long lDirID)
- X{
- X OSErr err;
- X Str255 st;
- X char chPerms = (!nFlags) ? fsRdPerm : fsRdWrPerm;
- X short nFRefNum;
- X
- X CtoPstr( sz );
- X BlockMove( sz, st, sz[0]+1 );
- X PtoCstr( sz );
- X if (hfsflag)
- X {
- X if (nFlags > 1)
- X err = HOpenRF( nVRefNum, lDirID, st, chPerms, &nFRefNum);
- X else
- X err = HOpen( nVRefNum, lDirID, st, chPerms, &nFRefNum);
- X }
- X else
- X {
- X /*
- X * Have to use PBxxx style calls since the high level
- X * versions don't support specifying permissions
- X */
- X ParamBlockRec pbr;
- X
- X pbr.ioParam.ioNamePtr = st;
- X pbr.ioParam.ioVRefNum = gnVRefNum;
- X pbr.ioParam.ioVersNum = 0;
- X pbr.ioParam.ioPermssn = chPerms;
- X pbr.ioParam.ioMisc = 0;
- X if (nFlags >1)
- X err = PBOpenRF( &pbr, false );
- X else
- X err = PBOpen( &pbr, false );
- X nFRefNum = pbr.ioParam.ioRefNum;
- X }
- X if ( err )
- X return -1;
- X else
- X return nFRefNum;
- X}
- X
- Xshort maccreat(char *sz, short nVRefNum, long lDirID, OSType ostCreator, OSType ostType)
- X{
- X OSErr err;
- X Str255 st;
- X FInfo fi;
- X
- X CtoPstr( sz );
- X BlockMove( sz, st, sz[0]+1 );
- X PtoCstr( sz );
- X if (hfsflag)
- X {
- X err = HGetFInfo( nVRefNum, lDirID, st, &fi );
- X if (err == fnfErr)
- X err = HCreate( nVRefNum, lDirID, st, ostCreator, ostType );
- X else if (err == noErr)
- X {
- X fi.fdCreator = ostCreator;
- X fi.fdType = ostType;
- X err = HSetFInfo( nVRefNum, lDirID, st, &fi );
- X }
- X }
- X else
- X {
- X err = GetFInfo( st, nVRefNum, &fi );
- X if (err == fnfErr)
- X err = Create( st, nVRefNum, ostCreator, ostType );
- X else if (err == noErr)
- X {
- X fi.fdCreator = ostCreator;
- X fi.fdType = ostType;
- X err = SetFInfo( st, nVRefNum, &fi );
- X }
- X }
- X if (err == noErr)
- X return noErr;
- X else
- X return -1;
- X}
- X
- Xshort macread(short nFRefNum, char *pb, unsigned cb)
- X{
- X long lcb = cb;
- X
- X (void)FSRead( nFRefNum, &lcb, pb );
- X
- X return (short)lcb;
- X}
- X
- Xshort macwrite(short nFRefNum, char *pb, unsigned cb)
- X{
- X long lcb = cb;
- X
- X (void)FSWrite( nFRefNum, &lcb, pb );
- X
- X return (short)lcb;
- X}
- X
- Xshort macclose(short nFRefNum)
- X{
- X return FSClose( nFRefNum );
- X}
- X
- Xlong maclseek(short nFRefNum, long lib, short nMode)
- X{
- X ParamBlockRec pbr;
- X
- X if (nMode == SEEK_SET)
- X nMode = fsFromStart;
- X else if (nMode == SEEK_CUR)
- X nMode = fsFromMark;
- X else if (nMode == SEEK_END)
- X nMode = fsFromLEOF;
- X pbr.ioParam.ioRefNum = nFRefNum;
- X pbr.ioParam.ioPosMode = nMode;
- X pbr.ioParam.ioPosOffset = lib;
- X (void)PBSetFPos(&pbr, 0);
- X return pbr.ioParam.ioPosOffset;
- X}
- X
- X#endif /* MACOS */
- END_OF_FILE
- if test 6797 -ne `wc -c <'MAC/macfile.c'`; then
- echo shar: \"'MAC/macfile.c'\" unpacked with wrong size!
- fi
- # end of 'MAC/macfile.c'
- fi
- if test -f 'MAC/thinkc.hqx' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MAC/thinkc.hqx'\"
- else
- echo shar: Extracting \"'MAC/thinkc.hqx'\" \(19223 characters\)
- sed "s/^X//" >'MAC/thinkc.hqx' <<'END_OF_FILE'
- X(This file must be converted with BinHex 4.0)
- X
- X:$(9ZHQP`,R4SD@jVB`"38Np+5d&)6!#3#$k'i#%!N!3"!*!$2+`!!$ZX!!!"fJ#
- X3!`)14'9cDh4[F#"'EfaNCA*%!3#3"dakT9J-G@jkDA!ZG'KTEQYM!J)!N!038Np
- X+5d&)6!%!rj!%!!"38Np+5d&)6!%!rj!%!*!5TN"a!`#3"Mk'9%&54P4"8L!"!2q
- X3"!#3"&9N!*!%8!#3!e!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!%rrm!!!T5!#N+[!!#rrm!!!T@!#N
- X,J!!$rrm!!!TD!#N+m!!%rrm!!!TH!#N,[!!!rrm!!!K)!#N+@!9YDf&SE!%f%ZN:
- END_OF_FILE
- if test 19223 -ne `wc -c <'MAC/thinkc.hqx'`; then
- echo shar: \"'MAC/thinkc.hqx'\" unpacked with wrong size!
- fi
- # end of 'MAC/thinkc.hqx'
- fi
- if test -f 'VMS/vmsshare.opt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'VMS/vmsshare.opt'\"
- else
- echo shar: Extracting \"'VMS/vmsshare.opt'\" \(30 characters\)
- sed "s/^X//" >'VMS/vmsshare.opt' <<'END_OF_FILE'
- Xsys$library:vaxcrtl.exe/share
- END_OF_FILE
- if test 30 -ne `wc -c <'VMS/vmsshare.opt'`; then
- echo shar: \"'VMS/vmsshare.opt'\" unpacked with wrong size!
- fi
- # end of 'VMS/vmsshare.opt'
- fi
- if test -f 'zipinfo.c.A' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'zipinfo.c.A'\"
- else
- echo shar: Extracting \"'zipinfo.c.A'\" \(29513 characters\)
- sed "s/^X//" >'zipinfo.c.A' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------
- X
- X zipinfo.c
- X
- X This program reads all sorts of totally nifty information, including the
- X central directory stuff, from a ZIP archive ("zipfile" for short). It
- X started as just a testbed for fooling with zipfiles, but at this point
- X it's actually a moderately useful utility. It also became the basis
- X for the rewrite of unzip (3.16 -> 4.0), using the central directory for
- X processing rather than the individual (local) file headers.
- X
- X For myself, I find it convenient to define an alias "ii" (under Unix and
- X VMS) or to rename the executable to "ii.exe" (OS/2 and DOS). This nicely
- X complements my Unix long-listing "ll" alias (ls -lF), since zipinfo's de-
- X fault action is to produce a Unix-like listing of the archive's contents.
- X "ii zipfile" is easier to type than "zipinfo zipfile"...
- X
- X Another dandy product from your buddies at Newtware!
- X
- X ---------------------------------------------------------------------------
- X
- X To compile (partial instructions; some of this stuff doesn't exist yet):
- X
- X under Unix (cc): make zipinfo
- X
- X under MS-DOS (TurboC): make -fMKZIPINF.DOS (edit appropriately)
- X
- X under MS-DOS (MSC): make MKZIPINF.DOS
- X (or use Makefile if you have MSC 6.0: "nmake zi_dos")
- X
- X under OS/2 (MSC): make MKZIPINF.DOS (edit appropriately)
- X (or use Makefile if you have MSC 6.0: "nmake zi_os2")
- X
- X under Atari OS: beats me...
- X
- X under VMS: @MAKE_ZIPINFO (see also VMSNOTES)
- X ZIPINFO == $DISKNAME:[DIRECTORY]ZIPINFO.EXE
- X
- X under Macintosh OS: who knows?
- X
- X ---------------------------------------------------------------------------
- X
- X Source: unzip50.zip (.tar.Z, etc.) for Unix, VMS, OS/2 and MS-DOS; see
- X `Where' in source distribution for ftp, uucp and mail-server
- X sites.
- X Author: Greg Roelofs, roelofs@nas.nasa.gov, 23 August 1990
- X Copyright: Portions copyright 1992 Greg Roelofs. Portions adapted from
- X unzip 3.1. SizeOfEAs() by Kai Uwe Rommel.
- X
- X ---------------------------------------------------------------------------*/
- X
- X
- X
- X
- X#ifndef ZIPINFO
- X# define ZIPINFO /* needed for Unix permissions in non-Unix environments */
- X#endif /* !ZIPINFO */
- X#include "unzip.h"
- X
- X#define VERSION "v1.0 of 21 August 92"
- X
- X#define LFLAG 3 /* for short "ls -l" type listing */
- X
- X#define EAID 0x0009 /* OS/2 EA extra field ID */
- Xtypedef struct { /* for OS/2 info in OS/2 and non-OS/2 environments */
- X unsigned short nID;
- X unsigned short nSize;
- X ULONG lSize;
- X} EAHEADER, *PEAHEADER;
- X
- X
- X
- X
- X/**********************/
- X/* Global Variables */
- X/**********************/
- X
- X#ifdef EBCDIC
- X int aflag=1; /* this is so you can read it on the screen */
- X#else /* (basically, entire program is "unzip -c") */
- X int aflag=0;
- X#endif
- Xint lflag=(-1); /* '-1slmv': listing format */
- Xint hflag=0; /* '-h': header line */
- Xint tflag=0; /* '-t': totals line */
- X
- Xbyte *inbuf, *inptr; /* input buffer (any size is legal) and pointer */
- Xint incnt;
- X
- Xint zipfd; /* zipfile file handle */
- Xchar zipfn[FILNAMSIZ];
- X
- Xchar local_hdr_sig[5] = "\120"; /* remaining signature bytes come later: */
- Xchar central_hdr_sig[5] = "\120"; /* must initialize at runtime so zipinfo */
- Xchar end_central_sig[5] = "\120"; /* executable won't look like a zipfile */
- Xchar extd_local_sig[5] = "\120";
- X
- Xcdir_file_hdr crec; /* used in zipinfo.c, misc.c */
- Xlocal_file_hdr lrec;
- Xecdir_rec ecrec;
- Xstruct stat statbuf; /* used by main() */
- X
- Xint process_all_files;
- Xlongint real_ecrec_offset, expect_ecrec_offset;
- Xlongint extra_bytes=0; /* used in zipinfo.c, misc.c */
- Xlongint cur_zipfile_bufstart; /* find_end_central_dir, readbuf */
- X
- Xmin_info info, *pInfo=(&info);
- X
- Xbyte *extra_field = NULL; /* used by VMS, Mac and OS/2 versions */
- Xbyte *outbuf; /* buffer for rle look-back, zipfile comment */
- Xbyte *outout; /* scratch pad for ASCII-native trans */
- X
- Xchar filename[FILNAMSIZ];
- Xchar sig[5];
- Xchar *fnames[2] = {"*", NULL}; /* default filenames vector */
- Xchar **fnv = fnames;
- X
- Xstatic byte *hold;
- Xstatic longint ziplen;
- Xstatic UWORD hostnum;
- Xstatic UWORD methnum;
- Xstatic UWORD extnum;
- X
- Xchar *EndSigMsg = "\nwarning:\
- X didn't find end-of-central-dir signature at end of central dir.\n";
- Xchar *CentSigMsg =
- X "error: expected central file header signature not found (file #%u).\n";
- Xchar *SeekMsg =
- X "error: attempt to seek before beginning of zipfile\n%s";
- X
- X#ifdef VMS
- Xchar *ReportMsg = "\
- X (please check that you have transferred or created the zipfile in the\n\
- X appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)\n";
- X#else /* !VMS */
- Xchar *ReportMsg = "\
- X (please check that you have transferred or created the zipfile in the\n\
- X appropriate BINARY mode and that you have compiled unzip properly)\n";
- X#endif /* ?VMS */
- X
- X
- X
- X
- X
- X
- X/******************/
- X/* Main program */
- X/******************/
- X
- Xmain(argc, argv)
- X int argc;
- X char *argv[];
- X{
- X char *s;
- X int c, error=FALSE, negative=0;
- X int hflag_slmv=TRUE, hflag_1=FALSE; /* diff options => diff defaults */
- X int tflag_slm=TRUE, tflag_1v=FALSE;
- X int explicit_h=FALSE, explicit_t=FALSE;
- X
- X
- X
- X/*---------------------------------------------------------------------------
- X Everybody is now "NOTINT16," but this is a nice little piece of code, so
- X just comment it out for future reference. :-)
- X ---------------------------------------------------------------------------*/
- X
- X#if 0
- X# ifndef KNOW_IT_WORKS /* define this to save space, if things already work */
- X# ifndef DOS_OS2 /* already works (no RISCy OS/2's yet...) */
- X# ifndef NOTINT16 /* whole point is to see if this NEEDS defining */
- X {
- X int error=0;
- X long testsig;
- X static char *mach_type[3] = {"big-endian", "structure-padding",
- X "big-endian and structure-padding"};
- X
- X strcpy((char *)&testsig,"012");
- X if (testsig != 0x00323130)
- X error = 1;
- X if (sizeof(cdir_file_hdr) != CREC_SIZE)
- X error += 2;
- X if (error--)
- X fprintf(stderr, "It appears that your machine is %s. If errors\n\
- Xoccur, please try recompiling with \"NOTINT16\" defined (read the\n\
- XMakefile, or try \"make zipinfo\").\n\n", mach_type[error]);
- X }
- X# endif /* !NOTINT16 */
- X# endif /* !DOS_OS2 */
- X# endif /* !KNOW_IT_WORKS */
- X#endif /* 0 */
- X
- X/*---------------------------------------------------------------------------
- X Put environment-variable options into the queue, then rip through any
- X command-line options lurking about...
- X ---------------------------------------------------------------------------*/
- X
- X envargs(&argc, &argv, ENV_ZIPINFO);
- X
- X while (--argc > 0 && (*++argv)[0] == '-') {
- X s = argv[0] + 1;
- X while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */
- X switch (c) {
- X case '-':
- X ++negative;
- X break;
- X case '1': /* shortest listing: just filenames */
- X if (negative)
- X lflag = -2, negative = 0;
- X else
- X lflag = 1;
- X break;
- X case 'h': /* header line */
- X if (negative)
- X hflag_1 = hflag_slmv = FALSE, negative = 0;
- X else {
- X hflag_1 = hflag_slmv = explicit_h = TRUE;
- X if (lflag == -1)
- X lflag = 0;
- X }
- X break;
- X case 'l': /* longer form of "ls -l" type listing */
- X if (negative)
- X lflag = -2, negative = 0;
- X else
- X lflag = 5;
- X break;
- X case 'm': /* medium form of "ls -l" type listing */
- X if (negative)
- X lflag = -2, negative = 0;
- X else
- X lflag = 4;
- X break;
- X case 's': /* default: shorter "ls -l" type listing */
- X if (negative)
- X lflag = -2, negative = 0;
- X else
- X lflag = 3;
- X break;
- X case 't': /* totals line */
- X if (negative)
- X tflag_1v = tflag_slm = FALSE, negative = 0;
- X else {
- X tflag_1v = tflag_slm = explicit_t = TRUE;
- X if (lflag == -1)
- X lflag = 0;
- X }
- X break;
- X case 'v': /* turbo-verbose listing */
- X if (negative)
- X lflag = -2, negative = 0;
- X else
- X lflag = 10;
- X break;
- X default:
- X error = TRUE;
- X break;
- X }
- X }
- X }
- X if ((argc-- == 0) || error)
- X RETURN(usage(error));
- X
- X if (argc != 0)
- X process_all_files = FALSE;
- X else
- X process_all_files = TRUE; /* for speed */
- X
- X /* if no listing options given (or all negated), or if only -h/-t given
- X * with individual files specified, use default listing format */
- X if ((lflag < 0) || (!process_all_files && (lflag == 0)))
- X lflag = LFLAG;
- X
- X /* set header and totals flags to default or specified values */
- X switch (lflag) {
- X case 0: /* 0: can only occur if either -t or -h explicitly given; */
- X case 1: /* therefore set both flags equal to normally false value */
- X hflag = hflag_1;
- X tflag = tflag_1v;
- X break;
- X case 3:
- X case 4:
- X case 5:
- X hflag = (!process_all_files && !explicit_h)? FALSE : hflag_slmv;
- X tflag = (!process_all_files && !explicit_t)? FALSE : tflag_slm;
- X break;
- X case 10:
- X hflag = hflag_slmv;
- X tflag = tflag_1v;
- X break;
- X }
- X
- X/*---------------------------------------------------------------------------
- X Now get the zipfile name from the command line and see if it exists as a
- X regular (non-directory) file. If not, append the ".zip" suffix. We don't
- X immediately check to see if this results in a good name, but we will do so
- X later. In the meantime, see if there are any member filespecs on the com-
- X mand line, and if so, set the filename pointer to point at them.
- X ---------------------------------------------------------------------------*/
- X
- X strcpy(zipfn, *argv++);
- X if (stat(zipfn, &statbuf) || (statbuf.st_mode & S_IFMT) == S_IFDIR)
- X strcat(zipfn, ZSUFX);
- X#if defined(UNIX) && !defined(VMS) /* Unix executables have no extension-- */
- X else if (statbuf.st_mode & S_IXUSR) /* might find zip, not zip.zip; etc */
- X fprintf(stderr, "\nnote: file [ %s ] may be an executable\n\n", zipfn);
- X#endif /* UNIX && !VMS */
- X
- X if (stat(zipfn, &statbuf)) { /* try again */
- X fprintf(stderr, "error: can't find zipfile [ %s ]\n", zipfn);
- X RETURN(9); /* 9: file not found */
- X } else
- X ziplen = statbuf.st_size;
- X
- X if (!process_all_files)
- X fnv = argv;
- X
- X/*---------------------------------------------------------------------------
- X Okey dokey, we have everything we need to get started. Let's roll.
- X ---------------------------------------------------------------------------*/
- X
- X inbuf = (byte *) (malloc(INBUFSIZ + 4)); /* 4 extra for hold[] (below) */
- X outbuf = (byte *) (malloc(OUTBUFSIZ + 1)); /* 1 extra for string termin. */
- X if (aflag) /* if need an ascebc scratch, */
- X outout = (byte *) (malloc(OUTBUFSIZ));
- X else /* allocate it... */
- X outout = outbuf; /* else just point to outbuf */
- X
- X if ((inbuf == NULL) || (outbuf == NULL) || (outout == NULL)) {
- X fprintf(stderr, "error: can't allocate zipinfo buffers\n");
- X RETURN(4); /* 4-8: insufficient memory */
- X }
- X hold = &inbuf[INBUFSIZ]; /* to check for boundary-spanning signatures */
- X
- X RETURN(process_zipfile()); /* keep passing errors back... */
- X
- X} /* end main() */
- X
- X
- X
- X
- X
- X/**********************/
- X/* Function usage() */
- X/**********************/
- X
- Xint usage(error)
- X int error;
- X{
- X FILE *usagefp;
- X
- X
- X/*---------------------------------------------------------------------------
- X If user requested usage, send it to stdout; else send to stderr.
- X ---------------------------------------------------------------------------*/
- X
- X if (error)
- X usagefp = (FILE *) stderr;
- X else
- X usagefp = (FILE *) stdout;
- X
- X fprintf(usagefp, "\
- X ZipInfo: Zipfile Information Utility %s\n\
- X (brought to you by Newtware, Inc., and the fine folks at Info-ZIP)\n\n\
- X Usage: zipinfo [-1smlvht] file[.zip] [filespec...]\n", VERSION);
- X fprintf(usagefp, "\
- X -1 list filenames only, one per line (useful for pipes)\n\
- X -s list zipfile info in short Unix \"ls -l\" format: default\n\
- X -m list zipfile info in medium Unix \"ls -l\" format\n\
- X -l list zipfile info in long Unix \"ls -l\" format\n\
- X -v list zipfile information in verbose, multi-page format\n\
- X -h list header line\n\
- X -t list totals for files listed or for all files\n");
- X/*
- X -p disable automatic \"more\" function (for pipes) [not implemented]\n");
- X */
- X
- X#ifdef VMS
- X fprintf(usagefp, "\nRemember that non-lowercase filespecs must be quoted\
- X in VMS (e.g., \"Makefile\").\n");
- X#endif
- X
- X if (error)
- X return 10; /* 10: bad or illegal parameters specified */
- X else
- X return 0; /* just wanted usage screen: no error */
- X
- X} /* end function usage() */
- X
- X
- X
- X
- X
- X/********************************/
- X/* Function process_zipfile() */
- X/********************************/
- X
- Xint process_zipfile() /* return PK-type error code */
- X{
- X int error=0, error_in_archive;
- X
- X
- X/*---------------------------------------------------------------------------
- X Open the zipfile for reading and in BINARY mode to prevent CR/LF trans-
- X lation, which would corrupt the bitstreams.
- X ---------------------------------------------------------------------------*/
- X
- X#ifdef VMS
- X if (check_format()) /* check for variable-length format */
- X return 2; /* 2: error in zipfile */
- X#endif /* VMS */
- X
- X if (open_input_file()) /* this should never happen, given the */
- X return 9; /* stat() test in main(), but... */
- X
- X/*---------------------------------------------------------------------------
- X Reconstruct the various PK signature strings, and find and process the
- X end-of-central-directory header.
- X ---------------------------------------------------------------------------*/
- X
- X strcat(local_hdr_sig, LOCAL_HDR_SIG);
- X strcat(central_hdr_sig, CENTRAL_HDR_SIG);
- X strcat(end_central_sig, END_CENTRAL_SIG);
- X strcat(extd_local_sig, EXTD_LOCAL_SIG);
- X
- X if (find_end_central_dir()) { /* not found; nothing to do */
- X close(zipfd);
- X return 2; /* 2: error in zipfile */
- X }
- X
- X real_ecrec_offset = cur_zipfile_bufstart + (inptr-inbuf);
- X#ifdef TEST
- X printf("\n found end-of-central-dir signature at offset %ld (%.8lXh)\n",
- X real_ecrec_offset, real_ecrec_offset);
- X printf(" from beginning of file; offset %d (%.4Xh) within block\n",
- X inptr-inbuf, inptr-inbuf);
- X#endif
- X
- X /* sets expect_ecrec_offset: */
- X if ((error_in_archive = process_end_central_dir()) > 1) {
- X close(zipfd);
- X return error_in_archive;
- X }
- X
- X/*---------------------------------------------------------------------------
- X Test the end-of-central-directory info for incompatibilities (multi-disk
- X archives) or inconsistencies (missing or extra bytes in zipfile).
- X ---------------------------------------------------------------------------*/
- X
- X if (ecrec.number_this_disk != ecrec.num_disk_with_start_central_dir) {
- X fprintf(stderr, "\n\
- X Zipfile is part of a multi-disk archive, and this is not the disk on\
- X which the central zipfile directory begins.\n");
- X error_in_archive = 11; /* 11: no files found */
- X } else {
- X if ((extra_bytes = real_ecrec_offset - expect_ecrec_offset) < 0) {
- X fprintf(stderr, "\nerror: missing %ld bytes in zipfile (\
- Xattempting to process anyway)\n\n", -extra_bytes);
- X error_in_archive = 2; /* 2: (weak) error in zipfile */
- X } else if (extra_bytes > 0) {
- X if ((ecrec.offset_start_central_directory == 0) &&
- X (ecrec.size_central_directory != 0)) /* zip 1.5 -go bug */
- X {
- X fprintf(stderr, "\nerror: NULL central directory offset (\
- Xattempting to process anyway)\n\n");
- X error_in_archive = 2; /* 2: (weak) error in zipfile */
- X } else {
- X fprintf(stderr, "\nwarning: extra %ld bytes at beginning or\
- X within zipfile\n (attempting to process anyway)\n\n", extra_bytes);
- X error_in_archive = 1; /* 1: warning error */
- X }
- X }
- X
- X /*-----------------------------------------------------------------------
- X Check for empty zipfile and exit now if so.
- X -----------------------------------------------------------------------*/
- X
- X if (expect_ecrec_offset == 0L && ecrec.size_central_directory == 0) {
- X printf("%sEmpty zipfile.\n", lflag>9 ? "\n " : "");
- X close(zipfd);
- X return (error_in_archive > 1)? error_in_archive : 1;
- X }
- X
- X /*-----------------------------------------------------------------------
- X Compensate for missing or extra bytes, and seek to where the start
- X of central directory should be. If header not found, uncompensate
- X and try again (necessary for at least some Atari archives created
- X with STZIP, as well as archives created by J.H. Holm's ZIPSPLIT).
- X -----------------------------------------------------------------------*/
- X
- X LSEEK( ecrec.offset_start_central_directory )
- X if ((readbuf(sig, 4) <= 0) || strncmp(sig, central_hdr_sig, 4)) {
- X longint tmp = extra_bytes;
- X
- X extra_bytes = 0;
- X LSEEK( ecrec.offset_start_central_directory )
- X if ((readbuf(sig, 4) <= 0) || strncmp(sig, central_hdr_sig, 4)) {
- X fprintf(stderr,
- X "error: start of central directory not found; zipfile corrupt.\n");
- X fprintf(stderr, ReportMsg);
- X close(zipfd);
- X return 3; /* 3: severe error in zipfile */
- X }
- X fprintf(stderr, "error: reported length of central directory is \
- X%d bytes too\n long (Atari STZIP zipfile? J.H. Holm ZIPSPLIT zipfile?)\
- X.\n Compensating...\n\n", -tmp);
- X error_in_archive = 2; /* 2: (weak) error in zipfile */
- X }
- X
- X /*-----------------------------------------------------------------------
- X Seek to the start of the central directory one last time, since we
- X have just read the first entry's signature bytes; then do the central
- X directory and close the zipfile.
- X -----------------------------------------------------------------------*/
- X
- X LSEEK( ecrec.offset_start_central_directory )
- X if ((error = process_central_dir()) > error_in_archive)
- X error_in_archive = error; /* don't overwrite stronger error */
- X if (lflag > 9)
- X printf("\n");
- X }
- X
- X close(zipfd);
- X return error_in_archive;
- X
- X} /* end function process_zipfile() */
- X
- X
- X
- X
- X
- X/*************************************/
- X/* Function find_end_central_dir() */
- X/*************************************/
- X
- Xint find_end_central_dir() /* return 0 if found, 1 otherwise */
- X{
- X int i, numblks;
- X longint tail_len;
- X
- X
- X
- X/*---------------------------------------------------------------------------
- X Treat case of short zipfile separately.
- X ---------------------------------------------------------------------------*/
- X
- X if (ziplen <= INBUFSIZ) {
- X lseek(zipfd, 0L, SEEK_SET);
- X if ((incnt = read(zipfd,inbuf,(unsigned int)ziplen)) == (int)ziplen)
- X /* 'P' must be at least 22 bytes from end of zipfile */
- X for (inptr = inbuf+(int)ziplen-22; inptr >= inbuf; --inptr)
- X if ((ascii_to_native(*inptr) == 'P') &&
- X !strncmp((char *)inptr, end_central_sig, 4)) {
- X incnt -= inptr - inbuf;
- X return 0; /* found it! */
- X } /* ...otherwise fall through & fail */
- X
- X/*---------------------------------------------------------------------------
- X Zipfile is longer than INBUFSIZ: may need to loop. Start with short
- X block at end of zipfile (if not TOO short).
- X ---------------------------------------------------------------------------*/
- X
- X } else {
- X if ((tail_len = ziplen % INBUFSIZ) > ECREC_SIZE) {
- X cur_zipfile_bufstart = lseek(zipfd, ziplen-tail_len, SEEK_SET);
- X if ((incnt = read(zipfd,inbuf,(unsigned int)tail_len)) !=
- X (int)tail_len)
- X goto fail; /* shut up; it's expedient. */
- X
- X /* 'P' must be at least 22 bytes from end of zipfile */
- X for (inptr = inbuf+(int)tail_len-22; inptr >= inbuf; --inptr)
- X if ((ascii_to_native(*inptr) == 'P') &&
- X !strncmp((char *)inptr, end_central_sig, 4)) {
- X incnt -= inptr - inbuf;
- X return 0; /* found it */
- X } /* ...otherwise search next block */
- X /* sig may span block boundary: */
- X strncpy((char *)hold, (char *)inbuf, 3);
- X } else
- X cur_zipfile_bufstart = ziplen - tail_len;
- X
- X /*
- X * Loop through blocks of zipfile data, starting at the end and going
- X * toward the beginning. Need only check last 65557 bytes of zipfile:
- X * comment may be up to 65535 bytes long, end-of-central-directory rec-
- X * ord is 18 bytes (shouldn't hardcode this number, but what the hell:
- X * already did so above (22=18+4)), and sig itself is 4 bytes.
- X *
- X * zipinfo: check the whole file, just in case some transfer protocol
- X * has appended a whole bunch of garbage at the end of the archive.
- X *
- X * =todo= ==done== ==rounding== =blksiz= */
- X numblks = (int) ((ziplen - tail_len + (INBUFSIZ-1)) / INBUFSIZ);
- X
- X for (i = 1; i <= numblks; ++i) {
- X cur_zipfile_bufstart -= INBUFSIZ;
- X lseek(zipfd, cur_zipfile_bufstart, SEEK_SET);
- X if ((incnt = read(zipfd,inbuf,INBUFSIZ)) != INBUFSIZ)
- X break; /* fall through and fail */
- X
- X for (inptr = inbuf+INBUFSIZ-1; inptr >= inbuf; --inptr)
- X if ((ascii_to_native(*inptr) == 'P') &&
- X !strncmp((char *)inptr, end_central_sig, 4)) {
- X incnt -= inptr - inbuf;
- X return 0; /* found it */
- X }
- X /* sig may span block boundary: */
- X strncpy((char *)hold, (char *)inbuf, 3);
- X }
- X
- X } /* end if (ziplen > INBUFSIZ) */
- X
- X/*---------------------------------------------------------------------------
- X Searched through whole region where signature should be without finding
- X it. Print informational message and die a horrible death.
- X ---------------------------------------------------------------------------*/
- X
- Xfail:
- X
- X fprintf(stderr, "\n\
- X %s:\n\n\
- X End-of-central-directory signature not found. Either this file is not\n\
- X a zipfile, or it constitutes one disk of a multi-part archive. In the\n\
- X latter case the central directory and zipfile comment will be found on\n\
- X the last disk(s) of this archive.\n", zipfn);
- X return 1; /* failed */
- X
- X} /* end function find_end_central_dir() */
- X
- X
- X
- X
- X
- X/****************************************/
- X/* Function process_end_central_dir() */
- X/****************************************/
- X
- Xint process_end_central_dir() /* return PK-type error code */
- X{
- X ec_byte_rec byterec;
- X int error=0;
- X
- X
- X/*--------------------------------------------------------------------------
- X Read the end-of-central-directory record and do any necessary machine-
- X type conversions (byte ordering, structure padding compensation) by
- X copying character array to struct.
- X ---------------------------------------------------------------------------*/
- X
- X if (readbuf((char *)byterec, ECREC_SIZE+4) <= 0)
- X return 51;
- X
- X ecrec.number_this_disk =
- X makeword(&byterec[NUMBER_THIS_DISK]);
- X ecrec.num_disk_with_start_central_dir =
- X makeword(&byterec[NUM_DISK_WITH_START_CENTRAL_DIR]);
- X ecrec.num_entries_centrl_dir_ths_disk =
- X makeword(&byterec[NUM_ENTRIES_CENTRL_DIR_THS_DISK]);
- X ecrec.total_entries_central_dir =
- X makeword(&byterec[TOTAL_ENTRIES_CENTRAL_DIR]);
- X ecrec.size_central_directory =
- X makelong(&byterec[SIZE_CENTRAL_DIRECTORY]);
- X ecrec.offset_start_central_directory =
- X makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]);
- X ecrec.zipfile_comment_length =
- X makeword(&byterec[ZIPFILE_COMMENT_LENGTH]);
- X
- X expect_ecrec_offset = ecrec.offset_start_central_directory +
- X ecrec.size_central_directory;
- X
- X/*---------------------------------------------------------------------------
- X Print out various interesting things about the zipfile.
- X ---------------------------------------------------------------------------*/
- X
- X /* header fits on one line, for anything up to 10GB and 10000 files: */
- X if (hflag)
- X printf((strlen(zipfn)<39)? "Archive: %s %ld bytes %d file%s\n"
- X : "Archive: %s %ld %d\n", zipfn, ziplen,
- X ecrec.total_entries_central_dir,
- X (ecrec.total_entries_central_dir==1)? "":"s");
- X
- X /* verbose format */
- X if (lflag > 9) {
- X printf("\nEnd-of-central-directory record:\n");
- X printf("-------------------------------\n\n");
- X
- X printf("\
- X Actual offset of end-of-central-dir record: %9ld (%.8lXh)\n\
- X Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\
- X (based on the length of the central directory and its expected offset)\n\n",
- X expect_ecrec_offset, expect_ecrec_offset,
- X real_ecrec_offset, real_ecrec_offset);
- X
- X if (ecrec.number_this_disk == 0) {
- X printf("\
- X This zipfile constitutes the sole disk of a single-part archive; its\n\
- X central directory contains %u %s. The central directory is %lu\n\
- X (%.8lXh) bytes long, and its (expected) offset in bytes from the\n\
- X beginning of the zipfile is %lu (%.8lXh).\n\n",
- X ecrec.total_entries_central_dir,
- X (ecrec.total_entries_central_dir == 1)? "entry" : "entries",
- X ecrec.size_central_directory, ecrec.size_central_directory,
- X ecrec.offset_start_central_directory,
- X ecrec.offset_start_central_directory);
- X } else {
- X printf("\
- X This zipfile constitutes disk %u of a multi-part archive. The central\n\
- X directory starts on disk %u; %u of its entries %s contained within\n\
- X this zipfile, out of a total of %u %s. The entire central\n\
- X directory is %lu (%.8lXh) bytes long, and its offset in bytes from\n\
- X the beginning of the zipfile in which it begins is %lu (%.8lXh).\n\n",
- X ecrec.number_this_disk,
- X ecrec.num_disk_with_start_central_dir,
- X ecrec.num_entries_centrl_dir_ths_disk,
- X (ecrec.num_entries_centrl_dir_ths_disk == 1)? "is" : "are",
- X ecrec.total_entries_central_dir,
- X (ecrec.total_entries_central_dir == 1) ? "entry" : "entries",
- X ecrec.size_central_directory, ecrec.size_central_directory,
- X ecrec.offset_start_central_directory,
- X ecrec.offset_start_central_directory);
- X }
- X
- X /*-----------------------------------------------------------------------
- X Get the zipfile comment, if any, and print it out. (Comment may be
- X up to 64KB long. May the fleas of a thousand camels infest the arm-
- X pits of anyone who actually takes advantage of this fact.)
- X -----------------------------------------------------------------------*/
- X
- X if (!ecrec.zipfile_comment_length)
- X printf(" There is no zipfile comment.\n");
- X else {
- X printf(" The zipfile comment is %u bytes long and contains the following text:\n\n",
- X ecrec.zipfile_comment_length );
- X printf("======================== zipfile comment begins ==========================\n");
- X if (do_string(ecrec.zipfile_comment_length, DISPLAY))
- X error = 1; /* 1: warning error */
- X printf("\n========================= zipfile comment ends ===========================\n");
- X if (error)
- X printf("\n The zipfile comment is truncated.\n");
- X } /* endif (comment exists) */
- X
- X } /* endif (verbose) */
- X
- X return error;
- X
- X} /* end function process_end_central_dir() */
- X
- X
- X
- X
- END_OF_FILE
- if test 29513 -ne `wc -c <'zipinfo.c.A'`; then
- echo shar: \"'zipinfo.c.A'\" unpacked with wrong size!
- elif test -f 'zipinfo.c.B'; then
- echo shar: Combining \"'zipinfo.c'\" \(59337 characters\)
- cat 'zipinfo.c.A' 'zipinfo.c.B' > 'zipinfo.c'
- if test 59337 -ne `wc -c <'zipinfo.c'`; then
- echo shar: \"'zipinfo.c'\" combined with wrong size!
- else
- rm zipinfo.c.A zipinfo.c.B
- fi
- fi
- # end of 'zipinfo.c.A'
- fi
- echo shar: End of archive 7 \(of 14\).
- cp /dev/null ark7isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 14 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...
-