home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume29 / unzip / part10 < prev    next >
Encoding:
Text File  |  1992-04-02  |  54.2 KB  |  1,690 lines

  1. Newsgroups: comp.sources.misc
  2. From: info-zip@cs.ucla.edu (Info-Zip)
  3. Subject:  v29i040:  unzip - Info-ZIP's portable UnZip v4.2, Part10/12
  4. Message-ID: <1992Apr3.063346.29189@sparky.imd.sterling.com>
  5. X-Md4-Signature: 1ed40bf265a4e8152deea0772169eba1
  6. Date: Fri, 3 Apr 1992 06:33:46 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: info-zip@cs.ucla.edu (Info-Zip)
  10. Posting-number: Volume 29, Issue 40
  11. Archive-name: unzip/part10
  12. Environment: Unix, VMS, OS/2, MS-DOS, Amiga, Macintosh
  13. Supersedes: unzip, Volume 19, Issues 96-101
  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:  AMIGA/utime.c ATARI/AtariST.pat History.420
  22. #   MSDOS/makefile.cr.uu MSDOS/makefile.uu OS2/dosname.c OS2/ship.dif
  23. #   VMS/crypt/make_unzip_gcc.com match.c unreduce.c unshrink.c
  24. # Wrapped by kent@sparky on Mon Mar 30 01:45:55 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 10 (of 12)."'
  28. if test -f 'AMIGA/utime.c' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'AMIGA/utime.c'\"
  30. else
  31.   echo shar: Extracting \"'AMIGA/utime.c'\" \(3993 characters\)
  32.   sed "s/^X//" >'AMIGA/utime.c' <<'END_OF_FILE'
  33. X/* utime.c */
  34. X
  35. X#include <string.h>
  36. X#include <time.h>
  37. X#include <errno.h>
  38. X
  39. X#include <exec/types.h>
  40. X#include <exec/memory.h>
  41. X#include <libraries/dos.h>
  42. X#include <libraries/dosextens.h>
  43. X#include <proto/exec.h>
  44. X#include <proto/dos.h>
  45. X
  46. Xextern LONG sendpkt(struct MsgPort *,LONG,LONG[],LONG);
  47. X
  48. Xextern int _OSERR;
  49. X
  50. X#ifndef SUCCESS
  51. X#define SUCCESS (-1L)
  52. X#define FAILURE 0L
  53. X#endif
  54. X
  55. Xint utime(char *file, time_t timep[]);
  56. X
  57. Xint utime(file,timep)
  58. Xchar *file;
  59. Xtime_t timep[];
  60. X{
  61. X
  62. X    struct DateStamp date;
  63. X    struct MsgPort *taskport;
  64. X    struct FileLock *dirlock, *lock;
  65. X    struct FileInfoBlock *fib;
  66. X
  67. X    LONG argv[4];
  68. X    UBYTE *ptr;
  69. X    long ret;
  70. X
  71. X/*  timep[1] -= timezone;   */
  72. X
  73. X    date.ds_Days = timep[1] / 86400;
  74. X    date.ds_Minute = (timep[1] - (date.ds_Days * 86400))/60;
  75. X    date.ds_Tick = ( timep[1] - (date.ds_Days * 86400) -
  76. X                                (date.ds_Minute * 60)
  77. X                   ) * TICKS_PER_SECOND;
  78. X    date.ds_Days -= ((8*365+2));
  79. X
  80. X    if( !(taskport = (struct MsgPort *)DeviceProc(file)) )
  81. X    {
  82. X        errno = ESRCH;          /* no such process */
  83. X        _OSERR = IoErr();
  84. X        return(-1);
  85. X    }
  86. X
  87. X    if( !(lock = (struct FileLock *)Lock(file,SHARED_LOCK)) )
  88. X    {
  89. X        errno = ENOENT;         /* no such file */
  90. X        _OSERR = IoErr();
  91. X        return(-1);
  92. X    }
  93. X
  94. X    if( !(fib = (struct FileInfoBlock *)AllocMem(
  95. X        (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
  96. X    {
  97. X        errno = ENOMEM;         /* insufficient memory */
  98. X        UnLock((BPTR)lock);
  99. X        return(-1);
  100. X    }
  101. X
  102. X    if( Examine((BPTR)lock,fib)==FAILURE )
  103. X    {
  104. X        errno = EOSERR;         /* operating system error */
  105. X        _OSERR = IoErr();
  106. X        UnLock((BPTR)lock);
  107. X        FreeMem((char *)fib,(long)sizeof(*fib));
  108. X        return(-1);
  109. X    }
  110. X
  111. X    dirlock = (struct FileLock *)ParentDir((BPTR)lock);
  112. X    ptr = (UBYTE *)AllocMem(64L,MEMF_PUBLIC);
  113. X    strcpy((ptr+1),fib->fib_FileName);
  114. X    *ptr = strlen(fib->fib_FileName);
  115. X    FreeMem((char *)fib,(long)sizeof(*fib));
  116. X    UnLock((BPTR)lock);
  117. X
  118. X    /* now fill in argument array */
  119. X
  120. X    argv[0] = NULL;
  121. X    argv[1] = (LONG)dirlock;
  122. X    argv[2] = (LONG)&ptr[0] >> 2;
  123. X    argv[3] = (LONG)&date;
  124. X
  125. X    errno = ret = sendpkt(taskport,34L,argv,4L);
  126. X
  127. X    FreeMem(ptr,64L);
  128. X    UnLock((BPTR)dirlock);
  129. X
  130. X    return(0);
  131. X
  132. X} /* utime() */
  133. X/*  sendpkt.c
  134. X *  by A. Finkel, P. Lindsay, C. Sheppner
  135. X *  returns Res1 of the reply packet
  136. X */
  137. X/*
  138. X#include <exec/types.h>
  139. X#include <exec/memory.h>
  140. X#include <libraries/dos.h>
  141. X#include <libraries/dosextens.h>
  142. X#include <proto/exec.h>
  143. X#include <proto/dos.h>
  144. X*/
  145. X
  146. XLONG sendpkt(pid,action,args,nargs)
  147. Xstruct MsgPort *pid;            /* process identifier (handler message port) */
  148. XLONG action,                    /* packet type (desired action)              */
  149. X     *args,                     /* a pointer to argument list                */
  150. X     nargs;                     /* number of arguments in list               */
  151. X{
  152. X
  153. X    struct MsgPort *replyport;
  154. X    struct StandardPacket *packet;
  155. X    LONG count, *pargs, res1;
  156. X
  157. X    replyport = (struct MsgPort *)CreatePort(0L,0L);
  158. X    if( !replyport ) return(NULL);
  159. X
  160. X    packet = (struct StandardPacket *)AllocMem(
  161. X            (long)sizeof(struct StandardPacket),MEMF_PUBLIC|MEMF_CLEAR);
  162. X    if( !packet )
  163. X    {
  164. X        DeletePort(replyport);
  165. X        return(NULL);
  166. X    }
  167. X
  168. X    packet->sp_Msg.mn_Node.ln_Name  = (char *)&(packet->sp_Pkt);
  169. X    packet->sp_Pkt.dp_Link          = &(packet->sp_Msg);
  170. X    packet->sp_Pkt.dp_Port          = replyport;
  171. X    packet->sp_Pkt.dp_Type          = action;
  172. X
  173. X    /* copy the args into the packet */
  174. X    pargs = &(packet->sp_Pkt.dp_Arg1);      /* address of 1st argument */
  175. X    for( count=0; count<nargs; count++ )
  176. X        pargs[count] = args[count];
  177. X
  178. X    PutMsg(pid,(struct Message *)packet);   /* send packet */
  179. X
  180. X    WaitPort(replyport);
  181. X    GetMsg(replyport);
  182. X
  183. X    res1 = packet->sp_Pkt.dp_Res1;
  184. X
  185. X    FreeMem((char *)packet,(long)sizeof(*packet));
  186. X    DeletePort(replyport);
  187. X
  188. X    return(res1);
  189. X
  190. X} /* sendpkt() */
  191. END_OF_FILE
  192.   if test 3993 -ne `wc -c <'AMIGA/utime.c'`; then
  193.     echo shar: \"'AMIGA/utime.c'\" unpacked with wrong size!
  194.   fi
  195.   # end of 'AMIGA/utime.c'
  196. fi
  197. if test -f 'ATARI/AtariST.pat' -a "${1}" != "-c" ; then 
  198.   echo shar: Will not clobber existing file \"'ATARI/AtariST.pat'\"
  199. else
  200.   echo shar: Extracting \"'ATARI/AtariST.pat'\" \(5779 characters\)
  201.   sed "s/^X//" >'ATARI/AtariST.pat' <<'END_OF_FILE'
  202. X*** mapname.c.orig    Fri Feb  7 22:56:19 1992
  203. X--- mapname.c    Fri Feb  7 23:06:32 1992
  204. X***************
  205. X*** 209,215 ****
  206. X--- 209,219 ----
  207. X  #ifdef MACOS
  208. X                      strcat(cdp, ":");
  209. X  #else /* !MACOS */
  210. X+ #if    ATARI_ST
  211. X+                     strcat(cdp, "\\");
  212. X+ #else  /* !ATARI_ST */
  213. X                      strcat(cdp, "/");
  214. X+ #endif /* ?ATARI_ST */
  215. X  #endif /* ?MACOS */
  216. X  #endif /* ?VMS */
  217. X                  }               /***** FALL THROUGH to ':' case  **** */
  218. X*** unzip.c.orig    Fri Feb  7 22:56:20 1992
  219. X--- unzip.c    Fri Feb  7 23:17:06 1992
  220. X***************
  221. X*** 119,124 ****
  222. X--- 119,131 ----
  223. X  byte *stack;
  224. X  #else
  225. X  byte suffix_of[HSIZE + 1];      /* also s-f length_nodes (smaller) */
  226. X+ #if    ATARI_ST
  227. X+ /* now this is the third time I had to fix this...
  228. X+  * does NOBODY understand that you C_A_N_N_O_T reuse a byte array
  229. X+  * for anything of larger type because of possible alignment problems?
  230. X+  */
  231. X+ int    HadToAlignStackElseItCrashed;
  232. X+ #endif
  233. X  byte stack[HSIZE + 1];          /* also s-f distance_nodes (smaller) */
  234. X  #endif
  235. X  
  236. X*** unzip.h.orig    Fri Feb  7 22:56:21 1992
  237. X--- unzip.h    Sat Feb  8 00:47:55 1992
  238. X***************
  239. X*** 27,34 ****
  240. X  #  if defined(THINK_C) || defined(MPW) /* for Macs */
  241. X  #    include <stddef.h>
  242. X  #  else
  243. X! #    include <sys/types.h> /* off_t, time_t, dev_t, ... */
  244. X! #    include <sys/stat.h>  /* Everybody seems to need this. */
  245. X  #  endif
  246. X  #endif                   /*   This include file defines
  247. X                            *     #define S_IREAD 0x0100  (owner may read)
  248. X--- 27,39 ----
  249. X  #  if defined(THINK_C) || defined(MPW) /* for Macs */
  250. X  #    include <stddef.h>
  251. X  #  else
  252. X! #    ifdef ATARI_ST
  253. X! #      include <stddef.h>
  254. X! #      define __STDC__ 1 /* see note below */
  255. X! #    else
  256. X! #      include <sys/types.h> /* off_t, time_t, dev_t, ... */
  257. X! #      include <sys/stat.h>  /* Everybody seems to need this. */
  258. X! #    endif
  259. X  #  endif
  260. X  #endif                   /*   This include file defines
  261. X                            *     #define S_IREAD 0x0100  (owner may read)
  262. X***************
  263. X*** 71,76 ****
  264. X--- 76,95 ----
  265. X      And now, our MS-DOS and OS/2 corner:
  266. X    ---------------------------------------------------------------------------*/
  267. X  
  268. X+ /*
  269. X+  * How comes poor little Atari ST 's playing with these boys of the 'hood ?
  270. X+  *
  271. X+  * For everybody: TURBO C for the Atari ST also defines __TURBOC__
  272. X+  *                You (yes YOU!!) may NOT RELY ON __TURBOC__ to tell
  273. X+  *                that this is MSDOS or whatever!
  274. X+  */
  275. X+ #ifdef ATARI_ST
  276. X+ /* KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE    */
  277. X+ #undef __TURBOC__
  278. X+ #endif
  279. X+ 
  280. X+ /* FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME  */
  281. X+ /*       vvvvvv    */
  282. X  #ifdef __TURBOC__
  283. X  #  define DOS_OS2             /* Turbo C under DOS, MSC under DOS or OS2    */
  284. X  #  include <sys/timeb.h>      /* for structure ftime                        */
  285. X***************
  286. X*** 123,132 ****
  287. X  #    ifdef MTS
  288. X  #      include <sys/file.h>     /* MTS uses this instead of fcntl.h */
  289. X  #    else
  290. X! #      include <fcntl.h>
  291. X  #    endif
  292. X  #  endif
  293. X  #endif
  294. X  /*
  295. X   *   fcntl.h (above):   This include file defines
  296. X   *                        #define O_BINARY 0x8000  (no cr-lf translation)
  297. X--- 142,162 ----
  298. X  #    ifdef MTS
  299. X  #      include <sys/file.h>     /* MTS uses this instead of fcntl.h */
  300. X  #    else
  301. X!      /*
  302. X!       * FIXME:
  303. X!       *
  304. X!       * Again, just by not being VMS, V7 or MTS, the little Atari ST
  305. X!       * winds up here (and everybody else too). WHOEVER NEEDS this stuff,
  306. X!       * DECLARE YOURSELF and DONT rely on this kind of negative logic!
  307. X!       */
  308. X! #      ifndef ATARI_ST
  309. X!          /* KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE    */
  310. X! #        include <fcntl.h>
  311. X! #      endif
  312. X  #    endif
  313. X  #  endif
  314. X  #endif
  315. X+ 
  316. X  /*
  317. X   *   fcntl.h (above):   This include file defines
  318. X   *                        #define O_BINARY 0x8000  (no cr-lf translation)
  319. X***************
  320. X*** 159,164 ****
  321. X--- 189,203 ----
  322. X      And finally, some random extra stuff:
  323. X    ---------------------------------------------------------------------------*/
  324. X  
  325. X+ /* FIXME:
  326. X+  *
  327. X+  * As used by Turbo C (at least for the Atari ST),
  328. X+  * __STDC__ means that the compiler has been RESTRICTED to standard ANSI C.
  329. X+  *
  330. X+  * What we want here is: do we have a compiler which has ANSI C prototypes
  331. X+  * and includes.
  332. X+  * So better use somthing like: ANSI_C or so...
  333. X+  */
  334. X  #ifdef __STDC__
  335. X  #  include <stdlib.h>      /* standard library prototypes, malloc(), etc. */
  336. X  #  include <string.h>      /* defines strcpy, strcmp, memcpy, etc. */
  337. X***************
  338. X*** 169,174 ****
  339. X--- 208,245 ----
  340. X  #endif
  341. X  
  342. X  
  343. X+ /* Incidently, for Turbo C on the Atari ST we just order the following items:
  344. X+  */
  345. X+ #if ATARI_ST
  346. X+ #  include <time.h>
  347. X+ /* the following includes are really specific for Turbo C 2.0 !!      */
  348. X+ #  include <ext.h>      /* this gives us stat()                         */
  349. X+ #  include <tos.h>      /* OS specific functions (Fdup)                 */
  350. X+ #  define MSDOS         1               /* from here on. */
  351. X+ #  define DOS_OS2       1               /* from here on. */
  352. X+ #  define __TURBOC__    1               /* from here on. */
  353. X+ /*
  354. X+  * FIXME:
  355. X+  * Although the Atari ST (MC68000) and Turbo C use 16 bit ints,
  356. X+  * we have to use NOTINT16, since its an high-endian, and therefore
  357. X+  * we cannot read the intel little-endian structs.
  358. X+  * For that reason, NOTINT16 is another misnomer.
  359. X+  */
  360. X+ #  define NOTINT16      1
  361. X+ 
  362. X+ #  ifndef S_IFMT
  363. X+ #  define S_IFMT        (S_IFCHR|S_IFREG|S_IFDIR)
  364. X+ #  endif
  365. X+ 
  366. X+ #  ifndef O_BINARY
  367. X+ #  define O_BINARY 0
  368. X+ #  endif
  369. X+ 
  370. X+ /* replace dup by corresponding tos function  */
  371. X+ #  define       dup             Fdup
  372. X+ #  define       mkdir           Dcreate
  373. X+ 
  374. X+ #endif
  375. X  
  376. X  
  377. X  
  378. END_OF_FILE
  379.   if test 5779 -ne `wc -c <'ATARI/AtariST.pat'`; then
  380.     echo shar: \"'ATARI/AtariST.pat'\" unpacked with wrong size!
  381.   fi
  382.   # end of 'ATARI/AtariST.pat'
  383. fi
  384. if test -f 'History.420' -a "${1}" != "-c" ; then 
  385.   echo shar: Will not clobber existing file \"'History.420'\"
  386. else
  387.   echo shar: Extracting \"'History.420'\" \(4666 characters\)
  388.   sed "s/^X//" >'History.420' <<'END_OF_FILE'
  389. XUnZip version 4.2, 20 March 1992
  390. X
  391. XNew features, you betcha:
  392. X
  393. X - directories now created by default (was only with "-d" option); new "-j"
  394. X    option to junk directory names [CN]
  395. X - "-n" option for never overwriting existing files (opposite of -o) [CN]
  396. X - "-u" option (update: at last!) from Kai Uwe Rommel, just like zip's
  397. X    update option, but in reverse
  398. X - "-f" option (freshen) to complement -u; VMS support for both [CN]
  399. X - option to rename extracted file if already exists (another much-wanted
  400. X    improvement!) [Kai]
  401. X - option to set "-n" (never overwrite) in middle of processing zipfile [CN]
  402. X - (uncompressed) symbolic links extracted under Unix [Mark Adler]
  403. X - international date formats for DOS, OS/2 [Jon Saxton]
  404. X - trailing ^Z now removed with -a option under Unix/VMS/etc. [CN]
  405. X - decryption (uses existing crypt.c from zip 1.0) [big thanks to Mark and
  406. X    Jean-loup!]
  407. X - OS/2:  longnames now saved into EA DATA. SF on FAT disk [Kai Uwe Rommel]
  408. X - OS/2 2.0:  IBM C Set/2 and GNU C/emx 32-bit compilers supported [Kai]
  409. X - OS/2, MS-DOS:  "-b" option (blanks) to allow writing of filenames with
  410. X    blanks (like EA DATA. SF, above) on FAT disks [CN]
  411. X - Mac:  Aztec C port; new makefiles for Aztec C and MPW C [Antoine Verheijen]
  412. X - Amiga:  several compilers supported (possibly--not tested) [Paul Wells,
  413. X    Georg Sassen]
  414. X - Atari:  patches to UnZip 4.1 + support files [Martin Schulz]
  415. X - VMS:  new makefile command files for GNU C [Mike Freeman]
  416. X - VMS:  major improvements to handling of VMS file attributes [Igor
  417. X    Mandrichenko]
  418. X - major restructuring of extraction code, prompted by rename and VMS patches
  419. X    [CN, Igor Mandrichenko]
  420. X - usage info goes to stdout if just "unzip" specified; otherwise to stderr
  421. X    as before (allows redirection under MS-DOS) [CN]
  422. X - testing info with quiet flag (unzip -tq) identifies zipfile being tested and
  423. X    reports number of files skipped--for background or batch processing [CN]
  424. X - several new systems supported, including Minix (type "make list") [various]
  425. X - new ZipInfo [CN] and Ship [Mark] utility programs
  426. X - new (but incomplete) COPYING and CONTRIBS files to give credit where
  427. X    credit due (let us know if you're not in there and should be).
  428. X - assorted other new files (like BUGS, so you know what's still screwed up :-)
  429. X
  430. XBugs fixed:
  431. X
  432. X - HP, others:  FILENAME_MAX=14, not 256 or whatever:  paths truncated [CN,
  433. X    with much prodding from Jean-loup Gailly :-) ]
  434. X - VMS:  filenames longer than 31 characters get truncated? [seems to have
  435. X    gotten fixed by itself, or else side effect from FILENAME_MAX]
  436. X - check expected offset vs. actual and compensate (bogus MacBinary headers,
  437. X    etc.); indicate file transfer errors [CN, Jean-loup]
  438. X - ifdef sco, skip <param.h> (redefinitions) [CN]
  439. X - ifdef typedef byte:  some systems (just Bull?) have predefined [CN]
  440. X - Unix:  blanks no longer converted to underlines [CN, Mark]
  441. X - DOS (& OS/2?):  fatal write error if file to be unzipped is read-only [Kai?]
  442. X - DOS (& OS/2?):  if out of disk space, unzip hangs hard [CN, usually works:
  443. X    see comments in BUGS, however!]
  444. X - DOS:  decryption with Borland C was broken [David Kirschbaum]
  445. X - DOS & OS/2:  dos2unix() was not used; commented out [David]
  446. X - decryption key was doubly defined [David]
  447. X - file creation (actually deletion) error if file exists but not owned by us;
  448. X    try unlinking, report error [Cliff Stanford]
  449. X - VMS:  MMS file needs an odd space [Joel Aycock]
  450. X - PK signature strings encoded so unzip executable doesn't look like a zipfile
  451. X    [CN]
  452. X - Makefile and code simplified to remove non-NOTINT16 stuff (fewer false bug
  453. X    reports that way) [CN]
  454. X - changed all ?? and ??? comments to avoid possible ANSI trigraph warnings
  455. X    (except one string in zipinfo.c) [CN]
  456. X - Turbo C++ 1.0:  fixed problem with missing _MAX_PATH [CN]
  457. X
  458. X==================
  459. X
  460. XThese changes occurred in various versions, from 4.10a to 4.10x and 4.20a to
  461. X4.20x.  UnZip 4.11 was an incomplete (and somewhat incorrect) beta version.
  462. XAnyway, I have no idea what versions correspond to what features (except that
  463. Xdecryption appeared in 4.20n); it's not particularly relevant, since they
  464. Xwere all internal versions anyway.
  465. X
  466. XMore important is the fact that this list undoubtedly leaves out many bug-
  467. Xfixes and even some features which have been added; apologies to anyone who
  468. Xmay inadvertently been slighted.  Let us know, eh?  It's been too long...
  469. X
  470. XGreg Roelofs (a.k.a. Cave Newt)
  471. X
  472. X==================
  473. X
  474. XAnd now, over to our fearless coordinator, David "Death on Skis" Kirschbaum:
  475. X
  476. XHelloooo, David...Earth to David...yoooo hooooo....   Hmmm...must be out for
  477. Xthe moment.  We'll check back in with him for the next release!
  478. END_OF_FILE
  479.   if test 4666 -ne `wc -c <'History.420'`; then
  480.     echo shar: \"'History.420'\" unpacked with wrong size!
  481.   fi
  482.   # end of 'History.420'
  483. fi
  484. if test -f 'MSDOS/makefile.cr.uu' -a "${1}" != "-c" ; then 
  485.   echo shar: Will not clobber existing file \"'MSDOS/makefile.cr.uu'\"
  486. else
  487.   echo shar: Extracting \"'MSDOS/makefile.cr.uu'\" \(4938 characters\)
  488.   sed "s/^X//" >'MSDOS/makefile.cr.uu' <<'END_OF_FILE'
  489. Xbegin 644 MSDOS/makefile.cr
  490. XM(R @36%K969I;&4N1$]3(" @($UA:V5F:6QE(&9O<B!5;EII<" T+G@L('5S
  491. XM:6YG($UI8W)O<V]F="!#($-O;7!I;&5R(#4N, T*(R @(%MC<GEP=%T@(" @
  492. XM(" @(&%N9"!-:6-R;W-O9G0@34%+12 T+C R("AO<B!L871E<B!V97)S:6]N
  493. XM<RDL(&]R($)O<FQA;F0-"B,@("!;;F\@:6YF;&%T95T@("!4=7)B;R!#(#(N
  494. XM,"X@($-O;6UE;G0O=6YC;VUM96YT('1H92!A<'!R;W!R:6%T92!S96-T:6]N
  495. XM<PT*(R @(" @(" @(" @(" @(" @(&)E;&]W(&%N9"]O<B!E9&ET('1H92!)
  496. XM;F-L=61E(&%N9"!,:6)R87)Y('!A=&AS+"!I9B -"B,@(" @(" @(" @(" @
  497. XM(" @("!N96-E<W-A<GDN("!&;W(@0F]R;&%N9"!#*RL@=7-E('1H92!N97=E
  498. XM<B!P<F]J96-T(&9I;&5S#0HC(" @(" @(" @(" @(" @(" @=VAI8V@@87)E
  499. XM(&%L<V\@:6YC;'5D960@*&)U="!R96%D('1H92!C;VUM96YT<R!I;B!#;VYT
  500. XM96YT<RDN#0HC#0HC(" @(" @(" @(" @(" @(" @57-E<G,@;V8@35-#(#8N
  501. XM,"!A;F0@3DU!2T4@<VAO=6QD('5S92!T:&4@<F5G=6QA<B!M86ME9FEL90T*
  502. XM(R @(" @(" @(" @(" @(" @(&)Y('1Y<&EN9R B;FUA:V4@;7-C7V1O<R(@
  503. XM;W(@(FYM86ME(&US8U]O<S(B+@T*(PT*(R @3F]T97,Z(" H,2D@56YC;VUM
  504. XM96YT('1H92!A<'!R;W!R:6%T92!C;VUP:6QE<B]/4R!O<'1I;VYS(&)E;&]W
  505. XM+@T*(R @(" @(" @(" H,BD@0VAA;F=E('1H92!V87)I;W5S($-&3$%'4R!A
  506. XM<R!A<'!R;W!R:6%T92!F;W(@>6]U<B!E;G9I<F]N;65N= T*(R @(" @(" @
  507. XM(" @(" @86YD(&QI8G)A<FEE<RX-"B,@(" @(" @(" @(" @($9O<B!-4T,Z
  508. XM(" M05,@<W!E8VEF:65S('-M86QL+6UO9&5L(&QI8G)A<GDL(&%N9" M1S(@
  509. XM96YA8FQE<PT*(R @(" @(" @(" @(" @.# R.#8@:6YS=')U8W1I;VYS+B @
  510. XM475I8VM#('5S97,@=&AE(&UE9&EU;2!M96UO<GD@;6]D96PL(&%S#0HC(" @
  511. XM(" @(" @(" @("!)(')E8V%L;" H+4%-(&%N9"]O<B M<6,I+B @5&AE(")!
  512. XM3$PZ(B!T87)G970@:7,@=7-E9"!B>2!-4T,-"B,@(" @(" @(" @(" @(#8N
  513. XM,"!W:71H(&]L9"!-04M%+B @6T)O($MU;&QM87)=#0HC(" @(" @(" @("@S
  514. XM*2!296YA;64@=&AI<R!F:6QE('1O(")U;GII<"(@;VX@82!$3U,@<WES=&5M
  515. XM.R!T>7!I;F<@(FUA:V4-"B,@(" @(" @(" @(" @('5N>FEP(B!W:71H($U3
  516. XM0R H;W(@(FUA:V4@+69U;GII<"(@=VET:"!40RD@=&AE;B!B=6EL9',-"B,@
  517. XM(" @(" @(" @(" @('5N>FEP+F5X92X-"B,-"B,@($=R96<@4F]E;&]F<PT*
  518. XM(PT*#0HC(R,C(R,C(R,C(R,C(R,C(R,C(R,-"B,@34%#4D\@1$5&24Y)5$E/
  519. XM3E,@(PT*(R,C(R,C(R,C(R,C(R,C(R,C(R,C#0H-"B,@0F]R;&%N9"!#*RL@
  520. XM,BXP(&9O<B!-4RU$3U,Z#0HC("TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B,@
  521. XM8F-C(&ES('5S=6%L;'D@8V]N9FEG=7)E9"!W:71H("U)(&%N9" M3"!S970@
  522. XM87!P<F]P<FEA=&5L>2XN+@T*(R!#0R ](&)C8PT*(R!#1DQ!1U,@/2 M;7,@
  523. XM+4\@+5H@+41#4EE05 T*(R!)3D-,(#T@(RU)8SI<8F]R;&%N9%QI;F-L=61E
  524. XM#0HC($Q$(#T@8F-C#0HC($Q$1DQ!1U,@/2 M;7,@(RU,8SI<8F]R;&%N9%QL
  525. XM:6(-"B,@3$1&3$%'4S(@/0T*#0HC(%1U<F)O($,@,BXP(&9O<B!-4RU$3U,Z
  526. XM#0HC("TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B,@=&-C(&ES('5S=6%L;'D@
  527. XM8V]N9FEG=7)E9"!W:71H("U)(&%N9" M3"!S970@87!P<F]P<FEA=&5L>2XN
  528. XM+@T*(R!#0R ]('1C8PT*(R!#1DQ!1U,@/2 M;7,@+4\@+5H@+41#4EE05 T*
  529. XM(R!)3D-,(#T@(RU)8SI<='5R8F]C7&EN8VQU9&4-"B,@3$0@/2!T8V,-"B,@
  530. XM3$1&3$%'4R ]("UM<R C+4QC.EQT=7)B;V-<;&EB#0HC($Q$1DQ!1U,R(#T-
  531. XM"@T*(R!-4T,@9F]R($U3+41/4SH-"B,@+2TM+2TM+2TM+2TM+2T-"D-#(#T@
  532. XM8VP-"D-&3$%'4R ]("U!4R M3W@@+4<R("U$0U)94%0@(",@861D("U&4&DX
  533. XM-R!I9B!C;W!R;V-E<W-O<B!I;G-T86QL960-"DE.0TP@/0T*3$0@/2!L:6YK
  534. XM#0I,1$9,04=3(#T@+TY/20T*3$1&3$%'4S(@/2 L)"H[#0H-"B,@35-#('=I
  535. XM=&@@4T1+(&9O<B!/4R\R.B @(" @(",@=&AI<R!T87)G970@;F\@;&]N9V5R
  536. XM('-U<'!O<G1E9#H@('5S92!-86ME9FEL90T*(R M+2TM+2TM+2TM+2TM+2TM
  537. XM+2TM+2T@(" @(" @(R H:68@>6]U($U54U0@=7-E('1H:7,@=&%R9V5T+"!A
  538. XM9&0@9&]S;F%M92YO8FH-"B,@0T,@/2!C;" @(" @(" @(" @(" @(" @(" @
  539. XM(",@("!T;R!/0DI3(&%N9"!T:&4@9&5P96YD96YC:65S(&QI;F4@8F5L;W<I
  540. XM#0HC($-&3$%'4R ]("U!4R M3W@@+4<R("U$3U,R("U$0U)94%0-"B,@24Y#
  541. XM3" ]("U)8SI<;35<:6YC;'5D92 @(" @(",@9F]R(&5X86UP;&4-"B,@3$0@
  542. XM/2!L:6YK#0HC($Q$1DQ!1U,@/2 O3D])#0HC(%)-(#T@9&5L#0HC($Q)0D,@
  543. XM/2!C.EQM-5QL:6)<<%QS;&EB8V4-"B,@3$E"1" ](&,Z7&TU7&QI8EQD;W-C
  544. XM86QL<RYL:6(-"B,@3$E"02 ](&,Z7&TU7&QI8EQA<&DN;&EB#0H-"D]"2E,@
  545. XM/2!U;GII<"YO8FH@8W)Y<'0N;V)J(&5X=')A8W0N;V)J(&9I;&5?:6\N;V)J
  546. XM(&UA<&YA;64N;V)J(&UA=&-H+F]B:EP-"B @(" @("!M:7-C+F]B:B!U;FEM
  547. XM<&QO9"YO8FH@=6YR961U8V4N;V)J('5N<VAR:6YK+F]B:@T*#0H-"B,C(R,C
  548. XM(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C#0HC
  549. XM($)!4TE#($-/35!)3$4@24Y35%)50U1)3TY3($%.1"!$15!%3D1%3D-)15,@
  550. XM(PT*(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
  551. XM(R,C(R,-"@T*04Q,"3H@=6YZ:7 N97AE#0H-"BYC+F]B:CH-"B @(" @(" @
  552. XM)"A#0RD@+6,@)"A#1DQ!1U,I("0H24Y#3"D@)"HN8PT*#0IU;GII<"YO8FHZ
  553. XM(" @(" @=6YZ:7 N8R!U;GII<"YH#0H-"F-R>7!T+F]B:CH@(" @("!C<GEP
  554. XM="YC('5N>FEP+F@@>FEP+F@-"@T*97AT<F%C="YO8FHZ(" @(&5X=')A8W0N
  555. XM8R!U;GII<"YH#0H-"F9I;&5?:6\N;V)J.B @("!F:6QE7VEO+F,@=6YZ:7 N
  556. XM: T*#0IM87!N86UE+F]B:CH@(" @;6%P;F%M92YC('5N>FEP+F@-"@T*;6%T
  557. XM8V@N;V)J.B @(" @(&UA=&-H+F,@=6YZ:7 N: T*#0IM:7-C+F]B:CH@(" @
  558. XM(" @;6ES8RYC('5N>FEP+F@-"@T*=6YI;7!L;V0N;V)J.B @('5N:6UP;&]D
  559. XM+F,@=6YZ:7 N: T*#0IU;G)E9'5C92YO8FHZ(" @=6YR961U8V4N8R!U;GII
  560. XM<"YH#0H-"G5N<VAR:6YK+F]B:CH@("!U;G-H<FEN:RYC('5N>FEP+F@-"@T*
  561. XM(R!$3U,Z#0HC("TM+0T*=6YZ:7 N97AE.B @(" @)"A/0DI3*0T*(" @(" @
  562. XM(" D*$Q$*2 D*$Q$1DQ!1U,I("0H3T)*4RD@)"A,1$9,04=3,BD-"@T*(R!/
  563. XM4R\R.@T*(R M+2TM#0HC('5N>FEP=&UP+F5X93H@("0H3T)*4RD-"B,@(" @
  564. XM(" @(" D*$Q$*2 D*$Q$1DQ!1U,I("0H3T)*4RDL("0J+F5X92PL)"A,24)#
  565. XM*2LD*$Q)0D0I.PT*(PT*(R!U;GII<"YE>&4Z(" @("!U;GII<'1M<"YE>&4-
  566. XM"B,@(" @(" @("!B:6YD('5N>FEP=&UP+F5X92 D*$Q)0D0I("0H3$E"02D@
  567. XM+6\@=6YZ:7 N97AE#0HC(" @(" @(" @)"A232D@=6YZ:7!T;7 N97AE#0HC
  568. XM(" @(" @(" @)"A232D@*BYO8FH-"B,@(" @(" @(" D*%)-*2 J+FUA< T*
  569. X!&B @
  570. Xend
  571. END_OF_FILE
  572.   if test 4938 -ne `wc -c <'MSDOS/makefile.cr.uu'`; then
  573.     echo shar: \"'MSDOS/makefile.cr.uu'\" unpacked with wrong size!
  574.   else
  575.     echo shar: Uudecoding \"'MSDOS/makefile.cr.uu'\"
  576.     cat MSDOS/makefile.cr.uu | uudecode
  577.     if [ -f MSDOS/makefile.cr.uu ]; then
  578.        rm MSDOS/makefile.cr.uu
  579.     fi
  580.   fi
  581.   # end of 'MSDOS/makefile.cr.uu'
  582. fi
  583. if test -f 'MSDOS/makefile.uu' -a "${1}" != "-c" ; then 
  584.   echo shar: Will not clobber existing file \"'MSDOS/makefile.uu'\"
  585. else
  586.   echo shar: Extracting \"'MSDOS/makefile.uu'\" \(4815 characters\)
  587.   sed "s/^X//" >'MSDOS/makefile.uu' <<'END_OF_FILE'
  588. Xbegin 644 MSDOS/makefile
  589. XM(R @36%K969I;&4N1$]3(" @($UA:V5F:6QE(&9O<B!5;EII<" T+G@L('5S
  590. XM:6YG($UI8W)O<V]F="!#($-O;7!I;&5R(#4N, T*(R @(%MN;R!C<GEP=%T@
  591. XM(" @(&%N9"!-:6-R;W-O9G0@34%+12 T+C R("AO<B!L871E<B!V97)S:6]N
  592. XM<RDL(&]R($)O<FQA;F0-"B,@("!;;F\@:6YF;&%T95T@("!4=7)B;R!#(#(N
  593. XM,"X@($-O;6UE;G0O=6YC;VUM96YT('1H92!A<'!R;W!R:6%T92!S96-T:6]N
  594. XM<PT*(R @(" @(" @(" @(" @(" @(&)E;&]W(&%N9"]O<B!E9&ET('1H92!)
  595. XM;F-L=61E(&%N9"!,:6)R87)Y('!A=&AS+"!I9B -"B,@(" @(" @(" @(" @
  596. XM(" @("!N96-E<W-A<GDN("!&;W(@0F]R;&%N9"!#*RL@=7-E('1H92!N97=E
  597. XM<B!P<F]J96-T(&9I;&5S#0HC(" @(" @(" @(" @(" @(" @=VAI8V@@87)E
  598. XM(&%L<V\@:6YC;'5D960@*&)U="!R96%D('1H92!C;VUM96YT<R!I;B!#;VYT
  599. XM96YT<RDN#0HC#0HC(" @(" @(" @(" @(" @(" @57-E<G,@;V8@35-#(#8N
  600. XM,"!A;F0@3DU!2T4@<VAO=6QD('5S92!T:&4@<F5G=6QA<B!M86ME9FEL90T*
  601. XM(R @(" @(" @(" @(" @(" @(&)Y('1Y<&EN9R B;FUA:V4@;7-C7V1O<R(@
  602. XM;W(@(FYM86ME(&US8U]O<S(B+@T*(PT*(R @3F]T97,Z(" H,2D@56YC;VUM
  603. XM96YT('1H92!A<'!R;W!R:6%T92!C;VUP:6QE<B]/4R!O<'1I;VYS(&)E;&]W
  604. XM+@T*(R @(" @(" @(" H,BD@0VAA;F=E('1H92!V87)I;W5S($-&3$%'4R!A
  605. XM<R!A<'!R;W!R:6%T92!F;W(@>6]U<B!E;G9I<F]N;65N= T*(R @(" @(" @
  606. XM(" @(" @86YD(&QI8G)A<FEE<RX-"B,@(" @(" @(" @(" @($9O<B!-4T,Z
  607. XM(" M05,@<W!E8VEF:65S('-M86QL+6UO9&5L(&QI8G)A<GDL(&%N9" M1S(@
  608. XM96YA8FQE<PT*(R @(" @(" @(" @(" @.# R.#8@:6YS=')U8W1I;VYS+B @
  609. XM475I8VM#('5S97,@=&AE(&UE9&EU;2!M96UO<GD@;6]D96PL(&%S#0HC(" @
  610. XM(" @(" @(" @("!)(')E8V%L;" H+4%-(&%N9"]O<B M<6,I+B @5&AE(")!
  611. XM3$PZ(B!T87)G970@:7,@=7-E9"!B>2!-4T,-"B,@(" @(" @(" @(" @(#8N
  612. XM,"!W:71H(&]L9"!-04M%+B @6T)O($MU;&QM87)=#0HC(" @(" @(" @("@S
  613. XM*2!296YA;64@=&AI<R!F:6QE('1O(")U;GII<"(@;VX@82!$3U,@<WES=&5M
  614. XM.R!T>7!I;F<@(FUA:V4-"B,@(" @(" @(" @(" @('5N>FEP(B!W:71H($U3
  615. XM0R H;W(@(FUA:V4@+69U;GII<"(@=VET:"!40RD@=&AE;B!B=6EL9',-"B,@
  616. XM(" @(" @(" @(" @('5N>FEP+F5X92X-"B,-"B,@($=R96<@4F]E;&]F<PT*
  617. XM(PT*#0HC(R,C(R,C(R,C(R,C(R,C(R,C(R,-"B,@34%#4D\@1$5&24Y)5$E/
  618. XM3E,@(PT*(R,C(R,C(R,C(R,C(R,C(R,C(R,C#0H-"B,@0F]R;&%N9"!#*RL@
  619. XM,BXP(&9O<B!-4RU$3U,Z#0HC("TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B,@
  620. XM8F-C(&ES('5S=6%L;'D@8V]N9FEG=7)E9"!W:71H("U)(&%N9" M3"!S970@
  621. XM87!P<F]P<FEA=&5L>2XN+@T*0T,@/2!B8V,-"D-&3$%'4R ]("UM<R M3R M
  622. XM6@T*24Y#3" ](",M26,Z7&)O<FQA;F1<:6YC;'5D90T*3$0@/2!B8V,-"DQ$
  623. XM1DQ!1U,@/2 M;7,@(RU,8SI<8F]R;&%N9%QL:6(-"DQ$1DQ!1U,R(#T-"@T*
  624. XM(R!4=7)B;R!#(#(N,"!F;W(@35,M1$]3.@T*(R M+2TM+2TM+2TM+2TM+2TM
  625. XM+2TM+2TM#0HC('1C8R!I<R!U<W5A;&QY(&-O;F9I9W5R960@=VET:" M22!A
  626. XM;F0@+4P@<V5T(&%P<')O<')I871E;'DN+BX-"B,@0T,@/2!T8V,-"B,@0T9,
  627. XM04=3(#T@+6US("U/("U:#0HC($E.0TP@/2 C+4EC.EQT=7)B;V-<:6YC;'5D
  628. XM90T*(R!,1" ]('1C8PT*(R!,1$9,04=3(#T@+6US(",M3&,Z7'1U<F)O8UQL
  629. XM:6(-"B,@3$1&3$%'4S(@/0T*#0HC($U30R!F;W(@35,M1$]3.@T*(R M+2TM
  630. XM+2TM+2TM+2TM+0T*(T-#(#T@8VP-"B-#1DQ!1U,@/2 M05,@+4]X("U',B @
  631. XM(" @(" @(R!A9&0@+490:3@W(&EF(&-O<')O8V5S<V]R(&EN<W1A;&QE9 T*
  632. XM(TE.0TP@/0T*(TQ$(#T@;&EN:PT*(TQ$1DQ!1U,@/2 O3D])#0HC3$1&3$%'
  633. XM4S(@/2 L)"H[#0H-"B,@35-#('=I=&@@4T1+(&9O<B!/4R\R.B @(" C('1H
  634. XM:7,@=&%R9V5T(&ES(&YO(&QO;F=E<B!S=7!P;W)T960Z("!U<V4@36%K969I
  635. XM;&4-"B,@+2TM+2TM+2TM+2TM+2TM+2TM+2TM(" @(" C("AI9B!Y;W4@3553
  636. XM5"!U<V4@=&AI<R!T87)G970L(&%D9"!D;W-N86UE+F]B:B!T;PT*(R!#0R ]
  637. XM(&-L(" @(" @(" @(" @(" @(" @(",@("!/0DI3(&%N9"!T:&4@9&5P96YD
  638. XM96YC:65S(&QI;F4@8F5L;W<I#0HC($-&3$%'4R ]("U!4R M3W@@+4<R("U$
  639. XM3U,R#0HC($E.0TP@/2 M26,Z7&TU7&EN8VQU9&4@(" @(R!F;W(@97AA;7!L
  640. XM90T*(R!,1" ](&QI;FL-"B,@3$1&3$%'4R ]("].3TD-"B,@4DT@/2!D96P-
  641. XM"B,@3$E"0R ](&,Z7&TU7&QI8EQP7'-L:6)C90T*(R!,24)$(#T@8SI<;35<
  642. XM;&EB7&1O<V-A;&QS+FQI8@T*(R!,24)!(#T@8SI<;35<;&EB7&%P:2YL:6(-
  643. XM"@T*3T)*4R ]('5N>FEP+F]B:B!E>'1R86-T+F]B:B!F:6QE7VEO+F]B:B!M
  644. XM87!N86UE+F]B:B!M871C:"YO8FI<#0H@(" @(" @;6ES8RYO8FH@=6YI;7!L
  645. XM;V0N;V)J('5N<F5D=6-E+F]B:B!U;G-H<FEN:RYO8FH-"@T*#0HC(R,C(R,C
  646. XM(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(PT*(R!"
  647. XM05-)0R!#3TU024Q%($E.4U1254-424].4R!!3D0@1$5014Y$14Y#2453(",-
  648. XM"B,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
  649. XM(R,C#0H-"D%,3 DZ('5N>FEP+F5X90T*#0HN8RYO8FHZ#0H@(" @(" @("0H
  650. XM0T,I("UC("0H0T9,04=3*2 D*$E.0TPI("0J+F,-"@T*=6YZ:7 N;V)J.B @
  651. XM(" @('5N>FEP+F,@=6YZ:7 N: T*#0IE>'1R86-T+F]B:CH@(" @97AT<F%C
  652. XM="YC('5N>FEP+F@-"@T*9FEL95]I;RYO8FHZ(" @(&9I;&5?:6\N8R!U;GII
  653. XM<"YH#0H-"FUA<&YA;64N;V)J.B @("!M87!N86UE+F,@=6YZ:7 N: T*#0IM
  654. XM871C:"YO8FHZ(" @(" @;6%T8V@N8R!U;GII<"YH#0H-"FUI<V,N;V)J.B @
  655. XM(" @("!M:7-C+F,@=6YZ:7 N: T*#0IU;FEM<&QO9"YO8FHZ(" @=6YI;7!L
  656. XM;V0N8R!U;GII<"YH#0H-"G5N<F5D=6-E+F]B:CH@("!U;G)E9'5C92YC('5N
  657. XM>FEP+F@-"@T*=6YS:')I;FLN;V)J.B @('5N<VAR:6YK+F,@=6YZ:7 N: T*
  658. XM#0H-"B,@1$]3.@T*(R M+2T-"G5N>FEP+F5X93H@(" @("0H3T)*4RD-"B @
  659. XM(" @(" @)"A,1"D@)"A,1$9,04=3*2 D*$]"2E,I("0H3$1&3$%'4S(I#0H-
  660. XM"B,@3U,O,CH-"B,@+2TM+0T*(R!U;GII<'1M<"YE>&4Z(" D*$]"2E,I#0HC
  661. XM(" @(" @(" @)"A,1"D@)"A,1$9,04=3*2 D*$]"2E,I+" D*BYE>&4L+"0H
  662. XM3$E"0RDK)"A,24)$*3L-"B,-"B,@=6YZ:7 N97AE.B @(" @=6YZ:7!T;7 N
  663. XM97AE#0HC(" @(" @(" @8FEN9"!U;GII<'1M<"YE>&4@)"A,24)$*2 D*$Q)
  664. XM0D$I("UO('5N>FEP+F5X90T*(R @(" @(" @("0H4DTI('5N>FEP=&UP+F5X
  665. XM90T*(R @(" @(" @("0H4DTI("HN;V)J#0HC(" @(" @(" @)"A232D@*BYM
  666. X%87 -"AH@
  667. Xend
  668. END_OF_FILE
  669.   if test 4815 -ne `wc -c <'MSDOS/makefile.uu'`; then
  670.     echo shar: \"'MSDOS/makefile.uu'\" unpacked with wrong size!
  671.   else
  672.     echo shar: Uudecoding \"'MSDOS/makefile.uu'\" 
  673.     cat MSDOS/makefile.uu | uudecode 
  674.     if [ -f MSDOS/makefile.uu ]; then 
  675.        rm MSDOS/makefile.uu
  676.     fi
  677.   fi
  678.   # end of 'MSDOS/makefile.uu'
  679. fi
  680. if test -f 'OS2/dosname.c' -a "${1}" != "-c" ; then 
  681.   echo shar: Will not clobber existing file \"'OS2/dosname.c'\"
  682. else
  683.   echo shar: Extracting \"'OS2/dosname.c'\" \(3577 characters\)
  684.   sed "s/^X//" >'OS2/dosname.c' <<'END_OF_FILE'
  685. X/* Unix/HPFS filename translation for FAT file systems */
  686. X/*  (with special unzip modifications:  sflag) */
  687. X
  688. X/* Author: Kai Uwe Rommel */
  689. X
  690. X#include "unzip.h"
  691. X
  692. X
  693. Xextern int sflag;  /* user wants to allow blanks (e.g., "EA DATA. SF") */
  694. X
  695. Xvoid ChangeNameForFAT(char *name)
  696. X{
  697. X  char *src, *dst, *next, *ptr, *dot, *start;
  698. X  static char invalid[] = ":;,=+\"[]<>| \t";
  699. X
  700. X  if ( isalpha(name[0]) && (name[1] == ':') )
  701. X    start = name + 2;
  702. X  else
  703. X    start = name;
  704. X
  705. X  src = dst = start;
  706. X  if ( (*src == '/') || (*src == '\\') )
  707. X    src++, dst++;
  708. X
  709. X  while ( *src )
  710. X  {
  711. X    for ( next = src; *next && (*next != '/') && (*next != '\\'); next++ );
  712. X
  713. X    for ( ptr = src, dot = NULL; ptr < next; ptr++ )
  714. X      if ( *ptr == '.' )
  715. X      {
  716. X        dot = ptr; /* remember last dot */
  717. X        *ptr = '_';
  718. X      }
  719. X
  720. X    if ( dot == NULL )
  721. X      for ( ptr = src; ptr < next; ptr++ )
  722. X        if ( *ptr == '_' )
  723. X          dot = ptr; /* remember last _ as if it were a dot */
  724. X
  725. X    if ( dot && (dot > src) &&
  726. X         ((next - dot <= 4) ||
  727. X          ((next - src > 8) && (dot - src > 3))) )
  728. X    {
  729. X      if ( dot )
  730. X        *dot = '.';
  731. X
  732. X      for ( ptr = src; (ptr < dot) && ((ptr - src) < 8); ptr++ )
  733. X        *dst++ = *ptr;
  734. X
  735. X      for ( ptr = dot; (ptr < next) && ((ptr - dot) < 4); ptr++ )
  736. X        *dst++ = *ptr;
  737. X    }
  738. X    else
  739. X    {
  740. X      if ( dot && (next - src == 1) )
  741. X        *dot = '.';           /* special case: "." as a path component */
  742. X
  743. X      for ( ptr = src; (ptr < next) && ((ptr - src) < 8); ptr++ )
  744. X        *dst++ = *ptr;
  745. X    }
  746. X
  747. X    *dst++ = *next; /* either '/' or 0 */
  748. X
  749. X    if ( *next )
  750. X    {
  751. X      src = next + 1;
  752. X
  753. X      if ( *src == 0 ) /* handle trailing '/' on dirs ! */
  754. X        *dst = 0;
  755. X    }
  756. X    else
  757. X      break;
  758. X  }
  759. X
  760. X  for ( src = start; *src != 0; ++src )
  761. X    if ( (strchr(invalid, *src) != NULL) ||
  762. X         ((*src == ' ') && !sflag) )  /* allow spaces if user wants */
  763. X        *src = '_';
  764. X}
  765. X
  766. X
  767. Xint IsFileNameValid(char *name)
  768. X{
  769. X  HFILE hf;
  770. X#ifdef __32BIT__
  771. X  ULONG uAction;
  772. X#else
  773. X  USHORT uAction;
  774. X#endif
  775. X
  776. X  switch( DosOpen(name, &hf, &uAction, 0, 0, FILE_OPEN,
  777. X                  OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0) )
  778. X  {
  779. X  case ERROR_INVALID_NAME:
  780. X  case ERROR_FILENAME_EXCED_RANGE:
  781. X    return FALSE;
  782. X  case NO_ERROR:
  783. X    DosClose(hf);
  784. X  default:
  785. X    return TRUE;
  786. X  }
  787. X}
  788. X
  789. X
  790. Xtypedef struct
  791. X{
  792. X  ULONG cbList;               /* length of value + 22 */
  793. X#ifdef __32BIT__
  794. X  ULONG oNext;
  795. X#endif
  796. X  BYTE fEA;                   /* 0 */
  797. X  BYTE cbName;                /* length of ".LONGNAME" = 9 */
  798. X  USHORT cbValue;             /* length of value + 4 */
  799. X  BYTE szName[10];            /* ".LONGNAME" */
  800. X  USHORT eaType;              /* 0xFFFD for length-preceded ASCII */
  801. X  USHORT eaSize;              /* length of value */
  802. X  BYTE szValue[CCHMAXPATH];
  803. X}
  804. XFEALST;
  805. X
  806. X
  807. Xint SetLongNameEA(char *name, char *longname)
  808. X{
  809. X  EAOP eaop;
  810. X  FEALST fealst;
  811. X
  812. X#ifndef __32BIT__
  813. X  if ( _osmode == DOS_MODE )
  814. X    return 0;
  815. X#endif
  816. X
  817. X  eaop.fpFEAList = (PFEALIST) &fealst;
  818. X  eaop.fpGEAList = NULL;
  819. X  eaop.oError = 0;
  820. X
  821. X  strcpy(fealst.szName, ".LONGNAME");
  822. X  strcpy(fealst.szValue, longname);
  823. X
  824. X  fealst.cbList  = sizeof(fealst) - CCHMAXPATH + strlen(fealst.szValue);
  825. X  fealst.cbName  = (BYTE) strlen(fealst.szName);
  826. X  fealst.cbValue = sizeof(USHORT) * 2 + strlen(fealst.szValue);
  827. X
  828. X#ifdef __32BIT__
  829. X  fealst.oNext   = 0;
  830. X#endif
  831. X  fealst.fEA     = 0;
  832. X  fealst.eaType  = 0xFFFD;
  833. X  fealst.eaSize  = strlen(fealst.szValue);
  834. X
  835. X  return DosSetPathInfo(name, FIL_QUERYEASIZE,
  836. X                        (PBYTE) &eaop, sizeof(eaop), 0
  837. X#ifndef __32BIT__
  838. X                       , 0
  839. X#endif
  840. X                       );
  841. X}
  842. END_OF_FILE
  843.   if test 3577 -ne `wc -c <'OS2/dosname.c'`; then
  844.     echo shar: \"'OS2/dosname.c'\" unpacked with wrong size!
  845.   fi
  846.   # end of 'OS2/dosname.c'
  847. fi
  848. if test -f 'OS2/ship.dif' -a "${1}" != "-c" ; then 
  849.   echo shar: Will not clobber existing file \"'OS2/ship.dif'\"
  850. else
  851.   echo shar: Extracting \"'OS2/ship.dif'\" \(4118 characters\)
  852.   sed "s/^X//" >'OS2/ship.dif' <<'END_OF_FILE'
  853. Xdiff -cb unzip/ship.c unzip-2/ship.c
  854. X*** unzip/ship.c    Wed Jan 29 15:17:28 1992
  855. X--- unzip-2/ship.c    Wed Mar 11 23:02:22 1992
  856. X***************
  857. X*** 26,31 ****
  858. X--- 26,36 ----
  859. X  #  endif /* MAILX */
  860. X  #endif /* sgi */
  861. X  
  862. X+ #ifdef __IBMC__        /* IBM C Set/2 (32-bit) for OS/2 2.0 */
  863. X+ #  define MSDOS
  864. X+ #  define mktemp tmpnam
  865. X+ #endif /* __IBMC__ */
  866. X+ 
  867. X  #ifdef VMS
  868. X  #  define TMPNAME "_SXXXXXX."
  869. X  #  define MAILCMD "mail %s /subj=\"%s %s%s\" \"%s\""
  870. X***************
  871. X*** 43,50 ****
  872. X--- 48,59 ----
  873. X  #  endif /* ?MAILX */
  874. X  #  ifdef MSDOS
  875. X  #    define PATHCUT '\\'
  876. X+ #    define RBMODE "rb"
  877. X+ #    define WBMODE "wb"
  878. X  #  else /* !MSDOS */
  879. X  #    define PATHCUT '/'
  880. X+ #    define RBMODE "r"
  881. X+ #    define WBMODE "w"
  882. X  #  endif /* ?MSDOS */
  883. X  #endif /* ?VMS */
  884. X  
  885. X***************
  886. X*** 257,272 ****
  887. X  #endif /* ?MSDOS */
  888. X  
  889. X  
  890. X- /* Define MSVMS if either MSDOS or VMS defined */
  891. X- #ifdef MSDOS
  892. X- #  define MSVMS
  893. X- #else /* !MSDOS */
  894. X- #  ifdef VMS
  895. X- #    define MSVMS
  896. X- #  endif /* VMS */
  897. X- #endif /* ?MSDOS */
  898. X- 
  899. X- 
  900. X  /* Define void, voidp, and extent (size_t) */
  901. X  #include <stdio.h>
  902. X  #ifdef MODERN
  903. X--- 266,271 ----
  904. X***************
  905. X*** 317,334 ****
  906. X  #endif /* ?MODERN */
  907. X  
  908. X  
  909. X- /* Fine tuning */
  910. X- #ifndef MSDOS
  911. X- #   define BSZ 8192   /* Buffer size for files */
  912. X- #else /* !MSDOS */
  913. X- #   define BSZ 4096   /* Keep precious NEAR space */
  914. X-     /* BSZ can't be 8192 even for compact model because of 64K limitation
  915. X-      * in im_lmat.c. If you run out of memory when processing a large number
  916. X-      * files, use the compact model and reduce BSZ to 2048 here and in
  917. X-      * im_lm.asm.
  918. X-      */
  919. X- #endif /* ?MSDOS */
  920. X- 
  921. X  /* end of tailor.h */
  922. X  
  923. X  #ifdef MODERN
  924. X--- 316,321 ----
  925. X***************
  926. X*** 390,396 ****
  927. X  char mpspc[9];          /* prealloced space for prefix */
  928. X  char *mprefix = mpspc;  /* identification for this mailing */
  929. X  char *mdest;            /* mail destination */
  930. X! char mname[10];         /* temporary file name if mailing */
  931. X  ulg ccnt;               /* count of bytes read or written */
  932. X  int noisy = 1;          /* false to inhibit informational messages */
  933. X  
  934. X--- 377,383 ----
  935. X  char mpspc[9];          /* prealloced space for prefix */
  936. X  char *mprefix = mpspc;  /* identification for this mailing */
  937. X  char *mdest;            /* mail destination */
  938. X! char mname[64];         /* temporary file name if mailing */
  939. X  ulg ccnt;               /* count of bytes read or written */
  940. X  int noisy = 1;          /* false to inhibit informational messages */
  941. X  
  942. X***************
  943. X*** 544,554 ****
  944. X  {
  945. X    cfile *c;             /* allocated cfile structure */
  946. X  
  947. X- #ifdef MSDOS
  948. X-   /* Set file mode to binary for MSDOS systems */
  949. X-   setmode(fileno(f), O_BINARY);
  950. X- #endif /* MSDOS */
  951. X- 
  952. X    /* Allocate and fill structure */
  953. X    if ((c = (cfile *)malloc(sizeof(cfile))) != NULL)
  954. X    {
  955. X--- 531,536 ----
  956. X***************
  957. X*** 1039,1045 ****
  958. X            err(SE_OVER, r);
  959. X          }
  960. X  #endif /* !VMS */
  961. X!         else if ((f = fopen(r, "w")) == NULL)
  962. X            err(SE_FULL, r);
  963. X          if ((c = chook(f)) == NULL)
  964. X            err(SE_MEM, "");
  965. X--- 1021,1027 ----
  966. X            err(SE_OVER, r);
  967. X          }
  968. X  #endif /* !VMS */
  969. X!         else if ((f = fopen(r, WBMODE)) == NULL)
  970. X            err(SE_FULL, r);
  971. X          if ((c = chook(f)) == NULL)
  972. X            err(SE_MEM, "");
  973. X***************
  974. X*** 1149,1154 ****
  975. X--- 1131,1141 ----
  976. X    /* No subject prefix yet */
  977. X    *mprefix = 0;
  978. X  
  979. X+ #ifdef MSDOS
  980. X+   if ( argc == 1 && isatty(0) )
  981. X+     help();
  982. X+ #endif
  983. X+ 
  984. X    /* See if help requested */
  985. X    if (argc > 1 && (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "-?") == 0))
  986. X      help();
  987. X***************
  988. X*** 1249,1255 ****
  989. X          else                            /* arg is file to ship */
  990. X          {
  991. X            s = 0;
  992. X!           if ((f = fopen(argv[r], "r")) == NULL)
  993. X              err(SE_FIND, argv[r]);
  994. X            if (mail && !*mprefix)
  995. X            {
  996. X--- 1236,1242 ----
  997. X          else                            /* arg is file to ship */
  998. X          {
  999. X            s = 0;
  1000. X!           if ((f = fopen(argv[r], RBMODE)) == NULL)
  1001. X              err(SE_FIND, argv[r]);
  1002. X            if (mail && !*mprefix)
  1003. X            {
  1004. END_OF_FILE
  1005.   if test 4118 -ne `wc -c <'OS2/ship.dif'`; then
  1006.     echo shar: \"'OS2/ship.dif'\" unpacked with wrong size!
  1007.   fi
  1008.   # end of 'OS2/ship.dif'
  1009. fi
  1010. if test -f 'VMS/crypt/make_unzip_gcc.com' -a "${1}" != "-c" ; then 
  1011.   echo shar: Will not clobber existing file \"'VMS/crypt/make_unzip_gcc.com'\"
  1012. else
  1013.   echo shar: Extracting \"'VMS/crypt/make_unzip_gcc.com'\" \(1658 characters\)
  1014.   sed "s/^X//" >'VMS/crypt/make_unzip_gcc.com' <<'END_OF_FILE'
  1015. X$ !
  1016. X$ !        "Makefile" for VMS versions of unzip and zipinfo
  1017. X$ !            (version:  crypt + no inflate)
  1018. X$ !
  1019. X$ ! Find out current disk and directory
  1020. X$ !
  1021. X$ my_name = f$env("procedure")
  1022. X$ here = f$parse(my_name,,,"device") + f$parse(my_name,,,"directory")
  1023. X$ set verify    ! like "echo on", eh?
  1024. X$ !
  1025. X$ ! Do unzip:
  1026. X$ !
  1027. X$ gcc /undef=__STDC__ /def=(CRYPT) unzip
  1028. X$ gcc /undef=__STDC__ /def=(CRYPT) crypt
  1029. X$ gcc /undef=__STDC__ /def=(CRYPT) extract
  1030. X$ gcc /undef=__STDC__ /def=(CRYPT) file_io
  1031. X$ gcc /undef=__STDC__ /def=(CRYPT)     mapname
  1032. X$ gcc /undef=__STDC__ /def=(CRYPT) match
  1033. X$ gcc /undef=__STDC__ /def=(CRYPT) misc
  1034. X$ gcc /undef=__STDC__ /def=(CRYPT) unimplod
  1035. X$ gcc /undef=__STDC__ /def=(CRYPT) unreduce
  1036. X$ gcc /undef=__STDC__ /def=(CRYPT) unshrink
  1037. X$ gcc /undef=__STDC__ /def=(CRYPT) vms
  1038. X$ gcc /undef=__STDC__ /def=(CRYPT) VMSmunch
  1039. X$ link unzip,crypt,extract,file_io,mapname,match,misc,-
  1040. X    unimplod,unreduce,unshrink,vms,VMSmunch,-
  1041. X gnu_cc:[000000]gcclib.olb/lib,-
  1042. X sys$input:/opt
  1043. X sys$share:vaxcrtl.exe/shareable
  1044. X! Next line:  put a similar line (full pathname for unzip.exe) in login.com.
  1045. X! Remember to include leading "$" before disk name.
  1046. X$ unzip == "$''here'unzip.exe"        ! set up symbol to use unzip
  1047. X$ !
  1048. X$ ! Do zipinfo:
  1049. X$ !
  1050. X$ gcc /undef=__STDC__ zipinfo
  1051. X$ rename misc.c misc_.c;*
  1052. X$ gcc /undef=__STDC__ /def=(ZIPINFO) misc_
  1053. X$ rename misc_.c misc.c;*
  1054. X$ link zipinfo,match,misc_,VMSmunch,-
  1055. X gnu_cc:[000000]gcclib.olb/lib,-
  1056. Xsys$input:/opt
  1057. X sys$share:vaxcrtl.exe/shareable
  1058. X! Next line:  put a similar line (full pathname for unzip.exe) in login.com.
  1059. X! Remember to include leading "$" before disk name.
  1060. X$ zipinfo == "$''here'zipinfo.exe"    ! set up symbol to use zipinfo
  1061. X$ set noverify
  1062. END_OF_FILE
  1063.   if test 1658 -ne `wc -c <'VMS/crypt/make_unzip_gcc.com'`; then
  1064.     echo shar: \"'VMS/crypt/make_unzip_gcc.com'\" unpacked with wrong size!
  1065.   fi
  1066.   # end of 'VMS/crypt/make_unzip_gcc.com'
  1067. fi
  1068. if test -f 'match.c' -a "${1}" != "-c" ; then 
  1069.   echo shar: Will not clobber existing file \"'match.c'\"
  1070. else
  1071.   echo shar: Extracting \"'match.c'\" \(4603 characters\)
  1072.   sed "s/^X//" >'match.c' <<'END_OF_FILE'
  1073. X/*--------------------------------------------------------------------------
  1074. X
  1075. X  match.c
  1076. X
  1077. X  The match() routine recursively compares a string to a "pattern" (regular
  1078. X  expression), returning TRUE if a match is found or FALSE if not.  This
  1079. X  version is specifically for use with unzip.c:  it leaves the case (upper,
  1080. X  lower, or mixed) of the string alone, but converts any uppercase characters
  1081. X  in the pattern to lowercase if indicated by the global var pInfo->lcflag
  1082. X  (which is to say, string is assumed to have been converted to lowercase
  1083. X  already, if such was necessary).
  1084. X
  1085. X  --------------------------------------------------------------------------
  1086. X
  1087. X  Copyrights:  see accompanying file "COPYING" in UnZip source distribution.
  1088. X
  1089. X  --------------------------------------------------------------------------*/
  1090. X
  1091. X
  1092. X#include "unzip.h"
  1093. X
  1094. X
  1095. X/*******************/
  1096. X/*  Match Defines  */
  1097. X/*******************/
  1098. X
  1099. X#define ASTERISK        '*'     /* The '*' metacharacter */
  1100. X#define QUESTION        '?'     /* The '?' metacharacter */
  1101. X#define BACK_SLASH      '\\'    /* The '\' metacharacter */
  1102. X#define LEFT_BRACKET    '['     /* The '[' metacharacter */
  1103. X#define RIGHT_BRACKET   ']'     /* The ']' metacharacter */
  1104. X#define EOS             '\000'  /* end-of-string */
  1105. X
  1106. X#define IS_OCTAL(ch)    (ch >= '0' && ch <= '7')
  1107. X
  1108. X
  1109. X
  1110. X/********************/
  1111. X/*  Match Typedefs  */
  1112. X/********************/
  1113. X
  1114. Xtypedef short int BOOLEAN;
  1115. X
  1116. X
  1117. X
  1118. X/*************************************/
  1119. X/*  Match Local Function Prototypes  */
  1120. X/*************************************/
  1121. X
  1122. Xstatic BOOLEAN do_list __((register char *string, char *pattern));
  1123. Xstatic void list_parse __((char **patp, char *lowp, char *highp));
  1124. Xstatic char nextch __((char **patp));
  1125. X
  1126. X
  1127. X
  1128. X
  1129. X
  1130. X/**********************/
  1131. X/*  Function match()  */
  1132. X/**********************/
  1133. X
  1134. Xint match(string, pattern)
  1135. Xchar *string;
  1136. Xchar *pattern;
  1137. X{
  1138. X    register int ismatch;
  1139. X
  1140. X    ismatch = FALSE;
  1141. X    switch (*pattern) {
  1142. X    case ASTERISK:
  1143. X        pattern++;
  1144. X        do {
  1145. X            ismatch = match(string, pattern);
  1146. X        }
  1147. X        while (!ismatch && *string++ != EOS);
  1148. X        break;
  1149. X    case QUESTION:
  1150. X        if (*string != EOS)
  1151. X            ismatch = match(++string, ++pattern);
  1152. X        break;
  1153. X    case EOS:
  1154. X        if (*string == EOS)
  1155. X            ismatch = TRUE;
  1156. X        break;
  1157. X    case LEFT_BRACKET:
  1158. X        if (*string != EOS)
  1159. X            ismatch = do_list(string, pattern);
  1160. X        break;
  1161. X    case BACK_SLASH:
  1162. X        pattern++;
  1163. X    default:
  1164. X        if (*string == ((pInfo->lcflag && isupper(*pattern))?
  1165. X            tolower(*pattern) : *pattern)) {
  1166. X            string++;
  1167. X            pattern++;
  1168. X            ismatch = match(string, pattern);
  1169. X        } else
  1170. X            ismatch = FALSE;
  1171. X        break;
  1172. X    }
  1173. X    return (ismatch);
  1174. X}
  1175. X
  1176. X
  1177. X
  1178. X
  1179. X
  1180. X/************************/
  1181. X/*  Function do_list()  */
  1182. X/************************/
  1183. X
  1184. Xstatic BOOLEAN do_list(string, pattern)
  1185. Xregister char *string;
  1186. Xchar *pattern;
  1187. X{
  1188. X    register BOOLEAN ismatch;
  1189. X    register BOOLEAN if_found;
  1190. X    register BOOLEAN if_not_found;
  1191. X    auto char lower;
  1192. X    auto char upper;
  1193. X
  1194. X    pattern++;
  1195. X    if (*pattern == '!') {
  1196. X        if_found = FALSE;
  1197. X        if_not_found = TRUE;
  1198. X        pattern++;
  1199. X    } else {
  1200. X        if_found = TRUE;
  1201. X        if_not_found = FALSE;
  1202. X    }
  1203. X    ismatch = if_not_found;
  1204. X    while (*pattern != ']' && *pattern != EOS) {
  1205. X        list_parse(&pattern, &lower, &upper);
  1206. X        if (*string >= lower && *string <= upper) {
  1207. X            ismatch = if_found;
  1208. X            while (*pattern != ']' && *pattern != EOS)
  1209. X                pattern++;
  1210. X        }
  1211. X    }
  1212. X
  1213. X    if (*pattern++ != ']') {
  1214. X        printf("Character class error\n");
  1215. X        exit(1);
  1216. X    } else if (ismatch)
  1217. X        ismatch = match(++string, pattern);
  1218. X
  1219. X    return (ismatch);
  1220. X}
  1221. X
  1222. X
  1223. X
  1224. X
  1225. X
  1226. X/***************************/
  1227. X/*  Function list_parse()  */
  1228. X/***************************/
  1229. X
  1230. Xstatic void list_parse(patp, lowp, highp)
  1231. Xchar **patp;
  1232. Xchar *lowp;
  1233. Xchar *highp;
  1234. X{
  1235. X    *lowp = nextch(patp);
  1236. X    if (**patp == '-') {
  1237. X        (*patp)++;
  1238. X        *highp = nextch(patp);
  1239. X    } else
  1240. X        *highp = *lowp;
  1241. X}
  1242. X
  1243. X
  1244. X
  1245. X
  1246. X
  1247. X/***********************/
  1248. X/*  Function nextch()  */
  1249. X/***********************/
  1250. X
  1251. Xstatic char nextch(patp)
  1252. Xchar **patp;
  1253. X{
  1254. X    register char ch;
  1255. X    register char chsum;
  1256. X    register int count;
  1257. X
  1258. X    ch = *(*patp)++;
  1259. X    if (ch == '\\') {
  1260. X        ch = *(*patp)++;
  1261. X        if (IS_OCTAL(ch)) {
  1262. X            chsum = 0;
  1263. X            for (count = 0; count < 3 && IS_OCTAL(ch); count++) {
  1264. X                chsum *= 8;
  1265. X                chsum += ch - '0';
  1266. X                ch = *(*patp)++;
  1267. X            }
  1268. X            (*patp)--;
  1269. X            ch = chsum;
  1270. X        }
  1271. X    }
  1272. X    return (ch);
  1273. X}
  1274. END_OF_FILE
  1275.   if test 4603 -ne `wc -c <'match.c'`; then
  1276.     echo shar: \"'match.c'\" unpacked with wrong size!
  1277.   fi
  1278.   # end of 'match.c'
  1279. fi
  1280. if test -f 'unreduce.c' -a "${1}" != "-c" ; then 
  1281.   echo shar: Will not clobber existing file \"'unreduce.c'\"
  1282. else
  1283.   echo shar: Extracting \"'unreduce.c'\" \(5041 characters\)
  1284.   sed "s/^X//" >'unreduce.c' <<'END_OF_FILE'
  1285. X/*---------------------------------------------------------------------------
  1286. X
  1287. X  unreduce.c
  1288. X
  1289. X  The Reducing algorithm is actually a combination of two distinct algorithms.
  1290. X  The first algorithm compresses repeated byte sequences, and the second al-
  1291. X  gorithm takes the compressed stream from the first algorithm and applies a
  1292. X  probabilistic compression method.
  1293. X
  1294. X  ---------------------------------------------------------------------------*/
  1295. X
  1296. X
  1297. X#include "unzip.h"
  1298. X
  1299. X
  1300. X/**************************************/
  1301. X/*  UnReduce Defines, Typedefs, etc.  */
  1302. X/**************************************/
  1303. X
  1304. X#define DLE    144
  1305. X
  1306. Xtypedef byte f_array[64];       /* for followers[256][64] */
  1307. X
  1308. Xstatic void LoadFollowers __((void));
  1309. X
  1310. X
  1311. X
  1312. X/*******************************/
  1313. X/*  UnReduce Global Variables  */
  1314. X/*******************************/
  1315. X
  1316. Xf_array *followers = (f_array *) prefix_of;     /* shared work space */
  1317. Xbyte Slen[256];
  1318. Xint factor;
  1319. X
  1320. Xint L_table[] =
  1321. X{0, 0x7f, 0x3f, 0x1f, 0x0f};
  1322. X
  1323. Xint D_shift[] =
  1324. X{0, 0x07, 0x06, 0x05, 0x04};
  1325. Xint D_mask[] =
  1326. X{0, 0x01, 0x03, 0x07, 0x0f};
  1327. X
  1328. Xint B_table[] =
  1329. X{8, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5,
  1330. X 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6,
  1331. X 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
  1332. X 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
  1333. X 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  1334. X 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  1335. X 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  1336. X 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1337. X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1338. X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1339. X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1340. X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1341. X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1342. X 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  1343. X 8, 8, 8, 8};
  1344. X
  1345. X
  1346. X
  1347. X
  1348. X
  1349. X/*************************/
  1350. X/*  Function unReduce()  */
  1351. X/*************************/
  1352. X
  1353. Xvoid unReduce()
  1354. X /* expand probabilistically reduced data */
  1355. X{
  1356. X    register int lchar;
  1357. X    int nchar;
  1358. X    int ExState;
  1359. X    int V;
  1360. X    int Len;
  1361. X
  1362. X    factor = lrec.compression_method - 1;
  1363. X    ExState = 0;
  1364. X    lchar = 0;
  1365. X    LoadFollowers();
  1366. X
  1367. X    while (((outpos + outcnt) < ucsize) && (!zipeof)) {
  1368. X        if (Slen[lchar] == 0)
  1369. X            READBIT(8, nchar)   /* ; */
  1370. X        else {
  1371. X            READBIT(1, nchar);
  1372. X            if (nchar != 0)
  1373. X                READBIT(8, nchar)       /* ; */
  1374. X            else {
  1375. X                int follower;
  1376. X                int bitsneeded = B_table[Slen[lchar]];
  1377. X                READBIT(bitsneeded, follower);
  1378. X                nchar = followers[lchar][follower];
  1379. X            }
  1380. X        }
  1381. X        /* expand the resulting byte */
  1382. X        switch (ExState) {
  1383. X
  1384. X        case 0:
  1385. X            if (nchar != DLE)
  1386. X                OUTB(nchar)     /*;*/
  1387. X            else
  1388. X                ExState = 1;
  1389. X            break;
  1390. X
  1391. X        case 1:
  1392. X            if (nchar != 0) {
  1393. X                V = nchar;
  1394. X                Len = V & L_table[factor];
  1395. X                if (Len == L_table[factor])
  1396. X                    ExState = 2;
  1397. X                else
  1398. X                    ExState = 3;
  1399. X            } else {
  1400. X                OUTB(DLE);
  1401. X                ExState = 0;
  1402. X            }
  1403. X            break;
  1404. X
  1405. X        case 2:{
  1406. X                Len += nchar;
  1407. X                ExState = 3;
  1408. X            }
  1409. X            break;
  1410. X
  1411. X        case 3:{
  1412. X                register int i = Len + 3;
  1413. X                int offset = (((V >> D_shift[factor]) &
  1414. X                               D_mask[factor]) << 8) + nchar + 1;
  1415. X                longint op = (outpos + outcnt) - offset;
  1416. X
  1417. X                /* special case- before start of file */
  1418. X                while ((op < 0L) && (i > 0)) {
  1419. X                    OUTB(0);
  1420. X                    op++;
  1421. X                    i--;
  1422. X                }
  1423. X
  1424. X                /* normal copy of data from output buffer */
  1425. X                {
  1426. X                    register int ix = (int) (op % OUTBUFSIZ);
  1427. X
  1428. X                    /* do a block memory copy if possible */
  1429. X                    if (((ix + i) < OUTBUFSIZ) &&
  1430. X                        ((outcnt + i) < OUTBUFSIZ)) {
  1431. X                        memcpy(outptr, &outbuf[ix], i);
  1432. X                        outptr += i;
  1433. X                        outcnt += i;
  1434. X                    }
  1435. X                    /* otherwise copy byte by byte */
  1436. X                    else
  1437. X                        while (i--) {
  1438. X                            OUTB(outbuf[ix]);
  1439. X                            if (++ix >= OUTBUFSIZ)
  1440. X                                ix = 0;
  1441. X                        }
  1442. X                }
  1443. X
  1444. X                ExState = 0;
  1445. X            }
  1446. X            break;
  1447. X        }
  1448. X
  1449. X        /* store character for next iteration */
  1450. X        lchar = nchar;
  1451. X    }
  1452. X}
  1453. X
  1454. X
  1455. X
  1456. X
  1457. X
  1458. X/******************************/
  1459. X/*  Function LoadFollowers()  */
  1460. X/******************************/
  1461. X
  1462. Xstatic void LoadFollowers()
  1463. X{
  1464. X    register int x;
  1465. X    register int i;
  1466. X
  1467. X    for (x = 255; x >= 0; x--) {
  1468. X        READBIT(6, Slen[x]);
  1469. X        for (i = 0; (byte) i < Slen[x]; i++) {
  1470. X            READBIT(8, followers[x][i]);
  1471. X        }
  1472. X    }
  1473. X}
  1474. END_OF_FILE
  1475.   if test 5041 -ne `wc -c <'unreduce.c'`; then
  1476.     echo shar: \"'unreduce.c'\" unpacked with wrong size!
  1477.   fi
  1478.   # end of 'unreduce.c'
  1479. fi
  1480. if test -f 'unshrink.c' -a "${1}" != "-c" ; then 
  1481.   echo shar: Will not clobber existing file \"'unshrink.c'\"
  1482. else
  1483.   echo shar: Extracting \"'unshrink.c'\" \(4365 characters\)
  1484.   sed "s/^X//" >'unshrink.c' <<'END_OF_FILE'
  1485. X/*---------------------------------------------------------------------------
  1486. X
  1487. X  unshrink.c
  1488. X
  1489. X  Shrinking is a Dynamic Lempel-Ziv-Welch compression algorithm with partial
  1490. X  clearing.
  1491. X
  1492. X  ---------------------------------------------------------------------------*/
  1493. X
  1494. X
  1495. X#include "unzip.h"
  1496. X
  1497. X
  1498. X/*************************************/
  1499. X/*  UnShrink Defines, Globals, etc.  */
  1500. X/*************************************/
  1501. X
  1502. X/*      MAX_BITS        13   (in unzip.h; defines size of global work area)  */
  1503. X#define INIT_BITS       9
  1504. X#define FIRST_ENT       257
  1505. X#define CLEAR           256
  1506. X#define GetCode(dest)   READBIT(codesize,dest)
  1507. X
  1508. Xstatic void partial_clear __((void));   /* local prototype */
  1509. X
  1510. Xint codesize, maxcode, maxcodemax, free_ent;
  1511. X
  1512. X
  1513. X
  1514. X
  1515. X/*************************/
  1516. X/*  Function unShrink()  */
  1517. X/*************************/
  1518. X
  1519. Xvoid unShrink()
  1520. X{
  1521. X    register int code;
  1522. X    register int stackp;
  1523. X    int finchar;
  1524. X    int oldcode;
  1525. X    int incode;
  1526. X
  1527. X
  1528. X    /* decompress the file */
  1529. X    codesize = INIT_BITS;
  1530. X    maxcode = (1 << codesize) - 1;
  1531. X    maxcodemax = HSIZE;         /* (1 << MAX_BITS) */
  1532. X    free_ent = FIRST_ENT;
  1533. X
  1534. X    for (code = maxcodemax; code > 255; code--)
  1535. X        prefix_of[code] = -1;
  1536. X
  1537. X    for (code = 255; code >= 0; code--) {
  1538. X        prefix_of[code] = 0;
  1539. X        suffix_of[code] = code;
  1540. X    }
  1541. X
  1542. X    GetCode(oldcode);
  1543. X    if (zipeof)
  1544. X        return;
  1545. X    finchar = oldcode;
  1546. X
  1547. X    OUTB(finchar);
  1548. X
  1549. X    stackp = HSIZE;
  1550. X
  1551. X    while (!zipeof) {
  1552. X        GetCode(code);
  1553. X        if (zipeof)
  1554. X            return;
  1555. X
  1556. X        while (code == CLEAR) {
  1557. X            GetCode(code);
  1558. X            switch (code) {
  1559. X
  1560. X            case 1:{
  1561. X                    codesize++;
  1562. X                    if (codesize == MAX_BITS)
  1563. X                        maxcode = maxcodemax;
  1564. X                    else
  1565. X                        maxcode = (1 << codesize) - 1;
  1566. X                }
  1567. X                break;
  1568. X
  1569. X            case 2:
  1570. X                partial_clear();
  1571. X                break;
  1572. X            }
  1573. X
  1574. X            GetCode(code);
  1575. X            if (zipeof)
  1576. X                return;
  1577. X        }
  1578. X
  1579. X
  1580. X        /* special case for KwKwK string */
  1581. X        incode = code;
  1582. X        if (prefix_of[code] == -1) {
  1583. X            stack[--stackp] = finchar;
  1584. X            code = oldcode;
  1585. X        }
  1586. X        /* generate output characters in reverse order */
  1587. X        while (code >= FIRST_ENT) {
  1588. X            if (prefix_of[code] == -1) {
  1589. X                stack[--stackp] = finchar;
  1590. X                code = oldcode;
  1591. X            } else {
  1592. X                stack[--stackp] = suffix_of[code];
  1593. X                code = prefix_of[code];
  1594. X            }
  1595. X        }
  1596. X
  1597. X        finchar = suffix_of[code];
  1598. X        stack[--stackp] = finchar;
  1599. X
  1600. X
  1601. X        /* and put them out in forward order, block copy */
  1602. X        if ((HSIZE - stackp + outcnt) < OUTBUFSIZ) {
  1603. X            memcpy(outptr, &stack[stackp], HSIZE - stackp);
  1604. X            outptr += HSIZE - stackp;
  1605. X            outcnt += HSIZE - stackp;
  1606. X            stackp = HSIZE;
  1607. X        }
  1608. X        /* output byte by byte if we can't go by blocks */
  1609. X        else
  1610. X            while (stackp < HSIZE)
  1611. X                OUTB(stack[stackp++]);
  1612. X
  1613. X
  1614. X        /* generate new entry */
  1615. X        code = free_ent;
  1616. X        if (code < maxcodemax) {
  1617. X            prefix_of[code] = oldcode;
  1618. X            suffix_of[code] = finchar;
  1619. X
  1620. X            do
  1621. X                code++;
  1622. X            while ((code < maxcodemax) && (prefix_of[code] != -1));
  1623. X
  1624. X            free_ent = code;
  1625. X        }
  1626. X        /* remember previous code */
  1627. X        oldcode = incode;
  1628. X    }
  1629. X}
  1630. X
  1631. X
  1632. X/******************************/
  1633. X/*  Function partial_clear()  */
  1634. X/******************************/
  1635. X
  1636. Xstatic void partial_clear()
  1637. X{
  1638. X    register int pr;
  1639. X    register int cd;
  1640. X
  1641. X    /* mark all nodes as potentially unused */
  1642. X    for (cd = FIRST_ENT; cd < free_ent; cd++)
  1643. X        prefix_of[cd] |= 0x8000;
  1644. X
  1645. X    /* unmark those that are used by other nodes */
  1646. X    for (cd = FIRST_ENT; cd < free_ent; cd++) {
  1647. X        pr = prefix_of[cd] & 0x7fff;    /* reference to another node? */
  1648. X        if (pr >= FIRST_ENT)    /* flag node as referenced */
  1649. X            prefix_of[pr] &= 0x7fff;
  1650. X    }
  1651. X
  1652. X    /* clear the ones that are still marked */
  1653. X    for (cd = FIRST_ENT; cd < free_ent; cd++)
  1654. X        if ((prefix_of[cd] & 0x8000) != 0)
  1655. X            prefix_of[cd] = -1;
  1656. X
  1657. X    /* find first cleared node as next free_ent */
  1658. X    cd = FIRST_ENT;
  1659. X    while ((cd < maxcodemax) && (prefix_of[cd] != -1))
  1660. X        cd++;
  1661. X    free_ent = cd;
  1662. X}
  1663. END_OF_FILE
  1664.   if test 4365 -ne `wc -c <'unshrink.c'`; then
  1665.     echo shar: \"'unshrink.c'\" unpacked with wrong size!
  1666.   fi
  1667.   # end of 'unshrink.c'
  1668. fi
  1669. echo shar: End of archive 10 \(of 12\).
  1670. cp /dev/null ark10isdone
  1671. MISSING=""
  1672. for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do
  1673.     if test ! -f ark${I}isdone ; then
  1674.     MISSING="${MISSING} ${I}"
  1675.     fi
  1676. done
  1677. if test "${MISSING}" = "" ; then
  1678.     echo You have unpacked all 12 archives.
  1679.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1680. else
  1681.     echo You still must unpack the following archives:
  1682.     echo "        " ${MISSING}
  1683. fi
  1684. exit 0
  1685.  
  1686.  
  1687. exit 0 # Just in case...
  1688.