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

  1. Newsgroups: comp.sources.misc
  2. From: zip-bugs@cs.ucla.edu (Info-ZIP group)
  3. Subject:  v31i101:  zip19 - Info-ZIP portable Zip, version 1.9, Part09/11
  4. Message-ID: <1992Aug23.064947.29627@sparky.imd.sterling.com>
  5. X-Md4-Signature: 21a7f40fe6ce3bc3b1189116643da76f
  6. Date: Sun, 23 Aug 1992 06:49:47 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 101
  11. Archive-name: zip19/part09
  12. Supersedes: zip: Volume 23, Issue 88-96
  13. Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, XOS, !AMIGA, ATARI, symlink, SGI, DEC, Cray, Convex, Amdahl, Sun, PC
  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:  atari/makefile.st infozip.who mac/macfile.c mac/macstat.c
  22. #   makefile msdos/makefile.msc.UU msdos/match.asm os2/match32.asm.UU
  23. #   vms/VMSmunch.h vms/vaxclib.opt
  24. # Wrapped by kent@sparky on Sun Aug 23 01:00:46 1992
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. echo If this archive is complete, you will see the following message:
  27. echo '          "shar: End of archive 9 (of 11)."'
  28. if test -f 'atari/makefile.st' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'atari/makefile.st'\"
  30. else
  31.   echo shar: Extracting \"'atari/makefile.st'\" \(1949 characters\)
  32.   sed "s/^X//" >'atari/makefile.st' <<'END_OF_FILE'
  33. X# Makefile for Zip, ZipNote and ZipSplit for
  34. X# Atari ST with Turbo C 2.0.
  35. X
  36. X# To use, do "make -f makefile.st"
  37. X
  38. X# ------------- Turbo C -------------
  39. XTCHOME=\TC
  40. X
  41. XCFLAGS=-A -G -I$(TCHOME)\INCLUDE -DATARI_ST
  42. XUTILFLAGS=-DUTIL $(CFLAGS)
  43. XCC=tcc
  44. XLD=tlink
  45. XLDFLAGS= -S=8192
  46. X
  47. X# variables
  48. XOBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o atari.o
  49. XOBJI = deflate.o trees.o bits.o
  50. X
  51. XOBJU = zipfile_.o zipup_.o fileio_.o util_.o globals.o
  52. XOBJN = zipnote.o  $(OBJU)
  53. XOBJS = zipsplit.o $(OBJU)
  54. X
  55. Xzips:    zip.prg zipnote.prg zipsplit.prg
  56. X    echo done
  57. X
  58. Xatari.o: atari.c
  59. X    $(CC) -c $(CFLAGS) atari.c
  60. X
  61. Xzip.o:    zip.h ziperr.h tailor.h revision.h zip.c
  62. X    $(CC) -c $(CFLAGS) zip.c
  63. X
  64. Xzipfile.o:    zip.h ziperr.h tailor.h zipfile.c
  65. X    $(CC) -c $(CFLAGS) zipfile.c
  66. X
  67. Xzipup.o:    zip.h ziperr.h tailor.h revision.h zipup.c
  68. X    $(CC) -c $(CFLAGS) zipup.c
  69. X
  70. Xfileio.o:    zip.h ziperr.h tailor.h fileio.c
  71. X    $(CC) -c $(CFLAGS) fileio.c
  72. X
  73. Xutil.o:    zip.h ziperr.h tailor.h util.c
  74. X    $(CC) -c $(CFLAGS) util.c
  75. X
  76. Xglobals.o:    zip.h ziperr.h tailor.h globals.c
  77. X    $(CC) -c $(CFLAGS) globals.c
  78. X
  79. Xzipnote.o:    zip.h ziperr.h tailor.h revision.h zipnote.c
  80. X    $(CC) -c $(CFLAGS) zipnote.c
  81. X
  82. Xzipsplit.o:    zipsplit.c zip.h ziperr.h tailor.h revision.h
  83. X    $(CC) -c $(CFLAGS) zipsplit.c
  84. X
  85. Xdeflate.o:    zip.h ziperr.h tailor.h deflate.c
  86. X    $(CC) -c $(CFLAGS) deflate.c
  87. X
  88. Xtrees.o:    zip.h ziperr.h tailor.h trees.c
  89. X    $(CC) -c $(CFLAGS) trees.c
  90. X
  91. Xbits.o:        zip.h ziperr.h tailor.h bits.c
  92. X    $(CC) -c $(CFLAGS) bits.c
  93. X
  94. Xzipfile_.o:    zipfile.c zip.h ziperr.h tailor.h
  95. X    $(CC) -c $(UTILFLAGS) -Ozipfile_.o zipfile.c
  96. X
  97. Xzipup_.o:    zipup.c zip.h ziperr.h tailor.h
  98. X    $(CC) -c $(UTILFLAGS) -Ozipup_.o zipup.c
  99. X
  100. Xfileio_.o:    fileio.c zip.h ziperr.h tailor.h
  101. X    $(CC) -c $(UTILFLAGS) -Ofileio_.o fileio.c
  102. X
  103. Xutil_.o:    util.c zip.h ziperr.h tailor.h
  104. X    $(CC) -c $(UTILFLAGS) -Ofileio_.o fileio.c
  105. X
  106. Xzip.prg: $(OBJZ) $(OBJI)
  107. X    $(LD) $(LDFLAGS) -C=zip.lnk -O=$@
  108. X
  109. Xzipnote.prg: $(OBJN)
  110. X    $(LD) $(LDFLAGS) -C=zipn.lnk -O=$@
  111. X
  112. Xzipsplit.prg: $(OBJS)
  113. X    $(LD) $(LDFLAGS) -C=zips.lnk -O=$@
  114. END_OF_FILE
  115.   if test 1949 -ne `wc -c <'atari/makefile.st'`; then
  116.     echo shar: \"'atari/makefile.st'\" unpacked with wrong size!
  117.   fi
  118.   # end of 'atari/makefile.st'
  119. fi
  120. if test -f 'infozip.who' -a "${1}" != "-c" ; then 
  121.   echo shar: Will not clobber existing file \"'infozip.who'\"
  122. else
  123.   echo shar: Extracting \"'infozip.who'\" \(6165 characters\)
  124.   sed "s/^X//" >'infozip.who' <<'END_OF_FILE'
  125. XThese members of the INFO-ZIP group contributed to the development and
  126. Xtesting of portable Zip.  They are responsible for whatever works in Zip.
  127. XWhatever doesn't work is solely the fault of the authors of Zip (Mark Adler,
  128. XRich Wales, Jean-loup Gailly, Kai Uwe Rommel and Igor Mandrichenko).
  129. XBill Davidsen provided the envargs code. If you have contributed and
  130. Xyour name has been forgotten, please send a reminder to the zip-bugs
  131. Xaddress given in the Readme file.
  132. X
  133. XMark Adler              madler@tybalt.caltech.edu       NeXT 2.x
  134. XGlenn J. Andrews        oper1%drcv06.decnet@drcvax.af.mil       VAX VMS
  135. XTom Betz                marob!upaya!tbetz@phri.nyu.edu  SCO Xenix 2.3.1
  136. XJames Birdsall          jwbirdsa@amc.com                AT&T 3B1
  137. XWim Bonner              27313853@WSUVM1.CSC.WSU.EDU     HP 9000/840a HPUX
  138. XPaul Borman             prb@cray.com                    Cray-X/YMP,2 UNICOS 6-8
  139. XLeslie C. Brown         lbrown@BRL.MIL                  Pyramid MIS-4
  140. XRalf Brown              ralf@b.gp.cs.cmu.edu            Pyramid MIS-4
  141. XPietro Caselli          zaphod@petruz.sublink.org       Minix 1.5.10
  142. XBill Davidsen           davidsen@crdos1.crd.ge.com      Xenix (on what?)
  143. XDaniel Deimert          daniel@hexagon.se               zeus3.21 Zilog S8000
  144. XJames P. Dugal          jpd@usl.edu                     Pyramid 90X OSx4.1
  145. X"Evil Ed"               esaffle@gmuvax2.gmu.edu         Ulrix-32 V3.1 (Rev. 9)
  146. XDavid A. Feinleib       t-davefe@microsoft.com          Windows NT
  147. XGreg Flint              afc@klaatu.cc.purdue.edu        ETA-10P* hybrid Sys V
  148. XJeff Foy                jfoy@glia.biostr.washington.edu IRIX Sys V Rel 3.3.1
  149. XMike Freeman            freeman@watsun.cc.columbia.edu  Vax VMS
  150. XKevin M. Fritz          kmfritz@apgea.army.mil          Turbo C++ 1.0
  151. XJean-loup Gailly        jloup@chorus.fr                 MS-DOS Microsoft C 5.1
  152. XScott D. Galloway       sgallowa@letterkenn-emh1.army.mil   Sperry 5000 SysV.3
  153. XGeorge Grimes           grimes@netcom.com               Apollo Domain SR10.4
  154. XHunter Goatley          goathunter@WKUVX1.BITNET        Vax VMS
  155. XArnt Gulbrandsen        agulbra@pvv.unit.no             Linux
  156. XDavid Gundlach          david@rolf.stat.uga.edu         Sun SS1+ SunOS 4.1
  157. XBob Hardy               hardy@lucid.com                 Power C on MSDOS
  158. XPeter Jones             jones@mips1.info.uqam.ca        MIPS UMIPS 4.0
  159. XKjetil W. J{\o}rgensen  jorgens@lise.unit.no            OSF/1
  160. XBruce Kahn              bkahn@archive.webo.dg.com       MS-DOS Microsoft C 5.1
  161. XJonathan I. Kamens      jik@pit-manager.mit.edu         ultrix on DECstation
  162. XBob Kemp                Robert.V.Kemp@att.com           AT&T 3B2 SysV 3.2v2
  163. XEarl Kiech              KIECH@utkvx.utk.edu             VAX VMS V5.4-1A
  164. XDavid Kirschbaum        kirsch@usasoc.soc.mil           He got us all in this
  165. X                                                        mess in the first place
  166. XBo Kullmar              bk@kullmar.se                   DNIX 5.2, 5.3
  167. XHarry Langenbacher      harry@neuron6.Jpl.Nasa.Gov      Sun SS1+ SunOS 4.1
  168. XMichael D. Lawler       mdlawler@bsu-cs.bsu.edu         Mt.Xinu BSD 4.3 on VAX
  169. XJohnny Lee              johnnyl@microsoft.com           Microsoft C 7.0
  170. XDavid Lemson            lemson@ux1.cso.uiuc.edu         Sequent Dynix 3.0.17
  171. XOnno van der Linden     vdlinden@fwi.uva.nl             SCO Unix 3.2.0
  172. X                                                        BC++ 3.0, djgcc 1.06
  173. XWarner Losh             imp@Solbourne.COM               packing algorithm help
  174. XJohn Lundin             lundin@urvax.urich.edu          VAX VMS
  175. XIgor Mandrichenko       mandrichenko@m10.ihep.su        VAX VMS
  176. XCliff Manis             root@csoftec.csf.com            SCO 2.3.1 (386)
  177. XFulvio Marino           fulvio@iconet.ico.olivetti.it   X/OS 2.3 & 2.4
  178. XBill Marsh              bmarsh@cod.nosc.mil             SGI Iris 4D35
  179. XPeter Mauzey            ptm@mtdcc.att.com               AT&T 6300
  180. XRafal Z. Maszkowski     <rzm%pltumk11.bitnet@mvs.oac.ucla.edu> Bug report
  181. XRobert McBroom (?)      rm3@ornl.gov                    DECsystem 5810
  182. XHumberto Ortiz-Zuazaga  zuazaga@ucunix.san.uc.edu       Linux
  183. XJames E. O'Dell         jim@fpr.com                     MacOS
  184. XWilliam O'Shaughnessy   williamo@hpcupt1.cup.hp.com     HPUX
  185. XEnrico Renato Palmerini palmer@vxscaq.cineca.it         UNISYS 7000 Sys 5 r2.3
  186. XKeith Petersen          w8sdz@simtel20.army.mil         Maintainer of Info-ZIP
  187. X                                                        Pyramid UCB OSx4.4c
  188. XDavid A Rasmussen       dave@convex.csd.uwm.edu         Convex C220 with 9.0 OS
  189. XMichael Regoli          mr@cica.indiana.edu             Ultrix 3.1 VAX 8650
  190. X                                                        BSD 4.3 IBM RT/125
  191. X                                                        BSD 4.3 MicroVAX 3500
  192. X                                                        SunOS 4.0.3 Sun 4/330
  193. XRick Rodgers            rodgers@maxwell.mmwb.ucsf.EDU   Unix man page
  194. XGreg Roelofs            roe2@midway.uchicago.edu        SunOS 4.1.1,4.1.2 Sun 4
  195. X                                                        Unicos 5.1--6.1.5 Cray
  196. X                                                        OS/2 1.3 MS C 6.0
  197. X                                                        Ultrix 4.1,4.2 DEC 5810
  198. X                                                        VMS 5.2, 5.4 VAX 8600
  199. X                                                        Irix 3.3.2, SGI Iris 4D
  200. X                                                        UTS 1.2.4 Amdahl 5880
  201. XKai Uwe Rommel          rommel@informatik.tu-muenchen.de        OS/2
  202. XJon Saxton              jrs@panix.com                   Microsoft C 6.0
  203. XSteve Salisbury         stevesa@microsoft.com           Microsoft C 6.0
  204. XMartin Schulz           martin@indian.cs.unb.ca         Atari ST
  205. XDave Sisson             daves@vtcosy.cns.vt.edu         AIX 1.1.1 PS/2 & 3090
  206. XRon Srodawa             srodawa@vela.acs.oakland.edu    SCO Xenix/386 2.3.3
  207. XBertil Stenstr|m        stenis@heron.qz.se              HP-UX 7.0 HP9000/835
  208. XAntoine Verheijen    antoine@sysmail.ucs.ualberta.ca envargs fix
  209. XArjan de Vet            devet@info.win.tue.nl           SunOS 4.1, MSC 5.1
  210. XRich Wales              wales@cs.ucla.edu               SunOS 4.0.3 Sun-3/50
  211. END_OF_FILE
  212.   if test 6165 -ne `wc -c <'infozip.who'`; then
  213.     echo shar: \"'infozip.who'\" unpacked with wrong size!
  214.   fi
  215.   # end of 'infozip.who'
  216. fi
  217. if test -f 'mac/macfile.c' -a "${1}" != "-c" ; then 
  218.   echo shar: Will not clobber existing file \"'mac/macfile.c'\"
  219. else
  220.   echo shar: Extracting \"'mac/macfile.c'\" \(6797 characters\)
  221.   sed "s/^X//" >'mac/macfile.c' <<'END_OF_FILE'
  222. X/*---------------------------------------------------------------------------
  223. X
  224. X  macfile.c
  225. X
  226. X  This source file is used by the mac port to support commands not available
  227. X  directly on the Mac, i.e. mkdir().
  228. X  It also helps determine if we're running on a Mac with HFS and a disk
  229. X  formatted for HFS (HFS - Hierarchical File System; compared to its predecessor,
  230. X  MFS - Macintosh File System).
  231. X  
  232. X  ---------------------------------------------------------------------------*/
  233. X
  234. X#include "unzip.h"
  235. X
  236. X#ifdef MACOS
  237. X#ifndef FSFCBLen
  238. X#define FSFCBLen    (*(short *)0x3F6)
  239. X#endif
  240. X
  241. Xstatic short wAppVRefNum;
  242. Xstatic long lAppDirID;
  243. Xint hfsflag;            /* set if disk has hierarchical file system */
  244. X
  245. Xstatic int IsHFSDisk(short wRefNum)
  246. X{
  247. X    /* get info about the specified volume */
  248. X    if (hfsflag == true) {
  249. X        HParamBlockRec    hpbr;
  250. X        Str255 temp;
  251. X        short wErr;
  252. X        
  253. X        hpbr.volumeParam.ioCompletion = 0;
  254. X        hpbr.volumeParam.ioNamePtr = temp;
  255. X        hpbr.volumeParam.ioVRefNum = wRefNum;
  256. X        hpbr.volumeParam.ioVolIndex = 0;
  257. X        wErr = PBHGetVInfo(&hpbr, 0);
  258. X
  259. X        if (wErr == noErr && hpbr.volumeParam.ioVFSID == 0
  260. X            && hpbr.volumeParam.ioVSigWord == 0x4244) {
  261. X                return true;
  262. X        }
  263. X    }
  264. X
  265. X    return false;
  266. X} /* IsHFSDisk */
  267. X
  268. Xvoid macfstest(int vrefnum)
  269. X{
  270. X    Str255 st;
  271. X
  272. X    /* is this machine running HFS file system? */
  273. X    if (FSFCBLen <= 0) {
  274. X        hfsflag = false;
  275. X    }
  276. X    else
  277. X    {
  278. X        hfsflag = true;
  279. X    }
  280. X
  281. X    /* get the file's volume reference number and directory ID */
  282. X    if (hfsflag == true) {
  283. X        WDPBRec    wdpb;
  284. X        OSErr err = noErr;
  285. X
  286. X        if (vrefnum != 0) {
  287. X            wdpb.ioCompletion = false;
  288. X            wdpb.ioNamePtr = st;
  289. X            wdpb.ioWDIndex = 0;
  290. X            wdpb.ioVRefNum = vrefnum;
  291. X            err = PBHGetVol(&wdpb, false);
  292. X        
  293. X            if (err == noErr) {
  294. X                wAppVRefNum = wdpb.ioWDVRefNum;
  295. X                lAppDirID = wdpb.ioWDDirID;
  296. X            }
  297. X        }
  298. X
  299. X        /* is the disk we're using formatted for HFS? */
  300. X        hfsflag = IsHFSDisk(wAppVRefNum);
  301. X    }
  302. X    
  303. X    return;
  304. X} /* mactest */
  305. X
  306. Xint macmkdir(char *path, short nVRefNum, long lDirID)
  307. X{
  308. X    OSErr    err = -1;
  309. X
  310. X    if (path != 0 && strlen(path)<256 && hfsflag == true) {
  311. X        HParamBlockRec    hpbr;
  312. X        Str255    st;
  313. X
  314. X        CtoPstr(path);
  315. X        if ((nVRefNum == 0) && (lDirID == 0))
  316. X        {
  317. X            hpbr.fileParam.ioNamePtr = st;
  318. X            hpbr.fileParam.ioCompletion = NULL;
  319. X            err = PBHGetVol((WDPBPtr)&hpbr, false);
  320. X            nVRefNum = hpbr.wdParam.ioWDVRefNum;
  321. X            lDirID = hpbr.wdParam.ioWDDirID;
  322. X        }
  323. X        else
  324. X        {
  325. X            err = noErr;
  326. X        }
  327. X        if (err == noErr) {
  328. X            hpbr.fileParam.ioCompletion = NULL;
  329. X            hpbr.fileParam.ioVRefNum = nVRefNum;
  330. X            hpbr.fileParam.ioDirID = lDirID;
  331. X            hpbr.fileParam.ioNamePtr = (StringPtr)path;
  332. X            err = PBDirCreate(&hpbr, false);
  333. X        }    
  334. X        PtoCstr(path);
  335. X    }
  336. X
  337. X    return (int)err;
  338. X} /* mkdir */
  339. X
  340. Xvoid ResolveMacVol(short nVRefNum, short *pnVRefNum, long *plDirID, StringPtr pst)
  341. X{
  342. X    if (hfsflag)
  343. X    {
  344. X        WDPBRec  wdpbr;
  345. X        Str255   st;
  346. X        OSErr    err;
  347. X
  348. X        wdpbr.ioCompletion = (ProcPtr)NULL;
  349. X        wdpbr.ioNamePtr = st;
  350. X        wdpbr.ioVRefNum = nVRefNum;
  351. X        wdpbr.ioWDIndex = 0;
  352. X        wdpbr.ioWDProcID = 0;
  353. X        wdpbr.ioWDVRefNum = 0;
  354. X        err = PBGetWDInfo( &wdpbr, false );
  355. X        if ( err == noErr )
  356. X        {
  357. X            if (pnVRefNum)
  358. X                *pnVRefNum = wdpbr.ioWDVRefNum;
  359. X            if (plDirID)
  360. X                *plDirID = wdpbr.ioWDDirID;
  361. X            if (pst)
  362. X                BlockMove( st, pst, st[0]+1 );
  363. X        }
  364. X    }
  365. X    else
  366. X    {
  367. X        if (pnVRefNum)
  368. X            *pnVRefNum = nVRefNum;
  369. X        if (plDirID)
  370. X            *plDirID = 0;
  371. X        if (pst)
  372. X            *pst = 0;
  373. X    }
  374. X}
  375. X
  376. Xshort macopen(char *sz, short nFlags, short nVRefNum, long lDirID)
  377. X{
  378. X    OSErr   err;
  379. X    Str255  st;
  380. X    char    chPerms = (!nFlags) ? fsRdPerm : fsRdWrPerm;
  381. X    short   nFRefNum;
  382. X
  383. X    CtoPstr( sz );
  384. X    BlockMove( sz, st, sz[0]+1 );
  385. X    PtoCstr( sz );
  386. X    if (hfsflag)
  387. X    {
  388. X        if (nFlags > 1)
  389. X            err = HOpenRF( nVRefNum, lDirID, st, chPerms, &nFRefNum);
  390. X        else
  391. X            err = HOpen( nVRefNum, lDirID, st, chPerms, &nFRefNum);
  392. X    }
  393. X    else
  394. X    {
  395. X        /*
  396. X         * Have to use PBxxx style calls since the high level
  397. X         * versions don't support specifying permissions
  398. X         */
  399. X        ParamBlockRec    pbr;
  400. X
  401. X        pbr.ioParam.ioNamePtr = st;
  402. X        pbr.ioParam.ioVRefNum = gnVRefNum;
  403. X        pbr.ioParam.ioVersNum = 0;
  404. X        pbr.ioParam.ioPermssn = chPerms;
  405. X        pbr.ioParam.ioMisc = 0;
  406. X        if (nFlags >1)
  407. X            err = PBOpenRF( &pbr, false );
  408. X        else
  409. X            err = PBOpen( &pbr, false );
  410. X        nFRefNum = pbr.ioParam.ioRefNum;
  411. X    }
  412. X    if ( err )
  413. X        return -1;
  414. X    else
  415. X        return nFRefNum;
  416. X}
  417. X
  418. Xshort maccreat(char *sz, short nVRefNum, long lDirID, OSType ostCreator, OSType ostType)
  419. X{
  420. X    OSErr   err;
  421. X    Str255  st;
  422. X    FInfo   fi;
  423. X
  424. X    CtoPstr( sz );
  425. X    BlockMove( sz, st, sz[0]+1 );
  426. X    PtoCstr( sz );
  427. X    if (hfsflag)
  428. X    {
  429. X        err = HGetFInfo( nVRefNum, lDirID, st, &fi );
  430. X        if (err == fnfErr)
  431. X            err = HCreate( nVRefNum, lDirID, st, ostCreator, ostType );
  432. X        else if (err == noErr)
  433. X        {
  434. X            fi.fdCreator = ostCreator;
  435. X            fi.fdType = ostType;
  436. X            err = HSetFInfo( nVRefNum, lDirID, st, &fi );
  437. X        }
  438. X    }
  439. X    else
  440. X    {
  441. X        err = GetFInfo( st, nVRefNum, &fi );
  442. X        if (err == fnfErr)
  443. X            err = Create( st, nVRefNum, ostCreator, ostType );
  444. X        else if (err == noErr)
  445. X        {
  446. X            fi.fdCreator = ostCreator;
  447. X            fi.fdType = ostType;
  448. X            err = SetFInfo( st, nVRefNum, &fi );
  449. X        }
  450. X    }
  451. X    if (err == noErr)
  452. X        return noErr;
  453. X    else
  454. X        return -1;
  455. X}
  456. X
  457. Xshort macread(short nFRefNum, char *pb, unsigned cb)
  458. X{
  459. X    long    lcb = cb;
  460. X
  461. X    (void)FSRead( nFRefNum, &lcb, pb );
  462. X
  463. X    return (short)lcb;
  464. X}
  465. X
  466. Xshort macwrite(short nFRefNum, char *pb, unsigned cb)
  467. X{
  468. X    long    lcb = cb;
  469. X
  470. X    (void)FSWrite( nFRefNum, &lcb, pb );
  471. X
  472. X    return (short)lcb;
  473. X}
  474. X
  475. Xshort macclose(short nFRefNum)
  476. X{
  477. X    return FSClose( nFRefNum );
  478. X}
  479. X
  480. Xlong maclseek(short nFRefNum, long lib, short nMode)
  481. X{
  482. X    ParamBlockRec   pbr;
  483. X
  484. X    if (nMode == SEEK_SET)
  485. X        nMode = fsFromStart;
  486. X    else if (nMode == SEEK_CUR)
  487. X        nMode = fsFromMark;
  488. X    else if (nMode == SEEK_END)
  489. X        nMode = fsFromLEOF;
  490. X    pbr.ioParam.ioRefNum = nFRefNum;
  491. X    pbr.ioParam.ioPosMode = nMode;
  492. X    pbr.ioParam.ioPosOffset = lib;
  493. X    (void)PBSetFPos(&pbr, 0);
  494. X    return pbr.ioParam.ioPosOffset;
  495. X}
  496. X
  497. X#endif /* MACOS */
  498. END_OF_FILE
  499.   if test 6797 -ne `wc -c <'mac/macfile.c'`; then
  500.     echo shar: \"'mac/macfile.c'\" unpacked with wrong size!
  501.   fi
  502.   # end of 'mac/macfile.c'
  503. fi
  504. if test -f 'mac/macstat.c' -a "${1}" != "-c" ; then 
  505.   echo shar: Will not clobber existing file \"'mac/macstat.c'\"
  506. else
  507.   echo shar: Extracting \"'mac/macstat.c'\" \(5863 characters\)
  508.   sed "s/^X//" >'mac/macstat.c' <<'END_OF_FILE'
  509. X#ifdef THINK_C
  510. X#define MACOS
  511. X#include    <pascal.h>
  512. X#endif
  513. X#ifdef MPW
  514. X#define MACOS
  515. X#include    <Files.h>
  516. X#include    <Errors.h>
  517. X#define FSFCBLen    (*(short *)0x3F6)
  518. X#define CtoPstr c2pstr
  519. X#define PtoCstr p2cstr
  520. X#endif
  521. X
  522. X#ifdef MACOS
  523. X#include    <string.h>
  524. X#include    "macstat.h"
  525. Xint macstat(char *path, struct stat *buf, short nVRefNum, long lDirID );
  526. X
  527. X#define unixTime(t) ((t) = ((t) < (time_t)0x7c25b080) ? 0 : (t) - (time_t)0x7c25b080)
  528. X
  529. X/* assume that the path will contain a Mac-type pathname, i.e. ':'s, etc. */
  530. Xint macstat(char *path, struct stat *buf, short nVRefNum, long lDirID )
  531. X{
  532. X    char    temp[256];
  533. X    short   nVRefNumT;
  534. X    long    lDirIDT;
  535. X    short   fIsHFS = false;
  536. X    OSErr   err;
  537. X    short   fUseDefault = ((nVRefNum == 0) && (lDirID == 0));
  538. X
  539. X    if (buf == (struct stat *)0L || path == (char *)0L) {
  540. X        SysBeep(1);
  541. X        return -1;
  542. X    }
  543. X
  544. X    if (path[0] == '\0' || strlen(path)>255) {
  545. X        return -1;
  546. X    }
  547. X
  548. X    if ( fUseDefault )
  549. X    {
  550. X        if (GetVol((StringPtr)&temp[0], &nVRefNumT) != noErr) {
  551. X            SysBeep(1);
  552. X            return -1;
  553. X        }
  554. X    }
  555. X
  556. X    /* get info about the specified volume */
  557. X    if (FSFCBLen > 0)   /* HFS Disk? */
  558. X    {
  559. X        HParamBlockRec    hpbr;
  560. X
  561. X        if ( fUseDefault )
  562. X        {
  563. X            WDPBRec wdpb;
  564. X    
  565. X            wdpb.ioCompletion = 0;
  566. X            wdpb.ioNamePtr = (StringPtr)temp;
  567. X            err = PBHGetVol(&wdpb, 0);
  568. X            nVRefNumT = wdpb.ioWDVRefNum;
  569. X            lDirIDT = wdpb.ioWDDirID;
  570. X        }
  571. X        else
  572. X        {
  573. X            nVRefNumT = nVRefNum;
  574. X            lDirIDT = lDirID;
  575. X            err = noErr;
  576. X        }
  577. X        if (err == noErr)
  578. X        {
  579. X            hpbr.volumeParam.ioCompletion = 0;
  580. X            hpbr.volumeParam.ioNamePtr = (StringPtr)temp;
  581. X            hpbr.volumeParam.ioVRefNum = nVRefNumT;
  582. X            hpbr.volumeParam.ioVolIndex = 0;
  583. X            err = PBHGetVInfo(&hpbr, 0);
  584. X
  585. X            if (err == noErr && hpbr.volumeParam.ioVFSID == 0
  586. X                && hpbr.volumeParam.ioVSigWord == 0x4244) {
  587. X                    fIsHFS = true;
  588. X            }
  589. X        }
  590. X    }
  591. X
  592. X
  593. X    /* number of links, at least in System 6.0x, 0 */
  594. X    buf->st_nlink = 0;
  595. X    /* user id */
  596. X    buf->st_uid = 0;
  597. X    /* group id */
  598. X    buf->st_gid = 0;
  599. X
  600. X    if (fIsHFS == true)   /* HFS? */
  601. X    {
  602. X        CInfoPBRec  cPB;
  603. X        HParamBlockRec  hPB;
  604. X
  605. X        /* get information about file */
  606. X        cPB.hFileInfo.ioCompletion = (ProcPtr)0L;
  607. X        CtoPstr(path);
  608. X        strncpy(temp,path, path[0]+1);
  609. X        PtoCstr(path);
  610. X        cPB.hFileInfo.ioNamePtr = (StringPtr)temp;
  611. X        cPB.hFileInfo.ioVRefNum = nVRefNumT;
  612. X        cPB.hFileInfo.ioDirID = lDirIDT;
  613. X        cPB.hFileInfo.ioFDirIndex = 0;
  614. X
  615. X        err = PBGetCatInfo(&cPB, false); 
  616. X
  617. X        if (err != noErr) {
  618. X            if (err != fnfErr) {
  619. X                SysBeep(1);
  620. X            }
  621. X            return -1;
  622. X        }
  623. X        
  624. X        /* Type of file: directory or regular file + access */
  625. X        buf->st_mode = (cPB.hFileInfo.ioFlAttrib & ioDirMask) ? S_IFDIR : S_IFREG |
  626. X                       (cPB.hFileInfo.ioFlAttrib & 0x01) ? S_IREAD : (S_IREAD | S_IWRITE);
  627. X        
  628. X        /* last access time, modification time and creation time(?) */
  629. X        buf->st_atime = buf->st_mtime = cPB.hFileInfo.ioFlMdDat;
  630. X        buf->st_ctime = cPB.hFileInfo.ioFlCrDat;
  631. X        /* dev number */
  632. X        buf->st_dev = (long)cPB.hFileInfo.ioVRefNum;
  633. X        /* inode number */
  634. X        buf->st_ino = cPB.hFileInfo.ioDirID;
  635. X        /* size of file - use only the data fork */
  636. X        buf->st_size = cPB.hFileInfo.ioFlLgLen;
  637. X
  638. X        /* size of disk block */
  639. X        hPB.volumeParam.ioCompletion = (ProcPtr)0L;
  640. X        hPB.volumeParam.ioNamePtr = (StringPtr)temp;
  641. X        hPB.volumeParam.ioVRefNum = nVRefNumT;
  642. X        hPB.volumeParam.ioVolIndex = 0;
  643. X
  644. X        err = PBHGetVInfo(&hPB, false);
  645. X
  646. X        if (err != noErr) {
  647. X            SysBeep(1);
  648. X            return -1;
  649. X        }
  650. X            
  651. X        buf->st_blksize = cPB.hFileInfo.ioFlPyLen / hPB.volumeParam.ioVAlBlkSiz;
  652. X    }
  653. X    else    /* MFS? */
  654. X    {
  655. X        ParamBlockRec   pPB;
  656. X        ParamBlockRec   hPB;
  657. X
  658. X        CtoPstr(path);
  659. X        strncpy(temp, path, path[0]+1);
  660. X        PtoCstr(path);
  661. X        pPB.fileParam.ioCompletion = (ProcPtr)0;
  662. X        pPB.fileParam.ioNamePtr = (StringPtr)temp;
  663. X        pPB.fileParam.ioVRefNum = nVRefNumT;
  664. X        pPB.fileParam.ioFVersNum = 0;
  665. X        pPB.fileParam.ioFDirIndex = 0;
  666. X
  667. X        err = PBGetFInfo(&pPB, false);
  668. X
  669. X        if (err != noErr) {
  670. X            SysBeep(1);
  671. X            return -1;
  672. X        }
  673. X
  674. X        /* Type of file: either directory or regular file + access */
  675. X        buf->st_mode = (pPB.fileParam.ioFlAttrib & ioDirMask) ? S_IFDIR : S_IFREG;
  676. X                       (pPB.fileParam.ioFlAttrib & 0x01) ? S_IREAD : (S_IREAD | S_IWRITE);
  677. X
  678. X        /* last access time, modification time and creation time(?) */
  679. X        buf->st_atime = buf->st_mtime = pPB.fileParam.ioFlMdDat;
  680. X        buf->st_ctime = pPB.fileParam.ioFlCrDat;
  681. X        /* dev number */
  682. X        buf->st_dev = (long)pPB.fileParam.ioVRefNum;
  683. X        /* inode number */
  684. X        buf->st_ino = pPB.fileParam.ioFlNum;
  685. X        /* size of file - use only the data fork */
  686. X        buf->st_size = pPB.fileParam.ioFlLgLen;
  687. X
  688. X        /* size of disk block */
  689. X        hPB.volumeParam.ioCompletion = (ProcPtr)0;
  690. X        hPB.volumeParam.ioNamePtr = (StringPtr)temp;
  691. X        hPB.volumeParam.ioVRefNum = nVRefNumT;
  692. X        hPB.volumeParam.ioVolIndex = 0;
  693. X
  694. X        err = PBGetVInfo(&hPB, false);
  695. X
  696. X        if (err != noErr) {
  697. X            SysBeep(1);
  698. X            return -1;
  699. X        }
  700. X
  701. X        buf->st_blksize = pPB.fileParam.ioFlPyLen / hPB.volumeParam.ioVAlBlkSiz;
  702. X    }
  703. X
  704. X    /* Convert from Macintosh time format to Unix time format. */
  705. X
  706. X    unixTime(buf->st_atime);
  707. X    unixTime(buf->st_mtime);
  708. X    unixTime(buf->st_ctime);
  709. X
  710. X    return 0;
  711. X}
  712. X#else
  713. X#error 1
  714. X#endif
  715. END_OF_FILE
  716.   if test 5863 -ne `wc -c <'mac/macstat.c'`; then
  717.     echo shar: \"'mac/macstat.c'\" unpacked with wrong size!
  718.   fi
  719.   # end of 'mac/macstat.c'
  720. fi
  721. if test -f 'makefile' -a "${1}" != "-c" ; then 
  722.   echo shar: Will not clobber existing file \"'makefile'\"
  723. else
  724.   echo shar: Extracting \"'makefile'\" \(7055 characters\)
  725.   sed "s/^X//" >'makefile' <<'END_OF_FILE'
  726. X# Makefile for Zip, ZipNote, ZipCloak and ZipSplit
  727. X
  728. X# what you can make ...
  729. Xall:
  730. X    @echo ''
  731. X    @echo 'Make what?  You must say what system to make Zip for--e.g.'
  732. X    @echo '"make bsd".  Choices: bsd, bsdold, sysv, sysv_old, sysv_386,'
  733. X    @echo 'dnix, linux, sun, sun_gcc, next10, next, hpux, cray, cray3,'
  734. X    @echo '3b1, att6300, zilog, scodos, aux, c120, convex, aix, minix,'
  735. X    @echo 'isc, ultrix, dec_osf1 and xos.'
  736. X    @echo 'See the files install.doc and zip.doc for more information.'
  737. X    @echo ''
  738. X
  739. XCRYPTO =
  740. XCLOAK =
  741. XCRFLAG =
  742. XMAKE = make
  743. X#  **********************************************************************
  744. X#  *** For encryption version, remove the # at the front of next line ***
  745. X# MAKE = make CRYPTO="crypt.o" CLOAK="zipcloak" CRFLAG="-DCRYPT"
  746. X
  747. X# (to use the Gnu compiler, change cc to gcc in CC and BIND)
  748. XCC = cc
  749. XBIND = cc
  750. XE =
  751. XCPP = /usr/lib/cpp -Dunix
  752. X
  753. X# probably can change this to 'install' if you have it
  754. XINSTALL = cp
  755. X
  756. X# target directories - where to install executables and man pages to
  757. XBINDIR = /usr/local/bin
  758. XMANDIR = /usr/man/manl
  759. X
  760. X# flags
  761. X#   CFLAGS    flags for C compile
  762. X#   LFLAGS1   flags after output file spec, before obj file list
  763. X#   LFLAGS2   flags after obj file list (libraries, etc)
  764. XCFLAGS = -O
  765. XLFLAGS1 =
  766. XLFLAGS2 = -s
  767. X
  768. X# object file lists
  769. XOBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o $(CRYPTO)
  770. X
  771. XOBJI = deflate.o trees.o bits.o
  772. XOBJA =
  773. XOBJU = zipfile_.o zipup_.o fileio_.o util_.o globals.o
  774. XOBJN = zipnote.o  $(OBJU)
  775. XOBJC = zipcloak.o $(OBJU) crypt_.o
  776. XOBJS = zipsplit.o $(OBJU)
  777. X
  778. X# suffix rules
  779. X.SUFFIXES:
  780. X.SUFFIXES: _.o .o .c .doc .1
  781. X.c_.o:
  782. X    rm -f $*_.c; ln $< $*_.c
  783. X    $(CC) $(CFLAGS) -DUTIL $(CRFLAG) -c $*_.c
  784. X    rm -f $*_.c
  785. X.c.o:
  786. X    $(CC) $(CFLAGS) $(CRFLAG) -c $<
  787. X
  788. X.1.doc:
  789. X    nroff -man $< | col -b | uniq > $@
  790. X
  791. X# rules for zip, zipnote, zipcloak, zipsplit, and zip.doc.
  792. X$(OBJZ): zip.h ziperr.h tailor.h
  793. X$(OBJI): zip.h ziperr.h tailor.h
  794. X$(OBJN): zip.h ziperr.h tailor.h
  795. X$(OBJS): zip.h ziperr.h tailor.h
  796. X$(OBJC): zip.h ziperr.h tailor.h
  797. X
  798. Xmatch.o: match.s
  799. X    $(CPP) match.s > _match.s
  800. X    $(CC) -c _match.s
  801. X    mv _match.o match.o
  802. X    rm -f _match.s
  803. X
  804. XZIPS = zip$E zipnote$E zipsplit$E $(CLOAK)$E
  805. X
  806. Xzip.o zipup.o zipnote.o zipcloak.o zipsplit.o: revision.h
  807. Xzips: $(ZIPS)
  808. Xzipsman: zip zipnote zipsplit $(CLOAK) zip.doc
  809. X
  810. Xzip$E: $(OBJZ) $(OBJI) $(OBJA)
  811. X    $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
  812. Xzipnote$E: $(OBJN)
  813. X    $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2)
  814. Xzipcloak$E: $(OBJC)
  815. X    $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2)
  816. Xzipsplit$E: $(OBJS)
  817. X    $(BIND) -o zipsplit$E $(LFLAGS1) $(OBJS) $(LFLAGS2)
  818. X
  819. X# install
  820. Xinstall:    $(ZIPS)
  821. X    $(INSTALL) $(ZIPS) $(BINDIR)
  822. X    $(INSTALL) zip.1 $(MANDIR)
  823. X
  824. X
  825. X# These symbols, when #defined using -D have these effects on compilation:
  826. X# ZMEM        - includes C language versions of memset(), memcpy(), and
  827. X#          memcmp() (util.c).
  828. X# DIRENT    - use <sys/dirent.h> and getdents() instead of <sys/dir.h>
  829. X#          and opendir(), etc. (fileio.c).
  830. X# NODIR        - used for 3B1, which has neither getdents() nor opendir().
  831. X# NDIR        - use "ndir.h" instead of <sys/dir.h> (fileio.c).
  832. X# UTIL        - select routines for utilities (note, cloak, and split).
  833. X# PROTO        - enable function prototypes.
  834. X# RMDIR        - remove directories using a system("rmdir ...") call.
  835. X# CONVEX    - for Convex make target.
  836. X# AIX        - for AIX make target.
  837. X# CRYPT     - include the encryption code.
  838. X# LINUX        - for linux make target.
  839. X
  840. X# BSD 4.3 (also Unisys 7000--AT&T System V with heavy BSD 4.2)
  841. Xbsd:
  842. X    $(MAKE) zips CFLAGS="-O"
  843. X
  844. X# BSD, but missing memset(), memcmp().
  845. Xbsdold:
  846. X    $(MAKE) zips CFLAGS="-O -DZMEM"
  847. X
  848. X# AT&T System V, Rel 3.  Also SCO, Xenix, OpenDeskTop, ETA-10P*, SGI.
  849. Xsysv_old:
  850. X    $(MAKE) zips CFLAGS="-O -DDIRENT"
  851. X
  852. X# AT&T System V, Rel 4. Also any system with readdir() and termio.
  853. Xsysv:
  854. X    $(MAKE) zips CFLAGS="-O -DSYSV -DTERMIO"
  855. X
  856. X# AT&T System V, Rel 4 for 386 (uses asm version):
  857. Xsysv_386:
  858. X    $(MAKE) zips CFLAGS="-O -DSYSV -DTERMIO -DASM" OBJA=match.o
  859. X
  860. X# DNIX 5.x: like System V but optimization is messed up.
  861. Xdnix:
  862. X    $(MAKE) zips CFLAGS="-DDIRENT"
  863. X
  864. X# Linux 0.96a with GCC 2.12, dies with <= 2.11c. The problem with
  865. X# builtin functions still has to be investigated.
  866. Xlinux:
  867. X    $(MAKE) zips CFLAGS="-O -fno-builtin -DSYSV -DTERMIO -DLINUX"
  868. X
  869. X# Sun OS 4.x: BSD, but use getdents(). If you have gcc, use 'make sun_gcc'
  870. X# instead since the code produced is better.
  871. Xsun:
  872. X    $(MAKE) zips CFLAGS="-O4 -DDIRENT"
  873. X
  874. X# Sun OS 4.x with gcc (bug with -s linker flag). Use -O if your version
  875. X# of gcc does not like -O2.
  876. Xsun_gcc:
  877. X    $(MAKE) zips CFLAGS="-O2 -DDIRENT" CC=gcc BIND=gcc LFLAGS2=""
  878. X    strip $(ZIPS)
  879. X
  880. X# NeXT 1.0: BSD, but use shared library.
  881. Xnext10:
  882. X    $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -lsys_s"
  883. X
  884. X# NeXT 2.0: BSD, but use MH_OBJECT format for smaller executables.
  885. Xnext:
  886. X    $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -object"
  887. X
  888. X# HPUX: System V, but use <ndir.h> and opendir(), etc.
  889. Xhpux:
  890. X    $(MAKE) zips CFLAGS="-O -DNDIR"
  891. X
  892. X# Cray Unicos 5.1.10 & 6.0.11, Standard C compiler 2.0
  893. Xcray:
  894. X    $(MAKE) zips CFLAGS="-O -DDIRENT" CC="scc"
  895. X
  896. X# Cray Unicos 6.1, Standard C compiler 3.0 (all routines except trees.c
  897. X# may be compiled with vector3; internal compiler bug in 3.0.2.3 and
  898. X# earlier requires vector2 for trees.c)
  899. Xcray3:
  900. X    $(MAKE) zips CFLAGS="-O -h vector2 -h scalar3 -DDIRENT" CC="scc"
  901. X
  902. X# AT&T 3B1: System V, but missing a few things.
  903. X3b1:
  904. X    $(MAKE) zips CFLAGS="-O -DNODIR -DRMDIR"
  905. X
  906. X# AT&T 6300 PLUS (don't know yet how to allocate 64K bytes):
  907. Xatt6300:
  908. X    $(MAKE) zips LFLAGS1="-Ml" \
  909. X    CFLAGS="-O -Ml -DNODIR -DRMDIR -DDYN_ALLOC -DMEDIUM_MEM -DWSIZE=16384"
  910. X
  911. X# zilog zeus 3.21
  912. Xzilog:
  913. X    $(MAKE) zips CFLAGS="-O -DZMEM -DNDIR -DRMDIR" CC="scc -i" BIND="scc"
  914. X
  915. X# SCO 386 cross compile for MS-DOS
  916. X# Note: zip.exe should be lzexe'd on DOS to reduce its size
  917. Xscodos:
  918. X    $(MAKE) zips CFLAGS="-O -Mc -dos -DNO_ASM" LFLAGS1="-Mc -dos" \
  919. X     LFLAGS2="-F 1000" E=".exe"
  920. X
  921. X# A/UX:
  922. Xaux:
  923. X    $(MAKE) zips CFLAGS="-O -DTERMIO"
  924. X
  925. X# Convex C120, OS 9.0, cc v. 4.0, no vectorization.
  926. Xc120:
  927. X    $(MAKE) zips CFLAGS="-O1 -rl -DCONVEX"
  928. X
  929. X# Convex C220, OS 9.0
  930. Xconvex:
  931. X    $(MAKE) zips CFLAGS="-O2 -rl -DCONVEX"
  932. X
  933. X# AIX Version 3.1 for RISC System/6000 
  934. Xaix:
  935. X    $(MAKE) zips CC="c89" BIND="c89" \
  936. X       CFLAGS="-O -D_POSIX_SOURCE -D_ALL_SOURCE -D_BSD -DAIX"
  937. X
  938. X# MINIX 1.5.10 with Bruce Evans 386 patches and gcc/GNU make
  939. Xminix:
  940. X    $(MAKE) zips CFLAGS="-O -DDIRENT -DMINIX" CC=gcc BIND=gcc
  941. X    chmem =262144 zip
  942. X
  943. X# Interactive Systems Corporation System V/386, Rel 3.2--optimizer problems
  944. Xisc:
  945. X    $(MAKE) zips CFLAGS="-DDIRENT"
  946. X
  947. X# DYNIX (R) V3.0.18 (no memset() or memcmp(), rindex() instead of strrchr())
  948. Xdynix:
  949. X    $(MAKE) zips CFLAGS="-O -DZMEM -Dstrrchr=rindex"
  950. X
  951. X# Ultrix
  952. Xultrix:
  953. X    $(MAKE) zips CFLAGS="-O -Olimit 700"
  954. X
  955. X# DEC OSF/1
  956. Xdec_osf1:
  957. X    $(MAKE) zips CFLAGS="-O -Olimit 1000 -DOSF -D_BSD"
  958. X
  959. X# xos: Olivetti LSX-3005..3045 with X/OS 2.3 or 2.4
  960. Xxos:
  961. X    $(MAKE) zips CFLAGS="-O -DTERMIO"
  962. X
  963. X# clean up after making stuff and installing it
  964. Xclean:
  965. X    rm -f *.o
  966. X    rm -f $(ZIPS)
  967. X
  968. X# This one's for Mark:
  969. Xit:
  970. X    $(MAKE) zipsman CFLAGS="-O -Wall -DPROTO"\
  971. X    LFLAGS2="-s -object" VPATH="${HOME}/Unix/bin"
  972. X
  973. X# and this one for Jean-loup:
  974. Xgcc_d:
  975. X    $(MAKE) zip CFLAGS="-g -DDEBUG -DDIRENT" CC=gcc BIND=gcc LFLAGS2="-g"
  976. X    mv zip zipd
  977. X
  978. X# end of Makefile
  979. END_OF_FILE
  980.   if test 7055 -ne `wc -c <'makefile'`; then
  981.     echo shar: \"'makefile'\" unpacked with wrong size!
  982.   fi
  983.   # end of 'makefile'
  984. fi
  985. if test -f 'msdos/makefile.msc.UU' -a "${1}" != "-c" ; then 
  986.   echo shar: Will not clobber existing file \"'msdos/makefile.msc.UU'\"
  987. else
  988.   echo shar: Extracting \"'msdos/makefile.msc.UU'\" \(5501 characters\)
  989.   sed "s/^X//" >'msdos/makefile.msc.UU' <<'END_OF_FILE'
  990. Xbegin 666 msdos/makefile.msc
  991. XM(R!-86ME9FEL92!F;W(@6FEP+"!::7!#;&]A:RP@6FEP3F]T92!A;F0@6FEP
  992. XM4W!L:70@9F]R#0HC($UI8W)O<V]F="!#(#4N,2!O<B V+C N#0H-"B,@5&\@
  993. XM=7-E+"!D;R B;6%K92!M86ME9FEL92YM<V,B#0H-"B,@061D("U$4TU!3$Q?
  994. XM345-(&]R("U$345$255-7TU%32!T;R!#1DQ!1U,@:68@>6]U('=I<V@@=&\@
  995. XM<F5D=6-E('1H92!M96UO<GD-"B,@<F5Q=6ER96UE;G1S+B!!9&0@+41.3U]!
  996. XM4TT@=&\@0T9,04=3(&%N9"!R96UO=F4@;6%T8V@N;V)J(&9R;VT@3T)*22!I
  997. XM9@T*(R!Y;W4@9&\@;F]T(&AA=F4@;6%S;2X-"@T*0U)94%1//0T*0TQ/04L]
  998. XM#0I#4D9,04<]#0H-"B,@("HJ*B!&;W(@96YC<GEP=&EO;B!V97)S:6]N+"!R
  999. XM96UO=F4@=&AE(",@870@=&AE(&9R;VYT(&]F(&YE>'0@,R!L:6YE<R J*BH-
  1000. XM"B-#4EE05$\]8W)Y<'0N;V)J#0HC0TQ/04L]>FEP8VQO86LN97AE#0HC0U)&
  1001. XM3$%'/2U$0U)94%0-"@T*(R M+2TM+2TM+2TM+2TM($UI8W)O<V]F="!#(#4N
  1002. XM,2!O<B V+C @+2TM+2TM+2TM+2TM+0T*34]$14P]+4%##0I&4#T-"D-&3$%'
  1003. XM4STM5S,@+4]X("UN;VQO9V\@)"A-3T1%3"D@)"A&4"D@)"A#4D9,04<I#0I3
  1004. XM4$5#1DQ!1U,]+5<S("U/86EC=" M1W,@+6YO;&]G;R D*$U/1$5,*2 D*$90
  1005. XM*2 D*$-21DQ!1RD-"E5424Q&3$%'4STM1%5424P@)"A#1DQ!1U,I("U&;PT*
  1006. XM0T,]8VP-"DQ$/6QI;FL-"DQ$1DQ!1U,]+V4O<W0Z,'@Q,# P#0HC(" @("!)
  1007. XM9B!Y;W4@=7-E(&QZ97AE(&%S(')E8V]M;65N9&5D+"!R96UO=F4@+V4@9G)O
  1008. XM;2!,1$9,04=3#0I!4SUM87-M#0HC(" @("!&;W(@35-#(#8N,"P@=7-E.B!!
  1009. XM4SUM;" -"D%31DQ!1U,]+6UL("UT#0HC($%D9" M1$193E]!3$Q/0R!T;R!!
  1010. XM4T9,04=3(&EF('EO=2!H879E(&1E9FEN960@:70@:6X@=&%I;&]R+F@@;W(@
  1011. XM0T9,04=3#0H-"B,@+2TM+2TM+2TM+2TM+2!#;VUM;VX@9&5C;&%R871I;VYS
  1012. XM.@T*4U1225 ]<F5M#0HC(" @($EF('EO=2!D;VXG="!H879E(&QZ97AE+"!G
  1013. XM970@:70N(%1H96X@9&5F:6YE.@T*(U-44DE0/6QZ97AE#0HC(" @($]R(&EF
  1014. XM('EO=2=V92!R96=I<W1E<F5D(%!+3$E412P@=&AE;B!D969I;F4Z#0HC4U12
  1015. XM25 ]<&ML:71E#0HC(" @(%1H:7,@;6%K97,@82!B:6<@9&EF9F5R96YC92!I
  1016. XM;B N97AE('-I>F4@*&%N9"!P;W-S:6)L>2!L;V%D('1I;64I#0H-"B,@+2TM
  1017. XM+2TM+2TM+2TM+2!5<V5D(&)Y(&EN<W1A;&P@<G5L90T*(R!S970@0DE.('1O
  1018. XM('1H92!D:7)E8W1O<GD@>6]U('=A;G0@=&\@:6YS=&%L;"!T:&4@97AE8W5T
  1019. XM86)L97,@=&\-"D))3B ](&,Z7'5T:6P-"@T*(R!V87)I86)L97,-"D]"2EH@
  1020. XM/2!Z:7 N;V)J('II<&9I;&4N;V)J('II<'5P+F]B:B!F:6QE:6\N;V)J('5T
  1021. XM:6PN;V)J(&=L;V)A;',N;V)J("0H0U)94%1/*0T*#0I/0DI)(#T@9&5F;&%T
  1022. XM92YO8FH@=')E97,N;V)J(&)I=',N;V)J(&UA=&-H+F]B:@T*(R!R96UO=F4@
  1023. XM;6%T8V@N;V)J(&EF('EO=2!D;R!N;W0@:&%V92!M87-M#0H-"D]"2E4@/2!Z
  1024. XM:7!F:6QE7RYO8FH@>FEP=7!?+F]B:B!F:6QE:6]?+F]B:B!U=&EL7RYO8FH@
  1025. XM9VQO8F%L<RYO8FH-"D]"2DX@/2!Z:7!N;W1E+F]B:B @)"A/0DI5*0T*3T)*
  1026. XM0R ]('II<&-L;V%K+F]B:B D*$]"2E4I(&-R>7!T7RYO8FH-"D]"2E,@/2!Z
  1027. XM:7!S<&QI="YO8FH@)"A/0DI5*0T*#0I:25!3(#T@>FEP+F5X92!Z:7!N;W1E
  1028. XM+F5X92!Z:7!S<&QI="YE>&4@)"A#3$]!2RD-"@T*>FEP<SH))"A:25!3*0T*
  1029. XM#0IZ:7 N;V)J.@EZ:7 N:"!Z:7!E<G(N:"!T86EL;W(N:"!R979I<VEO;BYH
  1030. XM('II<"YC#0H))"A#0RD@+6,@)"A#1DQ!1U,I("0J+F,-"@T*(R!-4T,@-2XQ
  1031. XM(&=E;F5R871E<R!B860@8V]D92!O;B!Z:7!F:6QE('=I=&@@+4]X#0IZ:7!F
  1032. XM:6QE+F]B:CH)>FEP+F@@>FEP97)R+F@@=&%I;&]R+F@@>FEP9FEL92YC#0H)
  1033. XM)"A#0RD@+6,@)"A34$5#1DQ!1U,I("0J+F,-"@T*>FEP=7 N;V)J.@EZ:7 N
  1034. XM:"!Z:7!E<G(N:"!T86EL;W(N:"!R979I<VEO;BYH('II<'5P+F,-"@DD*$-#
  1035. XM*2 M8R D*$-&3$%'4RD@)"HN8PT*#0IF:6QE:6\N;V)J.@EZ:7 N:"!Z:7!E
  1036. XM<G(N:"!T86EL;W(N:"!F:6QE:6\N8PT*"20H0T,I("UC("0H0T9,04=3*2 D
  1037. XM*BYC#0H-"G5T:6PN;V)J.@EZ:7 N:"!Z:7!E<G(N:"!T86EL;W(N:"!U=&EL
  1038. XM+F,-"@DD*$-#*2 M8R D*$-&3$%'4RD@)"HN8PT*#0IG;&]B86QS+F]B:CH)
  1039. XM>FEP+F@@>FEP97)R+F@@=&%I;&]R+F@@9VQO8F%L<RYC#0H))"A#0RD@+6,@
  1040. XM)"A#1DQ!1U,I("0J+F,-"@T*9&5F;&%T92YO8FHZ"7II<"YH('II<&5R<BYH
  1041. XM('1A:6QO<BYH(&1E9FQA=&4N8PT*"20H0T,I("UC("0H0T9,04=3*2 D*BYC
  1042. XM#0H-"G1R965S+F]B:CH)>FEP+F@@>FEP97)R+F@@=&%I;&]R+F@@=')E97,N
  1043. XM8PT*"20H0T,I("UC("0H0T9,04=3*2 D*BYC#0H-"F)I=',N;V)J.@EZ:7 N
  1044. XM:"!Z:7!E<G(N:"!T86EL;W(N:"!B:71S+F,-"@DD*$-#*2 M8R D*$-&3$%'
  1045. XM4RD@)"HN8PT*#0IC<GEP="YO8FHZ"7II<"YH('II<&5R<BYH('1A:6QO<BYH
  1046. XM(&-R>7!T+F,-"@DD*$-#*2 M8R D*$-&3$%'4RD@)"HN8PT*#0IZ:7!C;&]A
  1047. XM:RYO8FHZ"7II<"YH('II<&5R<BYH('1A:6QO<BYH(')E=FES:6]N+F@@>FEP
  1048. XM8VQO86LN8PT*"20H0T,I("UC("0H0T9,04=3*2 D*BYC#0H-"GII<&YO=&4N
  1049. XM;V)J.@EZ:7 N:"!Z:7!E<G(N:"!T86EL;W(N:"!R979I<VEO;BYH('II<&YO
  1050. XM=&4N8PT*"20H0T,I("UC("0H0T9,04=3*2 D*BYC#0H-"B,@35-#(#4N,2!D
  1051. XM:65S(&]N('II<'-P;&ET('=I=&@@+4]X#0IZ:7!S<&QI="YO8FHZ"7II<'-P
  1052. XM;&ET+F,@>FEP+F@@>FEP97)R+F@@=&%I;&]R+F@@<F5V:7-I;VXN: T*"20H
  1053. XM0T,I("UC("0H4U!%0T9,04=3*2 D*BYC#0H-"B,@35-#(#4N,2!G96YE<F%T
  1054. XM97,@8F%D(&-O9&4@;VX@>FEP9FEL92!W:71H("U/> T*>FEP9FEL95\N;V)J
  1055. XM.@EZ:7!F:6QE+F,@>FEP+F@@>FEP97)R+F@@=&%I;&]R+F@-"@DD*$-#*2 M
  1056. XM8R D*%-014-&3$%'4RD@+4155$E,("U&;R1 ('II<&9I;&4N8PT*#0IZ:7!U
  1057. XM<%\N;V)J.@EZ:7!U<"YC('II<"YH('II<&5R<BYH('1A:6QO<BYH#0H))"A#
  1058. XM0RD@+6,@)"A55$E,1DQ!1U,I)$ @>FEP=7 N8PT*#0IF:6QE:6]?+F]B:CH)
  1059. XM9FEL96EO+F,@>FEP+F@@>FEP97)R+F@@=&%I;&]R+F@-"@DD*$-#*2 M8R D
  1060. XM*%5424Q&3$%'4RDD0"!F:6QE:6\N8PT*#0IU=&EL7RYO8FHZ"75T:6PN8R!Z
  1061. XM:7 N:"!Z:7!E<G(N:"!T86EL;W(N: T*"20H0T,I("UC("0H551)3$9,04=3
  1062. XM*21 ('5T:6PN8PT*#0IC<GEP=%\N;V)J.@EC<GEP="YC('II<"YH#0H))"A#
  1063. XM0RD@+6,@)"A55$E,1DQ!1U,I)$ @8W)Y<'0N8PT*#0IM871C:"YO8FHZ"6UA
  1064. XM=&-H+F%S;0T*"20H05,I("0H05-&3$%'4RD@;6%T8V@[#0H-"B,@=V4@;75S
  1065. XM="!C=70@=&AE(&-O;6UA;F0@;&EN92!T;R!F:70@:6X@=&AE($U3+T1/4R Q
  1066. XM,C@@8GET92!L:6UI=#H-"GII<"YE>&4Z("0H3T)*6BD@)"A/0DI)*0T*"65C
  1067. XM:&\@)"A/0DI:*2L@/B!Z:7 N<G-P#0H)96-H;R D*$]"2DDI.R ^/B!Z:7 N
  1068. XM<G-P#0H))"A,1"D@)"A,1$9,04=3*2! >FEP+G)S< T*"61E;"!Z:7 N<G-P
  1069. XM#0H))"A35%))4"D@>FEP+F5X90T*#0IZ:7!C;&]A:RYE>&4Z("0H3T)*0RD-
  1070. XM"@EE8VAO("0H3T)*0RD[(#X@>FEP8RYR<W -"@DD*$Q$*2 D*$Q$1DQ!1U,I
  1071. XM($!Z:7!C+G)S< T*"61E;"!Z:7!C+G)S< T*"20H4U1225 I('II<&-L;V%K
  1072. XM+F5X90T*#0IZ:7!N;W1E+F5X93H@)"A/0DI.*0T*"65C:&\@)"A/0DI.*3L@
  1073. XM/B!Z:7!N+G)S< T*"20H3$0I("0H3$1&3$%'4RD@0'II<&XN<G-P#0H)9&5L
  1074. XM('II<&XN<G-P#0H))"A35%))4"D@>FEP;F]T92YE>&4-"@T*>FEP<W!L:70N
  1075. XM97AE.B D*$]"2E,I#0H)96-H;R D*$]"2E,I.R ^('II<',N<G-P#0H))"A,
  1076. XM1"D@)"A,1$9,04=3*2! >FEP<RYR<W -"@ED96P@>FEP<RYR<W -"@DD*%-4
  1077. XM4DE0*2!Z:7!S<&QI="YE>&4-"@T*:6YS=&%L;#H))"A:25!3*0T*"6-O<'D@
  1078. XM+V(@*BYE>&4@)"A"24XI#0H-"F-L96%N.@T*"61E;" J+F]B:@T*"61E;" J
  1079. X&+F5X90T*
  1080. Xend
  1081. END_OF_FILE
  1082.   if test 5501 -ne `wc -c <'msdos/makefile.msc.UU'`; then
  1083.     echo shar: \"'msdos/makefile.msc.UU'\" unpacked with wrong size!
  1084.   else
  1085.     echo shar: Uudecoding \"'msdos/makefile.msc'\" \(3966 characters\)
  1086.     cat msdos/makefile.msc.UU | uudecode
  1087.     if test 3966 -ne `wc -c <'msdos/makefile.msc'`; then
  1088.       echo shar: \"'msdos/makefile.msc'\" uudecoded with wrong size!
  1089.     else
  1090.       rm msdos/makefile.msc.UU
  1091.     fi
  1092.   fi
  1093.   # end of 'msdos/makefile.msc.UU'
  1094. fi
  1095. if test -f 'msdos/match.asm' -a "${1}" != "-c" ; then 
  1096.   echo shar: Will not clobber existing file \"'msdos/match.asm'\"
  1097. else
  1098.   echo shar: Extracting \"'msdos/match.asm'\" \(7753 characters\)
  1099.   sed "s/^X//" >'msdos/match.asm' <<'END_OF_FILE'
  1100. X;
  1101. X; Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  1102. X; Permission is granted to any individual or institution to use, copy, or
  1103. X; redistribute this software so long as all of the original files are included
  1104. X; unmodified, that it is not sold for profit, and that this copyright notice
  1105. X; is retained.
  1106. X;
  1107. X; match.asm by Jean-loup Gailly.
  1108. X
  1109. X; match.asm, optimized version of longest_match() in deflate.c
  1110. X; Must be assembled with masm -ml. To be used only with C compact model.
  1111. X; (For large model, follow the instructions given below.)
  1112. X; This file is only optional. If you don't have masm or tasm, use the
  1113. X; C version (add -DNO_ASM to CFLAGS in makefile.msc and remove match.obj
  1114. X; from OBJI). If you have reduced WSIZE in zip.h, then change its value
  1115. X; below.
  1116. X;
  1117. X; Turbo C 2.0 does not support static allocation of more than 64K bytes per
  1118. X; file, and does not have SS == DS. So TC and BC++ users must use:
  1119. X;   tasm -ml -DDYN_ALLOC -DSS_NEQ_DS match;
  1120. X;
  1121. X; To simplify the code, the option -DDYN_ALLOC is supported for OS/2
  1122. X; only if the arrays are guaranteed to have zero offset (allocated by
  1123. X; halloc). We also require SS==DS. This is satisfied for MSC but not Turbo C.
  1124. X
  1125. X        name    match
  1126. X
  1127. Xifndef DYN_ALLOC
  1128. X        extrn   _prev         : word
  1129. X        extrn   _window       : byte
  1130. X        prev    equ  _prev    ; offset part
  1131. X        window  equ  _window
  1132. Xendif
  1133. X
  1134. X_DATA    segment  word public 'DATA'
  1135. X        extrn   _match_start  : word
  1136. X        extrn   _prev_length  : word
  1137. X        extrn   _good_match   : word
  1138. X        extrn   _strstart     : word
  1139. X        extrn   _max_chain_length : word
  1140. Xifdef DYN_ALLOC
  1141. X        extrn   _prev         : word
  1142. X        extrn   _window       : word
  1143. X        prev    equ 0         ; offset forced to zero
  1144. X        window  equ 0
  1145. X        window_seg equ _window[2]
  1146. X    window_off equ 0
  1147. Xelse
  1148. X    wseg    dw seg _window
  1149. X        window_seg equ wseg
  1150. X    window_off equ offset _window
  1151. Xendif
  1152. X_DATA    ends
  1153. X
  1154. XDGROUP  group _DATA
  1155. X
  1156. X_TEXT   segment word public 'CODE'
  1157. X        assume  cs: _TEXT, ds: DGROUP
  1158. X
  1159. X    public _match_init
  1160. X        public _longest_match
  1161. X
  1162. X    MIN_MATCH     equ 3
  1163. X        MAX_MATCH     equ 258
  1164. X    WSIZE         equ 32768        ; keep in sync with zip.h !
  1165. X    MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
  1166. X    MAX_DIST      equ (WSIZE-MIN_LOOKAHEAD)
  1167. X
  1168. Xprev_ptr    dw  seg _prev        ; pointer to the prev array
  1169. Xifdef SS_NEQ_DS
  1170. X    match_start dw  0            ; copy of _match_start if SS != DS
  1171. Xendif
  1172. X
  1173. X; initialize or check the variables used in match.asm.
  1174. X
  1175. X_match_init proc near            ; 'proc far' for large model
  1176. Xifdef SS_NEQ_DS
  1177. X        ma_start equ cs:match_start    ; does not work on OS/2
  1178. Xelse
  1179. X    assume ss: DGROUP
  1180. X        ma_start equ ss:_match_start
  1181. X        mov     ax,ds
  1182. X        mov     bx,ss
  1183. X        cmp     ax,bx                   ; SS == DS?
  1184. X        jne     error
  1185. Xendif
  1186. Xifdef DYN_ALLOC
  1187. X    cmp    _prev[0],0        ; verify zero offset
  1188. X    jne    error
  1189. X    cmp    _window[0],0
  1190. X    jne    error
  1191. X  ifdef SS_NEQ_DS
  1192. X    mov    ax,_prev[2]        ; segment value
  1193. X    mov     cs:prev_ptr,ax        ; ugly write to code, crash on OS/2
  1194. X        prev_seg  equ cs:prev_ptr
  1195. X  else
  1196. X        prev_seg  equ ss:_prev[2]    ; works on OS/2 if SS == DS
  1197. X  endif
  1198. Xelse
  1199. X        prev_seg  equ cs:prev_ptr
  1200. Xendif
  1201. X    ret
  1202. X    extrn   _exit : near        ; 'far' for large model
  1203. Xerror:  call    _exit
  1204. X
  1205. X_match_init endp
  1206. X
  1207. X; -----------------------------------------------------------------------
  1208. X; Set match_start to the longest match starting at the given string and
  1209. X; return its length. Matches shorter or equal to prev_length are discarded,
  1210. X; in which case the result is equal to prev_length and match_start is
  1211. X; garbage.
  1212. X; IN assertions: cur_match is the head of the hash chain for the current
  1213. X;   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
  1214. X
  1215. X; int longest_match(cur_match)
  1216. X
  1217. X_longest_match  proc near         ; 'proc far' for large model
  1218. X        push    bp
  1219. X        mov     bp,sp
  1220. X        push    di
  1221. X    push    si
  1222. X    push    ds
  1223. X
  1224. X        cur_match    equ word ptr [bp+4] ; [bp+6] for large model
  1225. X
  1226. X;       window         equ es:window (es:0 for DYN_ALLOC)
  1227. X;       prev         equ ds:prev
  1228. X;       match        equ es:si
  1229. X;       scan         equ es:di
  1230. X;       chain_length equ bp
  1231. X;       best_len     equ bx
  1232. X;       limit        equ dx
  1233. X
  1234. X    mov    si,cur_match            ; use bp before it is destroyed
  1235. X        mov     bp,_max_chain_length    ; chain_length = max_chain_length
  1236. X    mov    di,_strstart
  1237. X    mov    dx,di
  1238. X    sub    dx,MAX_DIST             ; limit = strstart-MAX_DIST
  1239. X    jae    limit_ok
  1240. X    sub    dx,dx            ; limit = NIL
  1241. Xlimit_ok:
  1242. X        add     di,2+window_off         ; di = offset(window + strstart + 2)
  1243. X        mov     bx,_prev_length         ; best_len = prev_length
  1244. X    mov     es,window_seg
  1245. X        mov     ax,es:[bx+di-3]         ; ax = scan[best_len-1..best_len]
  1246. X        mov     cx,es:[di-2]            ; cx = scan[0..1]
  1247. X    cmp    bx,_good_match        ; do we have a good match already?
  1248. X        mov     ds,prev_seg            ; (does not destroy the flags)
  1249. X        assume  ds: nothing
  1250. X        jb      do_scan            ; good match?
  1251. X    shr    bp,1            ; chain_length >>= 2
  1252. X    shr    bp,1
  1253. X        jmp     short do_scan
  1254. X
  1255. X        even                            ; align destination of branch
  1256. Xlong_loop:
  1257. X; at this point, ds:di == scan+2, ds:si == cur_match
  1258. X        mov     ax,[bx+di-3]            ; ax = scan[best_len-1..best_len]
  1259. X        mov     cx,[di-2]               ; cx = scan[0..1]
  1260. X        mov     ds,prev_seg            ; reset ds to address the prev array
  1261. Xshort_loop:
  1262. X        dec     bp                      ; --chain_length
  1263. X        jz      the_end
  1264. X; at this point, di == scan+2, si = cur_match,
  1265. X; ax = scan[best_len-1..best_len] and cx = scan[0..1]
  1266. Xif (WSIZE-32768)
  1267. X        and     si,WSIZE-1              ; not needed if WSIZE=32768
  1268. Xendif
  1269. X        shl     si,1                    ; cur_match as word index
  1270. X        mov     si,prev[si]             ; cur_match = prev[cur_match]
  1271. X        cmp     si,dx            ; cur_match <= limit ?
  1272. X        jbe     the_end
  1273. Xdo_scan:
  1274. X        cmp     ax,word ptr es:window[bx+si-1] ; check match at best_len-1
  1275. X        jne     short_loop
  1276. X        cmp     cx,word ptr es:window[si]      ; check min_match_length match
  1277. X        jne     short_loop
  1278. X
  1279. X        lea     si,window[si+2]         ; si = match
  1280. X        mov     ax,di                   ; ax = scan+2
  1281. X        mov     cx,es
  1282. X        mov     ds,cx            ; ds = es = window
  1283. X        mov     cx,(MAX_MATCH-2)/2      ; scan for at most MAX_MATCH bytes
  1284. X        repe    cmpsw                   ; loop until mismatch
  1285. X        je      maxmatch                ; match of length MAX_MATCH?
  1286. Xmismatch:
  1287. X        mov     cl,[di-2]               ; mismatch on first or second byte?
  1288. X        sub     cl,[si-2]               ; cl = 0 if first bytes equal
  1289. X        xchg    ax,di                   ; di = scan+2, ax = end of scan
  1290. X        sub     ax,di                   ; ax = len
  1291. X    sub    si,ax            ; si = cur_match + 2 + offset(window)
  1292. X    sub    si,2+window_off         ; si = cur_match
  1293. X        sub     cl,1                    ; set carry if cl == 0 (can't use DEC)
  1294. X        adc     ax,0                    ; ax = carry ? len+1 : len
  1295. X        cmp     ax,bx                   ; len > best_len ?
  1296. X        jle     long_loop
  1297. X        mov     ma_start,si             ; match_start = cur_match
  1298. X        mov     bx,ax                   ; bx = best_len = len
  1299. X        cmp     ax,MAX_MATCH            ; len >= MAX_MATCH ?
  1300. X        jl      long_loop
  1301. Xthe_end:
  1302. X    pop    ds
  1303. X        assume  ds: DGROUP
  1304. Xifdef SS_NEQ_DS
  1305. X    mov    ax,ma_start        ; garbage if no match found
  1306. X    mov    ds:_match_start,ax
  1307. Xendif
  1308. X        pop     si
  1309. X        pop     di
  1310. X        pop     bp
  1311. X        mov     ax,bx                   ; result = ax = best_len
  1312. X        ret
  1313. Xmaxmatch:                               ; come here if maximum match
  1314. X        cmpsb                           ; increment si and di
  1315. X        jmp     mismatch                ; force match_length = MAX_LENGTH
  1316. X        
  1317. X_longest_match  endp
  1318. X
  1319. X_TEXT   ends
  1320. Xend
  1321. END_OF_FILE
  1322.   if test 7753 -ne `wc -c <'msdos/match.asm'`; then
  1323.     echo shar: \"'msdos/match.asm'\" unpacked with wrong size!
  1324.   fi
  1325.   # end of 'msdos/match.asm'
  1326. fi
  1327. if test -f 'os2/match32.asm.UU' -a "${1}" != "-c" ; then 
  1328.   echo shar: Will not clobber existing file \"'os2/match32.asm.UU'\"
  1329. else
  1330.   echo shar: Extracting \"'os2/match32.asm.UU'\" \(8134 characters\)
  1331.   sed "s/^X//" >'os2/match32.asm.UU' <<'END_OF_FILE'
  1332. Xbegin 666 os2/match32.asm
  1333. XM.PT*.R!#;W!Y<FEG:'0@*$,I(#$Y.3 M,3DY,B!-87)K($%D;&5R+"!2:6-H
  1334. XM87)D($(N(%=A;&5S+"!*96%N+6QO=7 @1V%I;&QY+ T*.R!+86D@57=E(%)O
  1335. XM;6UE;"!A;F0@26=O<B!-86YD<FEC:&5N:V\N#0H[(%!E<FUI<W-I;VX@:7,@
  1336. XM9W)A;G1E9"!T;R!A;GD@:6YD:79I9'5A;"!O<B!I;G-T:71U=&EO;B!T;R!U
  1337. XM<V4L(&-O<'DL(&]R#0H[(')E9&ES=')I8G5T92!T:&ES('-O9G1W87)E('-O
  1338. XM(&QO;F<@87,@86QL(&]F('1H92!O<FEG:6YA;"!F:6QE<R!A<F4@:6YC;'5D
  1339. XM960-"CL@=6YM;V1I9FEE9"P@=&AA="!I="!I<R!N;W0@<V]L9"!F;W(@<')O
  1340. XM9FET+"!A;F0@=&AA="!T:&ES(&-O<'ER:6=H="!N;W1I8V4-"CL@:7,@<F5T
  1341. XM86EN960N#0H[#0H[(&UA=&-H,S(N87-M(&)Y($IE86XM;&]U<"!'86EL;'DN
  1342. XM#0H-"CL@;6%T8V@S,BYA<VTL(&]P=&EM:7IE9"!V97)S:6]N(&]F(&QO;F=E
  1343. XM<W1?;6%T8V@H*2!I;B!D969L871E+F,-"CL@5&\@8F4@=7-E9"!O;FQY('=I
  1344. XM=&@@,S(@8FET(&9L870@;6]D96PN(%1O('-I;7!L:69Y('1H92!C;V1E+"!T
  1345. XM:&4@;W!T:6]N#0H[("U$1%E.7T%,3$]#(&ES(&YO="!S=7!P;W)T960N#0H[
  1346. XM(%1H:7,@9FEL92!I<R!O;FQY(&]P=&EO;F%L+B!)9B!Y;W4@9&]N)W0@:&%V
  1347. XM92!A;B!A<W-E;6)L97(L('5S92!T:&4-"CL@0R!V97)S:6]N("AA9&0@+41.
  1348. XM3U]!4TT@=&\@0T9,04=3(&EN(&UA:V5F:6QE(&%N9"!R96UO=F4@;6%T8V@N
  1349. XM;PT*.R!F<F]M($]"2DDI+B!)9B!Y;W4@:&%V92!R961U8V5D(%=325I%(&EN
  1350. XM('II<"YH+"!T:&5N(&-H86YG92!I=',@=F%L=64-"CL@8F5L;W<N#0H[(" @
  1351. XM(" @(" @(" @(" @*BHJ(%=A<FYI;F<Z('1H:7,@9FEL92!I<R!S=&EL;"!U
  1352. XM;G1E<W1E9" J*BH-"B @(" @(" @+C,X-@T*#0H@(" @(" @(&YA;64@(" @
  1353. XM;6%T8V@-"@T*7T)34R @("!S96=M96YT("!D=V]R9"!54T4S,B!P=6)L:6,@
  1354. XM)T)34R<-"B @(" @(" @97AT<FX@("!?;6%T8VA?<W1A<G0@(#H@9'=O<F0-
  1355. XM"B @(" @(" @97AT<FX@("!?<')E=E]L96YG=&@@(#H@9'=O<F0-"B @(" @
  1356. XM(" @97AT<FX@("!?9V]O9%]M871C:" @(#H@9'=O<F0-"B @(" @(" @97AT
  1357. XM<FX@("!?<W1R<W1A<G0@(" @(#H@9'=O<F0-"B @(" @(" @97AT<FX@("!?
  1358. XM;6%X7V-H86EN7VQE;F=T:" Z(&1W;W)D#0H@(" @(" @(&5X=')N(" @7W!R
  1359. XM978@(" @(" @(" Z('=O<F0-"B @(" @(" @97AT<FX@("!?=VEN9&]W(" @
  1360. XM(" @(#H@8GET90T*7T)34R @("!E;F1S#0H-"D1'4D]54" @9W)O=7 @7T)3
  1361. XM4PT*#0I?5$585" @('-E9VUE;G0@9'=O<F0@55-%,S(@<'5B;&EC("=#3T1%
  1362. XM)PT*(" @(" @("!A<W-U;64@(&-S.B!?5$585"P@9',Z($1'4D]54"P@<W,Z
  1363. XM($1'4D]54 T*#0H)<'5B;&EC(&UA=&-H7VEN:71?#0H@(" @(" @('!U8FQI
  1364. XM8R!L;VYG97-T7VUA=&-H7PT*#0H)34E.7TU!5$-((" @("!E<74@,PT*(" @
  1365. XM(" @("!-05A?34%40T@@(" @(&5Q=2 R-3@-"@E74TE:12 @(" @(" @(&5Q
  1366. XM=2 S,C<V. D).R!K965P(&EN('-Y;F,@=VET:"!Z:7 N:" A#0H)34E.7TQ/
  1367. XM3TM!2$5!1"!E<74@*$U!6%]-051#2"M-24Y?34%40T@K,2D-"@E-05A?1$E3
  1368. XM5" @(" @(&5Q=2 H5U-)6D4M34E.7TQ/3TM!2$5!1"D-"@T*.R!I;FET:6%L
  1369. XM:7IE(&]R(&-H96-K('1H92!V87)I86)L97,@=7-E9"!I;B!M871C:"YA<VTN
  1370. XM#0H-"FUA=&-H7VEN:71?('!R;V,@;F5A<@T*"7)E= T*;6%T8VA?:6YI=%\@
  1371. XM96YD< T*#0H[("TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
  1372. XM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM#0H[(%-E="!M
  1373. XM871C:%]S=&%R="!T;R!T:&4@;&]N9V5S="!M871C:"!S=&%R=&EN9R!A="!T
  1374. XM:&4@9VEV96X@<W1R:6YG(&%N9 T*.R!R971U<FX@:71S(&QE;F=T:"X@36%T
  1375. XM8VAE<R!S:&]R=&5R(&]R(&5Q=6%L('1O('!R979?;&5N9W1H(&%R92!D:7-C
  1376. XM87)D960L#0H[(&EN('=H:6-H(&-A<V4@=&AE(')E<W5L="!I<R!E<75A;"!T
  1377. XM;R!P<F5V7VQE;F=T:"!A;F0@;6%T8VA?<W1A<G0@:7,-"CL@9V%R8F%G92X-
  1378. XM"CL@24X@87-S97)T:6]N<SH@8W5R7VUA=&-H(&ES('1H92!H96%D(&]F('1H
  1379. XM92!H87-H(&-H86EN(&9O<B!T:&4@8W5R<F5N= T*.R @('-T<FEN9R H<W1R
  1380. XM<W1A<G0I(&%N9"!I=',@9&ES=&%N8V4@:7,@/#T@34%87T1)4U0L(&%N9"!P
  1381. XM<F5V7VQE;F=T:" ^/2 Q#0H-"CL@:6YT(&QO;F=E<W1?;6%T8V@H8W5R7VUA
  1382. XM=&-H*0T*#0IL;VYG97-T7VUA=&-H7R!P<F]C(&YE87(-"@T*(" @(" @("!C
  1383. XM=7)?;6%T8V@@(" @97%U(&1W;W)D('!T<B!;97-P*S(P70T*(" @(" @(" [
  1384. XM(')E='5R;B!A9&1R97-S(" @(" @(" @(" @(" @(#L@97-P*S$V#0H@(" @
  1385. XM(" @('!U<V@@(" @96)P(" @(" @(" @(" @(" @(" @(" @.R!E<W K,3(-
  1386. XM"B @(" @(" @<'5S:" @("!E9&D@(" @(" @(" @(" @(" @(" @(" [(&5S
  1387. XM<"LX#0H)<'5S: EE<VD@(" @(" @(" @(" @(" @(" @(" [(&5S<"LT#0H)
  1388. XM<'5S: EE8G@@(" @(" @(" @(" @(" @(" @(" [(&5S< T*#0H[(" @(" @
  1389. XM(&UA=&-H(" @(" @("!E<74@97-I#0H[(" @(" @('-C86X@(" @(" @("!E
  1390. XM<74@961I#0H[(" @(" @(&-H86EN7VQE;F=T:"!E<74@96)P#0H[(" @(" @
  1391. XM(&)E<W1?;&5N(" @("!E<74@96)X#0H[(" @(" @(&QI;6ET(" @(" @("!E
  1392. XM<74@961X#0H-"@EM;W8)97-I+&-U<E]M871C: T*(" @(" @("!M;W8@(" @
  1393. XM(&5B<"Q?;6%X7V-H86EN7VQE;F=T:" @(#L@8VAA:6Y?;&5N9W1H(#T@;6%X
  1394. XM7V-H86EN7VQE;F=T: T*"6UO=@EE9&DL7W-T<G-T87)T#0H);6]V"65D>"QE
  1395. XM9&D-"@ES=6()961X+$U!6%]$25-4(" @(" @(" @(" @.R!L:6UI=" ]('-T
  1396. XM<G-T87)T+4U!6%]$25-4#0H):F%E"7-H;W)T(&QI;6ET7V]K#0H)<W5B"65D
  1397. XM>"QE9'@)"0D[(&QI;6ET(#T@3DE,#0IL:6UI=%]O:SH-"B @(" @(" @861D
  1398. XM(" @("!E9&DL,BMO9F9S970@7W=I;F1O=R @(" [(&5D:2 ](&]F9G-E="AW
  1399. XM:6YD;W<@*R!S=')S=&%R=" K(#(I#0H@(" @(" @(&UO=B @(" @96)X+%]P
  1400. XM<F5V7VQE;F=T:" @(" @(" @.R!B97-T7VQE;B ]('!R979?;&5N9W1H#0H@
  1401. XM(" @(" @(&UO=B @(" @87@L6V5B>"ME9&DM,UT@(" @(" @(" @.R!A>" ]
  1402. XM('-C86Y;8F5S=%]L96XM,2XN8F5S=%]L96Y=#0H@(" @(" @(&UO=B @(" @
  1403. XM8W@L6V5D:2TR72 @(" @(" @(" @(" @.R!C>" ]('-C86Y;,"XN,5T-"@EC
  1404. XM;7 )96)X+%]G;V]D7VUA=&-H( D[(&1O('=E(&AA=F4@82!G;V]D(&UA=&-H
  1405. XM(&%L<F5A9'D_#0H@(" @(" @(&IB(" @(" @9&]?<V-A;@T*"7-H<@EE8G L
  1406. XM,@D)"3L@8VAA:6Y?;&5N9W1H(#X^/2 R#0H@(" @(" @(&IM<" @(" @<VAO
  1407. XM<G0@9&]?<V-A;@T*#0H@(" @(" @(&%L:6=N(" @-" @(" @(" @(" @(" @
  1408. XM(" @(" @(" @.R!A;&EG;B!D97-T:6YA=&EO;B!O9B!B<F%N8V@-"FQO;F=?
  1409. XM;&]O<#H-"CL@870@=&AI<R!P;VEN="P@961I(#T]('-C86XK,BP@97-I(#T]
  1410. XM(&-U<E]M871C: T*(" @(" @("!M;W8@(" @(&%X+%ME8G@K961I+3-=(" @
  1411. XM(" @(" @(#L@87@@/2!S8V%N6V)E<W1?;&5N+3$N+F)E<W1?;&5N70T*(" @
  1412. XM(" @("!M;W8@(" @(&-X+%ME9&DM,ET@(" @(" @(" @(" @(#L@8W@@/2!S
  1413. XM8V%N6S N+C%=#0IS:&]R=%]L;V]P.@T*(" @(" @("!D96,@(" @(&5B<" @
  1414. XM(" @(" @(" @(" @(" @(" @(#L@+2UC:&%I;E]L96YG=&@-"B @(" @(" @
  1415. XM:GH@(" @("!T:&5?96YD#0H[(&%T('1H:7,@<&]I;G0L(&5D:2 ]/2!S8V%N
  1416. XM*S(L(&5S:2 ]/2!C=7)?;6%T8V@L#0H[(&%X(#T@<V-A;EMB97-T7VQE;BTQ
  1417. XM+BYB97-T7VQE;ET@86YD(&-X(#T@<V-A;ELP+BXQ70T*(" @(" @("!A;F0@
  1418. XM(" @(&5S:2Q74TE:12TQ#0H@(" @(" @(&UO=B @(" @<VDL7W!R979;97-I
  1419. XM*V5S:5T@(" @(" @.R!C=7)?;6%T8V@@/2!P<F5V6V-U<E]M871C:%T-"B @
  1420. XM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" [('1O<"!W
  1421. XM;W)D(&]F(&5S:2!I<R!S=&EL;" P#0H@(" @(" @(&-M<" @(" @97-I+&5D
  1422. XM> D)"3L@8W5R7VUA=&-H(#P](&QI;6ET(#\-"B @(" @(" @:F)E(" @("!S
  1423. XM:&]R="!T:&5?96YD#0ID;U]S8V%N.@T*(" @(" @("!C;7 @(" @(&%X+'=O
  1424. XM<F0@<'1R(%]W:6YD;W=;96)X*V5S:2TQ72 @(#L@8VAE8VL@;6%T8V@@870@
  1425. XM8F5S=%]L96XM,0T*(" @(" @("!J;F4@(" @('-H;W)T7VQO;W -"B @(" @
  1426. XM(" @8VUP(" @("!C>"QW;W)D('!T<B!?=VEN9&]W6V5S:5T@(" @(" @(" [
  1427. XM(&-H96-K(&UI;E]M871C:%]L96YG=&@@;6%T8V@-"B @(" @(" @:FYE(" @
  1428. XM("!S:&]R=%]L;V]P#0H-"B @(" @(" @;&5A(" @("!E<VDL7W=I;F1O=UME
  1429. XM<VDK,ET@(" @(" [('-I(#T@;6%T8V@-"B @(" @(" @;6]V(" @("!E87@L
  1430. XM961I(" @(" @(" @(" @(" @(" [(&%X(#T@<V-A;BLR#0H@(" @(" @(&UO
  1431. XM=B @(" @96-X+"A-05A?34%40T@M,BDO,B @(" @.R!S8V%N(&9O<B!A="!M
  1432. XM;W-T($U!6%]-051#2"!B>71E<PT*(" @(" @("!R97!E(" @(&-M<'-W(" @
  1433. XM(" @(" @(" @(" @(" @(#L@;&]O<"!U;G1I;"!M:7-M871C: T*(" @(" @
  1434. XM("!J92 @(" @(&UA>&UA=&-H(" @(" @(" @(" @(" @(#L@;6%T8V@@;V8@
  1435. XM;&5N9W1H($U!6%]-051#2#\-"FUI<VUA=&-H.@T*(" @(" @("!M;W8@(" @
  1436. XM(&-L+%ME9&DM,ET@(" @(" @(" @(" @(#L@;6ES;6%T8V@@;VX@9FER<W0@
  1437. XM;W(@<V5C;VYD(&)Y=&4_#0H@(" @(" @('-U8B @(" @8VPL6V5S:2TR72 @
  1438. XM(" @(" @(" @(" @.R!C;" ](# @:68@9FER<W0@8GET97,@97%U86P-"B @
  1439. XM(" @(" @>&-H9R @("!E87@L961I(" @(" @(" @(" @(" @(" [(&5D:2 ]
  1440. XM('-C86XK,BP@96%X(#T@96YD(&]F('-C86X-"B @(" @(" @<W5B(" @("!E
  1441. XM87@L961I(" @(" @(" @(" @(" @(" [(&5A>" ](&QE;@T*"7-U8@EE<VDL
  1442. XM96%X(" @(" @(" )"3L@97-I(#T@8W5R7VUA=&-H("L@,B K(&]F9G-E="AW
  1443. XM:6YD;W<I#0H)<W5B"65S:2PR*V]F9G-E="!?=VEN9&]W(" @(#L@97-I(#T@
  1444. XM8W5R7VUA=&-H#0H@(" @(" @('-U8B @(" @8VPL,2 @(" @(" @(" @(" @
  1445. XM(" @(" @.R!S970@8V%R<GD@:68@8VP@/3T@," H8V%N)W0@=7-E($1%0RD-
  1446. XM"B @(" @(" @861C(" @("!E87@L," @(" @(" @(" @(" @(" @(" [(&5A
  1447. XM>" ](&-A<G)Y(#\@;&5N*S$@.B!L96X-"B @(" @(" @8VUP(" @("!E87@L
  1448. XM96)X(" @(" @(" @(" @(" @(" [(&QE;B ^(&)E<W1?;&5N(#\-"B @(" @
  1449. XM(" @:FQE(" @("!L;VYG7VQO;W -"B @(" @(" @;6]V(" @("!?;6%T8VA?
  1450. XM<W1A<G0L97-I(" @(" @(" [(&UA=&-H7W-T87)T(#T@8W5R7VUA=&-H#0H@
  1451. XM(" @(" @(&UO=B @(" @96)X+&5A>" @(" @(" @(" @(" @(" @.R!E8G@@
  1452. XM/2!B97-T7VQE;B ](&QE;@T*(" @(" @("!C;7 @(" @(&5A>"Q-05A?34%4
  1453. XM0T@@(" @(" @(" @(#L@;&5N(#X]($U!6%]-051#2" _#0H@(" @(" @(&IL
  1454. XM(" @(" @;&]N9U]L;V]P#0IT:&5?96YD.@T*(" @(" @("!M;W8@(" @(&5A
  1455. XM>"QE8G@@(" @(" @(" @(" @(" @(#L@<F5S=6QT(#T@96%X(#T@8F5S=%]L
  1456. XM96X-"@EP;W )96)X#0H@(" @(" @('!O<" @(" @97-I#0H@(" @(" @('!O
  1457. XM<" @(" @961I#0H@(" @(" @('!O<" @(" @96)P#0H@(" @(" @(')E= T*
  1458. XM;6%X;6%T8V@Z(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(#L@8V]M
  1459. XM92!H97)E(&EF(&UA>&EM=6T@;6%T8V@-"B @(" @(" @8VUP<V(@(" @(" @
  1460. XM(" @(" @(" @(" @(" @(" @(" [(&EN8W)E;65N="!E<VD@86YD(&5D:0T*
  1461. XM(" @(" @("!J;7 @(" @(&UI<VUA=&-H(" @(" @(" @(" @(" @(#L@9F]R
  1462. XM8V4@;6%T8VA?;&5N9W1H(#T@34%87TQ%3D=42 T*#0IL;VYG97-T7VUA=&-H
  1463. X=7R!E;F1P#0H-"E]415A4(" @96YD<PT*96YD#0H*
  1464. Xend
  1465. END_OF_FILE
  1466.  if test 8134 -ne `wc -c <'os2/match32.asm.UU'`; then
  1467.     echo shar: \"'os2/match32.asm.UU'\" unpacked with wrong size!
  1468.   else
  1469.     echo shar: Uudecoding \"'os2/match32.asm'\" \(5879 characters\)
  1470.     cat os2/match32.asm.UU | uudecode
  1471.     if test 5879 -ne `wc -c <'os2/match32.asm'`; then
  1472.       echo shar: \"'os2/match32.asm'\" uudecoded with wrong size!
  1473.     else
  1474.       rm os2/match32.asm.UU
  1475.     fi
  1476.   fi
  1477.   # end of 'os2/match32.asm.UU'
  1478. fi
  1479. if test -f 'vms/VMSmunch.h' -a "${1}" != "-c" ; then 
  1480.   echo shar: Will not clobber existing file \"'vms/VMSmunch.h'\"
  1481. else
  1482.   echo shar: Extracting \"'vms/VMSmunch.h'\" \(5511 characters\)
  1483.   sed "s/^X//" >'vms/VMSmunch.h' <<'END_OF_FILE'
  1484. X/*---------------------------------------------------------------------------
  1485. X
  1486. X  VMSmunch.h
  1487. X
  1488. X  A few handy #defines, plus the contents of three header files from Joe
  1489. X  Meadows' FILE program.  Used by VMSmunch and by various routines which
  1490. X  call VMSmunch (e.g., in Zip and UnZip).
  1491. X
  1492. X  ---------------------------------------------------------------------------*/
  1493. X
  1494. X#define GET_TIMES       4
  1495. X#define SET_TIMES       0
  1496. X#define GET_RTYPE       1
  1497. X#define CHANGE_RTYPE    2
  1498. X#define RESTORE_RTYPE   3
  1499. X
  1500. X/*---------------------------------------------------------------------------
  1501. X    fatdef.h
  1502. X  ---------------------------------------------------------------------------*/
  1503. X
  1504. X/* This header file was created by Joe Meadows, and is not copyrighted
  1505. X   in any way. No guarantee is made as to the accuracy of the contents
  1506. X   of this header file. This header file was last modified on Sep. 22th,
  1507. X   1987. (Modified to include this statement) */
  1508. X#define FAT$K_LENGTH 32
  1509. X#define FAT$C_LENGTH 32
  1510. X#define FAT$S_FATDEF 32
  1511. X
  1512. Xstruct fatdef {
  1513. X  union  {
  1514. X    unsigned char fat$b_rtype;
  1515. X    struct  {
  1516. X      unsigned fat$v_rtype : 4;
  1517. X      unsigned fat$v_fileorg : 4;
  1518. X    } fat$r_rtype_bits;
  1519. X  } fat$r_rtype_overlay;
  1520. X# define FAT$S_RTYPE 4
  1521. X# define FAT$V_RTYPE 0
  1522. X#   define FAT$C_UNDEFINED 0
  1523. X#   define FAT$C_FIXED 1
  1524. X#   define FAT$C_VARIABLE 2
  1525. X#   define FAT$C_VFC 3
  1526. X#   define FAT$C_STREAM 4
  1527. X#   define FAT$C_STREAMLF 5
  1528. X#   define FAT$C_STREAMCR 6
  1529. X# define FAT$S_FILEORG 4
  1530. X# define FAT$V_FILEORG 4
  1531. X#   define FAT$C_SEQUENTIAL 0
  1532. X#   define FAT$C_RELATIVE 1
  1533. X#   define FAT$C_INDEXED 2
  1534. X#   define FAT$C_DIRECT 3
  1535. X  union  {
  1536. X    unsigned char fat$b_rattrib;
  1537. X    struct  {
  1538. X      unsigned fat$v_fortrancc : 1;
  1539. X      unsigned fat$v_impliedcc : 1;
  1540. X      unsigned fat$v_printcc : 1;
  1541. X      unsigned fat$v_nospan : 1;
  1542. X    } fat$r_rattrib_bits;
  1543. X  } fat$r_rattrib_overlay;
  1544. X#   define FAT$V_FORTRANCC 0
  1545. X#   define FAT$M_FORTRANCC 1
  1546. X#   define FAT$V_IMPLIEDCC 1
  1547. X#   define FAT$M_IMPLIEDCC 2
  1548. X#   define FAT$V_PRINTCC 2
  1549. X#   define FAT$M_PRINTCC 4
  1550. X#   define FAT$V_NOSPAN 3
  1551. X#   define FAT$M_NOSPAN 8
  1552. X  unsigned short int fat$w_rsize;
  1553. X  union
  1554. X  {
  1555. X    unsigned long int fat$l_hiblk;
  1556. X    struct
  1557. X    {
  1558. X      unsigned short int fat$w_hiblkh;
  1559. X      unsigned short int fat$w_hiblkl;
  1560. X    } fat$r_hiblk_fields;
  1561. X  } fat$r_hiblk_overlay;
  1562. X  union
  1563. X  {
  1564. X    unsigned long int fat$l_efblk;
  1565. X    struct
  1566. X    {
  1567. X      unsigned short int fat$w_efblkh;
  1568. X      unsigned short int fat$w_efblkl;
  1569. X    } fat$r_efblk_fields;
  1570. X  } fat$r_efblk_overlay;
  1571. X  unsigned short int fat$w_ffbyte;
  1572. X  unsigned char fat$b_bktsize;
  1573. X  unsigned char fat$b_vfcsize;
  1574. X  unsigned short int fat$w_maxrec;
  1575. X  unsigned short int fat$w_defext;
  1576. X  unsigned short int fat$w_gbc;
  1577. X  char fat$fill[8];
  1578. X  unsigned short int fat$w_versions;
  1579. X};
  1580. X
  1581. X/*---------------------------------------------------------------------------
  1582. X    fchdef.h
  1583. X  ---------------------------------------------------------------------------*/
  1584. X
  1585. X/* This header file was created by Joe Meadows, and is not copyrighted
  1586. X   in any way. No guarantee is made as to the accuracy of the contents
  1587. X   of this header file. This header file was last modified on Sep. 22th,
  1588. X   1987. (Modified to include this statement) */
  1589. X
  1590. X#define FCH$V_BADACL 0x00B
  1591. X#define FCH$M_BADACL (1 << FCH$V_ACL)
  1592. X#define FCH$V_BADBLOCK 0x00E
  1593. X#define FCH$M_BADBLOCK (1 << FCH$V_BADBLOCK)
  1594. X#define FCH$V_CONTIG 0x007
  1595. X#define FCH$M_CONTIG (1 << FCH$V_CONTIG)
  1596. X#define FCH$V_CONTIGB 0x005
  1597. X#define FCH$M_CONTIGB (1 << FCH$V_CONTIGB)
  1598. X#define FCH$V_DIRECTORY 0x00D
  1599. X#define FCH$M_DIRECTORY (1 << FCH$V_DIRECTORY)
  1600. X#define FCH$V_ERASE 0x011
  1601. X#define FCH$M_ERASE (1 << FCH$V_ERASE)
  1602. X#define FCH$V_LOCKED 0x006
  1603. X#define FCH$M_LOCKED (1 << FCH$V_LOCKED)
  1604. X#define FCH$V_MARKDEL 0x00F
  1605. X#define FCH$M_MARKDEL (1 << FCH$V_MARKDEL)
  1606. X#define FCH$V_NOBACKUP 0x001
  1607. X#define FCH$M_NOBACKUP (1 << FCH$V_NOBACKUP)
  1608. X#define FCH$V_NOCHARGE 0x010
  1609. X#define FCH$M_NOCHARGE (1 << FCH$V_NOCHARGE)
  1610. X#define FCH$V_READCHECK 0x003
  1611. X#define FCH$M_READCHECK (1 << FCH$V_READCHECK)
  1612. X#define FCH$V_SPOOL 0x00C
  1613. X#define FCH$M_SPOOL (1 << FCH$V_SPOOL)
  1614. X#define FCH$V_WRITCHECK 0x004
  1615. X#define FCH$M_WRITCHECK (1 << FCH$V_WRITCHECK)
  1616. X#define FCH$V_WRITEBACK 0x002
  1617. X#define FCH$M_WRITEBACK (1 << FCH$V_WRITEBACK)
  1618. X
  1619. Xstruct fchdef  {
  1620. X  unsigned : 1;
  1621. X  unsigned fch$v_nobackup : 1 ;
  1622. X  unsigned fch$v_writeback : 1;
  1623. X  unsigned fch$v_readcheck : 1;
  1624. X  unsigned fch$v_writcheck : 1;
  1625. X  unsigned fch$v_contigb : 1;
  1626. X  unsigned fch$v_locked : 1;
  1627. X  unsigned fch$v_contig : 1;
  1628. X  unsigned : 3;
  1629. X  unsigned fch$v_badacl : 1;
  1630. X  unsigned fch$v_spool : 1;
  1631. X  unsigned fch$v_directory : 1;
  1632. X  unsigned fch$v_badblock : 1;
  1633. X  unsigned fch$v_markdel : 1;
  1634. X  unsigned fch$v_nocharge : 1;
  1635. X  unsigned fch$v_erase : 1;
  1636. X};
  1637. X
  1638. X/*---------------------------------------------------------------------------
  1639. X    fjndef.h
  1640. X  ---------------------------------------------------------------------------*/
  1641. X
  1642. X/* This header file was created by Joe Meadows, and is not copyrighted
  1643. X   in any way. No guarantee is made as to the accuracy of the contents
  1644. X   of this header file. This header file was last modified on Sep. 22th,
  1645. X   1987. (Modified to include this statement) */
  1646. X
  1647. X#define FJN$M_ONLY_RU 1
  1648. X#define FJN$M_RUJNL 2
  1649. X#define FJN$M_BIJNL 4
  1650. X#define FJN$M_AIJNL 8
  1651. X#define FJN$M_ATJNL 16
  1652. X#define FJN$M_NEVER_RU 32
  1653. X#define FJN$M_JOURNAL_FILE 64
  1654. X#define FJN$S_FJNDEF 1
  1655. Xstruct fjndef  {
  1656. X  unsigned fjn$v_only_ru : 1;
  1657. X  unsigned fjn$v_rujnl : 1;
  1658. X  unsigned fjn$v_bijnl : 1;
  1659. X  unsigned fjn$v_aijnl : 1;
  1660. X  unsigned fjn$v_atjnl : 1;
  1661. X  unsigned fjn$v_never_ru : 1;
  1662. X  unsigned fjn$v_journal_file:1;
  1663. X} ;
  1664. END_OF_FILE
  1665.   if test 5511 -ne `wc -c <'vms/VMSmunch.h'`; then
  1666.     echo shar: \"'vms/VMSmunch.h'\" unpacked with wrong size!
  1667.   fi
  1668.   # end of 'vms/VMSmunch.h'
  1669. fi
  1670. if test -f 'vms/vaxclib.opt' -a "${1}" != "-c" ; then 
  1671.   echo shar: Will not clobber existing file \"'vms/vaxclib.opt'\"
  1672. else
  1673.   echo shar: Extracting \"'vms/vaxclib.opt'\" \(30 characters\)
  1674.   sed "s/^X//" >'vms/vaxclib.opt' <<'END_OF_FILE'
  1675. Xsys$library:vaxcrtl.exe/share
  1676. END_OF_FILE
  1677.   if test 30 -ne `wc -c <'vms/vaxclib.opt'`; then
  1678.     echo shar: \"'vms/vaxclib.opt'\" unpacked with wrong size!
  1679.   fi
  1680.   # end of 'vms/vaxclib.opt'
  1681. fi
  1682. echo shar: End of archive 9 \(of 11\).
  1683. cp /dev/null ark9isdone
  1684. MISSING=""
  1685. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  1686.     if test ! -f ark${I}isdone ; then
  1687.     MISSING="${MISSING} ${I}"
  1688.     fi
  1689. done
  1690. if test "${MISSING}" = "" ; then
  1691.     echo You have unpacked all 11 archives.
  1692.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1693. else
  1694.     echo You still must unpack the following archives:
  1695.     echo "        " ${MISSING}
  1696. fi
  1697. exit 0
  1698. exit 0 # Just in case...
  1699.