home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d0xx / d050 / unixarc.lha / UnixArc / bugs / unixarc.53 < prev    next >
Encoding:
Text File  |  1987-01-17  |  2.4 KB  |  66 lines

  1. Article 53 of net.sources.bugs:
  2. Path: mcdsun!noao!hao!nbires!seismo!rutgers!clyde!cuae2!ihnp4!houxm!hjuxa!petsd!moncol!monuxa!john
  3. From: john@monuxa.UUCP (John Ruschmeyer)
  4. Newsgroups: net.sources.bugs
  5. Subject: ARC unsqueeze fix
  6. Message-ID: <390@monuxa.UUCP>
  7. Date: 18 Dec 86 21:42:38 GMT
  8. Organization: Monmouth College, W. Long Branch, NJ
  9. Lines: 53
  10.  
  11. When the UNIX  version of ARC was posted a while ago, I brought it up on
  12. our systems here. Unlike a recent poster to this newsgroup, I had no
  13. problem with the Lempel-Ziv (crunch) code, but never could get it to
  14. correctly squeeze or unsqueeze a file in an archive.
  15.  
  16. Reading the source code, I noticed that the squeeze/unsqueeze code on ARC
  17. is based on an earlier version of the recently-posted portable SQ/USQ
  18. programs. Using code from that program I was able to fix the problem with
  19. ARC not correctly unsqueezing a file in the archive (creating either a
  20. zero-length file or giving the 'invalid decode tree' message).
  21.  
  22. NOTE: I am still having problems with the squeeze code on our system. For
  23. some reason, trying to archive a file which would normally be squeezed on
  24. the MS-DOS version of ARC results in it being compressed with some
  25. less-efficient method. I think this is a bug, but it appears to be a
  26. harmless one.
  27.  
  28. Context diffs for the unsqueeze fix follow:
  29.  
  30. *** arcusq.c.old    Tue Dec 16 11:14:54 1986
  31. --- arcusq.c    Thu Dec 18 16:29:07 1986
  32. ***************
  33. *** 35,41
  34.   static int get_int(f)                  /* get an integer */
  35.   FILE *f;                               /* file to get it from */
  36.   {
  37. !     return getc_unp(f) | (getc_unp(f)<<8);
  38.   }
  39.   
  40.   init_usq(f)                            /* initialize Huffman unsqueezing */
  41.  
  42. --- 35,46 -----
  43.   static int get_int(f)                  /* get an integer */
  44.   FILE *f;                               /* file to get it from */
  45.   {
  46. ! int temp;
  47. ! temp = getc_unp(f);                    /* get low order byte */
  48. ! temp |= getc_unp(f) << 8;
  49. ! if (temp & 0x8000) temp |= (~0) << 15; /* propogate sign for big ints */
  50. ! return (temp);
  51.   }
  52.   
  53.   init_usq(f)                            /* initialize Huffman unsqueezing */
  54. -- 
  55. Name:        John Ruschmeyer
  56. US Mail:    Monmouth College, W. Long Branch, NJ 07764
  57. Phone:        (201) 571-3451
  58. UUCP:        ...!vax135!petsd!moncol!john    ...!princeton!moncol!john
  59.                            ...!pesnta!moncol!john
  60.  
  61.     Actually, I know a lot about what turns a woman off.
  62.     Now, if I could just stop doing it I'd be all set.
  63.  
  64.  
  65.