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

  1. Article 45 of net.sources.bugs:
  2. Path: mcdsun!noao!hao!nbires!seismo!rochester!ritcv!cci632!djh
  3. From: djh@cci632.UUCP (Daniel J. Hazekamp)
  4. Newsgroups: comp.unix.questions,net.sources.bugs
  5. Subject: Re: Bugs in Unix version of ARC
  6. Keywords: ARC mode 6 Lempel Zev
  7. Message-ID: <737@cci632.UUCP>
  8. Date: 9 Dec 86 20:51:02 GMT
  9. Organization: CCI, Communications Systems Division, Rochester, NY
  10. Lines: 48
  11. Xref: mcdsun comp.unix.questions:307 net.sources.bugs:45
  12.  
  13.  
  14. In article <1600003@fthood>, Emmet Gray writes:
  15.  
  16.  
  17.     I just can't believe that everyone else's copy of 'arc' is running 
  18.     properly on UNIX.  I've got the two versions off the of net, the one
  19.     posted in mid Aug and the other in late Sep.  Both seem to compile and
  20.     function except for extracting files that have been compressed using one
  21.     older 'crunch' routine (which is longer used in creating files, but is
  22.     arround for extracting).
  23.     
  24.     The older archives created using method number 6 called "Lempel-Zev
  25.     plus non-repeat" (shows up as 'crunched' in the 'v' option) will not
  26.     extract properly.  Small files appear to extract, but result in garbage
  27.     files.  Extracting large files created with this method will cause the
  28.     arc's internal stack to overflow.
  29.     
  30.     Aside from that one minor problem, everything works!
  31.     
  32.     Has anyone else had this problem?  Is there a cure?  I'm running SVR2
  33.     on a Masscomp 68000 system.
  34.     
  35.     Emmet P. Gray            US Army, HQ III Corps & Fort Hood
  36.     ..!ihnp4!uiucuxc!fthood!egray        Attn: AFZF-DE-ENV
  37.                         DEH, Environmental & Natural Resources
  38.                           Management Office
  39.                         Fort Hood, TX 76544-5057
  40.  
  41.  
  42. I've also come across this problem, and have finally come up with the fix.
  43. The problem area is in the function oldh() in arclzw.c. The hash key must
  44. be truncated to 16 bits before it is squared. Since most ints on larger
  45. machines are 32 bits, the line  'local = (pred + foll) | 0x0800' doesn't
  46. work. Changing it to 'local = ((pred + foll) | 0x0800) & 0xFFFF' causes
  47. it to work properly.
  48.  
  49. By the looks of the code in newh(), the problem may also arise with type 7
  50. entries. I don't have any arc's with type 7 entries to test with, so if
  51. some kind soul could test it for me, I'd appreciate it. If the problem does
  52. arise, the fix is similar to that above. Truncate the sum of pred & foll
  53. to 16 bits before the multiplication:
  54.     return (((pred + foll) & 0xFFFF) * 15073) & 0x0FFF;
  55.  
  56.  
  57.                         Dan Hazekamp
  58.                         Computer Consoles Inc.
  59.                         Rochester NY
  60.                     seismo!rochester!cci632!djh
  61.  
  62.  
  63.