home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / unzip50 / part07 < prev    next >
Encoding:
Text File  |  1992-08-22  |  59.1 KB  |  1,419 lines

  1. Newsgroups: comp.sources.misc
  2. From: zip-bugs@cs.ucla.edu (Info-ZIP group)
  3. Subject:  v31i110:  unzip50 - Info-ZIP portable UnZip, version 5.0, Part07/14
  4. Message-ID: <1992Aug24.025543.24754@sparky.imd.sterling.com>
  5. X-Md4-Signature: 5fd69f93d9b9caced342163d5aebe6b7
  6. Date: Mon, 24 Aug 1992 02:55:43 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: zip-bugs@cs.ucla.edu (Info-ZIP group)
  10. Posting-number: Volume 31, Issue 110
  11. Archive-name: unzip50/part07
  12. Supersedes: unzip: Volume 29, Issue 31-42
  13. Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, COHERENT AMIGA?, !ATARI, symlink, SGI, DEC, Cray, Convex, Amdahl, Sun
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  20. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  21. # Contents:  MAC/macfile.c MAC/thinkc.hqx VMS/vmsshare.opt zipinfo.c.A
  22. # Wrapped by kent@sparky on Sun Aug 23 21:09:33 1992
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 7 (of 14)."'
  26. if test -f 'MAC/macfile.c' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'MAC/macfile.c'\"
  28. else
  29.   echo shar: Extracting \"'MAC/macfile.c'\" \(6797 characters\)
  30.   sed "s/^X//" >'MAC/macfile.c' <<'END_OF_FILE'
  31. X/*---------------------------------------------------------------------------
  32. X
  33. X  macfile.c
  34. X
  35. X  This source file is used by the mac port to support commands not available
  36. X  directly on the Mac, i.e. mkdir().
  37. X  It also helps determine if we're running on a Mac with HFS and a disk
  38. X  formatted for HFS (HFS - Hierarchical File System; compared to its predecessor,
  39. X  MFS - Macintosh File System).
  40. X  
  41. X  ---------------------------------------------------------------------------*/
  42. X
  43. X#include "unzip.h"
  44. X
  45. X#ifdef MACOS
  46. X#ifndef FSFCBLen
  47. X#define FSFCBLen    (*(short *)0x3F6)
  48. X#endif
  49. X
  50. Xstatic short wAppVRefNum;
  51. Xstatic long lAppDirID;
  52. Xint hfsflag;            /* set if disk has hierarchical file system */
  53. X
  54. Xstatic int IsHFSDisk(short wRefNum)
  55. X{
  56. X    /* get info about the specified volume */
  57. X    if (hfsflag == true) {
  58. X        HParamBlockRec    hpbr;
  59. X        Str255 temp;
  60. X        short wErr;
  61. X        
  62. X        hpbr.volumeParam.ioCompletion = 0;
  63. X        hpbr.volumeParam.ioNamePtr = temp;
  64. X        hpbr.volumeParam.ioVRefNum = wRefNum;
  65. X        hpbr.volumeParam.ioVolIndex = 0;
  66. X        wErr = PBHGetVInfo(&hpbr, 0);
  67. X
  68. X        if (wErr == noErr && hpbr.volumeParam.ioVFSID == 0
  69. X            && hpbr.volumeParam.ioVSigWord == 0x4244) {
  70. X                return true;
  71. X        }
  72. X    }
  73. X
  74. X    return false;
  75. X} /* IsHFSDisk */
  76. X
  77. Xvoid macfstest(int vrefnum)
  78. X{
  79. X    Str255 st;
  80. X
  81. X    /* is this machine running HFS file system? */
  82. X    if (FSFCBLen <= 0) {
  83. X        hfsflag = false;
  84. X    }
  85. X    else
  86. X    {
  87. X        hfsflag = true;
  88. X    }
  89. X
  90. X    /* get the file's volume reference number and directory ID */
  91. X    if (hfsflag == true) {
  92. X        WDPBRec    wdpb;
  93. X        OSErr err = noErr;
  94. X
  95. X        if (vrefnum != 0) {
  96. X            wdpb.ioCompletion = false;
  97. X            wdpb.ioNamePtr = st;
  98. X            wdpb.ioWDIndex = 0;
  99. X            wdpb.ioVRefNum = vrefnum;
  100. X            err = PBHGetVol(&wdpb, false);
  101. X        
  102. X            if (err == noErr) {
  103. X                wAppVRefNum = wdpb.ioWDVRefNum;
  104. X                lAppDirID = wdpb.ioWDDirID;
  105. X            }
  106. X        }
  107. X
  108. X        /* is the disk we're using formatted for HFS? */
  109. X        hfsflag = IsHFSDisk(wAppVRefNum);
  110. X    }
  111. X    
  112. X    return;
  113. X} /* mactest */
  114. X
  115. Xint macmkdir(char *path, short nVRefNum, long lDirID)
  116. X{
  117. X    OSErr    err = -1;
  118. X
  119. X    if (path != 0 && strlen(path)<256 && hfsflag == true) {
  120. X        HParamBlockRec    hpbr;
  121. X        Str255    st;
  122. X
  123. X        CtoPstr(path);
  124. X        if ((nVRefNum == 0) && (lDirID == 0))
  125. X        {
  126. X            hpbr.fileParam.ioNamePtr = st;
  127. X            hpbr.fileParam.ioCompletion = NULL;
  128. X            err = PBHGetVol((WDPBPtr)&hpbr, false);
  129. X            nVRefNum = hpbr.wdParam.ioWDVRefNum;
  130. X            lDirID = hpbr.wdParam.ioWDDirID;
  131. X        }
  132. X        else
  133. X        {
  134. X            err = noErr;
  135. X        }
  136. X        if (err == noErr) {
  137. X            hpbr.fileParam.ioCompletion = NULL;
  138. X            hpbr.fileParam.ioVRefNum = nVRefNum;
  139. X            hpbr.fileParam.ioDirID = lDirID;
  140. X            hpbr.fileParam.ioNamePtr = (StringPtr)path;
  141. X            err = PBDirCreate(&hpbr, false);
  142. X        }    
  143. X        PtoCstr(path);
  144. X    }
  145. X
  146. X    return (int)err;
  147. X} /* mkdir */
  148. X
  149. Xvoid ResolveMacVol(short nVRefNum, short *pnVRefNum, long *plDirID, StringPtr pst)
  150. X{
  151. X    if (hfsflag)
  152. X    {
  153. X        WDPBRec  wdpbr;
  154. X        Str255   st;
  155. X        OSErr    err;
  156. X
  157. X        wdpbr.ioCompletion = (ProcPtr)NULL;
  158. X        wdpbr.ioNamePtr = st;
  159. X        wdpbr.ioVRefNum = nVRefNum;
  160. X        wdpbr.ioWDIndex = 0;
  161. X        wdpbr.ioWDProcID = 0;
  162. X        wdpbr.ioWDVRefNum = 0;
  163. X        err = PBGetWDInfo( &wdpbr, false );
  164. X        if ( err == noErr )
  165. X        {
  166. X            if (pnVRefNum)
  167. X                *pnVRefNum = wdpbr.ioWDVRefNum;
  168. X            if (plDirID)
  169. X                *plDirID = wdpbr.ioWDDirID;
  170. X            if (pst)
  171. X                BlockMove( st, pst, st[0]+1 );
  172. X        }
  173. X    }
  174. X    else
  175. X    {
  176. X        if (pnVRefNum)
  177. X            *pnVRefNum = nVRefNum;
  178. X        if (plDirID)
  179. X            *plDirID = 0;
  180. X        if (pst)
  181. X            *pst = 0;
  182. X    }
  183. X}
  184. X
  185. Xshort macopen(char *sz, short nFlags, short nVRefNum, long lDirID)
  186. X{
  187. X    OSErr   err;
  188. X    Str255  st;
  189. X    char    chPerms = (!nFlags) ? fsRdPerm : fsRdWrPerm;
  190. X    short   nFRefNum;
  191. X
  192. X    CtoPstr( sz );
  193. X    BlockMove( sz, st, sz[0]+1 );
  194. X    PtoCstr( sz );
  195. X    if (hfsflag)
  196. X    {
  197. X        if (nFlags > 1)
  198. X            err = HOpenRF( nVRefNum, lDirID, st, chPerms, &nFRefNum);
  199. X        else
  200. X            err = HOpen( nVRefNum, lDirID, st, chPerms, &nFRefNum);
  201. X    }
  202. X    else
  203. X    {
  204. X        /*
  205. X         * Have to use PBxxx style calls since the high level
  206. X         * versions don't support specifying permissions
  207. X         */
  208. X        ParamBlockRec    pbr;
  209. X
  210. X        pbr.ioParam.ioNamePtr = st;
  211. X        pbr.ioParam.ioVRefNum = gnVRefNum;
  212. X        pbr.ioParam.ioVersNum = 0;
  213. X        pbr.ioParam.ioPermssn = chPerms;
  214. X        pbr.ioParam.ioMisc = 0;
  215. X        if (nFlags >1)
  216. X            err = PBOpenRF( &pbr, false );
  217. X        else
  218. X            err = PBOpen( &pbr, false );
  219. X        nFRefNum = pbr.ioParam.ioRefNum;
  220. X    }
  221. X    if ( err )
  222. X        return -1;
  223. X    else
  224. X        return nFRefNum;
  225. X}
  226. X
  227. Xshort maccreat(char *sz, short nVRefNum, long lDirID, OSType ostCreator, OSType ostType)
  228. X{
  229. X    OSErr   err;
  230. X    Str255  st;
  231. X    FInfo   fi;
  232. X
  233. X    CtoPstr( sz );
  234. X    BlockMove( sz, st, sz[0]+1 );
  235. X    PtoCstr( sz );
  236. X    if (hfsflag)
  237. X    {
  238. X        err = HGetFInfo( nVRefNum, lDirID, st, &fi );
  239. X        if (err == fnfErr)
  240. X            err = HCreate( nVRefNum, lDirID, st, ostCreator, ostType );
  241. X        else if (err == noErr)
  242. X        {
  243. X            fi.fdCreator = ostCreator;
  244. X            fi.fdType = ostType;
  245. X            err = HSetFInfo( nVRefNum, lDirID, st, &fi );
  246. X        }
  247. X    }
  248. X    else
  249. X    {
  250. X        err = GetFInfo( st, nVRefNum, &fi );
  251. X        if (err == fnfErr)
  252. X            err = Create( st, nVRefNum, ostCreator, ostType );
  253. X        else if (err == noErr)
  254. X        {
  255. X            fi.fdCreator = ostCreator;
  256. X            fi.fdType = ostType;
  257. X            err = SetFInfo( st, nVRefNum, &fi );
  258. X        }
  259. X    }
  260. X    if (err == noErr)
  261. X        return noErr;
  262. X    else
  263. X        return -1;
  264. X}
  265. X
  266. Xshort macread(short nFRefNum, char *pb, unsigned cb)
  267. X{
  268. X    long    lcb = cb;
  269. X
  270. X    (void)FSRead( nFRefNum, &lcb, pb );
  271. X
  272. X    return (short)lcb;
  273. X}
  274. X
  275. Xshort macwrite(short nFRefNum, char *pb, unsigned cb)
  276. X{
  277. X    long    lcb = cb;
  278. X
  279. X    (void)FSWrite( nFRefNum, &lcb, pb );
  280. X
  281. X    return (short)lcb;
  282. X}
  283. X
  284. Xshort macclose(short nFRefNum)
  285. X{
  286. X    return FSClose( nFRefNum );
  287. X}
  288. X
  289. Xlong maclseek(short nFRefNum, long lib, short nMode)
  290. X{
  291. X    ParamBlockRec   pbr;
  292. X
  293. X    if (nMode == SEEK_SET)
  294. X        nMode = fsFromStart;
  295. X    else if (nMode == SEEK_CUR)
  296. X        nMode = fsFromMark;
  297. X    else if (nMode == SEEK_END)
  298. X        nMode = fsFromLEOF;
  299. X    pbr.ioParam.ioRefNum = nFRefNum;
  300. X    pbr.ioParam.ioPosMode = nMode;
  301. X    pbr.ioParam.ioPosOffset = lib;
  302. X    (void)PBSetFPos(&pbr, 0);
  303. X    return pbr.ioParam.ioPosOffset;
  304. X}
  305. X
  306. X#endif /* MACOS */
  307. END_OF_FILE
  308.   if test 6797 -ne `wc -c <'MAC/macfile.c'`; then
  309.     echo shar: \"'MAC/macfile.c'\" unpacked with wrong size!
  310.   fi
  311.   # end of 'MAC/macfile.c'
  312. fi
  313. if test -f 'MAC/thinkc.hqx' -a "${1}" != "-c" ; then 
  314.   echo shar: Will not clobber existing file \"'MAC/thinkc.hqx'\"
  315. else
  316.   echo shar: Extracting \"'MAC/thinkc.hqx'\" \(19223 characters\)
  317.   sed "s/^X//" >'MAC/thinkc.hqx' <<'END_OF_FILE'
  318. X(This file must be converted with BinHex 4.0)
  319. X
  320. X:$(9ZHQP`,R4SD@jVB`"38Np+5d&)6!#3#$k'i#%!N!3"!*!$2+`!!$ZX!!!"fJ#
  321. X3!`)14'9cDh4[F#"'EfaNCA*%!3#3"dakT9J-G@jkDA!ZG'KTEQYM!J)!N!038Np
  322. X+5d&)6!%!rj!%!!"38Np+5d&)6!%!rj!%!*!5TN"a!`#3"Mk'9%&54P4"8L!"!2q
  323. X3"!#3"&9N!*!%8!#3!e!!N!ZPeF!3TGA!,!#3%`)!!*N'!"3!N$S$m!#3r`#3r`#
  324. X3r`#3mK)!!!3!N!3#!*!$B!#3%`3!N"d35%%#!`!+!*!$!`#3!f!!N"-%!*!+3FS
  325. X!N"(f4&)"!J!*!*!$"!#3!f!!N"-%!*!+30J!N"!"9N4#!3)!!3#3!`8!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08`!!!5C$6NC(!!!"-P0*@N8!!!%q4%*69!!!!8T%3PG
  608. X6!!!"9N0548`!!J&L4%*94`!#!BC849K8!!!"UJ!"!*!(+3X!N!2rr`!!#QB!+3Z
  609. XF!!$rr`!!#')!)diF!!$rr`!!"rJ!+3V8!!$rr`!!!r3!+3UJ!!$rr`!!#Ei!+3U
  610. X%!!,rr`!!#L)!+3U!!!2rr`!!#LS!+3Vi!!6rr`!!#M)!+3VN!!(rra3!-QS!+3U
  611. Xd!!$rr`!!#MS!+3Y`!!$rr`!!#Mi!+3ZJ!!$rr`!!#N)!+3Yi!!$rr`!!#NB!+3U
  612. XN!!Err`!!#"i!+3U`rrm!"J!!#$S!+3UX!)$rr`!!#Q)!+3Z%!)$rr`!!#!3!+3U
  613. X3!!!#rrm!!!T+!#N,'!!$rrm!!!T1!#N+l!!%rrm!!!T5!#N+[!!#rrm!!!T@!#N
  614. X,J!!$rrm!!!TD!#N+m!!%rrm!!!TH!#N,[!!!rrm!!!K)!#N+@!9YDf&SE!%f%ZN:
  615. END_OF_FILE
  616.   if test 19223 -ne `wc -c <'MAC/thinkc.hqx'`; then
  617.     echo shar: \"'MAC/thinkc.hqx'\" unpacked with wrong size!
  618.   fi
  619.   # end of 'MAC/thinkc.hqx'
  620. fi
  621. if test -f 'VMS/vmsshare.opt' -a "${1}" != "-c" ; then 
  622.   echo shar: Will not clobber existing file \"'VMS/vmsshare.opt'\"
  623. else
  624.   echo shar: Extracting \"'VMS/vmsshare.opt'\" \(30 characters\)
  625.   sed "s/^X//" >'VMS/vmsshare.opt' <<'END_OF_FILE'
  626. Xsys$library:vaxcrtl.exe/share
  627. END_OF_FILE
  628.   if test 30 -ne `wc -c <'VMS/vmsshare.opt'`; then
  629.     echo shar: \"'VMS/vmsshare.opt'\" unpacked with wrong size!
  630.   fi
  631.   # end of 'VMS/vmsshare.opt'
  632. fi
  633. if test -f 'zipinfo.c.A' -a "${1}" != "-c" ; then 
  634.   echo shar: Will not clobber existing file \"'zipinfo.c.A'\"
  635. else
  636.   echo shar: Extracting \"'zipinfo.c.A'\" \(29513 characters\)
  637.   sed "s/^X//" >'zipinfo.c.A' <<'END_OF_FILE'
  638. X/*---------------------------------------------------------------------------
  639. X
  640. X  zipinfo.c
  641. X
  642. X  This program reads all sorts of totally nifty information, including the
  643. X  central directory stuff, from a ZIP archive ("zipfile" for short).  It
  644. X  started as just a testbed for fooling with zipfiles, but at this point
  645. X  it's actually a moderately useful utility.  It also became the basis
  646. X  for the rewrite of unzip (3.16 -> 4.0), using the central directory for
  647. X  processing rather than the individual (local) file headers.
  648. X
  649. X  For myself, I find it convenient to define an alias "ii" (under Unix and
  650. X  VMS) or to rename the executable to "ii.exe" (OS/2 and DOS).  This nicely
  651. X  complements my Unix long-listing "ll" alias (ls -lF), since zipinfo's de-
  652. X  fault action is to produce a Unix-like listing of the archive's contents.
  653. X  "ii zipfile" is easier to type than "zipinfo zipfile"...
  654. X
  655. X  Another dandy product from your buddies at Newtware!
  656. X
  657. X  ---------------------------------------------------------------------------
  658. X
  659. X  To compile (partial instructions; some of this stuff doesn't exist yet):
  660. X
  661. X     under Unix (cc):  make zipinfo
  662. X
  663. X     under MS-DOS (TurboC):  make -fMKZIPINF.DOS   (edit appropriately)
  664. X
  665. X     under MS-DOS (MSC):  make MKZIPINF.DOS
  666. X       (or use Makefile if you have MSC 6.0:  "nmake zi_dos")
  667. X
  668. X     under OS/2 (MSC):  make MKZIPINF.DOS   (edit appropriately)
  669. X       (or use Makefile if you have MSC 6.0:  "nmake zi_os2")
  670. X
  671. X     under Atari OS:  beats me...
  672. X
  673. X     under VMS:  @MAKE_ZIPINFO     (see also VMSNOTES)
  674. X                 ZIPINFO == $DISKNAME:[DIRECTORY]ZIPINFO.EXE
  675. X
  676. X     under Macintosh OS:  who knows?
  677. X
  678. X  ---------------------------------------------------------------------------
  679. X
  680. X  Source:     unzip50.zip (.tar.Z, etc.) for Unix, VMS, OS/2 and MS-DOS; see
  681. X              `Where' in source distribution for ftp, uucp and mail-server
  682. X              sites.
  683. X  Author:     Greg Roelofs, roelofs@nas.nasa.gov, 23 August 1990
  684. X  Copyright:  Portions copyright 1992 Greg Roelofs.  Portions adapted from
  685. X              unzip 3.1.  SizeOfEAs() by Kai Uwe Rommel.
  686. X
  687. X  ---------------------------------------------------------------------------*/
  688. X
  689. X
  690. X
  691. X
  692. X#ifndef ZIPINFO
  693. X#  define ZIPINFO   /* needed for Unix permissions in non-Unix environments */
  694. X#endif /* !ZIPINFO */
  695. X#include "unzip.h"
  696. X
  697. X#define VERSION  "v1.0 of 21 August 92"
  698. X
  699. X#define LFLAG    3        /* for short "ls -l" type listing */
  700. X
  701. X#define EAID     0x0009   /* OS/2 EA extra field ID */
  702. Xtypedef struct {          /* for OS/2 info in OS/2 and non-OS/2 environments */
  703. X    unsigned short nID;
  704. X    unsigned short nSize;
  705. X    ULONG lSize;
  706. X} EAHEADER, *PEAHEADER;
  707. X
  708. X
  709. X
  710. X
  711. X/**********************/
  712. X/*  Global Variables  */
  713. X/**********************/
  714. X
  715. X#ifdef EBCDIC
  716. X   int  aflag=1;        /* this is so you can read it on the screen  */
  717. X#else                   /* (basically, entire program is "unzip -c") */
  718. X   int  aflag=0;
  719. X#endif
  720. Xint lflag=(-1);         /* '-1slmv':  listing format */
  721. Xint hflag=0;            /* '-h':  header line */
  722. Xint tflag=0;            /* '-t':  totals line */
  723. X
  724. Xbyte *inbuf, *inptr;    /* input buffer (any size is legal) and pointer */
  725. Xint incnt;
  726. X
  727. Xint zipfd;              /* zipfile file handle */
  728. Xchar zipfn[FILNAMSIZ];
  729. X
  730. Xchar local_hdr_sig[5] = "\120";    /* remaining signature bytes come later:  */
  731. Xchar central_hdr_sig[5] = "\120";  /*  must initialize at runtime so zipinfo */
  732. Xchar end_central_sig[5] = "\120";  /*  executable won't look like a zipfile  */
  733. Xchar extd_local_sig[5] = "\120";
  734. X
  735. Xcdir_file_hdr crec;             /* used in zipinfo.c, misc.c */
  736. Xlocal_file_hdr lrec;
  737. Xecdir_rec ecrec;
  738. Xstruct stat statbuf;            /* used by main() */
  739. X
  740. Xint process_all_files;
  741. Xlongint real_ecrec_offset, expect_ecrec_offset;
  742. Xlongint extra_bytes=0;          /* used in zipinfo.c, misc.c */
  743. Xlongint cur_zipfile_bufstart;   /* find_end_central_dir, readbuf */
  744. X
  745. Xmin_info info, *pInfo=(&info);
  746. X
  747. Xbyte *extra_field = NULL;       /* used by VMS, Mac and OS/2 versions */
  748. Xbyte *outbuf;                   /* buffer for rle look-back, zipfile comment */
  749. Xbyte *outout;                   /* scratch pad for ASCII-native trans */
  750. X
  751. Xchar filename[FILNAMSIZ];
  752. Xchar sig[5];
  753. Xchar *fnames[2] = {"*", NULL};    /* default filenames vector */
  754. Xchar **fnv = fnames;
  755. X
  756. Xstatic byte *hold;
  757. Xstatic longint ziplen;
  758. Xstatic UWORD hostnum;
  759. Xstatic UWORD methnum;
  760. Xstatic UWORD extnum;
  761. X
  762. Xchar *EndSigMsg = "\nwarning:\
  763. X  didn't find end-of-central-dir signature at end of central dir.\n";
  764. Xchar *CentSigMsg =
  765. X  "error:  expected central file header signature not found (file #%u).\n";
  766. Xchar *SeekMsg =
  767. X  "error:  attempt to seek before beginning of zipfile\n%s";
  768. X
  769. X#ifdef VMS
  770. Xchar *ReportMsg = "\
  771. X  (please check that you have transferred or created the zipfile in the\n\
  772. X  appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)\n";
  773. X#else /* !VMS */
  774. Xchar *ReportMsg = "\
  775. X  (please check that you have transferred or created the zipfile in the\n\
  776. X  appropriate BINARY mode and that you have compiled unzip properly)\n";
  777. X#endif /* ?VMS */
  778. X
  779. X
  780. X
  781. X
  782. X
  783. X
  784. X/******************/
  785. X/*  Main program  */
  786. X/******************/
  787. X
  788. Xmain(argc, argv)
  789. X    int    argc;
  790. X    char   *argv[];
  791. X{
  792. X    char   *s;
  793. X    int    c, error=FALSE, negative=0;
  794. X    int    hflag_slmv=TRUE, hflag_1=FALSE;  /* diff options => diff defaults */
  795. X    int    tflag_slm=TRUE, tflag_1v=FALSE;
  796. X    int    explicit_h=FALSE, explicit_t=FALSE;
  797. X
  798. X
  799. X
  800. X/*---------------------------------------------------------------------------
  801. X    Everybody is now "NOTINT16," but this is a nice little piece of code, so
  802. X    just comment it out for future reference. :-)
  803. X  ---------------------------------------------------------------------------*/
  804. X
  805. X#if 0
  806. X# ifndef KNOW_IT_WORKS  /* define this to save space, if things already work */
  807. X# ifndef DOS_OS2        /* already works (no RISCy OS/2's yet...) */
  808. X# ifndef NOTINT16       /* whole point is to see if this NEEDS defining */
  809. X    {
  810. X        int error=0;
  811. X        long testsig;
  812. X        static char *mach_type[3] = {"big-endian", "structure-padding",
  813. X                                     "big-endian and structure-padding"};
  814. X
  815. X        strcpy((char *)&testsig,"012");
  816. X        if (testsig != 0x00323130)
  817. X            error = 1;
  818. X        if (sizeof(cdir_file_hdr) != CREC_SIZE)
  819. X            error += 2;
  820. X        if (error--)
  821. X            fprintf(stderr, "It appears that your machine is %s.  If errors\n\
  822. Xoccur, please try recompiling with \"NOTINT16\" defined (read the\n\
  823. XMakefile, or try \"make zipinfo\").\n\n", mach_type[error]);
  824. X    }
  825. X# endif /* !NOTINT16 */
  826. X# endif /* !DOS_OS2 */
  827. X# endif /* !KNOW_IT_WORKS */
  828. X#endif /* 0 */
  829. X
  830. X/*---------------------------------------------------------------------------
  831. X    Put environment-variable options into the queue, then rip through any
  832. X    command-line options lurking about...
  833. X  ---------------------------------------------------------------------------*/
  834. X
  835. X    envargs(&argc, &argv, ENV_ZIPINFO);
  836. X
  837. X    while (--argc > 0 && (*++argv)[0] == '-') {
  838. X        s = argv[0] + 1;
  839. X        while ((c = *s++) != 0) {    /* "!= 0":  prevent Turbo C warning */
  840. X            switch (c) {
  841. X                case '-':
  842. X                    ++negative;
  843. X                    break;
  844. X                case '1':      /* shortest listing:  just filenames */
  845. X                    if (negative)
  846. X                        lflag = -2, negative = 0;
  847. X                    else
  848. X                        lflag = 1;
  849. X                    break;
  850. X                case 'h':      /* header line */
  851. X                    if (negative)
  852. X                        hflag_1 = hflag_slmv = FALSE, negative = 0;
  853. X                    else {
  854. X                        hflag_1 = hflag_slmv = explicit_h = TRUE;
  855. X                        if (lflag == -1)
  856. X                            lflag = 0;
  857. X                    }
  858. X                    break;
  859. X                case 'l':      /* longer form of "ls -l" type listing */
  860. X                    if (negative)
  861. X                        lflag = -2, negative = 0;
  862. X                    else
  863. X                        lflag = 5;
  864. X                    break;
  865. X                case 'm':      /* medium form of "ls -l" type listing */
  866. X                    if (negative)
  867. X                        lflag = -2, negative = 0;
  868. X                    else
  869. X                        lflag = 4;
  870. X                    break;
  871. X                case 's':      /* default:  shorter "ls -l" type listing */
  872. X                    if (negative)
  873. X                        lflag = -2, negative = 0;
  874. X                    else
  875. X                        lflag = 3;
  876. X                    break;
  877. X                case 't':      /* totals line */
  878. X                    if (negative)
  879. X                        tflag_1v = tflag_slm = FALSE, negative = 0;
  880. X                    else {
  881. X                        tflag_1v = tflag_slm = explicit_t = TRUE;
  882. X                        if (lflag == -1)
  883. X                            lflag = 0;
  884. X                    }
  885. X                    break;
  886. X                case 'v':      /* turbo-verbose listing */
  887. X                    if (negative)
  888. X                        lflag = -2, negative = 0;
  889. X                    else
  890. X                        lflag = 10;
  891. X                    break;
  892. X                default:
  893. X                    error = TRUE;
  894. X                    break;
  895. X            }
  896. X        }
  897. X    }
  898. X    if ((argc-- == 0) || error)
  899. X        RETURN(usage(error));
  900. X
  901. X    if (argc != 0)
  902. X        process_all_files = FALSE;
  903. X    else
  904. X        process_all_files = TRUE;   /* for speed */
  905. X
  906. X    /* if no listing options given (or all negated), or if only -h/-t given
  907. X     * with individual files specified, use default listing format */
  908. X    if ((lflag < 0) || (!process_all_files && (lflag == 0)))
  909. X        lflag = LFLAG;
  910. X
  911. X    /* set header and totals flags to default or specified values */
  912. X    switch (lflag) {
  913. X        case 0:   /* 0:  can only occur if either -t or -h explicitly given; */
  914. X        case 1:   /*  therefore set both flags equal to normally false value */
  915. X            hflag = hflag_1;
  916. X            tflag = tflag_1v;
  917. X            break;
  918. X        case 3:
  919. X        case 4:
  920. X        case 5:
  921. X            hflag = (!process_all_files && !explicit_h)? FALSE : hflag_slmv;
  922. X            tflag = (!process_all_files && !explicit_t)? FALSE : tflag_slm;
  923. X            break;
  924. X        case 10:
  925. X            hflag = hflag_slmv;
  926. X            tflag = tflag_1v;
  927. X            break;
  928. X    }
  929. X
  930. X/*---------------------------------------------------------------------------
  931. X    Now get the zipfile name from the command line and see if it exists as a
  932. X    regular (non-directory) file.  If not, append the ".zip" suffix.  We don't
  933. X    immediately check to see if this results in a good name, but we will do so
  934. X    later.  In the meantime, see if there are any member filespecs on the com-
  935. X    mand line, and if so, set the filename pointer to point at them.
  936. X  ---------------------------------------------------------------------------*/
  937. X
  938. X    strcpy(zipfn, *argv++);
  939. X    if (stat(zipfn, &statbuf) || (statbuf.st_mode & S_IFMT) == S_IFDIR)
  940. X        strcat(zipfn, ZSUFX);
  941. X#if defined(UNIX) && !defined(VMS)  /* Unix executables have no extension-- */
  942. X    else if (statbuf.st_mode & S_IXUSR)  /* might find zip, not zip.zip; etc */
  943. X        fprintf(stderr, "\nnote:  file [ %s ] may be an executable\n\n", zipfn);
  944. X#endif /* UNIX && !VMS */
  945. X
  946. X    if (stat(zipfn, &statbuf)) {    /* try again */
  947. X        fprintf(stderr, "error:  can't find zipfile [ %s ]\n", zipfn);
  948. X        RETURN(9);                  /* 9:  file not found */
  949. X    } else
  950. X        ziplen = statbuf.st_size;
  951. X
  952. X    if (!process_all_files)
  953. X        fnv = argv;
  954. X
  955. X/*---------------------------------------------------------------------------
  956. X    Okey dokey, we have everything we need to get started.  Let's roll.
  957. X  ---------------------------------------------------------------------------*/
  958. X
  959. X    inbuf = (byte *) (malloc(INBUFSIZ + 4));    /* 4 extra for hold[] (below) */
  960. X    outbuf = (byte *) (malloc(OUTBUFSIZ + 1));  /* 1 extra for string termin. */
  961. X    if (aflag)                  /* if need an ascebc scratch, */
  962. X        outout = (byte *) (malloc(OUTBUFSIZ));
  963. X    else                        /*  allocate it... */
  964. X        outout = outbuf;        /*  else just point to outbuf */
  965. X
  966. X    if ((inbuf == NULL) || (outbuf == NULL) || (outout == NULL)) {
  967. X        fprintf(stderr, "error:  can't allocate zipinfo buffers\n");
  968. X        RETURN(4);              /* 4-8:  insufficient memory */
  969. X    }
  970. X    hold = &inbuf[INBUFSIZ];    /* to check for boundary-spanning signatures */
  971. X
  972. X    RETURN(process_zipfile());  /* keep passing errors back... */
  973. X
  974. X} /* end main() */
  975. X
  976. X
  977. X
  978. X
  979. X
  980. X/**********************/
  981. X/*  Function usage()  */
  982. X/**********************/
  983. X
  984. Xint usage(error)
  985. X    int error;
  986. X{
  987. X    FILE *usagefp;
  988. X
  989. X
  990. X/*---------------------------------------------------------------------------
  991. X    If user requested usage, send it to stdout; else send to stderr.
  992. X  ---------------------------------------------------------------------------*/
  993. X
  994. X    if (error)
  995. X        usagefp = (FILE *) stderr;
  996. X    else
  997. X        usagefp = (FILE *) stdout;
  998. X
  999. X    fprintf(usagefp, "\
  1000. X   ZipInfo:  Zipfile Information Utility %s\n\
  1001. X   (brought to you by Newtware, Inc., and the fine folks at Info-ZIP)\n\n\
  1002. X   Usage:  zipinfo [-1smlvht] file[.zip] [filespec...]\n", VERSION);
  1003. X    fprintf(usagefp, "\
  1004. X     -1  list filenames only, one per line (useful for pipes)\n\
  1005. X     -s  list zipfile info in short Unix \"ls -l\" format:  default\n\
  1006. X     -m  list zipfile info in medium Unix \"ls -l\" format\n\
  1007. X     -l  list zipfile info in long Unix \"ls -l\" format\n\
  1008. X     -v  list zipfile information in verbose, multi-page format\n\
  1009. X     -h  list header line\n\
  1010. X     -t  list totals for files listed or for all files\n");
  1011. X/*
  1012. X     -p  disable automatic \"more\" function (for pipes) [not implemented]\n");
  1013. X */
  1014. X
  1015. X#ifdef VMS
  1016. X    fprintf(usagefp, "\nRemember that non-lowercase filespecs must be quoted\
  1017. X in VMS (e.g., \"Makefile\").\n");
  1018. X#endif
  1019. X
  1020. X    if (error)
  1021. X        return 10;    /* 10:  bad or illegal parameters specified */
  1022. X    else
  1023. X        return 0;     /* just wanted usage screen: no error */
  1024. X
  1025. X} /* end function usage() */
  1026. X
  1027. X
  1028. X
  1029. X
  1030. X
  1031. X/********************************/
  1032. X/*  Function process_zipfile()  */
  1033. X/********************************/
  1034. X
  1035. Xint process_zipfile()   /* return PK-type error code */
  1036. X{
  1037. X    int error=0, error_in_archive;
  1038. X
  1039. X
  1040. X/*---------------------------------------------------------------------------
  1041. X    Open the zipfile for reading and in BINARY mode to prevent CR/LF trans-
  1042. X    lation, which would corrupt the bitstreams.
  1043. X  ---------------------------------------------------------------------------*/
  1044. X
  1045. X#ifdef VMS
  1046. X    if (check_format())         /* check for variable-length format */
  1047. X        return 2;               /* 2:  error in zipfile */
  1048. X#endif /* VMS */
  1049. X
  1050. X    if (open_input_file())      /* this should never happen, given the */
  1051. X        return 9;               /*   stat() test in main(), but... */
  1052. X
  1053. X/*---------------------------------------------------------------------------
  1054. X    Reconstruct the various PK signature strings, and find and process the
  1055. X    end-of-central-directory header.
  1056. X  ---------------------------------------------------------------------------*/
  1057. X
  1058. X    strcat(local_hdr_sig, LOCAL_HDR_SIG);
  1059. X    strcat(central_hdr_sig, CENTRAL_HDR_SIG);
  1060. X    strcat(end_central_sig, END_CENTRAL_SIG);
  1061. X    strcat(extd_local_sig, EXTD_LOCAL_SIG);
  1062. X
  1063. X    if (find_end_central_dir()) {   /* not found; nothing to do */
  1064. X        close(zipfd);
  1065. X        return 2;                   /* 2:  error in zipfile */
  1066. X    }
  1067. X
  1068. X    real_ecrec_offset = cur_zipfile_bufstart + (inptr-inbuf);
  1069. X#ifdef TEST
  1070. X    printf("\n  found end-of-central-dir signature at offset %ld (%.8lXh)\n",
  1071. X      real_ecrec_offset, real_ecrec_offset);
  1072. X    printf("    from beginning of file; offset %d (%.4Xh) within block\n",
  1073. X      inptr-inbuf, inptr-inbuf);
  1074. X#endif
  1075. X
  1076. X    /* sets expect_ecrec_offset: */
  1077. X    if ((error_in_archive = process_end_central_dir()) > 1) {
  1078. X        close(zipfd);
  1079. X        return error_in_archive;
  1080. X    }
  1081. X
  1082. X/*---------------------------------------------------------------------------
  1083. X    Test the end-of-central-directory info for incompatibilities (multi-disk
  1084. X    archives) or inconsistencies (missing or extra bytes in zipfile).
  1085. X  ---------------------------------------------------------------------------*/
  1086. X
  1087. X    if (ecrec.number_this_disk != ecrec.num_disk_with_start_central_dir) {
  1088. X        fprintf(stderr, "\n\
  1089. X     Zipfile is part of a multi-disk archive, and this is not the disk on\
  1090. X     which the central zipfile directory begins.\n");
  1091. X        error_in_archive = 11;  /* 11:  no files found */
  1092. X    } else {
  1093. X        if ((extra_bytes = real_ecrec_offset - expect_ecrec_offset) < 0) {
  1094. X            fprintf(stderr, "\nerror:  missing %ld bytes in zipfile (\
  1095. Xattempting to process anyway)\n\n", -extra_bytes);
  1096. X            error_in_archive = 2;       /* 2:  (weak) error in zipfile */
  1097. X        } else if (extra_bytes > 0) {
  1098. X            if ((ecrec.offset_start_central_directory == 0) &&
  1099. X                (ecrec.size_central_directory != 0))   /* zip 1.5 -go bug */
  1100. X            {
  1101. X                fprintf(stderr, "\nerror:  NULL central directory offset (\
  1102. Xattempting to process anyway)\n\n");
  1103. X                error_in_archive = 2;   /* 2:  (weak) error in zipfile */
  1104. X            } else {
  1105. X                fprintf(stderr, "\nwarning:  extra %ld bytes at beginning or\
  1106. X within zipfile\n          (attempting to process anyway)\n\n", extra_bytes);
  1107. X                error_in_archive = 1;   /* 1:  warning error */
  1108. X            }
  1109. X        }
  1110. X
  1111. X    /*-----------------------------------------------------------------------
  1112. X        Check for empty zipfile and exit now if so.
  1113. X      -----------------------------------------------------------------------*/
  1114. X
  1115. X        if (expect_ecrec_offset == 0L  &&  ecrec.size_central_directory == 0) {
  1116. X            printf("%sEmpty zipfile.\n", lflag>9 ? "\n  " : "");
  1117. X            close(zipfd);
  1118. X            return (error_in_archive > 1)? error_in_archive : 1;
  1119. X        }
  1120. X
  1121. X    /*-----------------------------------------------------------------------
  1122. X        Compensate for missing or extra bytes, and seek to where the start
  1123. X        of central directory should be.  If header not found, uncompensate
  1124. X        and try again (necessary for at least some Atari archives created
  1125. X        with STZIP, as well as archives created by J.H. Holm's ZIPSPLIT).
  1126. X      -----------------------------------------------------------------------*/
  1127. X
  1128. X        LSEEK( ecrec.offset_start_central_directory )
  1129. X        if ((readbuf(sig, 4) <= 0) || strncmp(sig, central_hdr_sig, 4)) {
  1130. X            longint tmp = extra_bytes;
  1131. X
  1132. X            extra_bytes = 0;
  1133. X            LSEEK( ecrec.offset_start_central_directory )
  1134. X            if ((readbuf(sig, 4) <= 0) || strncmp(sig, central_hdr_sig, 4)) {
  1135. X                fprintf(stderr,
  1136. X            "error:  start of central directory not found; zipfile corrupt.\n");
  1137. X                fprintf(stderr, ReportMsg);
  1138. X                close(zipfd);
  1139. X                return 3;           /* 3:  severe error in zipfile */
  1140. X            }
  1141. X            fprintf(stderr, "error:  reported length of central directory is \
  1142. X%d bytes too\n        long (Atari STZIP zipfile?  J.H. Holm ZIPSPLIT zipfile?)\
  1143. X.\n        Compensating...\n\n", -tmp);
  1144. X            error_in_archive = 2;   /* 2:  (weak) error in zipfile */
  1145. X        }
  1146. X
  1147. X    /*-----------------------------------------------------------------------
  1148. X        Seek to the start of the central directory one last time, since we
  1149. X        have just read the first entry's signature bytes; then do the central
  1150. X        directory and close the zipfile.
  1151. X      -----------------------------------------------------------------------*/
  1152. X
  1153. X        LSEEK( ecrec.offset_start_central_directory )
  1154. X        if ((error = process_central_dir()) > error_in_archive)
  1155. X            error_in_archive = error;    /* don't overwrite stronger error */
  1156. X        if (lflag > 9)
  1157. X            printf("\n");
  1158. X    }
  1159. X
  1160. X    close(zipfd);
  1161. X    return error_in_archive;
  1162. X
  1163. X} /* end function process_zipfile() */
  1164. X
  1165. X
  1166. X
  1167. X
  1168. X
  1169. X/*************************************/
  1170. X/*  Function find_end_central_dir()  */
  1171. X/*************************************/
  1172. X
  1173. Xint find_end_central_dir()   /* return 0 if found, 1 otherwise */
  1174. X{
  1175. X    int       i, numblks;
  1176. X    longint   tail_len;
  1177. X
  1178. X
  1179. X
  1180. X/*---------------------------------------------------------------------------
  1181. X    Treat case of short zipfile separately.
  1182. X  ---------------------------------------------------------------------------*/
  1183. X
  1184. X    if (ziplen <= INBUFSIZ) {
  1185. X        lseek(zipfd, 0L, SEEK_SET);
  1186. X        if ((incnt = read(zipfd,inbuf,(unsigned int)ziplen)) == (int)ziplen)
  1187. X            /* 'P' must be at least 22 bytes from end of zipfile */
  1188. X            for (inptr = inbuf+(int)ziplen-22;  inptr >= inbuf;  --inptr)
  1189. X                if ((ascii_to_native(*inptr) == 'P')  &&
  1190. X                     !strncmp((char *)inptr, end_central_sig, 4)) {
  1191. X                    incnt -= inptr - inbuf;
  1192. X                    return 0;   /* found it! */
  1193. X                }               /* ...otherwise fall through & fail */
  1194. X
  1195. X/*---------------------------------------------------------------------------
  1196. X    Zipfile is longer than INBUFSIZ:  may need to loop.  Start with short
  1197. X    block at end of zipfile (if not TOO short).
  1198. X  ---------------------------------------------------------------------------*/
  1199. X
  1200. X    } else {
  1201. X        if ((tail_len = ziplen % INBUFSIZ) > ECREC_SIZE) {
  1202. X            cur_zipfile_bufstart = lseek(zipfd, ziplen-tail_len, SEEK_SET);
  1203. X            if ((incnt = read(zipfd,inbuf,(unsigned int)tail_len)) !=
  1204. X                (int)tail_len)
  1205. X                goto fail;      /* shut up; it's expedient. */
  1206. X
  1207. X            /* 'P' must be at least 22 bytes from end of zipfile */
  1208. X            for (inptr = inbuf+(int)tail_len-22;  inptr >= inbuf;  --inptr)
  1209. X                if ((ascii_to_native(*inptr) == 'P')  &&
  1210. X                     !strncmp((char *)inptr, end_central_sig, 4)) {
  1211. X                    incnt -= inptr - inbuf;
  1212. X                    return 0;   /* found it */
  1213. X                }               /* ...otherwise search next block */
  1214. X            /* sig may span block boundary: */
  1215. X            strncpy((char *)hold, (char *)inbuf, 3);
  1216. X        } else
  1217. X            cur_zipfile_bufstart = ziplen - tail_len;
  1218. X
  1219. X        /*
  1220. X         * Loop through blocks of zipfile data, starting at the end and going
  1221. X         * toward the beginning.  Need only check last 65557 bytes of zipfile:
  1222. X         * comment may be up to 65535 bytes long, end-of-central-directory rec-
  1223. X         * ord is 18 bytes (shouldn't hardcode this number, but what the hell:
  1224. X         * already did so above (22=18+4)), and sig itself is 4 bytes.
  1225. X         * 
  1226. X         * zipinfo:  check the whole file, just in case some transfer protocol
  1227. X         * has appended a whole bunch of garbage at the end of the archive.
  1228. X         *
  1229. X         *                =todo=   ==done==   ==rounding==    =blksiz=      */
  1230. X        numblks = (int) ((ziplen - tail_len + (INBUFSIZ-1)) / INBUFSIZ);
  1231. X
  1232. X        for (i = 1;  i <= numblks;  ++i) {
  1233. X            cur_zipfile_bufstart -= INBUFSIZ;
  1234. X            lseek(zipfd, cur_zipfile_bufstart, SEEK_SET);
  1235. X            if ((incnt = read(zipfd,inbuf,INBUFSIZ)) != INBUFSIZ)
  1236. X                break;          /* fall through and fail */
  1237. X
  1238. X            for (inptr = inbuf+INBUFSIZ-1;  inptr >= inbuf;  --inptr)
  1239. X                if ((ascii_to_native(*inptr) == 'P')  &&
  1240. X                     !strncmp((char *)inptr, end_central_sig, 4)) {
  1241. X                    incnt -= inptr - inbuf;
  1242. X                    return 0;   /* found it */
  1243. X                }
  1244. X            /* sig may span block boundary: */
  1245. X            strncpy((char *)hold, (char *)inbuf, 3);
  1246. X        }
  1247. X
  1248. X    } /* end if (ziplen > INBUFSIZ) */
  1249. X
  1250. X/*---------------------------------------------------------------------------
  1251. X    Searched through whole region where signature should be without finding
  1252. X    it.  Print informational message and die a horrible death.
  1253. X  ---------------------------------------------------------------------------*/
  1254. X
  1255. Xfail:
  1256. X
  1257. X    fprintf(stderr, "\n\
  1258. X     %s:\n\n\
  1259. X     End-of-central-directory signature not found.  Either this file is not\n\
  1260. X     a zipfile, or it constitutes one disk of a multi-part archive.  In the\n\
  1261. X     latter case the central directory and zipfile comment will be found on\n\
  1262. X     the last disk(s) of this archive.\n", zipfn);
  1263. X    return 1;   /* failed */
  1264. X
  1265. X} /* end function find_end_central_dir() */
  1266. X
  1267. X
  1268. X
  1269. X
  1270. X
  1271. X/****************************************/
  1272. X/*  Function process_end_central_dir()  */
  1273. X/****************************************/
  1274. X
  1275. Xint process_end_central_dir()   /* return PK-type error code */
  1276. X{
  1277. X    ec_byte_rec   byterec;
  1278. X    int           error=0;
  1279. X
  1280. X
  1281. X/*--------------------------------------------------------------------------
  1282. X    Read the end-of-central-directory record and do any necessary machine-
  1283. X    type conversions (byte ordering, structure padding compensation) by
  1284. X    copying character array to struct.
  1285. X  ---------------------------------------------------------------------------*/
  1286. X
  1287. X    if (readbuf((char *)byterec, ECREC_SIZE+4) <= 0)
  1288. X        return 51;
  1289. X
  1290. X    ecrec.number_this_disk =
  1291. X        makeword(&byterec[NUMBER_THIS_DISK]);
  1292. X    ecrec.num_disk_with_start_central_dir =
  1293. X        makeword(&byterec[NUM_DISK_WITH_START_CENTRAL_DIR]);
  1294. X    ecrec.num_entries_centrl_dir_ths_disk =
  1295. X        makeword(&byterec[NUM_ENTRIES_CENTRL_DIR_THS_DISK]);
  1296. X    ecrec.total_entries_central_dir =
  1297. X        makeword(&byterec[TOTAL_ENTRIES_CENTRAL_DIR]);
  1298. X    ecrec.size_central_directory =
  1299. X        makelong(&byterec[SIZE_CENTRAL_DIRECTORY]);
  1300. X    ecrec.offset_start_central_directory =
  1301. X        makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]);
  1302. X    ecrec.zipfile_comment_length =
  1303. X        makeword(&byterec[ZIPFILE_COMMENT_LENGTH]);
  1304. X
  1305. X    expect_ecrec_offset = ecrec.offset_start_central_directory +
  1306. X                           ecrec.size_central_directory;
  1307. X
  1308. X/*---------------------------------------------------------------------------
  1309. X    Print out various interesting things about the zipfile.
  1310. X  ---------------------------------------------------------------------------*/
  1311. X
  1312. X    /* header fits on one line, for anything up to 10GB and 10000 files: */
  1313. X    if (hflag)
  1314. X        printf((strlen(zipfn)<39)? "Archive:  %s   %ld bytes   %d file%s\n"
  1315. X          : "Archive:  %s   %ld   %d\n", zipfn, ziplen,
  1316. X          ecrec.total_entries_central_dir,
  1317. X          (ecrec.total_entries_central_dir==1)? "":"s");
  1318. X
  1319. X    /* verbose format */
  1320. X    if (lflag > 9) {
  1321. X        printf("\nEnd-of-central-directory record:\n");
  1322. X        printf("-------------------------------\n\n");
  1323. X
  1324. X        printf("\
  1325. X  Actual offset of end-of-central-dir record:   %9ld (%.8lXh)\n\
  1326. X  Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\
  1327. X  (based on the length of the central directory and its expected offset)\n\n",
  1328. X          expect_ecrec_offset, expect_ecrec_offset,
  1329. X          real_ecrec_offset, real_ecrec_offset);
  1330. X
  1331. X        if (ecrec.number_this_disk == 0) {
  1332. X            printf("\
  1333. X  This zipfile constitutes the sole disk of a single-part archive; its\n\
  1334. X  central directory contains %u %s.  The central directory is %lu\n\
  1335. X  (%.8lXh) bytes long, and its (expected) offset in bytes from the\n\
  1336. X  beginning of the zipfile is %lu (%.8lXh).\n\n",
  1337. X              ecrec.total_entries_central_dir,
  1338. X              (ecrec.total_entries_central_dir == 1)? "entry" : "entries",
  1339. X              ecrec.size_central_directory, ecrec.size_central_directory,
  1340. X              ecrec.offset_start_central_directory,
  1341. X              ecrec.offset_start_central_directory);
  1342. X        } else {
  1343. X            printf("\
  1344. X  This zipfile constitutes disk %u of a multi-part archive.  The central\n\
  1345. X  directory starts on disk %u; %u of its entries %s contained within\n\
  1346. X  this zipfile, out of a total of %u %s.  The entire central\n\
  1347. X  directory is %lu (%.8lXh) bytes long, and its offset in bytes from\n\
  1348. X  the beginning of the zipfile in which it begins is %lu (%.8lXh).\n\n",
  1349. X              ecrec.number_this_disk,
  1350. X              ecrec.num_disk_with_start_central_dir,
  1351. X              ecrec.num_entries_centrl_dir_ths_disk,
  1352. X              (ecrec.num_entries_centrl_dir_ths_disk == 1)? "is" : "are",
  1353. X              ecrec.total_entries_central_dir,
  1354. X              (ecrec.total_entries_central_dir == 1) ? "entry" : "entries",
  1355. X              ecrec.size_central_directory, ecrec.size_central_directory,
  1356. X              ecrec.offset_start_central_directory,
  1357. X              ecrec.offset_start_central_directory);
  1358. X        }
  1359. X
  1360. X    /*-----------------------------------------------------------------------
  1361. X        Get the zipfile comment, if any, and print it out.  (Comment may be
  1362. X        up to 64KB long.  May the fleas of a thousand camels infest the arm-
  1363. X        pits of anyone who actually takes advantage of this fact.)
  1364. X      -----------------------------------------------------------------------*/
  1365. X
  1366. X        if (!ecrec.zipfile_comment_length)
  1367. X            printf("  There is no zipfile comment.\n");
  1368. X        else {
  1369. X            printf("  The zipfile comment is %u bytes long and contains the following text:\n\n",
  1370. X              ecrec.zipfile_comment_length );
  1371. X            printf("======================== zipfile comment begins ==========================\n");
  1372. X            if (do_string(ecrec.zipfile_comment_length, DISPLAY))
  1373. X                error = 1;          /* 1:  warning error */
  1374. X            printf("\n========================= zipfile comment ends ===========================\n");
  1375. X            if (error)
  1376. X                printf("\n  The zipfile comment is truncated.\n");
  1377. X        } /* endif (comment exists) */
  1378. X
  1379. X    } /* endif (verbose) */
  1380. X
  1381. X    return error;
  1382. X
  1383. X} /* end function process_end_central_dir() */
  1384. X
  1385. X
  1386. X
  1387. X
  1388. END_OF_FILE
  1389.  if test 29513 -ne `wc -c <'zipinfo.c.A'`; then
  1390.     echo shar: \"'zipinfo.c.A'\" unpacked with wrong size!
  1391.  elif test -f 'zipinfo.c.B'; then
  1392.     echo shar: Combining  \"'zipinfo.c'\" \(59337 characters\)
  1393.     cat 'zipinfo.c.A' 'zipinfo.c.B' > 'zipinfo.c'
  1394.     if test 59337 -ne `wc -c <'zipinfo.c'`; then
  1395.       echo shar: \"'zipinfo.c'\" combined with wrong size!
  1396.     else
  1397.       rm zipinfo.c.A zipinfo.c.B
  1398.     fi
  1399.   fi
  1400.   # end of 'zipinfo.c.A'
  1401. fi
  1402. echo shar: End of archive 7 \(of 14\).
  1403. cp /dev/null ark7isdone
  1404. MISSING=""
  1405. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1406.     if test ! -f ark${I}isdone ; then
  1407.     MISSING="${MISSING} ${I}"
  1408.     fi
  1409. done
  1410. if test "${MISSING}" = "" ; then
  1411.     echo You have unpacked all 14 archives.
  1412.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1413. else
  1414.     echo You still must unpack the following archives:
  1415.     echo "        " ${MISSING}
  1416. fi
  1417. exit 0
  1418. exit 0 # Just in case...
  1419.