home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sources / misc / 3865 < prev    next >
Encoding:
Text File  |  1992-08-23  |  59.3 KB  |  1,765 lines

  1. Newsgroups: comp.sources.misc
  2. Path: sparky!kent
  3. From: zip-bugs@cs.ucla.edu (Info-ZIP group)
  4. Subject:  v31i115:  unzip50 - Info-ZIP portable UnZip, version 5.0, Part12/14
  5. Message-ID: <1992Aug24.025813.25273@sparky.imd.sterling.com>
  6. Followup-To: comp.sources.d
  7. X-Md4-Signature: 253d0ffd87194d37a1959458621792a9
  8. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  9. Organization: Sterling Software
  10. References: <csm-v31i104=unzip50.215137@sparky.IMD.Sterling.COM>
  11. Date: Mon, 24 Aug 1992 02:58:13 GMT
  12. Approved: kent@sparky.imd.sterling.com
  13. Lines: 1750
  14.  
  15. Submitted-by: zip-bugs@cs.ucla.edu (Info-ZIP group)
  16. Posting-number: Volume 31, Issue 115
  17. Archive-name: unzip50/part12
  18. Supersedes: unzip: Volume 29, Issue 31-42
  19. Environment: UNIX, VMS, OS/2, MS-DOS, MACINTOSH, WIN-NT, LINUX, MINIX, COHERENT AMIGA?, !ATARI, symlink, SGI, DEC, Cray, Convex, Amdahl, Sun
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then feed it
  23. # into a shell via "sh file" or similar.  To overwrite existing files,
  24. # type "sh file -c".
  25. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  26. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  27. # Contents:  AMIGA/stat.c AMIGA/utime.c ATARI/README.src.UU
  28. #   ATARI/unzip.prj.UU BUGS CONTRIBS MSDOS/Borland.fix MSDOS/makefile
  29. #   OS2/makefile.os2 Readme VMS/unzip.rnh Where envargs.c unshrink.c
  30. # Wrapped by kent@sparky on Sun Aug 23 21:09:36 1992
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. echo If this archive is complete, you will see the following message:
  33. echo '          "shar: End of archive 12 (of 14)."'
  34. if test -f 'AMIGA/stat.c' -a "${1}" != "-c" ; then 
  35.   echo shar: Will not clobber existing file \"'AMIGA/stat.c'\"
  36. else
  37.   echo shar: Extracting \"'AMIGA/stat.c'\" \(3402 characters\)
  38.   sed "s/^X//" >'AMIGA/stat.c' <<'END_OF_FILE'
  39. X/* stat.c -- for Lattice 4.01 */
  40. X
  41. X#include <exec/types.h>
  42. X#include <exec/exec.h>
  43. X#include <libraries/dos.h>
  44. X#include <libraries/dosextens.h>
  45. X#include <proto/exec.h>
  46. X#include <proto/dos.h>
  47. X
  48. X#include <sys/types.h>
  49. X#include <sys/stat.h>
  50. X
  51. X/* I can't find the defines for DirEntryType or EntryType... */
  52. X#define DOSDIR  (2L)
  53. X#define DOSFILE (-3L)   /* actually, < 0 */
  54. X
  55. X#ifndef SUCCESS
  56. X#define SUCCESS (-1)
  57. X#define FAILURE (0)
  58. X#endif
  59. X
  60. Xextern int stat(char *file,struct stat *buf);
  61. X
  62. Xstat(file,buf)
  63. Xchar *file;
  64. Xstruct stat *buf;
  65. X{
  66. X
  67. X        struct FileInfoBlock *inf;
  68. X        struct FileLock *lock;
  69. X        long ftime;
  70. X
  71. X        if( (lock = (struct FileLock *)Lock(file,SHARED_LOCK))==0 )
  72. X                /* file not found */
  73. X                return(-1);
  74. X
  75. X        if( !(inf = (struct FileInfoBlock *)AllocMem(
  76. X                (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
  77. X        {
  78. X                UnLock((BPTR)lock);
  79. X                return(-1);
  80. X        }
  81. X
  82. X        if( Examine((BPTR)lock,inf)==FAILURE )
  83. X        {
  84. X                FreeMem((char *)inf,(long)sizeof(*inf));
  85. X                UnLock((BPTR)lock);
  86. X                return(-1);
  87. X        }
  88. X
  89. X        /* fill in buf */
  90. X
  91. X        buf->st_dev                =
  92. X        buf->st_nlink        =
  93. X        buf->st_uid                =
  94. X        buf->st_gid                =
  95. X        buf->st_rdev        = 0;
  96. X        
  97. X        buf->st_ino                = inf->fib_DiskKey;
  98. X        buf->st_blocks        = inf->fib_NumBlocks;
  99. X        buf->st_size        = inf->fib_Size;
  100. X        buf->st_blksize        = 512;
  101. X
  102. X        /* now the date.  AmigaDOG has weird datestamps---
  103. X         *      ds_Days is the number of days since 1-1-1978;
  104. X         *      however, as Unix wants date since 1-1-1970...
  105. X         */
  106. X
  107. X        ftime =
  108. X                (inf->fib_Date.ds_Days * 86400 )                +
  109. X                (inf->fib_Date.ds_Minute * 60 )                 +
  110. X                (inf->fib_Date.ds_Tick / TICKS_PER_SECOND )     +
  111. X                (86400 * 8 * 365 )                              +
  112. X                (86400 * 2 );  /* two leap years, I think */
  113. X
  114. X/*  ftime += timezone;  */
  115. X
  116. X        buf->st_ctime =
  117. X        buf->st_atime =
  118. X        buf->st_mtime =
  119. X        buf->st_mtime = ftime;
  120. X
  121. X        switch( inf->fib_DirEntryType )
  122. X        {
  123. X        case DOSDIR:
  124. X                buf->st_mode = S_IFDIR;
  125. X                break;
  126. X
  127. X        case DOSFILE:
  128. X                buf->st_mode = S_IFREG;
  129. X                break;
  130. X
  131. X        default:
  132. X                buf->st_mode = S_IFDIR | S_IFREG;
  133. X                /* an impossible combination?? */
  134. X        }
  135. X
  136. X        /* lastly, throw in the protection bits */
  137. X
  138. X        if((inf->fib_Protection & FIBF_READ) == 0)
  139. X                buf->st_mode |= S_IREAD;
  140. X
  141. X        if((inf->fib_Protection & FIBF_WRITE) == 0)
  142. X                buf->st_mode |= S_IWRITE;
  143. X
  144. X        if((inf->fib_Protection & FIBF_EXECUTE) == 0)
  145. X                buf->st_mode |= S_IEXECUTE;
  146. X
  147. X        if((inf->fib_Protection & FIBF_DELETE) == 0)
  148. X                buf->st_mode |= S_IDELETE;
  149. X
  150. X        if((inf->fib_Protection & (long)FIBF_ARCHIVE))
  151. X                buf->st_mode |= S_IARCHIVE;
  152. X
  153. X        if((inf->fib_Protection & (long)FIBF_PURE))
  154. X                buf->st_mode |= S_IPURE;
  155. X
  156. X        if((inf->fib_Protection & (long)FIBF_SCRIPT))
  157. X                buf->st_mode |= S_ISCRIPT;
  158. X
  159. X        FreeMem((char *)inf, (long)sizeof(*inf));
  160. X        UnLock((BPTR)lock);
  161. X
  162. X        return(0);
  163. X
  164. X}
  165. END_OF_FILE
  166.   if test 3402 -ne `wc -c <'AMIGA/stat.c'`; then
  167.     echo shar: \"'AMIGA/stat.c'\" unpacked with wrong size!
  168.   fi
  169.   # end of 'AMIGA/stat.c'
  170. fi
  171. if test -f 'AMIGA/utime.c' -a "${1}" != "-c" ; then 
  172.   echo shar: Will not clobber existing file \"'AMIGA/utime.c'\"
  173. else
  174.   echo shar: Extracting \"'AMIGA/utime.c'\" \(3993 characters\)
  175.   sed "s/^X//" >'AMIGA/utime.c' <<'END_OF_FILE'
  176. X/* utime.c */
  177. X
  178. X#include <string.h>
  179. X#include <time.h>
  180. X#include <errno.h>
  181. X
  182. X#include <exec/types.h>
  183. X#include <exec/memory.h>
  184. X#include <libraries/dos.h>
  185. X#include <libraries/dosextens.h>
  186. X#include <proto/exec.h>
  187. X#include <proto/dos.h>
  188. X
  189. Xextern LONG sendpkt(struct MsgPort *,LONG,LONG[],LONG);
  190. X
  191. Xextern int _OSERR;
  192. X
  193. X#ifndef SUCCESS
  194. X#define SUCCESS (-1L)
  195. X#define FAILURE 0L
  196. X#endif
  197. X
  198. Xint utime(char *file, time_t timep[]);
  199. X
  200. Xint utime(file,timep)
  201. Xchar *file;
  202. Xtime_t timep[];
  203. X{
  204. X
  205. X    struct DateStamp date;
  206. X    struct MsgPort *taskport;
  207. X    struct FileLock *dirlock, *lock;
  208. X    struct FileInfoBlock *fib;
  209. X
  210. X    LONG argv[4];
  211. X    UBYTE *ptr;
  212. X    long ret;
  213. X
  214. X/*  timep[1] -= timezone;   */
  215. X
  216. X    date.ds_Days = timep[1] / 86400;
  217. X    date.ds_Minute = (timep[1] - (date.ds_Days * 86400))/60;
  218. X    date.ds_Tick = ( timep[1] - (date.ds_Days * 86400) -
  219. X                                (date.ds_Minute * 60)
  220. X                   ) * TICKS_PER_SECOND;
  221. X    date.ds_Days -= ((8*365+2));
  222. X
  223. X    if( !(taskport = (struct MsgPort *)DeviceProc(file)) )
  224. X    {
  225. X        errno = ESRCH;          /* no such process */
  226. X        _OSERR = IoErr();
  227. X        return(-1);
  228. X    }
  229. X
  230. X    if( !(lock = (struct FileLock *)Lock(file,SHARED_LOCK)) )
  231. X    {
  232. X        errno = ENOENT;         /* no such file */
  233. X        _OSERR = IoErr();
  234. X        return(-1);
  235. X    }
  236. X
  237. X    if( !(fib = (struct FileInfoBlock *)AllocMem(
  238. X        (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) )
  239. X    {
  240. X        errno = ENOMEM;         /* insufficient memory */
  241. X        UnLock((BPTR)lock);
  242. X        return(-1);
  243. X    }
  244. X
  245. X    if( Examine((BPTR)lock,fib)==FAILURE )
  246. X    {
  247. X        errno = EOSERR;         /* operating system error */
  248. X        _OSERR = IoErr();
  249. X        UnLock((BPTR)lock);
  250. X        FreeMem((char *)fib,(long)sizeof(*fib));
  251. X        return(-1);
  252. X    }
  253. X
  254. X    dirlock = (struct FileLock *)ParentDir((BPTR)lock);
  255. X    ptr = (UBYTE *)AllocMem(64L,MEMF_PUBLIC);
  256. X    strcpy((ptr+1),fib->fib_FileName);
  257. X    *ptr = strlen(fib->fib_FileName);
  258. X    FreeMem((char *)fib,(long)sizeof(*fib));
  259. X    UnLock((BPTR)lock);
  260. X
  261. X    /* now fill in argument array */
  262. X
  263. X    argv[0] = NULL;
  264. X    argv[1] = (LONG)dirlock;
  265. X    argv[2] = (LONG)&ptr[0] >> 2;
  266. X    argv[3] = (LONG)&date;
  267. X
  268. X    errno = ret = sendpkt(taskport,34L,argv,4L);
  269. X
  270. X    FreeMem(ptr,64L);
  271. X    UnLock((BPTR)dirlock);
  272. X
  273. X    return(0);
  274. X
  275. X} /* utime() */
  276. X/*  sendpkt.c
  277. X *  by A. Finkel, P. Lindsay, C. Sheppner
  278. X *  returns Res1 of the reply packet
  279. X */
  280. X/*
  281. X#include <exec/types.h>
  282. X#include <exec/memory.h>
  283. X#include <libraries/dos.h>
  284. X#include <libraries/dosextens.h>
  285. X#include <proto/exec.h>
  286. X#include <proto/dos.h>
  287. X*/
  288. X
  289. XLONG sendpkt(pid,action,args,nargs)
  290. Xstruct MsgPort *pid;            /* process identifier (handler message port) */
  291. XLONG action,                    /* packet type (desired action)              */
  292. X     *args,                     /* a pointer to argument list                */
  293. X     nargs;                     /* number of arguments in list               */
  294. X{
  295. X
  296. X    struct MsgPort *replyport;
  297. X    struct StandardPacket *packet;
  298. X    LONG count, *pargs, res1;
  299. X
  300. X    replyport = (struct MsgPort *)CreatePort(0L,0L);
  301. X    if( !replyport ) return(NULL);
  302. X
  303. X    packet = (struct StandardPacket *)AllocMem(
  304. X            (long)sizeof(struct StandardPacket),MEMF_PUBLIC|MEMF_CLEAR);
  305. X    if( !packet )
  306. X    {
  307. X        DeletePort(replyport);
  308. X        return(NULL);
  309. X    }
  310. X
  311. X    packet->sp_Msg.mn_Node.ln_Name  = (char *)&(packet->sp_Pkt);
  312. X    packet->sp_Pkt.dp_Link          = &(packet->sp_Msg);
  313. X    packet->sp_Pkt.dp_Port          = replyport;
  314. X    packet->sp_Pkt.dp_Type          = action;
  315. X
  316. X    /* copy the args into the packet */
  317. X    pargs = &(packet->sp_Pkt.dp_Arg1);      /* address of 1st argument */
  318. X    for( count=0; count<nargs; count++ )
  319. X        pargs[count] = args[count];
  320. X
  321. X    PutMsg(pid,(struct Message *)packet);   /* send packet */
  322. X
  323. X    WaitPort(replyport);
  324. X    GetMsg(replyport);
  325. X
  326. X    res1 = packet->sp_Pkt.dp_Res1;
  327. X
  328. X    FreeMem((char *)packet,(long)sizeof(*packet));
  329. X    DeletePort(replyport);
  330. X
  331. X    return(res1);
  332. X
  333. X} /* sendpkt() */
  334. END_OF_FILE
  335.   if test 3993 -ne `wc -c <'AMIGA/utime.c'`; then
  336.     echo shar: \"'AMIGA/utime.c'\" unpacked with wrong size!
  337.   fi
  338.   # end of 'AMIGA/utime.c'
  339. fi
  340. if test -f 'ATARI/README.src.UU' -a "${1}" != "-c" ; then 
  341.   echo shar: Will not clobber existing file \"'ATARI/README.src.UU'\"
  342. else
  343.   echo shar: Extracting \"'ATARI/README.src.UU'\" \(4205 characters\)
  344.   sed "s/^X//" >'ATARI/README.src.UU' <<'END_OF_FILE'
  345. Xbegin 666 ATARI/README.src
  346. XM54Y:25 @-"XQ('-O=7)C92!C;V1E(&9O<B!T:&4@071A<FD@4U0-"CT]/3T]
  347. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]#0H-"E1H92!S;W5R
  348. XM8V4@8V]D92!F;W(@54Y:25 @-"XQ("AO<B!L871E<BD@:7,@879A:6QA8FQE
  349. XM('1H<F]U9V@-"F%N;VYY;6]U<R!F=' @9G)O;3H-"@T*"7-I;71E;#(P+F%R
  350. XM;7DN;6EL"6UI<V,O=6YI>"]U;GII<#0Q+BH-"F]R"7=U87)C:&EV92YW=7-T
  351. XM;"YE9'4);6ER<F]R<R]M:7-C+W5N:7@O=6YZ:7 T,2XJ#0H-"DD@:&%V92!C
  352. XM;VUP:6QE9"!U;GII<"YP<F<@=VET:"!455)"3R!#(#(N,"!F;W(@=&AE($%4
  353. XM05))(%-4+"!P<F]B86)L>0T*=&AE(&)E<W0@0R!C;VUP:6QE<B!A=F%I;&%B
  354. XM;&4@9F]R('1H92!!=&%R:2!35"X-"@T*37D@;6]D:69I8V%T:6]N<R!T;R!U
  355. XM;GII<#H-"@T*,2D@051!4DE35"Y0050-"@DM(&%N(&%L:6=N;65N="!P<F]B
  356. XM;&5M(&EN('1H92!D871A("AU;GII<"YC*0T*#0H)+2!S970@)UPG(&%S('1H
  357. XM92!P871H(&-H87)A8W1E<B!F;W(@=&AE($%T87)I(%-4("AM87!N86UE+F,I
  358. XM#0H-"@DM(&%D9&ET:6]N<R!T;R!U;GII<"YH('-O('1H870@5'5R8F\@0R!F
  359. XM;W(@=&AE($%T87)I(%-4(&ES("!H87!P>2X-"@D@($D@=&AI;FL@22!D:61N
  360. XM)W0@8G)E86L@86YY=&AI9R!E;'-E+"!A="!L96%S="!T:&4@4W5N)W,@=F5R
  361. XM<VEO;@T*"2 @8V]M<&EL97,@:G5S="!A<R!B969O<F4N#0H)("!)(&-O;6UE
  362. XM;G1E9"!M87-S:79E;'D@:6X@=6YZ:7 N:"!B96-A=7-E('1H92!C;VYF:6=U
  363. XM<F%T:6]N#0H@(" @(" @(" @:7,@;F]T('=E;&P@=&AO=6=H="!O=70N("!4
  364. XM:&4@;&%S="!T:6UE($D@9V5N97)A=&5D('1H92!35 T*(" @(" @(" @('9E
  365. XM<G-I;VX@22!T:')E=R!O=70@86QL('1H92!M97-S+"!T:&4@<F5S=6QT(&]F
  366. XM('=H:6-H('=A<R!T:&%T#0H@(" @(" @(" @;7D@=F5R<VEO;B!W87-N)W0@
  367. XM9&ES=')I8G5T960N("!)(&AO<&4@=&AA="!W:6QL(&9I="!I;B!B971T97(-
  368. XM"B @(" @(" @("!T:&ES('1I;64N("!)9B!A;GEB;V1Y(&-A<F5S(&%B;W5T
  369. XM('1H92!C;VUM96YT<RP@:G5S="!C;&5A;B!U< T*(" @(" @(" @('1H92!C
  370. XM;V1E("AT;V=E=&AE<B!W:71H(&-O;6UE;G1S*2X-"@T*,BD@3U!424U)6D4N
  371. XM4$%4#0H)5&AI<R!P871C:"!I<R!G96YE<F%L(&%N9"!N;W0@<F5L871E9"!T
  372. XM;R!T:&4@071A<FD@4U0N#0H)270@<W!E961S('5P('1H92!P<F]C97-S:6YG
  373. XM(&)Y(&%S(&UU8V@@87,@,S E(&)Y#0H)96QI;6EN871I;F<@;6%N>2!F=6YC
  374. XM=&EO;B!C86QL<RP@;W!T:6UI>FEN9R!S;VUE#0H);6%C<F]S(&%N9"!U<VEN
  375. XM9R!A(%5,3TY'(&)I=&)U9F9E<BX@(%1H92!C;&%I;65D#0H)<&5R9F]R;6%N
  376. XM8V4@9V%I;B!I<R!O;B!A(%-U;BP@=7-I;F<@=6YZ:7 @+70@<V]M92UF:6QE
  377. XM+@T*"4D@9&ED;B=T(&UE87-U<F4@=&AE('-P965D(&]N('1H92!!=&%R:2!3
  378. XM5"X-"@T*,RD@4UE-3$E.2RY0050-"@E4:&ES(&%P<&QI97,@=&\@=6YI>"!S
  379. XM>7-T96US(&]N;'DN("!5;GII<"!D;V5S(&5X=')A8W0-"@ES>6UB;VQI8R!L
  380. XM:6YK<R!C;W)R96-T;'D@;F]W+@T*#0HT*2!53DE80DQ!3BY0050-"@E/;B!5
  381. XM;FEX('-Y<W1E;7,L(&9I;&4@;F%M97,@;6%Y(&-O;G1A:6X@8FQA;FMS+@T*
  382. XM"4EF('1H97D@9&\L('=H>2!N;W0@86QL;W<@=&AE;2!T;R!B92!R97-T;W)E
  383. XM9"!E>&%C=&QY/PT*"49O<B!A;&P@;W1H97(@<WES=&5M<R!S=&EL;"!C:&%N
  384. XM9V4@=&AE(&)L86YK<R!T;R G7R<N#0H-"D1U92!T;R!H:7-T;W)I8R!R96%S
  385. XM;VYS('1H92!O<F1E<B!T:&5S92!P871C:&5S('=E<F4@87!P;&EE9"!I<PT*
  386. XM(#,@+2 T("T@,2 M(#(N("!(;W=E=F5R('1H97D@9&\@;F]T(&]V97)L87 @
  387. XM86YD(&-A;B!T:&5R969O<F4@8F4-"F%P<&QI960@:6YD97!E;F1E;G1L>2X-
  388. XM"@T*22!A;2!P<F]V:61I;F<@54Y:25 N4%)'(&9O<B!T:&4@071A<FD@4U0@
  389. XM87,@54Y:25 T,2Y!4D,-"F9O<B!T:&]S92!W:&\@9&]N)W0@:&%V92!A;GD@
  390. XM=6YZ:7!P97(@>65T+@T*#0I3<&5C:6%L(&9E871U<F5S.@T*/3T]/3T]/3T]
  391. XM/3T]/3T]/3T-"@T*(%5N>FEP+G!R9R!U<V5S(&$@<W!E8VEA;"!V97)S:6]N
  392. XM(&]F('1H92!S=&%R='5P(&9I;&4@=VAI8V@@:7,@8V%P86)L90T*(&]F(')E
  393. XM8V]G;FEZ:6YG(&5X=&5N9&5D('!A<F%M971E<G,@82!L82!"96-K96UE>65R
  394. XM+TUA<FL@5VEL;&EA;7,@<VAE;&PL#0H@=7-I;F<@=&AE(")!4D=6/2(@16YV
  395. XM:7)O;FUE;G0@=F%R:6%B;&4N#0H-"B!!;'1H;W5G:"!T:&4@5'5R8F\@0R!C
  396. XM;VUP:6QE<B!I<R!Q=6ET92!G;V]D+"!T:&4@;&EB<R!A<F4@8G5G9WDA#0H@
  397. XM5&AE<F5F;W)E($D@8V%N;F]T(&=A<F%N=&5E('1H870@86YY('5N>FEP+G!R
  398. XM9R!C;VUP:6QE9"!W:71H(%1U<F)O($,-"B!W:6QL(&5V97(@<G5N('-U8V-E
  399. XM<W-F=6QL>2X@36EN92!S965M<R!T;R!B92!O:RXL(&)U="!)(&AA=F4@9FEX
  400. XM960-"B!V87)I;W5S('!R;V)L96US(&9O<B!M>2!L:6(N($5S<&5C:6%L;'D@
  401. XM=&AE('-T870H*2!W87,@;6%K:6YG('1R;W5B;&4N#0H-"DAO=V5V97(L(&EF
  402. XM('-O;65O;F4@=V%N=',@=&\@8V]M<&EL92!I="!T:&4@<V%M92!W87D@22!D
  403. XM:60L#0IT:&5R92!A<F4@97-S96YT:6%L;'D@,R!W87ES.@T*+2!U<VEN9R!A
  404. XM('-H96QL+"!A;F0@=&AE(&-O;6UA;F0@;&EN92!C;VUP:6QE<B!40T,L#0H@
  405. XM(&%S(&EN9&EC871E9"!B>2!T:&4@<V-R:7!T("=-04M%250G+ T*#0HM('5S
  406. XM:6YG('-O;64@<V]R="!O9B!M86ME(&%N9" G34%+149)3$4N4U0G#0H@(%1H
  407. XM:7,@86YD('1H92!P<F5V:6]U<R!C87-E(&)O=&@@<F5Q=6ER92!A;'-O("=4
  408. XM3$E.2RY/4%0G#0H-"BT@=7-I;F<@=&AE(&EN=&5R86-T:79E('9E<G-I;VX@
  409. XM)U1#)R!O9B!4=7)B;R!#(&%N9 T*("!T:&4@<W5P<&QI960@)U5.6DE0+E!2
  410. XM2B<N#0H-"E!L96%S92!R96%D('1H92!N;W1E(&%B;W9E(&%B;W5T('!R;V)L
  411. XM96US('=H:6-H(&UI9VAT(&%R:7-E#0IW:&5N('EO=2!R96-O;7!I;&4@=6YZ
  412. XM:7 @;VX@>6]U<B!!=&%R:2X-"@T*"0D)"0EM87)T:6Y 871L86YT:6,N8W,N
  413. X*=6YB+F-A#0H-"B!!
  414. Xend
  415. END_OF_FILE
  416.  if test 4205 -ne `wc -c <'ATARI/README.src.UU'`; then
  417.     echo shar: \"'ATARI/README.src.UU'\" unpacked with wrong size!
  418.   else
  419.     echo shar: Uudecoding \"'ATARI/README.src'\" \(3025 characters\)
  420.     cat ATARI/README.src.UU | uudecode
  421.     if test 3025 -ne `wc -c <'ATARI/README.src'`; then
  422.       echo shar: \"'ATARI/README.src'\" uudecoded with wrong size!
  423.     else
  424.       rm ATARI/README.src.UU
  425.     fi
  426.   fi
  427.   # end of 'ATARI/README.src.UU'
  428. fi
  429. if test -f 'ATARI/unzip.prj.UU' -a "${1}" != "-c" ; then 
  430.   echo shar: Will not clobber existing file \"'ATARI/unzip.prj.UU'\"
  431. else
  432.   echo shar: Extracting \"'ATARI/unzip.prj.UU'\" \(586 characters\)
  433.   sed "s/^X//" >'ATARI/unzip.prj.UU' <<'END_OF_FILE'
  434. Xbegin 666 ATARI/unzip.prj
  435. XM.SX^/CX^/CX@54Y:25 N4%)*#0H-"E5.6DE0+E!21PT*#0H](" @(" @(" @
  436. XM(" @(" @(" @.R!L:7-T(&]F(&UO9'5L97,@9F]L;&]W<RXN+@T*#0H[(%1#
  437. XM4U1!4E0N3R @(" @(" @(" [('-T87)T=7 @8V]D90T*35E35$%25"Y/#0I5
  438. XM3EI)4"Y##0I&24Q%7TE/+D,-"DU!4$Y!344N0PT*34%40T@N0PT*34E30RY#
  439. XM#0I53DE-4$Q/1"Y##0I53E)%1%5#12Y##0I53E-(4DE.2RY##0H-"E1#4U1$
  440. XM3$E"+DQ)0B @(" @(" [('-T86YD87)D(&QI8G)A<GD-"E1#15A43$E"+DQ)
  441. XM0B @(" @(" [(&5X=&5N9&5D(&QI8G)A<GD-"E1#5$]33$E"+DQ)0B @(" @
  442. XM(" [(%1/4R!L:6)R87)Y#0H-"CL^/CX^/CX^/CX^/CX^/CX^/CX^/CX^/CX^
  443. XI/CX^/CX^/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\#0H^
  444. Xend
  445. END_OF_FILE
  446.  if test 586 -ne `wc -c <'ATARI/unzip.prj.UU'`; then
  447.     echo shar: \"'ATARI/unzip.prj.UU'\" unpacked with wrong size!
  448.   else
  449.     echo shar: Uudecoding \"'ATARI/unzip.prj'\" \(401 characters\)
  450.     cat ATARI/unzip.prj.UU | uudecode
  451.     if test 401 -ne `wc -c <'ATARI/unzip.prj'`; then
  452.       echo shar: \"'ATARI/unzip.prj'\" uudecoded with wrong size!
  453.     else
  454.       rm ATARI/unzip.prj.UU
  455.     fi
  456.   fi
  457.   # end of 'ATARI/unzip.prj.UU'
  458. fi
  459. if test -f 'BUGS' -a "${1}" != "-c" ; then 
  460.   echo shar: Will not clobber existing file \"'BUGS'\"
  461. else
  462.   echo shar: Extracting \"'BUGS'\" \(3584 characters\)
  463.   sed "s/^X//" >'BUGS' <<'END_OF_FILE'
  464. XBugs (real and/or imagined):
  465. X---------------------------
  466. X
  467. X - Watcom C getch() broken; password echos (reported to Watcom by K.U.Rommel)
  468. X - VMS docs out of date
  469. X - Amiga port broken?
  470. X - VMS unzip no longer sets permissions correctly
  471. X - Macintosh file attributes not interpreted correctly (both unzip, zipinfo)
  472. X - errno declaration conflicts with several compilers' definitions:  change
  473. X    logic so undeclared by default?  How many systems affected?
  474. X - (?) add ifndef MODERN around srand, rand prototypes in crypt.c? [James
  475. X    Birdsall, 4/23]
  476. X - pkbug error:  zipfile with incorrect csize and/or ucsize--check for end of
  477. X    compressed (csize) data in uncompression routines:
  478. X      unimplod.c:    while ((!zipeof) && ((outpos + outcnt) < ucsize)) {
  479. X      unreduce.c:    while (((outpos + outcnt) < ucsize) && (!zipeof)) {
  480. X    (James Birdsall, Mark, bottom of BUGS.long)
  481. X - if PK signature not found, append .zip and try again without error 
  482. X    messages (Jean-loup, others, bottom of BUGS.long)
  483. X - disk full:  a few files clear some pointer; continuing beyond "Continue?"
  484. X    prompt, regardless of answer, kills unzip--stack too small? (doesn't seem
  485. X    to matter)  Bug in MSC write() function?  Subsequent write code isn't any 
  486. X    different from -t option, so unlikely to be bug in uncompress routines...
  487. X    File descriptor bad/close() failure?  (workaround:  ^C at prompt)
  488. X - textfile conversions on a PC system add extra CR to lines which already have
  489. X    CR/LF combo; other directions probably don't work, either (Mac/Unix/...):
  490. X    rewrite "dos2unix" and make general
  491. X - compressed symlinks are allowed:  revise symlink code
  492. X - fix "no errors detected" message for errors occurring *before* extract_or_
  493. X    test_files(); count errors?  differentiate between errors and warnings?
  494. X
  495. X
  496. XFeatures (possible and/or definite):
  497. X-----------------------------------
  498. X
  499. X - add -x "exclude following files" option to unzip and zipinfo
  500. X - make use of FILE_IO_C and similar defines to avoid including unnecessary
  501. X    header files in various modules (unzip.h)
  502. X - add "near" to global vars [Steve Salisbury, 4/21]
  503. X - construct CRC table dynamically? [Jean-loup, 5/12]
  504. X - when listing filenames, use '?' for non-printables? [Thomas Wolff, 6/1]
  505. X - modify to decompress input stream if part of a pipe, but continue using
  506. X    central directory if not (BIG job!)--extended local header capability
  507. X - need zipinfo target(s) in makefile.dos
  508. X - build in capability to check text/binary type and warn if -a (if version
  509. X    < 1.1 and not made on DOS--i.e., not early Info-ZIP versions)
  510. X - allow wildcards in zipfile name (loop through each one)
  511. X - test/incorporate Martin Schulz optimization patch (still useful?)
  512. X - add -oo option (overwrite and override):  no user queries (if bad password,
  513. X    skip file; if disk full, take default action; if VMS special on non-VMS,
  514. X    unpack anyway; etc.)
  515. X - add -Q[Q[Q]] option (quiet mode on comments, cautions, warnings and errors):
  516. X    forget -oo, or make synonym?  Default level -Q?
  517. X - incorporate Atari patches
  518. X - rewrite mapname()
  519. X - modify set_file_time routines to share common code (macro?)
  520. X - add zipinfo "in-depth" option? (check local vs. central filenames, etc.)
  521. X - create zipcat program to concatenate zipfiles
  522. X - create zipfix program to rebuild/salvage damaged zipfiles
  523. X - assembly-language routines?
  524. X - add -i (ignore case for internal filename match) option?  (maybe not)
  525. X - CP/M version (Jeffery Foy)
  526. X - VM/CMS version (Chua Kong Sian, others)
  527. X - put man pages in more "proper" nroff format
  528. X - add OS/2 .INF format helpfiles for UnZip and ZipInfo
  529. X
  530. END_OF_FILE
  531.   if test 3584 -ne `wc -c <'BUGS'`; then
  532.     echo shar: \"'BUGS'\" unpacked with wrong size!
  533.   fi
  534.   # end of 'BUGS'
  535. fi
  536. if test -f 'CONTRIBS' -a "${1}" != "-c" ; then 
  537.   echo shar: Will not clobber existing file \"'CONTRIBS'\"
  538. else
  539.   echo shar: Extracting \"'CONTRIBS'\" \(3583 characters\)
  540.   sed "s/^X//" >'CONTRIBS' <<'END_OF_FILE'
  541. XThis is a partial list of contributors to Info-ZIP UnZip and the code upon
  542. Xwhich it is based.  Many, many others have also contributed, and if you are
  543. Xamong them, please let us know.  Aside from the Info-ZIP digest archives,
  544. Xwe have not kept very good track of who contributed what.  Also, contributors
  545. Xto the makefile are listed at the bottom of Makefile.
  546. X
  547. X  Mark Adler             decryption, inflate, explode, funzip code; misc. casts
  548. X  Glenn Andrews          MSDOS makefiles; prototyping bugfix
  549. X  Joel Aycock            descrip.mms bugfix
  550. X  Allan Bjorklund        in misc.c
  551. X  James Birdsall         extract.c bugfix; etc.
  552. X  Wim Bonner             OS/2 stuff
  553. X  John Cowan             mods to original match.c; other stuff?
  554. X  Frank da Cruz          xxu.c, on which mapname.c is based
  555. X  Bill Davidsen          -q(q); mapname stuff; memset/memcpy(?); etc.
  556. X  Arjan de Vet           various things, but I don't remember exactly what...
  557. X  James Dugal            ZMEM stuff; unshrink bugfix; file perms stuff; etc.
  558. X  Jim Dumser             -z stuff; umask bugfixes; etc.
  559. X  Mark Edwards           in mapname.c, misc.c
  560. X  David Feinleib         Windows NT port
  561. X  Mike Freeman           VMS GCC makefiles; etc.
  562. X  Jean-loup Gailly       decryption code; much prodding to fix bugs :-)
  563. X  Hunter Goatley         VMS RUNOFF source (documentation)
  564. X  Robert Heath           original Windows port
  565. X  Dave Heiland           new usage screen [, new documentation...?]
  566. X  Larry Jones            ZMEM stuff; unimplod bugfix; etc.
  567. X  Kjetil J{\o}rgenson    ln/copy misc_.c bugfix
  568. X  Bob Kemp               NOTINT16 rewrite (byte arrays instead of structs)
  569. X  J. Kercheval           filmatch.c, on which match.c is based
  570. X  David Kirschbaum       mapname port; general-purpose meddling; Python jokes
  571. X  Alvin Koh              Borland C++ bugfixes
  572. X  Bo Kullmar             -z code; bugfixes: umask, do_string, BSD time; etc.
  573. X  Johnny Lee             Macintosh port; Mac resource fork stuff; Win3.1 port
  574. X  Warner Losh            in misc.c
  575. X  Igor Mandrichenko      vms.c; many improvements and VMS modifications
  576. X  Fulvio Marino          revised UnZip and ZipInfo man pages
  577. X  Carl Mascott           original Unix port
  578. X  Gene McManus           -o code
  579. X  Joe Meadows            file.c, on which VMSmunch.c is based
  580. X  Mike O'Carroll         OS/2 stuff
  581. X  Humberto Ortiz-Zuazaga Linux port; permissions bugfix; missing declarations
  582. X  Keith Petersen         former Info-ZIP list maintainer
  583. X  Piet W. Plomp          nice fix for msc_dos Makefile target
  584. X  Antonio Querubin, Jr   descrip.mms (VMS makefile)
  585. X  Greg Roelofs           central directory code; ZipInfo; original VMS port;...
  586. X  Kai Uwe Rommel         much OS/2 code; bugfixes; etc.
  587. X  Steve Salisbury        CountryInfo bugfix; variable INBUFSIZ
  588. X  Georg Sassen           Amiga DICE compiler port
  589. X  Jon Saxton             date formats
  590. X  Hugh Schmidt           VMS stuff
  591. X  Martin Schulz          Atari patches
  592. X  Charles Scripter       various bug reports and bugfixes
  593. X  Chris Seaman           Unix time stuff
  594. X  Richard Seay           MS-DOS Quick C makefile
  595. X  Alex Sergejew          file_io.c bugfix; stat() bugfix; Down Under jokes
  596. X  Samuel H. Smith        original unzip code (Pascal and C) for PC
  597. X  Cliff Stanford         file_io.c umask bug
  598. X  Onno van der Linden    SCO optimization bugfix; etc.
  599. X  Jim Van Zandt          one of original man pages
  600. X  Antoine Verheijen      MTS/EBCDIC stuff; FILENAME_MAX stuff; Mac fixes; etc.
  601. X  Rich Wales             current Info-ZIP moderator and zip guy
  602. X  Paul Wells             original Amiga port for SAS/C and Lattice C (?)
  603. END_OF_FILE
  604.   if test 3583 -ne `wc -c <'CONTRIBS'`; then
  605.     echo shar: \"'CONTRIBS'\" unpacked with wrong size!
  606.   fi
  607.   # end of 'CONTRIBS'
  608. fi
  609. if test -f 'MSDOS/Borland.fix' -a "${1}" != "-c" ; then 
  610.   echo shar: Will not clobber existing file \"'MSDOS/Borland.fix'\"
  611. else
  612.   echo shar: Extracting \"'MSDOS/Borland.fix'\" \(3818 characters\)
  613.   sed "s/^X//" >'MSDOS/Borland.fix' <<'END_OF_FILE'
  614. XNotes on patching Borland (binary) executables so they'll understand Unix-
  615. Xstyle, LF-delimited ASCII files (from Onno van der Linden, c/o Frank van
  616. Xder Linden, vdlinden@fwi.uva.nl).
  617. X
  618. X
  619. X1. The CPP used by TC 2.0 can't handle unix-style (LF-terminated) lines.
  620. X   The CPP used by BC++ 2.0 can.
  621. X   The CPP used by BC++ 3.0 can't handle #if statements with unix-style lines.
  622. X   Fixes for both these problems below (GRR:  offset, new byte, old byte).
  623. X
  624. X     Comparing files \TC\CPP.EXE and \TC\CPP.OLD
  625. X     00004F25: 0D 0A
  626. X     00005E3D: 0D 0A
  627. X     00007916: 0D 0A
  628. X     000079D6: 0D 0A
  629. X     00007AC1: 0A 0D
  630. X     0000D8EE: EC F7
  631. X     0000D8F1: F7 EC
  632. X     0000D9EE: EC F7
  633. X     0000D9F1: F7 EC
  634. X     0000DC80: 0A 0D
  635. X     0000DC90: 0A 0D
  636. X
  637. X     Comparing files \BORLANDC\BIN\CPP.EXE and \BORLANDC\BIN\CPP.OLD
  638. X     0001D150: 89 75
  639. X     0001D151: 36 08
  640. X     0001D152: 30 89
  641. X     0001D153: 23 36
  642. X     0001D154: 75 30
  643. X     0001D155: 04 23
  644. X     0001D288: 9A 89
  645. X     0001D289: FF 36
  646. X     0001D28A: FF 30
  647. X     0001D28B: 00 23
  648. X     0001D28C: 00 9A
  649. X     0001D28E: 0E FF
  650. X     0001D28F: 30 00
  651. X     0001D290: 23 00
  652. X     0001E5A7: 89 8D
  653. X
  654. X
  655. X2. The compilers (tcc 2.0 and bcc 3.0) are both one-pass compilers; i.e.,
  656. X   cpp.exe isn't used when compiling with tcc or bcc.  The earlier statements
  657. X   about both cpp's are the same for the builtin preprocesser in the compilers.
  658. X   To fix the unix-style line stuff for the compilers, apply the fixes below.
  659. X   I do have something called bpatch.c which reads in the output of fc /b and
  660. X   changes the executable.  If anyone is too lazy to write it himself, just
  661. X   send out a mail.
  662. X
  663. X     Comparing files TCC.EXE and TCC.OLD
  664. X     00005E06: BF 88
  665. X     00005E07: 02 01
  666. X     00005E0C: 88 BF
  667. X     00005E0D: 01 02
  668. X     00006E7C: 0A 0D
  669. X     00011FF9: 0A 0D
  670. X     00012059: 0A 0D
  671. X     00017E6C: 0A 0D
  672. X     00018181: 0A 0D
  673. X     000181F6: 0A 0D
  674. X     00018AC1: 0A 0D
  675. X     00018B27: 0D 0A
  676. X     00018BBE: 0A 0D
  677. X     00018C12: 0A 0D
  678. X     00018C6A: 0A 0D
  679. X     0001948A: 0A 0D
  680. X     000194B7: 0D 0A
  681. X     00019507: 0A 0D
  682. X     0001C093: 0A 0D
  683. X     0001C495: 3C 89
  684. X     0001C496: 0D 46
  685. X     0001C497: 74 FC
  686. X     0001C498: DF 3D
  687. X     0001C499: FF 0D
  688. X     0001C49A: 0E 00
  689. X     0001C49B: 34 75
  690. X     0001C49C: 50 03
  691. X     0001C49D: 3C E9
  692. X     0001C49E: 0A F6
  693. X     0001C49F: 75 FB
  694. X     0001C4A0: 03 FF
  695. X     0001C4A1: E9 0E
  696. X     0001C4A2: F2 34
  697. X     0001C4A3: FB 50
  698. X     0001C4D0: 0A 0D
  699. X     0001CFA7: 0A 0D
  700. X     0001CFBA: 0D 0A
  701. X     0001D007: 0A 0D
  702. X     0002A13C: 0A 0D
  703. X     0002A14C: 0A 0D
  704. X     0002A2B6: EC F7
  705. X     0002A2B9: F7 EC
  706. X     0002A3B6: EC F7
  707. X     0002A3B9: F7 EC
  708. X     0002A4B6: EC F7
  709. X     0002A4B9: F7 EC
  710. X     0002BDC3: 20 21
  711. X     0002BDC6: 21 20
  712. X     
  713. X     Comparing files BCC.EXE and BCC.OLD
  714. X     0002B877: 89 75
  715. X     0002B878: 36 08
  716. X     0002B879: 5C 89
  717. X     0002B87A: 5F 36
  718. X     0002B87B: 75 5C
  719. X     0002B87C: 04 5F
  720. X     0002B9AF: 0E 89
  721. X     0002B9B0: E8 36
  722. X     0002B9B1: 56 5C
  723. X     0002B9B2: DC 5F
  724. X     0002B9B3: FF 90
  725. X     0002B9B5: 5C E8
  726. X     0002B9B6: 5F 51
  727. X     0002B9B7: 90 DC
  728. X     
  729. X   Just an addition: the first one was for the cpp.exe's, the recent one is for
  730. X   the compilers (bcc.exe, tcc.exe).  The first one is a bit redundant because
  731. X   cpp.exe is hardly ever used.  See it as an attempt to make things complete.
  732. X
  733. X
  734. X3. For those of you who are using NDMAKE45 under MSDOS:
  735. X   version 4.5 predefines the macro's MAKE and MFLAGS as readonly's.
  736. X   So there was no way you could use $(MAKE) with ndmake45.
  737. X   Here are the fc /b's that make things work:
  738. X
  739. X     Comparing files MAKE45.EXE and MAKE45.OLD
  740. X     000019C0: 00 03   # MFLAG
  741. X     000019DC: 00 03   # MAKE
  742. X     00007BEA: 0A 7E   # output of make -p
  743. X     00007BEB: 00 0A   #
  744. X
  745. X     Comparing files MAKE45L.EXE and MAKE45L.OLD
  746. X     0000277E: 00 03   # MFLAG
  747. X     0000279D: 00 03   # MAKE
  748. X     0000A6A8: 0A 7E   # output of make -p
  749. X     0000A6A9: 00 0A
  750. X
  751. END_OF_FILE
  752.   if test 3818 -ne `wc -c <'MSDOS/Borland.fix'`; then
  753.     echo shar: \"'MSDOS/Borland.fix'\" unpacked with wrong size!
  754.   fi
  755.   # end of 'MSDOS/Borland.fix'
  756. fi
  757. if test -f 'MSDOS/makefile' -a "${1}" != "-c" ; then 
  758.   echo shar: Will not clobber existing file \"'MSDOS/makefile'\"
  759. else
  760.   echo shar: Extracting \"'MSDOS/makefile'\" \(3196 characters\)
  761.   sed "s/^X//" >'MSDOS/makefile' <<'END_OF_FILE'
  762. X#------------------------------------------------------------------------------
  763. X# Makefile for UnZip 5.x and ZipInfo 1.x                Greg Roelofs and others
  764. X# Version:  Microsoft C 5.x / Turbo C                              24 June 1992
  765. X#------------------------------------------------------------------------------
  766. X
  767. X# Comment/uncomment appropriate sections for your compiler.  Users of MSC 6
  768. X# and NMAKE should use the main Makefile, targets msc_dos and zi_dos.
  769. X#
  770. X# Latest revisions:  26 June 1992
  771. X
  772. X
  773. X#####################
  774. X# MACRO DEFINITIONS #
  775. X#####################
  776. X
  777. XCRYPTF =
  778. XCRYPTO =
  779. X# Uncomment the following two lines for decryption version:
  780. X#CRYPTF = -DCRYPT
  781. X#CRYPTO = crypt.obj
  782. X
  783. XSTRIP=rem
  784. X#    If you don't have lzexe, get it. Then define:
  785. X#STRIP=lzexe
  786. X#    and remove /e from LDFLAGS
  787. X#    This makes a big difference in .exe size (and possibly load time).
  788. X
  789. X
  790. X# MSC for MS-DOS:
  791. X# --------------
  792. XCC = cl
  793. XCFLAGS = -AS -Oait -Gs -G2 $(CRYPTF)   # add -G2 and/or -FPi87 for 80286/80x87
  794. XINCL =                                 # (-Ox does not work for inflate.c)
  795. XLD = link
  796. XLDFLAGS = /NOI/e/st:0x1000
  797. X# remove /e in above line if you have lzexe
  798. XLDFLAGS2 = ,$*;
  799. X
  800. X# Turbo C 2.0 for MS-DOS:
  801. X# ----------------------
  802. X## tcc is usually configured with -I and -L set appropriately...
  803. X#CC = tcc
  804. X#CFLAGS = -ms -O -Z $(CRYPTF)           # add -1 for 80286 instructions
  805. X#INCL = #-Ic:\turboc\include
  806. X#LD = tcc
  807. X#LDFLAGS = -ms #-Lc:\turboc\lib
  808. X#LDFLAGS2 =
  809. X
  810. X
  811. XOBJS1 = unzip.obj $(CRYPTO) envargs.obj explode.obj extract.obj file_io.obj
  812. XOBJS2 = inflate.obj mapname.obj match.obj misc.obj unreduce.obj unshrink.obj
  813. X
  814. XZI_OBJS = zipinfo.obj envargs.obj match.obj misc_.obj
  815. X
  816. X
  817. X###############################################
  818. X# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  819. X###############################################
  820. X
  821. Xdefault:        unzip.exe zipinfo.exe
  822. X
  823. X.c.obj:
  824. X        $(CC) -c $(CFLAGS) $(INCL) $*.c
  825. X
  826. Xunzip.obj:      unzip.c unzip.h
  827. X
  828. Xcrypt.obj:      crypt.c unzip.h zip.h    # may or may not be in distribution
  829. X
  830. Xenvargs.obj:    envargs.c unzip.h
  831. X
  832. Xexplode.obj:    explode.c unzip.h
  833. X
  834. Xextract.obj:    extract.c unzip.h
  835. X
  836. Xfile_io.obj:    file_io.c unzip.h
  837. X
  838. Xinflate.obj:    inflate.c unzip.h
  839. X
  840. Xmapname.obj:    mapname.c unzip.h
  841. X
  842. Xmatch.obj:      match.c unzip.h
  843. X
  844. Xmisc.obj:       misc.c unzip.h
  845. X
  846. Xmisc_.obj:      misc.c unzip.h
  847. X    copy misc.c misc_.c
  848. X        $(CC) -c $(CFLAGS) -DZIPINFO $(INCL) misc_.c
  849. X    del misc_.c
  850. X
  851. Xunreduce.obj:   unreduce.c unzip.h
  852. X
  853. Xunshrink.obj:   unshrink.c unzip.h
  854. X
  855. X
  856. X
  857. X# DOS/MS make:
  858. X# -----------
  859. Xunzip.exe:      $(OBJS1) $(OBJS2)
  860. X    echo $(OBJS1)+ > unzip.rsp
  861. X    echo $(OBJS2); >> unzip.rsp
  862. X    $(LD) $(LDFLAGS) @unzip.rsp
  863. X    del unzip.rsp
  864. X    $(STRIP) unzip.exe
  865. X
  866. X# DOS/Borland tmake:  (not tested:  may need to use tlink instead)
  867. X# -----------------
  868. X#unzip.exe:     $(OBJS1) $(OBJS2)
  869. X#    $(LD) $(LDFLAGS) @&&|
  870. X#$(OBJS1)+
  871. X#$(OBJS2)
  872. X#|
  873. X#    $(STRIP) unzip.exe
  874. X
  875. X# DOS/better makes which know how to deal with 128 char limit on command line:
  876. X# ---------------------------------------------------------------------------
  877. X#unzip.exe:     $(OBJS)
  878. X#    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  879. X
  880. X
  881. X
  882. X# Both makes:  (not tested)
  883. X# ----------
  884. Xzipinfo.exe:    $(ZI_OBJS)
  885. X    $(LD) $(LDFLAGS) $(ZI_OBJS) $(LDFLAGS2)
  886. X    $(STRIP) zipinfo.exe
  887. END_OF_FILE
  888.   if test 3196 -ne `wc -c <'MSDOS/makefile'`; then
  889.     echo shar: \"'MSDOS/makefile'\" unpacked with wrong size!
  890.   fi
  891.   # end of 'MSDOS/makefile'
  892. fi
  893. if test -f 'OS2/makefile.os2' -a "${1}" != "-c" ; then 
  894.   echo shar: Will not clobber existing file \"'OS2/makefile.os2'\"
  895. else
  896.   echo shar: Extracting \"'OS2/makefile.os2'\" \(3611 characters\)
  897.   sed "s/^X//" >'OS2/makefile.os2' <<'END_OF_FILE'
  898. X# Makefile for UnZip, ZipInfo and Ship                       12 August 1992
  899. X#
  900. X# - for Microsoft C 6.00 under OS/2 1.x (16-bit)
  901. X# - for IBM C Set/2 under OS/2 2.0 (32-bit)
  902. X# - for Watcom C/386 9.0 under OS/2 2.0 (32-bit)
  903. X# - for GNU gcc (emx kit) under OS/2 2.0 (32-bit)
  904. X
  905. X# To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
  906. X# name being "makefile.os2").
  907. X
  908. X# Notes on Microsoft C 6.00 compilation:
  909. X#   The resulting programs can be used under OS/2 1.x or 2.x
  910. X#   protected mode only, not under DOS.  A larger stack has to
  911. X#   be used for OS/2 because system calls use more stack than
  912. X#   under DOS; 8k is recommended by Microsoft.
  913. X
  914. X# Notes on IBM C Set/2, Watcom C/386 or gcc compilation:
  915. X#   The resulting programs can be used under OS/2 protected
  916. X#   mode of OS/2 2.0 only, not under 1.x and not under DOS.
  917. X
  918. XCRYPTF =
  919. XCRYPTO =
  920. X# *** For decryption version, remove the # at the front of next 2 lines ***
  921. X# CRYPTF = -DCRYPT
  922. X# CRYPTO = crypt$(OBJ)
  923. X
  924. Xdefault:
  925. X    @echo Enter "$(MAKE) -f makefile.os2 msc"
  926. X    @echo    or "$(MAKE) -f makefile.os2 ibm"
  927. X    @echo    or "$(MAKE) -f makefile.os2 watcom"
  928. X    @echo    or "$(MAKE) -f makefile.os2 gcc"
  929. X
  930. Xmscdos:
  931. X    $(MAKE) -f makefile.os2 unzips \
  932. X    CC="cl -nologo -AC -Oaict -Gs" \
  933. X    CFLAGS="-Zp1 $(CRYPTF)" \
  934. X    LDFLAGS="-Lr -F 1000 -Fe" \
  935. X    LDFLAGS2="" \
  936. X    OUT="-Fo" \
  937. X    OBJ=".obj" \
  938. X    OBJO=""
  939. X
  940. Xmsc:
  941. X    $(MAKE) -f makefile.os2 unzips \
  942. X    CC="cl -nologo -AC -Ocegit -Gs" \
  943. X    CFLAGS="-G2 -Zp1 $(CRYPTF) -DOS2 -DMSC" \
  944. X    LDFLAGS="-Lp -F 2000 -Fe" \
  945. X    LDFLAGS2="" \
  946. X    OUT="-Fo" \
  947. X    OBJ=".obj" \
  948. X    DEF=unzip.def DEFI=zipinfo.def DEFS=ship.def
  949. X
  950. Xibm:
  951. X    $(MAKE) -f makefile.os2 unzips \
  952. X    CC="icc -Q -O -Gs" \
  953. X    CFLAGS="-Sm -Sp1 $(CRYPTF) -DOS2" \
  954. X    LDFLAGS="-B/ST:131072 -Fe" \
  955. X    LDFLAGS2="" \
  956. X    OUT="-Fo" \
  957. X    OBJ=".obj" \
  958. X    DEF=unzip.def DEFI=zipinfo.def DEFS=ship.def
  959. X
  960. Xwatcom:
  961. X    $(MAKE) -f makefile.os2 unzips \
  962. X    CC="wcl386 -zq -Ox -s" \
  963. X    CFLAGS="-Zp1 $(CRYPTF) -DOS2" \
  964. X    LDFLAGS="-k131072 -x -Fe=" \
  965. X    LDFLAGS2="" \
  966. X    OUT="-Fo" \
  967. X    OBJ=".obj"
  968. X
  969. Xgcc:
  970. X    $(MAKE) -f makefile.os2 unzips \
  971. X    CC="gcc -O -s" \
  972. X    CFLAGS="$(CRYPTF) -DOS2 -Uunix" \
  973. X    LDFLAGS="-o " \
  974. X    LDFLAGS2="-los2" \
  975. X    OUT="-o" \
  976. X    OBJ=".o"
  977. X
  978. X# variables
  979. XOBJ1 = unzip$(OBJ) envargs$(OBJ) extract$(OBJ) misc$(OBJ) $(CRYPTO)
  980. XOBJ2 = file_io$(OBJ) mapname$(OBJ) match$(OBJ)
  981. XOBJ3 = inflate$(OBJ) explode$(OBJ) unreduce$(OBJ) unshrink$(OBJ)
  982. XOBJO = os2unzip$(OBJ)
  983. XOBJI = zipinfo$(OBJ) envargs$(OBJ) match$(OBJ) misc_$(OBJ) os2zinfo$(OBJ)
  984. X
  985. Xunzips:    unzip.exe zipinfo.exe
  986. X
  987. Xcrypt$(OBJ):    crypt.c unzip.h zip.h
  988. X    $(CC) -c $(CFLAGS) $*.c
  989. X
  990. Xenvargs$(OBJ):    envargs.c unzip.h
  991. X    $(CC) -c $(CFLAGS) $*.c
  992. X
  993. Xexplode$(OBJ):    explode.c unzip.h
  994. X    $(CC) -c $(CFLAGS) $*.c
  995. X
  996. Xextract$(OBJ):    extract.c unzip.h
  997. X    $(CC) -c $(CFLAGS) $*.c
  998. X
  999. Xfile_io$(OBJ):    file_io.c unzip.h
  1000. X    $(CC) -c $(CFLAGS) $*.c
  1001. X
  1002. Xinflate$(OBJ):    inflate.c unzip.h
  1003. X    $(CC) -c $(CFLAGS) $*.c
  1004. X
  1005. Xmapname$(OBJ):    mapname.c unzip.h
  1006. X    $(CC) -c $(CFLAGS) $*.c
  1007. X
  1008. Xmatch$(OBJ):    match.c unzip.h
  1009. X    $(CC) -c $(CFLAGS) $*.c
  1010. X
  1011. Xmisc$(OBJ):    misc.c unzip.h
  1012. X    $(CC) -c $(CFLAGS) $*.c
  1013. X
  1014. Xmisc_$(OBJ):    misc.c unzip.h
  1015. X    $(CC) -c $(CFLAGS) -DZIPINFO $(OUT)$@ misc.c
  1016. X
  1017. Xos2unzip$(OBJ): os2unzip.c unzip.h
  1018. X    $(CC) -c $(CFLAGS) $*.c
  1019. X
  1020. Xos2zinfo$(OBJ):    os2unzip.c unzip.h
  1021. X    $(CC) -c $(CFLAGS) -DZIPINFO $(OUT)$@ os2unzip.c
  1022. X
  1023. Xunreduce$(OBJ):    unreduce.c unzip.h
  1024. X    $(CC) -c $(CFLAGS) $*.c
  1025. X
  1026. Xunshrink$(OBJ):    unshrink.c unzip.h
  1027. X    $(CC) -c $(CFLAGS) $*.c
  1028. X
  1029. Xunzip$(OBJ):    unzip.c unzip.h
  1030. X    $(CC) -c $(CFLAGS) $*.c
  1031. X
  1032. Xzipinfo$(OBJ):    zipinfo.c unzip.h
  1033. X    $(CC) -c $(CFLAGS) $*.c
  1034. X
  1035. Xunzip.exe: $(OBJ1) $(OBJ2) $(OBJ3) $(OBJO) $(DEF)
  1036. X    $(CC) $(LDFLAGS)$@ $(DEF) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJO) $(LDFLAGS2)
  1037. X
  1038. Xzipinfo.exe: $(OBJI) $(DEFI)
  1039. X    $(CC) $(LDFLAGS)$@ $(DEFI) $(OBJI) $(LDFLAGS2)
  1040. END_OF_FILE
  1041.   if test 3611 -ne `wc -c <'OS2/makefile.os2'`; then
  1042.     echo shar: \"'OS2/makefile.os2'\" unpacked with wrong size!
  1043.   fi
  1044.   # end of 'OS2/makefile.os2'
  1045. fi
  1046. if test -f 'Readme' -a "${1}" != "-c" ; then 
  1047.   echo shar: Will not clobber existing file \"'Readme'\"
  1048. else
  1049.   echo shar: Extracting \"'Readme'\" \(4033 characters\)
  1050.   sed "s/^X//" >'Readme' <<'END_OF_FILE'
  1051. XFile Readme for:
  1052. X
  1053. Xunzip50.zip    generic Unix/VMS/OS2/MSDOS/Mac/Windows[/Amiga/Atari] UnZip 5.0
  1054. Xunzip50.zoo    same as above, but ZOO format
  1055. Xunzip50.tar.Z    same as above, but compressed tar format
  1056. X
  1057. XA public distribution version of the Info-ZIP project's generic UnZip
  1058. Xutility; 21 August 1992.
  1059. X
  1060. X__________________________________________________________________________
  1061. X
  1062. XBEFORE YOU ASK:  UnZip, its companion utility Zip, and related utilities
  1063. Xand support files can be found in many places; read the file "Where" for
  1064. Xfurther details.  To contact the authors with suggestions, bug reports, or
  1065. Xfixes, continue reading this file (Readme) and the file "ZipRules".  For
  1066. Xa list of known bugs and possible future features, read "BUGS".  And for a
  1067. Xcommented listing of the files included in the source distribution, read
  1068. X"Contents" in said distribution.
  1069. X
  1070. XALSO NOTE:  Info-ZIP's mailing addresses and ftp site will be changing
  1071. Xwithin the next month.  The current e-mail addresses should hold for a
  1072. Xwhile via mail-forwarding, but watch for the new addresses in our next
  1073. Xrelease.
  1074. X__________________________________________________________________________
  1075. X
  1076. X
  1077. XThis version of UnZip has been ported to a wide array of Unix and other
  1078. Xmainframes, minis, and micros (including VMS, OS/2, Minix, MSDOS, Windows,
  1079. XAmiga (not tested recently), and Macintosh).  Although highly compatible 
  1080. Xwith PKware's PKZIP and PKUNZIP utilities of MSDOS fame, our primary ob-
  1081. Xjective has been one of portability and other-than-MSDOS functionality.  
  1082. XFeatures not found in the PKWare version include default extraction of 
  1083. Xdirectory trees (with a switch to defeat this, rather than the other way 
  1084. Xaround); VMS, Macintosh and OS/2 extended file attributes; and, of course, 
  1085. Xthe ability to run under most of your favorite operating systems.
  1086. X
  1087. XSee the main Contents file for a list of what's included.  The individual
  1088. XOS Contents files (e.g., VMS/Contents) may list important compilation info
  1089. Xin addition to explaining what files are what, so be sure to read them if
  1090. Xyou're not compiling under Unix.
  1091. X
  1092. XNew features in this version include support for deflation (the new, high-
  1093. Xperformance compression method introduced in the PKZIP 1.93 alpha); much
  1094. Xfaster decompression; relaxed copyright restrictions, due to rewritten
  1095. Xcode (see COPYING for details); multiple password guessing, for encrypted
  1096. Xzipfiles; support for options stored in an environment variable, to change
  1097. Xthe default behavior; and a new Unix filter version of UnZip called FUnZip.
  1098. XMany bugs were fixed as well.  The History file details the changes, and 
  1099. XBUGS indicates the ones we haven't nailed just yet. :-)
  1100. X
  1101. XSee unzip.1 or unzip.man for usage (or zipinfo.1/zipinfo.man for ZipInfo
  1102. Xusage, or funzip.1/funzip.man--do you sense a pattern here?--for FUnZip
  1103. Xusage).  Unfortunately the VMS versions of these documents are out of date
  1104. Xnow; we hope to correct this soon.
  1105. X
  1106. XAll bug reports and patches (context diffs only, please!) should go to 
  1107. Xzip-bugs@cs.ucla.edu, and suggestions for new features can be sent to 
  1108. Xinfo-zip@cs.ucla.edu (although we don't promise to use all suggestions).
  1109. XIf it's something which is manifestly useful, sending the required patches 
  1110. Xto zip-bugs directly is likely to produce a quicker response than asking 
  1111. Xus to do it.  Those directly responsible for updating the code are somewhat
  1112. Xshort on time these days.  If you're considering a port, however, please 
  1113. Xcheck in with Info-ZIP FIRST, since the code is constantly being updated 
  1114. Xbehind the scenes.  We'll arrange to send you the latest source.  The 
  1115. Xalternative is the possibility that your hard work will be tucked away in 
  1116. Xa sub-archive and pretty much ignored.
  1117. X
  1118. XIf you'd like to keep up to date with our UnZip (and companion Zip utility)
  1119. Xdevelopment, join the ranks of BETA testers, add your own thoughts and con-
  1120. Xtributions, etc., send your request to Info-ZIP-Request@cs.ucla.edu and 
  1121. XRich Wales will add you to the Info-ZIP newsletter mailing list.
  1122. X
  1123. XGreg Roelofs (Cave Newt), UnZip maintainer,
  1124. Xwith inspiration from David Kirschbaum
  1125. END_OF_FILE
  1126.   if test 4033 -ne `wc -c <'Readme'`; then
  1127.     echo shar: \"'Readme'\" unpacked with wrong size!
  1128.   fi
  1129.   # end of 'Readme'
  1130. fi
  1131. if test -f 'VMS/unzip.rnh' -a "${1}" != "-c" ; then 
  1132.   echo shar: Will not clobber existing file \"'VMS/unzip.rnh'\"
  1133. else
  1134.   echo shar: Extracting \"'VMS/unzip.rnh'\" \(4796 characters\)
  1135.   sed "s/^X//" >'VMS/unzip.rnh' <<'END_OF_FILE'
  1136. X.!
  1137. X.!  File:    UNZIP.RNH
  1138. X.!
  1139. X.!  Author:    Hunter Goatley
  1140. X.!
  1141. X.!  Date:    October 23, 1991
  1142. X.!
  1143. X.!  Description:
  1144. X.!
  1145. X.!    RUNOFF source file for portable UNZIP on-line help for VMS.
  1146. X.!    Adapted from UNZIP.MAN, distributed with UNZIP.
  1147. X.!
  1148. X.!    To build:    $ RUNOFF UNZIP.RNH
  1149. X.!            $ LIBR/HELP/INSERT libr UNZIP
  1150. X.!
  1151. X.!  Modification history:
  1152. X.!
  1153. X.!    01-001        Hunter Goatley        23-OCT-1991 09:21
  1154. X.!        Genesis.
  1155. X.!    01-002        Cave Newt        16-MAR-1992 22:37
  1156. X.!        Update for UnZip 4.2.
  1157. X.!    01-003        Igor Mandrichenko    23-MAY-1992 22:14
  1158. X.!        Add -X option to command syntax.
  1159. X.!    01-004        Cave Newt        24-MAY-1992 13:30
  1160. X.!        Add UNZIP_OPTS environment variable help.
  1161. X.!
  1162. X.noflags
  1163. X.lm4 .rm72
  1164. X.indent -4
  1165. X1 UNZIP
  1166. X.br
  1167. XUnZip is used to extract files compressed and packaged by Zip (see HELP ZIP
  1168. Xfor information on ZIP).
  1169. X.sk
  1170. XFor a brief help on Zip and Unzip, run each without specifying any
  1171. Xparameters on the command line.
  1172. X.sk
  1173. XUNZIP will list, test, or extract from a ZIP archive.  ZIP archives are commonly
  1174. Xfound on MS-DOS systems; a VMS version of ZIP can also be found here.
  1175. X.sk
  1176. XArchive member extraction is implied by the absence of the -c, -p, -t, -l, -v or
  1177. X-z options.  All archive members are processed unless a filespec is provided to
  1178. Xspecify a subset of the archive members.  The filespec is similar to an egrep
  1179. Xexpression, and may contain:
  1180. X.sk
  1181. X.literal
  1182. X     *       matches a sequence of 0 or more characters
  1183. X     ?       matches exactly 1 character
  1184. X     \nnn    matches the character having octal code nnn
  1185. X     [...]   matches any single character found inside the brackets;
  1186. X             ranges are specified by a beginning character,
  1187. X             a hyphen, and an ending character.  If a '!' follows
  1188. X             the left bracket, then the range of characters
  1189. X             matched is complemented with respect to the ASCII
  1190. X             character set.
  1191. X.end literal
  1192. X.sk
  1193. XFormat:
  1194. X.sk;.lm+1;.literal
  1195. XUNZIP [-cflptuvxz[ajnoqUVX]] file[.zip] [filespec...]
  1196. X.end literal;.lm-1
  1197. X.!------------------------------------------------------------------------------
  1198. X.indent -4
  1199. X2 Parameters
  1200. X.sk;.indent -4
  1201. Xfile[.zip]
  1202. X.sk
  1203. XFile specification for the ZIP archive.  The suffix .ZIP is applied if the
  1204. Xspecified file does not exist.  Note that self-extracting ZIP files are
  1205. Xsupported; just specify the .EXE suffix yourself.
  1206. X.sk;.indent -4
  1207. X[filespec]
  1208. X.sk
  1209. XAn optional list of archive members to be processed.  Expressions may be
  1210. Xused to match multiple members.  Expressions should be enclosed in double-quotes
  1211. Xto prevent interpretation by DCL.  Multiple filenames should be separated by
  1212. Xblanks.
  1213. X.!------------------------------------------------------------------------------
  1214. X.indent -4
  1215. X2 Options
  1216. X.br
  1217. XThe default action of UnZip is to extract all zipfile entries.  The following
  1218. Xoptions and modifiers can be provided:
  1219. X.sk;.literal
  1220. X   -c   extract files to SYS$OUTPUT (terminal)
  1221. X   -f   freshen existing files (replace if newer); create none
  1222. X   -l   list archive files (short format)
  1223. X   -p   extract files to SYS$OUTPUT; no informational messages
  1224. X   -t   test archive files
  1225. X   -u   update existing files; create new ones if needed
  1226. X   -v   list archive files (verbose format)
  1227. X   -x   extract files in archive (default)
  1228. X   -z   display only the archive comment
  1229. X.end literal;.sk;.literal
  1230. X MODIFIERS
  1231. X   -a   convert to VMS textfile format (only use for TEXT files!)
  1232. X   -j   junk paths (don't recreate archive's directory structure)
  1233. X   -n   never overwrite existing files; don't prompt
  1234. X   -o   OK to overwrite files without prompting
  1235. X   -q   perform operations quietly (-qq => even quieter)
  1236. X   -U   leave filenames uppercase if created under MS-DOS, VMS, etc.
  1237. X   -V   retain (VMS) file version numbers
  1238. X   -X   restore owner/protection info (may require privileges)
  1239. X.end literal;.sk
  1240. X! [this should probably be a separate section]:
  1241. XIn addition, default options may be specified via the UNZIP_OPTS logical.
  1242. XFor example, the following will cause UnZip to restore owner/protection
  1243. Xinformation and perform all operations at quiet-level 1 by default:
  1244. X.sk;.literal
  1245. X    define UNZIP_OPTS "-qX"
  1246. X.end literal;.sk
  1247. XNote that the quotation marks are required to preserve lowercase options.
  1248. XTo negate a default option on the command line, add one or more minus 
  1249. Xsigns before the option letter, in addition to the leading switch character
  1250. X`-':
  1251. X.sk;.literal
  1252. X    unzip --ql zipfile
  1253. X.end literal
  1254. Xor
  1255. X.literal
  1256. X    unzip -l-q zipfile
  1257. X.end literal;.sk
  1258. XAt present it is not possible to decrement an option below zero--that is,
  1259. Xmore than a few minuses have no effect.
  1260. X.sk
  1261. XUNZIP_OPTS may be defined as a symbol rather than a logical, but if both
  1262. Xare defined, the logical is used.
  1263. X.!-----------------------------------------------------------------------------
  1264. X.indent -4
  1265. X2 Authors
  1266. X.br
  1267. XSamuel H. Smith, Usenet contributors, and Info-ZIP.
  1268. X.sk
  1269. XVMS on-line help ported from UNZIP.MAN by Hunter Goatley.
  1270. END_OF_FILE
  1271.   if test 4796 -ne `wc -c <'VMS/unzip.rnh'`; then
  1272.     echo shar: \"'VMS/unzip.rnh'\" unpacked with wrong size!
  1273.   fi
  1274.   # end of 'VMS/unzip.rnh'
  1275. fi
  1276. if test -f 'Where' -a "${1}" != "-c" ; then 
  1277.   echo shar: Will not clobber existing file \"'Where'\"
  1278. else
  1279.   echo shar: Extracting \"'Where'\" \(4412 characters\)
  1280.   sed "s/^X//" >'Where' <<'END_OF_FILE'
  1281. X__________________________________________________________________________
  1282. X
  1283. X  This is the Info-ZIP file ``Where,'' last updated on 20 August 1992.
  1284. X__________________________________________________________________________
  1285. X
  1286. X
  1287. X  SITE OWNERS:  If you're listed in here but the information is not
  1288. X  correct (or if you're a big site but aren't listed at all), please
  1289. X  let us know!  E-mail to zip-bugs at the address given in Readme
  1290. X  and we'll update this file.
  1291. X
  1292. XBasic source-archive names for Info-ZIP's portable Zip, UnZip, and related
  1293. Xutilities (on some ftp sites, the .zip files may have a .zoo equivalent
  1294. Xin zoo 2.10 format):
  1295. X
  1296. X    zip19.zip    Zip 1.9 (includes zipnote and zipsplit)
  1297. X    zip19.tar.Z    ditto, compress'd tar format
  1298. X
  1299. X    unzip50.zip    UnZip 5.0 (includes zipinfo and funzip)
  1300. X    unzip50.tar.Z    ditto, compress'd tar format
  1301. X
  1302. X    wunz12sr.zip    WizUnZip 1.2 support files for Windows 3.1, UnZip 5.0
  1303. X
  1304. X    zcrypt19.zip    encryption/decryption support (includes zipcloak)
  1305. X
  1306. XRelated archives and files:
  1307. X
  1308. X    UnzpHist.zip    changes history of UnZip, back to 2.0
  1309. X
  1310. X    zip19x.zip      MSDOS executables and docs for zip, zipnote, zipsplit
  1311. X    unzip50.exe     MSDOS executable for unzip
  1312. X
  1313. X    zip19_16.zip    OS/2 1.x 16-bit executables and docs
  1314. X    zip19_32.zip    OS/2 2.x 32-bit executables and docs
  1315. X    unz50_16.exe    OS/2 1.x 16-bit executable
  1316. X    unz50_32.exe    OS/2 2.x 32-bit executable
  1317. X
  1318. X    zip19vms.zip    VMS executables and docs for zip, zipnote, zipsplit
  1319. X    unz50vms.exe    VMS executable for unzip
  1320. X
  1321. X    zip_unzip.hqx   Macinstosh executables (zip 1.0 only, 1.9 not ready)
  1322. X
  1323. X    winunz12.zip    Windows 3.1 executables (zip 1.0 only, 1.9 not ready)
  1324. X
  1325. X    pkz110eu.exe    MS-DOS PKZIP/PKUNZIP 1.1 (self-extracting archive)
  1326. X    pkz193a.exe    MS-DOS PKZIP/PKUNZIP beta 1.93 (self-extracting)
  1327. X    pkz102-2.exe    OS/2 PKZIP/PKUNZIP 1.02 (self-extracting)
  1328. X
  1329. Xftp sites for the US-exportable sources and executables.  Look for
  1330. Xthe file names given above in the following directories.  Some sites
  1331. Xlike to use slightly different names, such as zip-1.9.tar-z instead
  1332. Xof zip19.tar.Z.
  1333. X
  1334. X    wuarchive.wustl.edu:/packages/compression/...
  1335. X    wuarchive.wustl.edu:/mirrors/misc/unix/...
  1336. X    wuarchive.wustl.edu:/mirrors/misc/vaxvms/...
  1337. X    wuarchive.wustl.edu:/mirrors/msdos/zip/...
  1338. X    wuarchive.wustl.edu:/mirrors/msdos/windows3/...
  1339. X
  1340. X    ftp.uu.net:/pub/zip/...
  1341. X
  1342. X    ftp-os2.nmsu.edu:/pub/os2/2.0/archivers/...
  1343. X    ftp-os2.nmsu.edu:/pub/os2/all/archivers/...
  1344. X
  1345. X    Zip 1.9 and UnZip 5.0 will also be available at any comp.sources.misc
  1346. X    archive site as soon as they are posted.
  1347. X
  1348. X    wuarchive.wustl.edu:/mirrors/msdos/zip/pkz110eu.exe
  1349. X    ux1.cso.uiuc.edu:/pc/exec-pc/pkz193a.exe    [128.174.5.59]
  1350. X
  1351. Xftp sites for the encryption and decryption sources:
  1352. X
  1353. X    NOTE:  Non-US users, please do NOT ftp from the US site (US
  1354. X    regulations and all that).  Likewise, US users, please do not
  1355. X    ftp from the European sites (it's not illegal, but it sure is
  1356. X    a waste of expensive bandwidth).
  1357. X
  1358. X    From the US:
  1359. X       wuarchive.wustl.edu:/mirrors3/garbo.uwasa.fi/arcutil/zcrypt19.zip
  1360. X
  1361. X    Outside the US:
  1362. X       garbo.uwasa.fi:/pc/arcutil/zcrypt19.zip
  1363. X       ftp.win.tue.nl:/pub/compression/zip/zcrypt19.zip
  1364. X       ftp.inria.fr:/system/arch-compr/zcrypt19.zip
  1365. X       ftp.informatik.tu-muenchen.de:/pub/utils/archiver/zcrypt19.zip
  1366. X         (mail server at ftp-mailer@ftp.informatik.tu-muenchen.de)
  1367. X
  1368. XTo find other ftp sites:
  1369. X
  1370. X    The "archie" ftp database utility can be used to find an ftp site
  1371. X    near you.  If you don't know how to use it, DON'T ASK US--check the
  1372. X    Usenet groups news.newusers.questions or news.answers or some such,
  1373. X    or ask your system administrator.
  1374. X
  1375. XUUCP sites:
  1376. X
  1377. X    uunet!~/pub/zip/ ...
  1378. X
  1379. XMail servers:
  1380. X
  1381. X    If you don't have anonymous FTP capability, you can mail one
  1382. X    of the following commands (in the body of an e-mail message) to
  1383. X    listserv@vm1.nodak.edu or listserv@vm.ecs.rpi.edu in order to
  1384. X    get a copy via e-mail:
  1385. X
  1386. X    /pdget mail pd:<misc.unix>unzip50.tar-z uuencode
  1387. X    /pdget mail pd:<misc.unix>zip19.zip uuencode
  1388. X   or:    /pdget mail pd:<misc.unix>zip19.tar-z uuencode
  1389. X
  1390. X    To get the encryption source by email, send the following commands
  1391. X    to ftp-mailer@ftp.informatik.tu-muenchen.de:
  1392. X
  1393. X    get /pub/utils/archiver/zcrypt19.zip
  1394. X        quit
  1395. X
  1396. X__________________________________________________________________________
  1397. X
  1398. XAgain, if someone repackages any of the source or executable archives in
  1399. XVMS-, Mac- or Atari-specific formats, please let us know (send e-mail to 
  1400. Xzip-bugs at the address listed in README).
  1401. X__________________________________________________________________________
  1402. X
  1403. END_OF_FILE
  1404.   if test 4412 -ne `wc -c <'Where'`; then
  1405.     echo shar: \"'Where'\" unpacked with wrong size!
  1406.   fi
  1407.   # end of 'Where'
  1408. fi
  1409. if test -f 'envargs.c' -a "${1}" != "-c" ; then 
  1410.   echo shar: Will not clobber existing file \"'envargs.c'\"
  1411. else
  1412.   echo shar: Extracting \"'envargs.c'\" \(3304 characters\)
  1413.   sed "s/^X//" >'envargs.c' <<'END_OF_FILE'
  1414. X/*****************************************************************
  1415. X | envargs - add default options from environment to command line
  1416. X |----------------------------------------------------------------
  1417. X | Author: Bill Davidsen, original 10/13/91, revised 23 Oct 1991.
  1418. X | This program is in the public domain.
  1419. X |----------------------------------------------------------------
  1420. X | Minor program notes:
  1421. X |  1. Yes, the indirection is a tad complex
  1422. X |  2. Parenthesis were added where not needed in some cases
  1423. X |     to make the action of the code less obscure.
  1424. X |  3. Set tabsize to four to make this pretty
  1425. X |----------------------------------------------------------------
  1426. X | UnZip notes 24 May 92 ("v1.4"):
  1427. X |  1. #include "unzip.h" for prototypes
  1428. X |  2. changed ch to type char
  1429. X |  3. added an ifdef to avoid Borland warnings
  1430. X *****************************************************************/
  1431. X
  1432. X#include "unzip.h"
  1433. Xstatic int count_args __((char *));
  1434. Xstatic void mem_err __((void));
  1435. X
  1436. X#if (defined(SCCS) && !defined(lint))  /* causes warnings:  annoying */
  1437. Xstatic char *SCCSid = "@(#)envargs.c    1.3 23 Oct 1991";
  1438. X#endif
  1439. X
  1440. Xvoid
  1441. Xenvargs(Pargc, Pargv, envstr)
  1442. Xint *Pargc;
  1443. Xchar ***Pargv;
  1444. Xchar *envstr;
  1445. X{
  1446. X    char *getenv();
  1447. X    char *envptr;                /* value returned by getenv */
  1448. X    char *bufptr;                /* copy of env info */
  1449. X    int argc = 0;                /* internal arg count */
  1450. X    char ch;                    /* spare temp value */
  1451. X    char **argv;                /* internal arg vector */
  1452. X    char **argvect;                /* copy of vector address */
  1453. X
  1454. X    /* see if anything in the environment */
  1455. X    envptr = getenv(envstr);
  1456. X    if (envptr == (char *)NULL || *envptr == 0) return;
  1457. X
  1458. X    /* count the args so we can allocate room for them */
  1459. X    argc = count_args(envptr);
  1460. X    bufptr = (char *)malloc(1+strlen(envptr));
  1461. X    if (bufptr == (char *)NULL) mem_err();
  1462. X    strcpy(bufptr, envptr);
  1463. X
  1464. X    /* allocate a vector large enough for all args */
  1465. X    argv = (char **)malloc((argc+*Pargc+1)*sizeof(char *));
  1466. X    if (argv == (char **)NULL) mem_err();
  1467. X    argvect = argv;
  1468. X
  1469. X    /* copy the program name first, that's always true */
  1470. X    *(argv++) = *((*Pargv)++);
  1471. X
  1472. X    /* copy the environment args next, may be changed */
  1473. X    do {
  1474. X        *(argv++) = bufptr;
  1475. X        /* skip the arg and any trailing blanks */
  1476. X        while (((ch = *bufptr) != '\0') && ch != ' ') ++bufptr;
  1477. X        if (ch == ' ') *(bufptr++) = '\0';
  1478. X        while (((ch = *bufptr) != '\0') && ch == ' ') ++bufptr;
  1479. X    } while (ch);
  1480. X
  1481. X    /* now save old argc and copy in the old args */
  1482. X    argc += *Pargc;
  1483. X    while (--(*Pargc)) *(argv++) = *((*Pargv)++);
  1484. X
  1485. X    /* finally, add a NULL after the last arg, like UNIX */
  1486. X    *argv = (char *)NULL;
  1487. X
  1488. X    /* save the values and return */
  1489. X    *Pargv = argvect;
  1490. X    *Pargc = argc;
  1491. X}
  1492. X
  1493. Xstatic int
  1494. Xcount_args(s)
  1495. Xchar *s;
  1496. X{
  1497. X    int count = 0;
  1498. X    char ch;
  1499. X
  1500. X    do {
  1501. X        /* count and skip args */
  1502. X        ++count;
  1503. X        while (((ch = *s) != '\0') && ch != ' ') ++s;
  1504. X        while (((ch = *s) != '\0') && ch == ' ') ++s;
  1505. X    } while (ch);
  1506. X
  1507. X    return count;
  1508. X}
  1509. X
  1510. Xstatic void
  1511. Xmem_err()
  1512. X{
  1513. X    perror("Can't get memory for arguments");
  1514. X    exit(2);
  1515. X}
  1516. X
  1517. X#ifdef TEST
  1518. Xmain(argc, argv)
  1519. Xint argc;
  1520. Xchar **argv;
  1521. X{
  1522. X    int i;
  1523. X
  1524. X    printf("Orig argv: %p\n", argv);
  1525. X    dump_args(argc, argv);
  1526. X    envargs(&argc, &argv, "ENVTEST");
  1527. X    printf(" New argv: %p\n", argv);
  1528. X    dump_args(argc, argv);
  1529. X}
  1530. X
  1531. Xdump_args(argc, argv)
  1532. Xint argc;
  1533. Xchar *argv[];
  1534. X{
  1535. X    int i;
  1536. X
  1537. X    printf("\nDump %d args:\n", argc);
  1538. X    for (i=0; i<argc; ++i) {
  1539. X        printf("%3d %s\n", i, argv[i]);
  1540. X    }
  1541. X}
  1542. X#endif
  1543. END_OF_FILE
  1544.   if test 3304 -ne `wc -c <'envargs.c'`; then
  1545.     echo shar: \"'envargs.c'\" unpacked with wrong size!
  1546.   fi
  1547.   # end of 'envargs.c'
  1548. fi
  1549. if test -f 'unshrink.c' -a "${1}" != "-c" ; then 
  1550.   echo shar: Will not clobber existing file \"'unshrink.c'\"
  1551. else
  1552.   echo shar: Extracting \"'unshrink.c'\" \(4656 characters\)
  1553.   sed "s/^X//" >'unshrink.c' <<'END_OF_FILE'
  1554. X/*---------------------------------------------------------------------------
  1555. X
  1556. X  unshrink.c
  1557. X
  1558. X  Shrinking is a Dynamic Lempel-Ziv-Welch compression algorithm with partial
  1559. X  clearing.
  1560. X
  1561. X  ---------------------------------------------------------------------------*/
  1562. X
  1563. X
  1564. X#include "unzip.h"
  1565. X
  1566. X
  1567. X/*************************************/
  1568. X/*  UnShrink Defines, Globals, etc.  */
  1569. X/*************************************/
  1570. X
  1571. X/*      MAX_BITS        13   (in unzip.h; defines size of global work area)  */
  1572. X#define INIT_BITS       9
  1573. X#define FIRST_ENT       257
  1574. X#define CLEAR           256
  1575. X#define GetCode(dest)   READBIT(codesize,dest)
  1576. X
  1577. Xstatic void partial_clear __((void));   /* local prototype */
  1578. X
  1579. Xint codesize, maxcode, maxcodemax, free_ent;
  1580. X
  1581. X
  1582. X
  1583. X
  1584. X/*************************/
  1585. X/*  Function unShrink()  */
  1586. X/*************************/
  1587. X
  1588. Xvoid unShrink()
  1589. X{
  1590. X    register int code;
  1591. X    register int stackp;
  1592. X    int finchar;
  1593. X    int oldcode;
  1594. X    int incode;
  1595. X
  1596. X
  1597. X    /* decompress the file */
  1598. X    codesize = INIT_BITS;
  1599. X    maxcode = (1 << codesize) - 1;
  1600. X    maxcodemax = HSIZE;         /* (1 << MAX_BITS) */
  1601. X    free_ent = FIRST_ENT;
  1602. X
  1603. X    code = maxcodemax;
  1604. X    do {
  1605. X        prefix_of[code] = -1;
  1606. X    } while (--code > 255);
  1607. X/*
  1608. X    OvdL: -Ox with SCO's 3.2.0 cc gives
  1609. X    a. warning: overflow in constant multiplication
  1610. X    b. segmentation fault (core dumped) when using the executable
  1611. X    for (code = maxcodemax; code > 255; code--)
  1612. X        prefix_of[code] = -1;
  1613. X */
  1614. X
  1615. X    for (code = 255; code >= 0; code--) {
  1616. X        prefix_of[code] = 0;
  1617. X        suffix_of[code] = (byte) code;
  1618. X    }
  1619. X
  1620. X    GetCode(oldcode);
  1621. X    if (zipeof)
  1622. X        return;
  1623. X    finchar = oldcode;
  1624. X
  1625. X    OUTB(finchar);
  1626. X
  1627. X    stackp = HSIZE;
  1628. X
  1629. X    while (!zipeof) {
  1630. X        GetCode(code);
  1631. X        if (zipeof)
  1632. X            return;
  1633. X
  1634. X        while (code == CLEAR) {
  1635. X            GetCode(code);
  1636. X            switch (code) {
  1637. X                case 1:
  1638. X                    codesize++;
  1639. X                    if (codesize == MAX_BITS)
  1640. X                        maxcode = maxcodemax;
  1641. X                    else
  1642. X                        maxcode = (1 << codesize) - 1;
  1643. X                    break;
  1644. X
  1645. X                case 2:
  1646. X                    partial_clear();
  1647. X                    break;
  1648. X            }
  1649. X
  1650. X            GetCode(code);
  1651. X            if (zipeof)
  1652. X                return;
  1653. X        }
  1654. X
  1655. X
  1656. X        /* special case for KwKwK string */
  1657. X        incode = code;
  1658. X        if (prefix_of[code] == -1) {
  1659. X            stack[--stackp] = (byte) finchar;
  1660. X            code = oldcode;
  1661. X        }
  1662. X        /* generate output characters in reverse order */
  1663. X        while (code >= FIRST_ENT) {
  1664. X            if (prefix_of[code] == -1) {
  1665. X                stack[--stackp] = (byte) finchar;
  1666. X                code = oldcode;
  1667. X            } else {
  1668. X                stack[--stackp] = suffix_of[code];
  1669. X                code = prefix_of[code];
  1670. X            }
  1671. X        }
  1672. X
  1673. X        finchar = suffix_of[code];
  1674. X        stack[--stackp] = (byte) finchar;
  1675. X
  1676. X
  1677. X        /* and put them out in forward order, block copy */
  1678. X        if ((HSIZE - stackp + outcnt) < OUTBUFSIZ) {
  1679. X            memcpy(outptr, &stack[stackp], HSIZE - stackp);
  1680. X            outptr += HSIZE - stackp;
  1681. X            outcnt += HSIZE - stackp;
  1682. X            stackp = HSIZE;
  1683. X        }
  1684. X        /* output byte by byte if we can't go by blocks */
  1685. X        else
  1686. X            while (stackp < HSIZE)
  1687. X                OUTB(stack[stackp++]);
  1688. X
  1689. X
  1690. X        /* generate new entry */
  1691. X        code = free_ent;
  1692. X        if (code < maxcodemax) {
  1693. X            prefix_of[code] = oldcode;
  1694. X            suffix_of[code] = (byte) finchar;
  1695. X
  1696. X            do
  1697. X                code++;
  1698. X            while ((code < maxcodemax) && (prefix_of[code] != -1));
  1699. X
  1700. X            free_ent = code;
  1701. X        }
  1702. X        /* remember previous code */
  1703. X        oldcode = incode;
  1704. X    }
  1705. X}
  1706. X
  1707. X
  1708. X
  1709. X/******************************/
  1710. X/*  Function partial_clear()  */
  1711. X/******************************/
  1712. X
  1713. Xstatic void partial_clear()
  1714. X{
  1715. X    register int pr;
  1716. X    register int cd;
  1717. X
  1718. X    /* mark all nodes as potentially unused */
  1719. X    for (cd = FIRST_ENT; cd < free_ent; cd++)
  1720. X        prefix_of[cd] |= 0x8000;
  1721. X
  1722. X    /* unmark those that are used by other nodes */
  1723. X    for (cd = FIRST_ENT; cd < free_ent; cd++) {
  1724. X        pr = prefix_of[cd] & 0x7fff;    /* reference to another node? */
  1725. X        if (pr >= FIRST_ENT)    /* flag node as referenced */
  1726. X            prefix_of[pr] &= 0x7fff;
  1727. X    }
  1728. X
  1729. X    /* clear the ones that are still marked */
  1730. X    for (cd = FIRST_ENT; cd < free_ent; cd++)
  1731. X        if ((prefix_of[cd] & 0x8000) != 0)
  1732. X            prefix_of[cd] = -1;
  1733. X
  1734. X    /* find first cleared node as next free_ent */
  1735. X    cd = FIRST_ENT;
  1736. X    while ((cd < maxcodemax) && (prefix_of[cd] != -1))
  1737. X        cd++;
  1738. X    free_ent = cd;
  1739. X}
  1740. END_OF_FILE
  1741.   if test 4656 -ne `wc -c <'unshrink.c'`; then
  1742.     echo shar: \"'unshrink.c'\" unpacked with wrong size!
  1743.   fi
  1744.   # end of 'unshrink.c'
  1745. fi
  1746. echo shar: End of archive 12 \(of 14\).
  1747. cp /dev/null ark12isdone
  1748. MISSING=""
  1749. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1750.     if test ! -f ark${I}isdone ; then
  1751.     MISSING="${MISSING} ${I}"
  1752.     fi
  1753. done
  1754. if test "${MISSING}" = "" ; then
  1755.     echo You have unpacked all 14 archives.
  1756.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1757. else
  1758.     echo You still must unpack the following archives:
  1759.     echo "        " ${MISSING}
  1760. fi
  1761. exit 0
  1762. exit 0 # Just in case...
  1763.