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

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