Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site usl.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!akgub!usl!jih
From: jih@usl.UUCP (Juha I. Heinanen)
Newsgroups: net.micro.mac
Subject: Re: All these hex'es
Message-ID: <172@usl.UUCP>
Date: Tue, 11-Dec-84 22:18:25 EST
Article-I.D.: usl.172
Posted: Tue Dec 11 22:18:25 1984
Date-Received: Thu, 13-Dec-84 02:46:27 EST
References: <785@enea.UUCP>
Organization: USL, Lafayette, LA
Lines: 56

Here is what I have learned about different hex formats.  Ron Hitchens
(hitchens@ut-sally) was kind to provide me most of the below
information.

The binhex format was developed for storing files as ASCII text on
Compuserve.  In order to download foo.hex (or any text file) from Unix
to Mac you should login to Mac using MacTerminal exactly as "man macput"
says and then give a command "macput -u foo.hex".  Option -u is
important since it converts LFs to CRs.  Then just run program binhex
on Mac to convert the text file into an application.  Which options to
set in binhex depends on which format (old or new) your foo.hex file is.
The new version is now the most common and then you should set the
Compressed option on.  In all cases I have turned Text Filter option 
off (I don't know when it should be used).

If you get the application in .rsrc (i.e. binary) format then you don't
have to use binhex at all.  Just download the file either using "macput
-r foo" if you only have foo.rsrc file, or simply "macput foo" if you
have got all three forks of the file (i.e. foo.rsrc, foo.info, and
foo.data).

Macget does the reverse of macput, i.e. it is used to uppload
applications and text files from Mac to Un*x.  It contains the same
options as macput.  See the manual page for details.

Finally there are the two programs tohex/fromhex.  They were developed
for the sumacc project for downloading object files created by their C
compiler.  An object file for the Mac created by that compiler has the
suffix .rsrc, tohex converts it to the text format (.dl) you've seen on
the usenet.  (For some reason unknown to me the program names have
prefix "hex" in them although the .dl format seems nothing to do with
hexadecimal.) This was done because when they started they couldn't
download directly with macput/MacTerminal. It also allowed them to mail
object files.  Fromhex simply does the reverse translation.  It's
preferable to download the binary form (.rsrc) because it's only half
as big, and macput sets 8bit mode on the tty port.   So the two
commands below do the trick:

  fromhex foo.rsrc 
  macput -r foo

The minimal set of programs needed for all of the above thus includes
MacTerminal and Binhex on Mac, and macput, macget, tohex, and fromhex
on Un*x.  Everything except MacTerminal is in public domain and has
been posted on the net in several formats.  If you don't have
MacTerminal, kermit might be a good replacement although I have not
tried it yet.  In order to get binhex running in the first place you
must get it in .rsrc (or in .dl) format.

Please make corrections and additions if I have missed something.

                              Juha Heinanen

USL, P.O. Box 44330, Lafayette, LA 70504-4330,  tel. (318)231-5345
UUCP:  {ut-sally, akgua}!usl!jih
ARPA:  usl!jih@ut-sally   CSNet: usl!jih%ut-sally.ARPA@csnet-relay