Xref: utzoo comp.sources.d:2747 comp.sys.att:4423 unix-pc.general:1483 Path: utzoo!utgpu!water!watmath!clyde!att!cbnews!res From: res@cbnews.ATT.COM (Robert E. Stampfli) Newsgroups: comp.sources.d,comp.sys.att,unix-pc.general Subject: Re: help with arc Message-ID: <1485@cbnews.ATT.COM> Date: 7 Oct 88 19:38:06 GMT References: <204@arnold.UUCP> <209@arnold.UUCP> Reply-To: res@cbnews.ATT.COM (Robert E. Stampfli) Organization: AT&T Bell Laboratories, Columbus Lines: 33 In article <209@arnold.UUCP> dave@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