[net.micro.mac] All these hex'es

ber@enea.UUCP (Bjorn Eriksen) (12/07/84)

I'v just bought a Mac and is new to this newsgroup. There has been
lots of talk about all these binhex/fromhex/tohex or whatever hex'es
there are. Could someone enlighten me how these are supposted to work
and how they are related to macput/macget? Where do I get a complete
hex-package? I have a VAX 11/780 with 4.2BSD and a 512K Mac.
Still waiting for MacTerminal. What's next?
-- 
	Bjorn Eriksen
	ENEA DATA Sweden

	UUCP:	{decvax,philabs}!mcvax!enea!ber
	ARPA:	decvax!mcvax!enea!ber@berkeley.arpa
		mcvax!enea!ber@seismo.arpa

jih@usl.UUCP (Juha I. Heinanen) (12/12/84)

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.dl >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

dlc@lanl.ARPA (12/15/84)

> In all cases I have turned Text Filter option 
> off (I don't know when it should be used).
I think the text filter allows formatting codes to be removed from MacWrite
documents so they can be sent out.  But, of course, I'm not sure.