Article 56 of net.sources.bugs: Path: mcdsun!noao!hao!nbires!seismo!rutgers!princeton!allegra!ulysses!mhuxt!ihnp4!houxm!hjuxa!catnip!ben From: ben@catnip.UUCP Newsgroups: net.sources.bugs Subject: Fix to make Unix arc work on 16 bit machines Message-ID: <438@catnip.UUCP> Date: 25 Dec 86 06:15:15 GMT Organization: The Broder Residence, Holmdel, NJ 07733 Lines: 27 There is a bug in the recently distributed Unix ARC that will cause it to fail when extracting long files, in partcular, files whose size cannot be expressed as a 16 bit quantity. The problem is in the dos2long conversion in arcunix.c. The offending code as it originally appears #define dos2long(x) ((unsigned char)(x)[0] + ((unsigned char)(x)[1]<<8) + \ ((unsigned char)(x)[2]<<16) + \ ((unsigned char)(x)[3]<<24)) will shift (x)[2] and (x)[3] straight into the bit bucket. I just casted them to long to rectify the problem. #define dos2long(x) ((unsigned char)(x)[0] + ((unsigned char)(x)[1]<<8) + \ ((long)(unsigned char)(x)[2]<<16) + \ ((long)(unsigned char)(x)[3]<<24)) ---- arc now appears to run fine under SCO Xenix. -- Ben Broder {ihnp4,decvax} !hjuxa!catnip!ben {houxm,clyde}/