home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / vmsnet / sources / 332 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  47.6 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!agate!dog.ee.lbl.gov!network.ucsd.edu!mvb.saic.com!vmsnet-sources
  2. From: goathunter@wkuvx1.bitnet
  3. Newsgroups: vmsnet.sources
  4. Subject: Zip v1.9 & UnZip v5.0, part 15/22
  5. Message-ID: <8009686@MVB.SAIC.COM>
  6. Date: Tue, 01 Sep 1992 22:53:17 GMT
  7. Organization: Western Kentucky University, Bowling Green, KY
  8. Lines: 1212
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: goathunter@wkuvx1.bitnet
  12. Posting-number: Volume 3, Issue 137
  13. Archive-name: zip_unzip/part15
  14.  
  15. -+-+-+-+-+-+-+-+ START OF PART 15 -+-+-+-+-+-+-+-+
  16. X            workspace`5B4`5D = 'R';
  17. X        if (xattr & S_IWGRP) `7B
  18. X            workspace`5B5`5D = 'W';
  19. X            workspace`5B7`5D = 'D';
  20. X        `7D
  21. X        if (xattr & S_IXGRP)
  22. X            workspace`5B6`5D = 'E';
  23. X        if (xattr & S_IROTH)
  24. X            workspace`5B8`5D = 'R';
  25. X        if (xattr & S_IWOTH) `7B
  26. X            workspace`5B9`5D = 'W';
  27. X            workspace`5B11`5D = 'D';
  28. X        `7D
  29. X        if (xattr & S_IXOTH)
  30. X            workspace`5B10`5D = 'E';
  31. X
  32. X        *p++ = '(';
  33. X        for (k = j = 0;  j < 3;  ++j) `7B    /* loop over groups of permissi
  34. Vons */
  35. X            for (i = 0;  i < 4;  ++i, ++k)  /* loop over perms within a grou
  36. Vp */
  37. X                if (workspace`5Bk`5D)
  38. X                    *p++ = workspace`5Bk`5D;
  39. X            *p++ = ',';                      /* group separator */
  40. X            if (j == 0)
  41. X                while ((*p++ = *q++) != ','); /* system, owner perms are sam
  42. Ve */
  43. X        `7D
  44. X        *p-- = 0;
  45. X        *p = ')';   /* overwrite last comma */
  46. X        printf("  VMS file attributes (%06o octal):               %s\n",
  47. X          xattr, attribs);
  48. X
  49. X    `7D else if ((hostnum != DOS_OS2_FAT_) && (hostnum != OS2_HPFS_)) `7B
  50. X        /* assume Unix-like */
  51. X        switch (xattr & S_IFMT) `7B
  52. X            case S_IFREG:   attribs`5B0`5D = '-';  break;
  53. X            case S_IFLNK:   attribs`5B0`5D = 'l';  break;
  54. X            case S_IFBLK:   attribs`5B0`5D = 'b';  break;
  55. X            case S_IFCHR:   attribs`5B0`5D = 'c';  break;
  56. X            case S_IFIFO:   attribs`5B0`5D = 'p';  break;
  57. X            case S_IFSOCK:  attribs`5B0`5D = 's';  break;
  58. X            case S_IFDIR:   attribs`5B0`5D = 'd';  break;
  59. X            default:        attribs`5B0`5D = '?';  break;
  60. X        `7D
  61. X        if (xattr & S_IRUSR)        /* no read-permission: user */
  62. X            attribs`5B1`5D = 'r';
  63. X        else
  64. X            attribs`5B1`5D = '-';
  65. X        if (xattr & S_IWUSR)        /* no write-permission: user */
  66. X            attribs`5B2`5D = 'w';
  67. X        else
  68. X            attribs`5B2`5D = '-';
  69. X        if (xattr & S_IXUSR)        /* no execute-permission: user */
  70. X            if (xattr & S_ISUID)
  71. X                attribs`5B3`5D = 's';
  72. X            else
  73. X                attribs`5B3`5D = 'x';
  74. X        else
  75. X            if (xattr & S_ISUID)
  76. X                attribs`5B3`5D = 'S';   /* undefined state */
  77. X            else
  78. X                attribs`5B3`5D = '-';
  79. X        if (xattr & S_IRGRP)        /* no read-permission: group */
  80. X            attribs`5B4`5D = 'r';
  81. X        else
  82. X            attribs`5B4`5D = '-';
  83. X        if (xattr & S_IWGRP)        /* no write-permission: group */
  84. X            attribs`5B5`5D = 'w';
  85. X        else
  86. X            attribs`5B5`5D = '-';
  87. X        if (xattr & S_IXGRP)        /* no execute-permission: group */
  88. X            if (xattr & S_ISGID)
  89. X                attribs`5B6`5D = 's';
  90. X            else
  91. X                attribs`5B6`5D = 'x';
  92. X        else
  93. X            if (xattr & S_ISGID)    /* or could use S_ENFMT (same) */
  94. X                attribs`5B6`5D = 'l';
  95. X            else
  96. X                attribs`5B6`5D = '-';
  97. X        if (xattr & S_IROTH)        /* no read-permission: other */
  98. X            attribs`5B7`5D = 'r';
  99. X        else
  100. X            attribs`5B7`5D = '-';
  101. X        if (xattr & S_IWOTH)        /* no write-permission: other */
  102. X            attribs`5B8`5D = 'w';
  103. X        else
  104. X            attribs`5B8`5D = '-';
  105. X        if (xattr & S_IXOTH)        /* no execute-permission: other */
  106. X            if (xattr & S_ISVTX)    /* "sticky bit" */
  107. X                attribs`5B9`5D = 't';
  108. X            else
  109. X                attribs`5B9`5D = 'x';
  110. X        else
  111. X            if (xattr & S_ISVTX)
  112. X                attribs`5B9`5D = 'T';   /* undefined state */
  113. X            else
  114. X                attribs`5B9`5D = '-';
  115. X        attribs`5B10`5D = 0;
  116. X        printf("  Unix file attributes (%06o octal):              %s\n",
  117. X          xattr, attribs);
  118. X
  119. X    `7D /* endif (hostnum: external attributes format) */
  120. X
  121. X    if ((xattr=(UWORD)(crec.external_file_attributes & 0xFF)) == 0)
  122. X        printf("  MS-DOS file attributes (%02X hex):                  none\n
  123. V",
  124. X          xattr);
  125. X    else if (xattr == 1)
  126. X        printf(
  127. X          "  MS-DOS file attributes (%02X hex):                  read-only\n
  128. V",
  129. X          xattr);
  130. X    else
  131. X        printf(
  132. X         "  MS-DOS file attributes (%02X hex):                  %s%s%s%s%s%s
  133. V\n",
  134. X          xattr, (xattr&1)?"rdo ":"", (xattr&2)?"hid ":"", (xattr&4)?"sys ":
  135. V"",
  136. X          (xattr&8)?"lab ":"", (xattr&16)?"dir ":"", (xattr&32)?"arc":"");
  137. X    printf(
  138. X     "  offset of local header from start of archive:     %lu (%.8lXh) bytes
  139. V\n",
  140. X      crec.relative_offset_local_header, crec.relative_offset_local_header);
  141. X
  142. X/*--------------------------------------------------------------------------
  143. V-
  144. X    Skip the extra field, if any, and print the file comment, if any (the
  145. X    filename has already been printed, above).  That finishes up this file
  146. X    entry...
  147. X  --------------------------------------------------------------------------
  148. V-*/
  149. X
  150. X    if (crec.extra_field_length > 0) `7B
  151. X/* #ifdef OS2 */
  152. X#if TRUE
  153. X        ULONG ea_size;
  154. X        if ((error = do_string(crec.extra_field_length, EXTRA_FIELD)) != 0)
  155. V `7B
  156. X            error_in_archive = error;
  157. X            if (error > 1)      /* fatal:  can't continue */
  158. X                return (error);
  159. X        `7D
  160. X        if ((ea_size = SizeOfEAs(extra_field)) != 0)
  161. X            printf("\n\
  162. X  This file has %lu bytes of OS/2 EA's in the local extra field.\n\
  163. X  (May not match OS/2 \"dir\" amount due to storage method.)\n\n",
  164. X              ea_size);
  165. X        else
  166. X            printf("\n  There is an unknown extra field (skipping).\n");
  167. X#else
  168. X        printf("\n  There is an extra field (skipping).\n");
  169. X        SKIP_(crec.extra_field_length)
  170. X#endif
  171. X    `7D else
  172. X        printf("\n");
  173. X
  174. X    if (!crec.file_comment_length)
  175. X        printf("  There is no file comment.\n");
  176. X    else `7B
  177. X        printf("\
  178. X------------------------- file comment begins ----------------------------\n
  179. V");
  180. X        if ((error = do_string(crec.file_comment_length, DISPLAY)) != 0) `7B
  181. X          error_in_archive = error;   /* might be warning */
  182. X          if (error > 1)      /* fatal */
  183. X              return error;
  184. X        `7D
  185. X        printf("\n\
  186. X-------------------------- file comment ends -----------------------------\n
  187. V");
  188. X    `7D
  189. X
  190. X    return error_in_archive;
  191. X
  192. X`7D /* end function long_info() */
  193. X
  194. X
  195. X
  196. X
  197. X
  198. X/**************************/
  199. X/*  Function SizeOfEAs()  */
  200. X/**************************/
  201. X
  202. XULONG SizeOfEAs(extra_field)   /* Author: Kai Uwe Rommel */
  203. X    void   *extra_field;
  204. X`7B
  205. X    EAHEADER *pEAblock = (PEAHEADER) extra_field;
  206. X
  207. X    if ( extra_field != NULL && pEAblock -> nID == EAID )
  208. X      return pEAblock -> lSize;
  209. X
  210. X    return 0L;
  211. X`7D
  212. X
  213. X
  214. X
  215. X
  216. X
  217. X/***************************/
  218. X/*  Function short_info()  */
  219. X/***************************/
  220. X
  221. Xint short_info()   /* return PK-type error code */
  222. X`7B
  223. X    int           k, error, error_in_archive=0;
  224. X    UWORD         hostver, xattr;
  225. X    char          workspace`5B12`5D, attribs`5B16`5D;
  226. X    static char   impl`5B5`5D="i#:#", defl`5B5`5D="def#", unkn`5B8`5D;
  227. X    static char   dtype`5B5`5D="NXF?";  /* normal, maximum, fastest, undefin
  228. Ved */
  229. X    static char   *os`5BNUM_HOSTS+1`5D = `7B"dos", "ami", "vms", "unx", "cms
  230. V",
  231. X                      "atr", "os2", "mac", "zzz", "cpm", "???" `7D;
  232. X    static char   *method`5BNUM_METHODS+1`5D = `7B"stor", "shrk", "re:1", "r
  233. Ve:2",
  234. X                      "re:3", "re:4", impl, "tokn", defl, unkn`7D;
  235. X
  236. X
  237. X/*--------------------------------------------------------------------------
  238. V-
  239. X    Print out various interesting things about the compressed file.
  240. X  --------------------------------------------------------------------------
  241. V-*/
  242. X
  243. X    methnum = MIN(crec.compression_method, NUM_METHODS);
  244. X    hostnum = MIN(crec.version_made_by`5B1`5D, NUM_HOSTS);
  245. X    hostver = crec.version_made_by`5B0`5D;
  246. X/*
  247. X    extnum = MIN(crec.version_needed_to_extract`5B1`5D, NUM_HOSTS);
  248. X    extver = crec.version_needed_to_extract`5B0`5D;
  249. X */
  250. X
  251. X    if (methnum == IMPLODED) `7B
  252. X        impl`5B1`5D = (crec.general_purpose_bit_flag & 2)? '8' : '4';
  253. X        impl`5B3`5D = (crec.general_purpose_bit_flag & 4)? '3' : '2';
  254. X    `7D else if (methnum == DEFLATED) `7B
  255. X        UWORD  dnum=(crec.general_purpose_bit_flag>>1) & 3;
  256. X        defl`5B3`5D = dtype`5Bdnum`5D;
  257. X    `7D else if (methnum == NUM_METHODS) `7B   /* unknown */
  258. X        sprintf(unkn, "u%03d", crec.compression_method);
  259. X    `7D
  260. X
  261. X    for (k = 0;  k < 15;  ++k)
  262. X        attribs`5Bk`5D = ' ';
  263. X    attribs`5B15`5D = 0;
  264. X
  265. X    xattr = (UWORD) ((crec.external_file_attributes >> 16) & 0xFFFF);
  266. X    switch (hostnum) `7B
  267. X      case VMS_:
  268. X          `7B   char   *p=attribs;
  269. X              int    i, j;
  270. X
  271. X              for (k = 0;  k < 12;  ++k)
  272. X                  workspace`5Bk`5D = 0;
  273. X              if (xattr & S_IRUSR)
  274. X                  workspace`5B0`5D = 'R';
  275. X              if (xattr & S_IWUSR) `7B
  276. X                  workspace`5B1`5D = 'W';
  277. X                  workspace`5B3`5D = 'D';
  278. X              `7D
  279. X              if (xattr & S_IXUSR)
  280. X                  workspace`5B2`5D = 'E';
  281. X              if (xattr & S_IRGRP)
  282. X                  workspace`5B4`5D = 'R';
  283. X              if (xattr & S_IWGRP) `7B
  284. X                  workspace`5B5`5D = 'W';
  285. X                  workspace`5B7`5D = 'D';
  286. X              `7D
  287. X              if (xattr & S_IXGRP)
  288. X                workspace`5B6`5D = 'E';
  289. X              if (xattr & S_IROTH)
  290. X                  workspace`5B8`5D = 'R';
  291. X              if (xattr & S_IWOTH) `7B
  292. X                  workspace`5B9`5D = 'W';
  293. X                  workspace`5B11`5D = 'D';
  294. X              `7D
  295. X              if (xattr & S_IXOTH)
  296. X                  workspace`5B10`5D = 'E';
  297. X
  298. X              for (k = j = 0;  j < 3;  ++j) `7B     /* groups of permissions
  299. V */
  300. X                  for (i = 0;  i < 4;  ++i, ++k)  /* perms within a group */
  301. X                      if (workspace`5Bk`5D)
  302. X                          *p++ = workspace`5Bk`5D;
  303. X                  *p++ = ',';                     /* group separator */
  304. X              `7D
  305. X              *--p = ' ';   /* overwrite last comma */
  306. X              if ((p - attribs) < 12)
  307. X                  sprintf(&attribs`5B12`5D, "%d.%d", hostver/10, hostver%10)
  308. V;
  309. X          `7D
  310. X          break;
  311. X
  312. X      case DOS_OS2_FAT_:
  313. X      case OS2_HPFS_:
  314. X          xattr = (UWORD) (crec.external_file_attributes & 0xFF);
  315. X          sprintf(attribs, "%s,%s,%s,%s", (xattr&32)?"arc":"",
  316. X            (xattr&2)?"hid":"", (xattr&1)?"rdo":"rw", (xattr&4)?"sys":"");
  317. X          if ((k = strlen(attribs)) < 15)
  318. X              attribs`5Bk`5D = ' ';   /* overwrite '\0' */
  319. X          if (k < 12)
  320. X              sprintf(&attribs`5B12`5D, "%d.%d", hostver/10, hostver%10);
  321. X          break;
  322. X
  323. X      default:   /* assume Unix-like */
  324. X          switch (xattr & S_IFMT) `7B
  325. X              case S_IFREG:   attribs`5B0`5D = '-';  break;
  326. X              case S_IFLNK:   attribs`5B0`5D = 'l';  break;
  327. X              case S_IFBLK:   attribs`5B0`5D = 'b';  break;
  328. X              case S_IFCHR:   attribs`5B0`5D = 'c';  break;
  329. X              case S_IFIFO:   attribs`5B0`5D = 'p';  break;
  330. X              case S_IFSOCK:  attribs`5B0`5D = 's';  break;
  331. X              case S_IFDIR:   attribs`5B0`5D = 'd';  break;
  332. X              default:        attribs`5B0`5D = '?';  break;
  333. X          `7D
  334. X          if (xattr & S_IRUSR)        /* no read-permission: user */
  335. X              attribs`5B1`5D = 'r';
  336. X          else
  337. X              attribs`5B1`5D = '-';
  338. X          if (xattr & S_IWUSR)        /* no write-permission: user */
  339. X              attribs`5B2`5D = 'w';
  340. X          else
  341. X              attribs`5B2`5D = '-';
  342. X          if (xattr & S_IXUSR)        /* no execute-permission: user */
  343. X              if (xattr & S_ISUID)
  344. X                  attribs`5B3`5D = 's';
  345. X              else
  346. X                  attribs`5B3`5D = 'x';
  347. X          else
  348. X              if (xattr & S_ISUID)
  349. X                  attribs`5B3`5D = 'S';   /* undefined state */
  350. X              else
  351. X                  attribs`5B3`5D = '-';
  352. X          if (xattr & S_IRGRP)        /* no read-permission: group */
  353. X              attribs`5B4`5D = 'r';
  354. X          else
  355. X              attribs`5B4`5D = '-';
  356. X          if (xattr & S_IWGRP)        /* no write-permission: group */
  357. X              attribs`5B5`5D = 'w';
  358. X          else
  359. X              attribs`5B5`5D = '-';
  360. X          if (xattr & S_IXGRP)        /* no execute-permission: group */
  361. X              if (xattr & S_ISGID)
  362. X                  attribs`5B6`5D = 's';
  363. X              else
  364. X                  attribs`5B6`5D = 'x';
  365. X          else
  366. X              if (xattr & S_ISGID)    /* or could use S_ENFMT (same) */
  367. X                  attribs`5B6`5D = 'l';
  368. X              else
  369. X                  attribs`5B6`5D = '-';
  370. X          if (xattr & S_IROTH)        /* no read-permission: other */
  371. X              attribs`5B7`5D = 'r';
  372. X          else
  373. X              attribs`5B7`5D = '-';
  374. X          if (xattr & S_IWOTH)        /* no write-permission: other */
  375. X              attribs`5B8`5D = 'w';
  376. X          else
  377. X              attribs`5B8`5D = '-';
  378. X          if (xattr & S_IXOTH)        /* no execute-permission: other */
  379. X              if (xattr & S_ISVTX)    /* "sticky bit" */
  380. X                  attribs`5B9`5D = 't';
  381. X              else
  382. X                  attribs`5B9`5D = 'x';
  383. X          else
  384. X              if (xattr & S_ISVTX)
  385. X                  attribs`5B9`5D = 'T';   /* undefined state */
  386. X              else
  387. X                  attribs`5B9`5D = '-';
  388. X          sprintf(&attribs`5B12`5D, "%d.%d", hostver/10, hostver%10);
  389. X          break;
  390. X
  391. X    `7D /* end switch (hostnum: external attributes format) */
  392. X
  393. X    printf("%s %s %7lu %c%c", attribs, os`5Bhostnum`5D, crec.uncompressed_si
  394. Vze,
  395. X      (crec.general_purpose_bit_flag & 1)?
  396. X      ((crec.internal_file_attributes & 1)? 'T' : 'B') :   /* encrypted */
  397. X      ((crec.internal_file_attributes & 1)? 't' : 'b'),    /* plaintext */
  398. X      (crec.general_purpose_bit_flag & 8)? (crec.extra_field_length? 'X' : '
  399. Vl')
  400. X                                        : (crec.extra_field_length? 'x' : '-
  401. V'));
  402. X    if (lflag == 4) `7B
  403. X        longint c = (longint) crec.compressed_size;
  404. X        longint uc = (longint) crec.uncompressed_size;
  405. X
  406. X        if (crec.general_purpose_bit_flag & 1)
  407. X            c -= 12;    /* if encrypted, don't count encryption header */
  408. X        /* risk signed overflow if blindly multiply: */
  409. X        printf("%3d%%", (uc==0)? 0 : ((uc>2000000L)?
  410. X          ((int)((uc-c)/(uc/1000L))+5)/10 : ((int)((1000L*(uc-c))/uc)+5)/10)
  411. V );
  412. X    `7D else if (lflag == 5)
  413. X        printf(" %7lu", crec.compressed_size);
  414. X
  415. X    printf(" %s %s %s\n", method`5Bmethnum`5D,
  416. X      zipinfo_time(&crec.last_mod_file_date, &crec.last_mod_file_time),
  417. X      filename);
  418. X
  419. X/*--------------------------------------------------------------------------
  420. V-
  421. X    Skip the extra field and/or the file comment, if any (the filename has
  422. X    already been printed, above).  That finishes up this file entry...
  423. X  --------------------------------------------------------------------------
  424. V-*/
  425. X
  426. X    SKIP_(crec.extra_field_length)
  427. X    SKIP_(crec.file_comment_length)
  428. X
  429. X    return error_in_archive;
  430. X
  431. X`7D /* end function short_info() */
  432. X
  433. X
  434. X
  435. X
  436. X
  437. X/*****************************/
  438. X/*  Function zipinfo_time()  */
  439. X/*****************************/
  440. X
  441. Xchar *zipinfo_time(datez, timez)
  442. X    UWORD   *datez, *timez;
  443. X`7B
  444. X    UWORD         yr, mo, dy, hh, mm, ss;
  445. X    static char   d_t_str`5B21`5D;
  446. X    static char   *month`5B12`5D = `7B"Jan", "Feb", "Mar", "Apr", "May", "Ju
  447. Vn",
  448. X                                "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"`7D;
  449. X
  450. X
  451. X
  452. X/*--------------------------------------------------------------------------
  453. V-
  454. X    Convert the file-modification date and time info to a string of the form
  455. V`20
  456. X    "23 Feb 1990 17:15:00" or "23-Feb-91 17:15," depending on value of lflag
  457. V.
  458. X  --------------------------------------------------------------------------
  459. V-*/
  460. X
  461. X    yr = ((*datez >> 9) & 0x7f) + 80;     /* dissect date */
  462. X    mo = ((*datez >> 5) & 0x0f) - 1;
  463. X    dy = *datez & 0x1f;
  464. X
  465. X    hh = (*timez >> 11) & 0x1f;           /* dissect time */
  466. X    mm = (*timez >> 5) & 0x3f;
  467. X    ss = (*timez & 0x1f) * 2;
  468. X
  469. X    if ((lflag >= 3) && (lflag <= 5))
  470. X        sprintf(d_t_str, "%2u-%s-%u %02u:%02u", dy, month`5Bmo`5D, yr, hh, m
  471. Vm);
  472. X    else if (lflag > 9)  /* verbose listing format */
  473. X        sprintf(d_t_str, "%u %s %u %02u:%02u:%02u", dy, month`5Bmo`5D, yr+19
  474. V00,
  475. X          hh, mm, ss);
  476. X
  477. X    return d_t_str;
  478. X
  479. X`7D /* end function zipinfo_time() */
  480. X
  481. X
  482. X
  483. X
  484. X
  485. X/********************************/
  486. X/*  Function open_input_file()  */
  487. X/********************************/
  488. X
  489. Xint open_input_file()   /* return 1 if open failed */
  490. X`7B
  491. X    /*
  492. X     *  open the zipfile for reading and in BINARY mode to prevent cr/lf
  493. X     *  translation, which would corrupt the bitstreams
  494. X     */
  495. X
  496. X#ifdef VMS
  497. X    zipfd = open(zipfn, O_RDONLY, 0, "ctx=stm");
  498. X#else /* !VMS */
  499. X#ifdef UNIX
  500. X    zipfd = open(zipfn, O_RDONLY);
  501. X#else /* !UNIX */
  502. X#ifdef MACOS
  503. X    zipfd = open(zipfn, 0);
  504. X#else /* !MACOS */
  505. X    zipfd = open(zipfn, O_RDONLY `7C O_BINARY);
  506. X#endif /* ?MACOS */
  507. X#endif /* ?UNIX */
  508. X#endif /* ?VMS */
  509. X    if (zipfd < 1) `7B
  510. X        fprintf(stderr, "error:  can't open zipfile `5B %s `5D\n", zipfn);
  511. X        return 1;
  512. X    `7D
  513. X    return 0;
  514. X
  515. X`7D /* end function open_input_file() */
  516. X
  517. X
  518. X
  519. X
  520. X
  521. X/************************/
  522. X/*  Function readbuf()  */
  523. X/************************/
  524. X
  525. Xint readbuf(buf, size)   /* return number of bytes read into buf */
  526. X    char *buf;
  527. X    register unsigned size;
  528. X`7B
  529. X    register int count;
  530. X    int n;
  531. X
  532. X    n = size;
  533. X    while (size) `7B
  534. X        if (incnt == 0) `7B
  535. X            if ((incnt = read(zipfd, inbuf, INBUFSIZ)) <= 0)
  536. X                return (n-size);
  537. X            /* buffer ALWAYS starts on a block boundary:  */
  538. X            cur_zipfile_bufstart += INBUFSIZ;
  539. X            inptr = inbuf;
  540. X        `7D
  541. X        count = MIN(size, (unsigned)incnt);
  542. X        memcpy(buf, inptr, count);
  543. X        buf += count;
  544. X        inptr += count;
  545. X        incnt -= count;
  546. X        size -= count;
  547. X    `7D
  548. X    return n;
  549. X
  550. X`7D /* end function readbuf() */
  551. $ CALL UNPACK [.UNZIP50]ZIPINFO.C;1 471242085
  552. $ create 'f'
  553. X
  554. XZIPINFO(1)               USER COMMANDS                 ZIPINFO(1)
  555. X
  556. XNAME
  557. X     zipinfo - list detailed information about a ZIP archive file
  558. X
  559. XSYNOPSIS
  560. X     zipinfo `5B-1smlvht`5D file`5B.zip`5D `5Bfilespec ...`5D
  561. X
  562. XARGUMENTS
  563. X     file`5B.zip`5D  Path of the ZIP archive.  The suffix `60`60.zip'' is
  564. X                 applied  if  the  file specified does not exist.
  565. X                 Note that self-extracting  ZIP  files  are  sup-
  566. X                 ported;  just  specify the `60`60.exe'' suffix your-
  567. X                 self.
  568. X
  569. X     `5Bfilespec`5D  An optional list of archive members to  be  pro-
  570. X                 cessed.  Expressions may be used to match multi-
  571. X                 ple members; be sure to quote  expressions  that
  572. X                 contain   characters  interpreted  by  the  Unix
  573. X                 shell. See PATTERN  MATCHING  (below)  for  more
  574. X                 details.
  575. X
  576. XOPTIONS
  577. X     -1  list filenames only, one per line (useful for pipes)
  578. X     -s  list zipfile  info  in  short  Unix  `60`60ls  -l''  format:
  579. X         default
  580. X     -m  list zipfile info in medium Unix `60`60ls -l'' format
  581. X     -l  list zipfile info in long Unix `60`60ls -l'' format
  582. X     -v  list zipfile information in verbose, multi-page format
  583. X     -h  list header line
  584. X     -t  list totals for files listed or for all files
  585. X
  586. XPATTERN MATCHING
  587. X     All archive members are listed unless a filespec is provided
  588. X     to specify a subset of the archive members.  The filespec is
  589. X     similar to an egrep expression, and may contain:
  590. X
  591. X     *      matches a sequence of 0 or more characters
  592. X     ?      matches exactly 1 character
  593. X     \nnn   matches the character having octal code nnn
  594. X     `5B...`5D  matches any single character found inside the  brack-
  595. X            ets; ranges are specified by a beginning character, a
  596. X            hyphen, and an ending character.  If  an  exclamation
  597. X            point  or  a  carat  (`60!'  or  `60`5E')  follows the left
  598. X            bracket, then the range of characters matched is com-
  599. X            plemented  with  respect  to  the ASCII character set
  600. X            (that is, anything except the characters  inside  the
  601. X            brackets is considered a match).
  602. X
  603. XDESCRIPTION
  604. X     ZipInfo lists technical information  about  a  ZIP  archive,
  605. X     including  information  file  access permissions, encryption
  606. X     status, type of compression, version and operating system of
  607. X     compressing program, and the like.  The default option is to
  608. X
  609. XInfo-ZIP          Last change: 19 Aug 92 (v1.0)                 1
  610. X
  611. XZIPINFO(1)               USER COMMANDS                 ZIPINFO(1)
  612. X
  613. X     list files in the following format:
  614. X
  615. X-rw-rwl---  1.5 unx    2802 t- defX 11-Aug-91 13:48 perms.2660
  616. X
  617. X     The last three fields are clearly the modification date  and
  618. X     time of the file, and its name.  The case of the filename is
  619. X     respected; thus files  which  come  from  MS-DOS  PKZIP  are
  620. X     always  capitalized.   If  the file was zipped with a stored
  621. X     directory name, that  is  also  displayed  as  part  of  the
  622. X     filename.
  623. X
  624. X     The second and third  fields  indicate  that  the  file  was
  625. X     zipped  under Unix with version 1.5 of Zip (a beta version).
  626. X     Since it comes from Unix, the file permissions at the begin-
  627. X     ning   of   the  line  are  printed  in  Unix  format.   The
  628. X     uncompressed file-size (2802 in this example) is the  fourth
  629. X     field.
  630. X
  631. X     The fifth field consists of two characters, either of  which
  632. X     may  take  on  several  values.   The first character may be
  633. X     either `60t' or `60b', indicating that Zip believes the file  to
  634. X     be  text  or  binary,  respectively;  but  if  the  file  is
  635. X     encrypted, ZipInfo notes this fact by capitalizing the char-
  636. X     acter  (`60T'  or `60B').  The second character may also take on
  637. X     four values, depending on whether there is an extended local
  638. X     header  and/or  an  `60`60extra field'' associated with the file
  639. X     (explained in PKWare's APPNOTE.TXT).  If neither exists, the
  640. X     character  will  be  a hyphen (`60-'); if there is an extended
  641. X     local header but no extra field, `60l'; if the  reverse,  `60x';
  642. X     and  if  both  exist, `60X'.  Thus the file in this example is
  643. X     (apparently) a text file, is not encrypted, and has  neither
  644. X     an  extra field nor an extended local header associated with
  645. X     it.  The example below, on the other hand, is  an  encrypted
  646. X     binary file with an extra field:
  647. X
  648. XRWD,R,R     0.9 vms     168 Bx shrk  9-Aug-91 19:15 perms.0644
  649. X
  650. X     Extra fields are used by PKWare for  authenticity  verifica-
  651. X     tion(?)  and  possibly other purposes, and by Info-ZIP's Zip
  652. X     1.6 and later to store OS/2, Macintosh and VMS  file  attri-
  653. X     butes.  This example presumably falls into the latter class,
  654. X     then.  Note that the file attributes are listed in VMS  for-
  655. X     mat.   Other  possibilities  for  the  host operating system
  656. X     include OS/2 with High Performance File System  (HPFS),  DOS
  657. X     or  OS/2  with  File Allocation Table (FAT) file system, and
  658. X     Macintosh, denoted as follows:
  659. X
  660. Xarc,,rw,    1.0 os2    5358 Tl i4:3  4-Dec-91 11:33 longfilename.hpfs
  661. Xarc,hid,rdo,sys dos    4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
  662. X--w-------  1.0 mac   17357 bx i8:2  4-May-92 04:02 unzip.macr
  663. X
  664. XInfo-ZIP          Last change: 19 Aug 92 (v1.0)                 2
  665. X
  666. XZIPINFO(1)               USER COMMANDS                 ZIPINFO(1)
  667. X
  668. X     File attributes in the first two cases are  indicated  in  a
  669. X     DOS-like  format,  where  the  file  may or may not have its
  670. X     archive bit set; may be hidden or not; may be read-write  or
  671. X     read-only;  and  may be a system file or not.  If the attri-
  672. X     butes are too long,  the  version  number  of  the  encoding
  673. X     software is omitted.  (The information is still available in
  674. X     the verbose listing, however.)  Interpretation of  Macintosh
  675. X     file attributes needs some work yet.
  676. X
  677. X     Finally, the sixth field indicates  the  compression  method
  678. X     and  possible  sub-method used.  There are six methods known
  679. X     at present:  storing (no compression), reducing,  shrinking,
  680. X     imploding,  tokenizing,  and  deflating.  In addition, there
  681. X     are four levels of reducing (1 through  4);  four  types  of
  682. X     imploding  (4K or 8K sliding dictionary, and 2 or 3 Shannon-
  683. X     Fano trees); and three levels of  deflating  (fast,  normal,
  684. X     maximum  compression).  ZipInfo represents these methods and
  685. X     their sub-methods as follows:  `60`60stor''; `60`60re:1,'' `60`60re:2,'
  686. V'
  687. X     etc.;  `60`60shrk'';  `60`60i4:2,''  `60`60i8:3,''  etc.;  `60`60tokn''
  688. V; and
  689. X     `60`60defF,'' `60`60defN,'' and `60`60defX.''
  690. X
  691. X     The medium and long listings are  almost  identical  to  the
  692. X     short  format except that they add information on the file's
  693. X     compression.   The  medium  format  indicates   the   file's
  694. X     compression factor as a percentage:
  695. X
  696. X-rw-rwl---  1.5 unx    2802 t- 81% defX 11-Aug-91 13:48 perms.2660
  697. X
  698. X     In this example, the file has been compressed by more than a
  699. X     factor of five; the compressed data are only 19% of the ori-
  700. X     ginal size.  The long format  gives  the  compressed  file's
  701. X     size in bytes, instead:
  702. X
  703. X-rw-rwl---  1.5 unx    2802 t-     538 defX 11-Aug-91 13:48 perms.2660
  704. X
  705. X     In addition to individual file information, a  default  zip-
  706. X     file listing also includes header and trailer lines:
  707. X
  708. XArchive:  OS2.zip   5453 bytes   5 files
  709. X,,rw,       1.0 os2     730 b- i4:3 26-Jun-92 23:40 Contents
  710. X,,rw,       1.0 os2    3710 b- i4:3 26-Jun-92 23:33 makefile.os2
  711. X,,rw,       1.0 os2    8753 b- i8:3 26-Jun-92 15:29 os2unzip.c
  712. X,,rw,       1.0 os2      98 b- stor 21-Aug-91 15:34 unzip.def
  713. X,,rw,       1.0 os2      95 b- stor 21-Aug-91 17:51 zipinfo.def
  714. X5 files, 13386 bytes uncompressed, 4951 bytes compressed:  63%
  715. X
  716. X     The header line gives the name of  the  archive,  its  total
  717. X     size,  and  the total number of files; the trailer gives the
  718. X     number of files listed, their total uncompressed  size,  and
  719. X     their  total  compressed  size  (not  including any of Zip's
  720. X     internal overhead).  If, however, one or more filespecs  are
  721. X     provided, the header and trailer lines are not listed.  This
  722. X
  723. XInfo-ZIP          Last change: 19 Aug 92 (v1.0)                 3
  724. X
  725. XZIPINFO(1)               USER COMMANDS                 ZIPINFO(1)
  726. X
  727. X     behavior is also similar to that of Unix's `60`60ls -l''; it may
  728. X     be  overridden  by  specifying  the -h and -t options expli-
  729. X     citly.  In such a case  the  listing  format  must  also  be
  730. X     specified  explicitly,  since  -h  or  -t  (or  both) in the
  731. X     absence of other options implies that  ONLY  the  header  or
  732. X     trailer  line (or both) is listed.  See the EXAMPLES section
  733. X     below for a semi-intelligible translation of this nonsense.
  734. X
  735. X     The verbose listing is self-explanatory.  It also lists file
  736. X     comments  and the zipfile comment, if any, and the number of
  737. X     bytes of OS/2 extended attributes  stored.   Note  that  the
  738. X     latter  number will in general NOT match the number given by
  739. X     OS/2's `60`60dir'' command; OS/2 always reports  the  number  of
  740. X     bytes  required  in  16-bit  format,  whereas ZipInfo always
  741. X     reports the 32-bit storage.
  742. X
  743. XENVIRONMENT OPTIONS
  744. X     Modifying ZipInfo's default behavior via options  placed  in
  745. X     an environment variable can be a bit complicated to explain,
  746. X     due to ZipInfo's attempts to handle various defaults  in  an
  747. X     intuitive,  yet  Unix-like,  manner.  Nevertheless, there is
  748. X     some underlying logic.  In brief, there are three `60`60priority
  749. X     levels''  of  options:   the  default  options;  environment
  750. X     options, which can override or  add  to  the  defaults;  and
  751. X     explicit  options  given  by the user, which can override or
  752. X     add to either of the above.
  753. X
  754. X     The default listing  format,  as  noted  above,  corresponds
  755. X     roughly  to  the "zipinfo -hst" command (except when indivi-
  756. X     dual zipfile members are specified).  A user who prefers the
  757. X     long-listing  format  (-l)  can  make  use  of  the  ZIPINFO
  758. X     environment variable to change this default:
  759. X
  760. X           setenv ZIPINFO -l            Unix C shell
  761. X
  762. X           ZIPINFO=-l; export ZIPINFO   Unix Bourne shell
  763. X
  764. X           set ZIPINFO=-l               OS/2 or MS-DOS
  765. X
  766. X           define ZIPINFO_OPTS "-l"     VMS (quotes for LOWERCASE)
  767. X
  768. X     If,  in  addition,  the  user  dislikes  the  trailer  line,
  769. X     ZipInfo's concept of `60`60negative options''  may  be  used  to
  770. X     override  the default inclusion of the line.  This is accom-
  771. X     plished by preceding the undesired option with one  or  more
  772. X     minuses:   e.g., `60`60-l-t'' or `60`60--tl'', in this example.  The
  773. X     first hyphen is the regular switch character,  but  the  one
  774. X     before the `60t' is a minus sign.  The dual use of hyphens may
  775. X     seem  a  little  awkward,  but  it's  reasonably   intuitive
  776. X     nonetheless:   simply  ignore  the  first hyphen and go from
  777. X     there.  It is also consistent with the behavior of the  Unix
  778. X     command nice(1).
  779. X
  780. XInfo-ZIP          Last change: 19 Aug 92 (v1.0)                 4
  781. X
  782. XZIPINFO(1)               USER COMMANDS                 ZIPINFO(1)
  783. X
  784. XEXAMPLES
  785. X     To get a basic, short-format listing of  the  complete  con-
  786. X     tents of a ZIP archive `60`60storage.zip,'' with both header and
  787. X     totals lines, use only the archive name as  an  argument  to
  788. X     zipinfo:
  789. X
  790. X           zipinfo storage
  791. X
  792. X     To produce  a  basic,  long-format  listing  (not  verbose),
  793. X     including header and totals lines, use -l:
  794. X
  795. X           zipinfo -l storage
  796. X
  797. X     To list the complete contents of the archive without  header
  798. X     and  totals  lines,  either  negate the -h and -t options or
  799. X     else specify the contents explicitly:
  800. X
  801. X           zipinfo --h-t storage
  802. X
  803. X           zipinfo storage \*
  804. X
  805. X     (where the backslash is required only  if  the  shell  would
  806. X     otherwise  expand the `60*' wildcard, as in Unix when globbing
  807. X     is turned on--double quotes around the asterisk  would  have
  808. X     worked  as  well).   To turn off the totals line by default,
  809. X     use the environment variable (C shell is assumed here):
  810. X
  811. X           setenv ZIPINFO --t
  812. X
  813. X           zipinfo storage
  814. X
  815. X     To get the full, short-format listing of the  first  example
  816. X     again,  given that the environment variable is set as in the
  817. X     previous example, it is necessary to specify the  -s  option
  818. X     explicitly,  since the -t option by itself implies that ONLY
  819. X     the footer line is to be printed:
  820. X
  821. X           setenv ZIPINFO --t
  822. X
  823. X           zipinfo -t storage           `5Bonly totals line`5D
  824. X
  825. X           zipinfo -st storage          `5Bfull listing`5D
  826. X
  827. X     The -s option, like -m and -l, includes headers and  footers
  828. X     by  default, unless otherwise specified.  Since the environ-
  829. X     ment variable specified no footers and  that  has  a  higher
  830. X     precedence  than  the default behavior of -s, an explicit -t
  831. X     option was necessary to produce the full  listing.   Nothing
  832. X     was  indicated  about  the header, however, so the -s option
  833. X     was sufficient.  Note that both the -h and -t options,  when
  834. X     used  by themselves or with each other, override any default
  835. X     listing of member files; only the header and/or  footer  are
  836. X
  837. XInfo-ZIP          Last change: 19 Aug 92 (v1.0)                 5
  838. X
  839. XZIPINFO(1)               USER COMMANDS                 ZIPINFO(1)
  840. X
  841. X     printed.   This  behavior  will  be more useful when ZipInfo
  842. X     accepts wildcards for the zipfile name; one may then summar-
  843. X     ize the contents of all zipfiles with a single command.
  844. X
  845. X     To list information on a single file within the archive,  in
  846. X     medium format, specify the filename explicitly:
  847. X
  848. X           zipinfo -m storage unshrink.c
  849. X
  850. X     The specification of any member file, as  in  this  example,
  851. X     will  override the default header and totals lines; only the
  852. X     single line of information about the requested file will  be
  853. X     printed.   This  is  intuitively  what one would expect when
  854. X     requesting information about a single  file.   For  multiple
  855. X     files,  it  is often useful to know the total compressed and
  856. X     uncompressed size; in such cases -t may be specified  expli-
  857. X     citly:
  858. X
  859. X           zipinfo -mt storage "*.`5Bch`5D Mak\*
  860. X
  861. X     Finally, to get maximal information about the  ZIP  archive,
  862. X     use the verbose option.  It is usually wise to pipe the out-
  863. X     put into a filter such as more(1):
  864. X
  865. X           zipinfo -v storage `7C more
  866. X
  867. XTIPS
  868. X     The author finds it convenient to set up an alias `60`60ii'' for
  869. X     ZipInfo  on systems which allow aliases, or else to set up a
  870. X     batch  file  `60`60ii.bat''  or  to  rename  the  executable  to
  871. X     `60`60ii.exe'' on systems such as MS-DOS which have no provision
  872. X     for aliases.  The `60`60ii'' usage parallels the  common  `60`60ll''
  873. X     alias  for long listings in Unix, and the similarity between
  874. X     the outputs of the two commands was intentional.
  875. X
  876. XSEE ALSO
  877. X     funzip(1),  unzip(1),   zip(1),   zipcloak(1),   zipnote(1),
  878. X     zipsplit(1)
  879. X
  880. XAUTHOR
  881. X     Greg Roelofs (also known as Cave Newt).  ZipInfo  is  partly
  882. X     based  on  S. H. Smith's unzip and contains pattern-matching
  883. X     code by  J.  Kercheval,  but  mostly  it  was  written  from
  884. X     scratch.  The OS/2 extra-field code is by Kai Uwe Rommel.
  885. X
  886. XInfo-ZIP          Last change: 19 Aug 92 (v1.0)                 6
  887. X
  888. $ CALL UNPACK [.UNZIP50]ZIPINFO.DOC;1 1196901134
  889. $ create 'f'
  890. XSubject: Info-ZIP Rules (No Feelthy ...)
  891. X
  892. XIn discussions with Mark Adler (and others), I realized we in the Info-ZIP
  893. Xcommunity have been evolving a set of rules that maybe oughtta be
  894. Xdocumented, archived, and available to potential contributors.
  895. X
  896. XThe following appear to meet our requirements.  Please observe these
  897. Xrules when submitting source, context diff, or other files to Info-ZIP.
  898. X
  899. X
  900. X1 - "NO FEELTHY TABS"
  901. X
  902. X    Many editors and EMail systems either have no capability to use and/or
  903. Xdisplay the Ascii 9 TAB character correctly, or there are variable tab
  904. Xcolumns, or other horrors.  (My MaxEMail offline email editor for one.)
  905. X
  906. X    Bottom line:  use spaces, not tabs.
  907. X
  908. X    Related utility programs:  Unix and MS-DOS :  expand, unexpand.
  909. XMS-DOS: Buerg's TABS; Toad Hall's TOADSOFT.  And some editors have the
  910. Xconversion built-in.
  911. X
  912. X    Exceptions:  The Unix Makefile.  Some makes seem to require "real"
  913. Xtabs.  If they need it there, fine.  So don't fiddle the Makefile.
  914. X
  915. X
  916. X2 - "NO FEELTHY CRS"
  917. X
  918. X    All source, documentation and other text files shall have Unix style
  919. Xline endings (LF, Ctrl-J), NOT the MS-DOS CR/LF or Mac CR line endings.
  920. X
  921. X    Reason:  "Real programmers" in any environment can convert back and
  922. Xforth between Unix and DOS/Mac style.  MS-DOS Turbo C can use Unix or
  923. XMS-DOS line endings (donno about Mac Turbo C).  Buerg's LIST file display
  924. Xutility for MS-DOS can use Unix or MS-DOS line endings.  Unix utilities
  925. Xlike diff and patch die a horrible death (or produce horrible output) if
  926. Xtarget files have CRs.
  927. X
  928. X    Related utilities:  flip for Unix and MS-DOS.
  929. X
  930. X    Exceptions:  The zip archive README and zip.doc files, which Mark
  931. XAdler wants to leave in MSDOS for "unsophisticated" (read brain-dead) DOS
  932. Xusers.  Also the batch files to compile under MS-DOS (where it requires
  933. Xthe CRs.)
  934. X
  935. X
  936. X3 - "NO FEELTHY HEX"
  937. X
  938. X    We'll use uuencode/uudecode compatible converters to move binary files
  939. Xthrough our 7-bit EMail systems (xxencode on special request).  Uuencoded
  940. Xfiles, if larger than +/- 32Kb, will be broken into smaller (< 32Kb)
  941. Xfiles (via David M. Read's UUXFER utility).
  942. X
  943. X    Reason:  to prevent sounds of gagging mailers from resounding
  944. Xthroughout the land.  To be standard with the Uunet side of the world.
  945. XTo be relatively efficient in the binary->Ascii conversion.  (Yeah, yeah,
  946. XI know, there's better conversions out there.  But not as widely known.)
  947. X
  948. X    Related utilities:  uuencode, uudecode, uuxfer20, quux, others.
  949. XJust make sure they don't leave imbedded or trailing spaces.  (E.g., they
  950. Xshould use the "`60" character in place of Ascii 32.)  Else mailers are
  951. Xprone to truncate or whatever.  Message me if you need one.
  952. X
  953. X
  954. X4 - "NO FEELTHY TARS"
  955. X
  956. X    unzip will be available in .tar.Z (16-bit compressed tar), .arc (as
  957. Xavailable on Unix, SIMTEL20, PKPAK, etc., *NOT* the latest proprietary
  958. XSEA version), or .zip format.  (If requesting we EMail you source,
  959. Xspecify desired format.)  zip source will only be distributed in .zip
  960. Xarchives.
  961. X
  962. X    Reason:  For unzip development or use, anyone should have one of the
  963. Xspecified dearchivers.  For zip development or use, you shouldn't be
  964. Xmessing with zip unless you can already unzip.  (This protects the
  965. Xinnocent.)
  966. X
  967. X    Related utilities:  Unix:  arc, tar, compress, zip, unzip.  MS-DOS:
  968. XPKUNPAK, PKUNZIP, PAK, TAR, COMPRESS, and others.
  969. X
  970. X    Exceptions:  EMail me directly for any special circumstances or
  971. Xrequirements (zoo, BinHex, 12-bit compress, etc.)
  972. X
  973. X
  974. X5 - "NO FEELTHY FANCY_NAMES"
  975. X
  976. X    Assume the worst:  that someone on a brain-damaged DOS system has to
  977. Xwork with everything your magic fingers produced.  Keep the file names
  978. Xunimaginative and within MS-DOS limits (e.g., ordinary A..Z, 1..9, "-$_!"
  979. Xtype characters, in the "filename.typ" 8-dot-3 format).  MacUsers, giggle
  980. Xall you want, but no spaces.
  981. X
  982. X    Reason:  Compatibility with different file systems.  MS-DOS is the
  983. Xmost limited.
  984. X
  985. X
  986. X6 - "NO FEELTHY GRAPHICS"
  987. X
  988. X    Do all your editing in a plain-text ASCII editor.  No WordPerfect,
  989. XWord, WordStar document mode, or other word processor files, thenkyew.
  990. XNo desktop publishing.  No TIFFs, no GIFs, no imbedded pictures or dancing
  991. Xladies (too bad, Cave Newt).
  992. X
  993. X    Reason:  Compatibility with different consoles.  My old XT clone is
  994. Xthe most limited!
  995. X
  996. X    Related utilities:  vi, ed, EDLIN, Turbo C editor, UED, EASYEDIT, cat
  997. Xor "COPY CON UNZIP.C"; various word processor -> text conversion utilities.
  998. X
  999. X
  1000. X7 - "NO FEELTHY DASHES"
  1001. X
  1002. X    Don't have repeated dashes (starting at the left margin) in any
  1003. Xsource code or patches you try to EMail to me or Info-ZIP.  Instead, be
  1004. Xsure to always prefix them with a space, asterisk, comment, whatever, like
  1005. Xthis:
  1006. X#---------------   or
  1007. X/*--------------   or even
  1008. X ---------------   (just indented)
  1009. X
  1010. X    Reason:  Most "undigestify" utilities (that break down newsletters
  1011. Xinto their separate messages) use that "--------" (starting at the left
  1012. Xmargin) as the symbol that it's hit the end of a message.  I'd rather not
  1013. Xhave your C source file broken up into a dozen separate untitled messages
  1014. Xin my mail system, thank you.  I'll be going through the unzip source Any
  1015. XDay Now and changing anything like that by indenting, prefixing, whatever.
  1016. X
  1017. X
  1018. X*-------------------*
  1019. X
  1020. XDavid Kirschbaum
  1021. XInfo-ZIP Coordinator
  1022. $ CALL UNPACK [.UNZIP50]ZIPRULES.;1 486630870
  1023. $ create 'f'
  1024. XEncoding of file DISK$USER99:`5BBERRYMAN`5DZIP19.ZIP;1
  1025. X`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`
  1026. V7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E`7E
  1027. X!@@QIM5R$T5TEIUN9(3VBU$TR%USA9TWZ%DT1$#KZ%DT;DCajm@C@5ag@DP@@Dah@efag@HB@@*4
  1028. VICAb
  1029. X@Dal@8IJc@B<??af@LA@@Hah@Hb@mPPM1ABA5DGan@H@TKM@ATc@m@@SAICYX/>fJN%Eb@D.b@0@
  1030. V@<BP
  1031. XX,f6d2%Ff(9BY/MVRMEA@V54TVA@@Eah@VU#K5@PRMQB@VYTPBE@@PAc@0@GHT@@4b@EXAc@mBPD
  1032. VF4&2
  1033. XQDF4&2A@I5$F@X%QHMT@@0B@T.@@4/#,@,mBPCPCPBGaf@I5DH@XEQAQU@@0Bag@T",@@NdJ/=8?
  1034. V>J9,
  1035. X)<6#?;+Db@I5$G@XETR=T@@mE@KU%UXf"XA8?A1@Tc@Laj@$TSW@mURQDUA@@E@00EEPPORA@8,)
  1036. V<6#?
  1037. X;+D4&UM=668@Q/3_EC:%:B((BG7"44Sd06mfSdQZ06,_mT4C42#,XC%(VRJ;8<+__C)$-S3gIN6"
  1038. V<M3<
  1039. X&7<Ff')?%AZEWd5Q#+#465N/I64R&@))MZ/I?@WM=9;N;LZ6'96g6g2f&M4<3O;,BJ0,235,';*X
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