🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #8274

mcvert, CRC errors on Sun???

#8274
From: caesar
Date: Wed, 22 Nov 1989 04:00
44 lines
2347 bytes
I am trying to use mcvert on my Sun to unbinhex files received
from comp.binaries.mac so they can be through TOPS to a Mac
then unstuffed with the Unstuffit DA.  I know StuffIt 1.5.1
has an unbinhex option, but I'd prefer to do this step on
my Sun if possible.

When I run mcvert I invariably receive a CRC error.  I noticed
that if I added an extra line to hqxify.c's hqx_to_bin_hdr:

   :
 calc_crc = 0;
 while (hqx_ptr < hqx_end)
     calc_crc = (((calc_crc&0xff) << 8) | *hqx_ptr++) ^ magic[calc_crc >> 8];
 calc_crc = ((calc_crc&0xff) << 8) ^ magic[calc_crc >> 8];
 calc_crc = ((calc_crc&0xff) << 8) ^ magic[calc_crc >> 8];
 buf_ptr = hqx_ptr;
 calc_crc |= *(buf_ptr + 1); /* <<<<<< I added this line <<<<<< */
   :
 check_hqx_crc(calc_crc, "File header CRC mismatch in %s", binfname);
   :

then the I would no longer get CRC errors any file headers. But
I cannot find a simple solution to the "file data" or "file rsrc"
CRC errors.  I've seen the .hqx file processed correctly with
StuffIt 1.5.1 and mcvert starts by saying:

   Converting     SafeEject.sit    type = "SIT!", author = "SIT!"

so the .hqx files seem to be good.  I do not know the algorithm for
binhex, so I am pretty well lost (them thar magic numbers must be
doin' sumtin' pretty sneaky :^)  ). Is the problem with mcvert,
byte order on the Sun, NL instead of CR, phase of the moon ...

Has anyone else had errors like this?  Please e-mail me anything
that might help or a note for me to e-mail the solution to you
when I get this problem resolved.  Thanks.

Bob

--
Robert J. Caesar Jr. <caesar@ge-dab.ge.com>  General Electric Company
UUCP: ...!mcnc!ge-rtp!ge-dab!caesar       Simulation & Control Systems Dept.
PHONE: (904) 239-2011                     1800 Volusia Avenue, Room 4150
GECOM:     8*620-2011                     Daytona Beach, Florida  32015
Technical Details
Message-ID: <2709@ge-dab.GE.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!samsung!uunet!crdgw1!ge-dab!otis.DAB.GE.COM!caesar

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!samsung!uunet!crdgw1!ge-dab!otis.DAB.GE.COM!caesar
From: caesar@otis.DAB.GE.COM
Newsgroups: comp.sys.mac
Subject: mcvert, CRC errors on Sun???
Message-ID: <2709@ge-dab.GE.COM>
Date: 22 Nov 89 04:00:17 GMT
Sender: news@ge-dab.GE.COM
Reply-To: caesar@otis.DAB.GE.COM ()
Distribution: usa
Organization: GE Simulation & Control Systems Dept., Daytona Beach, FL
Lines: 44