help with arc
Robert E. Stampfli
res at cbnews.ATT.COM
Sat Oct 8 05:38:06 AEST 1988
In article <209 at arnold.UUCP> dave at arnold.UUCP (Dave Arnold) writes:
>>I am trying to build arc for System V. Everything compiles
>>and runs ok---except it always creates corrupted archives.
>>Anybody have similar problems?
I tried mailing this to Dave, but apparently he didn't get it -- maybe
others will find it useful, too. From his later posting, I am certain
he was bit by the same bug I was.
I am running a Unix-PC 7300 with version 3.5 of the OS (all known fixes
applied). This is what I did to make the ARC 5.21 distributed by Howard
Chu useable on my UNIX-pc:
1. In file arccode.c, look at the last function, code(), and change
the declaration for the argument from "char c" to "unsigned char c".
This circumvents a compiler bug which manifests itself in a sign
extension problem on 8-bit quantities returned by code(). ARC will
now decode crunched data correctly.
2. In file arcusq.c, look for the declaration of structure nd and change
the instance of "int child[2]" to "short child[2]". This circumvents
a compiler bug which causes problems with the unsqueeze of a large
squeezed file. (Not to mention saving a little space.)
3. In file arcpack.c, look for the line that prints the percent compression
and insert a check to prevent the divide by zero that occurs if you try
to insert a zero length file into an archive. This is a program bug.
Hope this helps,
Rob Stampfli
att!cbnews!res
osu-cis!n8emr!kd8wk!res
More information about the Unix-pc.general
mailing list