[net.micro.mac] Xbin problems

milo@ndmath.uucp (Greg Corson) (07/20/86)

I located a little bug in the current version of XBIN which may explain some of
the CRC error problems people have been having.  Note that this bug only occurs
if your compiler uses 16 bit "int"'s.

In one of the routines (do_q_fork I think) there is a loop counter called "i"
which is defined as an int.  This counter must be capable of holding the number
of bytes in the file...obviously a 16 bit int would only be able to hold up to
32767 bytes.  If you have 16 bit ints and feed a file bigger than 32k into 
xbin it will bomb with a CRC error.  To fix the problem, go hunting for this 
loop counter and change it to a long.  I did this fix and xbin now works fine
on my system.

If memory serves me correctly...the line where i is defined reads something like
int  c,i;

Anyway...it shouldn't be too hard to find...I would have posted more exact 
info but the machine I am posting from does not have xbin source to refer to.

Greg Corson
pur-ee!iuvax!kangaro!milo