[comp.sys.mac] BinHex 4.0 Usage

bayes@hpfcdc.HP.COM (Scott Bayes) (07/20/88)

> complains mightily about the application being unavailable or busy when I
> try to open it.  I've noticed that the file type and creator for these files
> tends to be SIT! or PIT, but have no idea that this is significant.  I've also
> tried stripping out all linefeed characters and extra text from the captured
> file before using BinHex.  No difference.  So here's my question:
> 
> 	What am I doing that I shouldn't be doing, or what should I be
> 	doing that I'm not now doing?

I think these files need to be "unpacked" with either PackIt (PIT files), 
or StuffIt (SIT! files). Acquire a copy of each of these, make them
accessible, and double click on the BinHexed files. PackIt or StuffIt should
be invoked, and ask you about unpacking. Do the obvious (StuffIt may not be
obvious). The files created by these programs should run nicely, if Binhex
didn't complain earlier.

> 
> Any help would be greatly appreciated.  I'd hate to have to toss away 4 MB
> of carefully captured files.  ADVthanksANCE!
> 
> TJ {With Amazing Grace} The Piper
> aka Ted Jardine  CFI-ASME/I
> Usenet:		...uw-beaver!ssc-vax!ted
> Internet:	ted@boeing.com

Scott (loving bagpipes) Bayes

werner@utastro.UUCP (Werner Uhrig) (07/24/88)

In article <3250@juniper.uucp>, wizard@juniper.uucp (John Onorato) writes:

> I, too, have had problems with binhex (tho it might not be binhex that is
> the problem... :-).  I have captured a few files from the comp.binaries.mac
> newsgroup.  Red Ryder, when I capture the text, puts it in a plain vanilla
> text editor for me.  Then I open the file with Red Writer and take out 
> the -- MORE n% --s.  Finally, I run binhex on the final file, and I always
> get a CRC error!  What am I doing wrong?  Has anyone had (more) success?

uh, were do I start - you are doing things about as inefficiently and
unreliably as one can think of.....  but we all started this way, I suspect.

Maybe someone can dig out an old article which gives a tutorial about things... 

or write a new one (to be updated and reposted at regular intervals in the
future) ...

here is the quick, short and dirty ... (but, hopefully, correct)

1) DO NOT capture the text - download your files with a protocol that
	does error detection;  NEVER-EVER capture text when you cannot
	afford line-noise corrupting it.  Red Ryder has error-detecting
	modes - plus it can do the download in the background.  If you do
	not have the RR-documentation and can't figure it out, use
	something like Kermit, which is in the Public Domain ...
	the same is true for most other commercial communication programs
	such as VersaTerm, MicroPhone, MacTerminal, etc ...
	NOTE: you have to use a program like XMODEM, MACPUT, KERMIT, ...
	on your USEnet host for downloading (KERMIT 0.90 was distributed
	in comp.binaries.mac recently;  it's high time the other programs
	get passed around again, I suspect).

2) there are a variety of scripts and utilities available  which make
	combining, cleaning and downloading a snap:  let me just name a few
	"buzzwords" naming items you want to get your hands on and learn
	how to use:  comb-hex, clean-news, xbin, unpit, macbin, macbin2,
	.... quite a few more, mostly C-programs and UNIX-shell-scripts ...
	(yes, it's time those get posted again also ...  or, maybe, we can
	 get some regional archive-servers going (also) ... )

3) I don't recall for sure, but I seem to remember that RR and/or RedWriter 
	do something funny to the End-of-Line character and BinHex4 might
	not like that .... besides, BinHex also doesn't like garbage at the
	beginning of the file (just in case you forgot to remove the headers).
	StuffIt-1.40 doesn't care about those - another reason to use that
	program ... 

Maybe someone remembers a magazine article or Users-Group newsletter to which
we can point folks (or even upload) to help neophytes get going ...?!
(I can't recall any such item in the archives on SUMEX or SIMTEL20; I
certainly don't have one on RASCAL and don't recall any in the other
local archives on SALLY or IX1 ... can anyone help get some old newsletters
from user-groups  like BCS, BMUG, etc.. uploaded?  I'll get them archived
online once and for all.... if we get a number of tutorials uploaded, we
can even get a new sub-directory going on SIMTEL20, dedicated to the topic)

BTW, I don't see anyone fighting for the task of moderator, or even voice
any thoughts on the topic.... scary amount of work, isn't it?  Well, I sure
hope you-all don't forget to write thank-you notes to Roger - and don't
forget to congratulate him to the new Mr. Long!!!  I saw one (or was it two)
articles posted, expressing thanks to Roger - I hope, that means we all
are doing the *RIGHT* and Roger's mailbox is flooded with signs of apprecia-
tion for his years of work....

The reason why I feel like I need to mention this is because just today I
got a note from a net-friend in Australia who has shared with us a number
of his programming efforts (he even had to pay for transmission cost himself
from 'Down-Under' across the Pacific) - accompanied only by a request of an
occasional postcard to let him know that there are some happy users out
there (no SHAREware-$s, no hint that a few bucks would be welcome to offset
the cost of bringing it to us; no mention of being a poor student...) ... 
...the note was letting me know that he received "another" postcard from
Holland, this time, and that he was wondering why it seems that it is mainly
(only?) Europeans he hears from ... 

When I think about it, I no longer wonder why there is so little PD or
Shareware any more and why so many oldtimers are getting burnt out by
the bad vibes and intolerance that seems to be more rampant than ever...

I sure hope that at the "Netters-Meet" in Boston which Hammen from Wisconsin
advertised here today, someone raises the glass to toast some of the
people we have reason to show appreciation to:  and if I get there, I hope
to bring some postcards along which I'll ask everyone to sign to send to
those that couldn't make it in person;  heck one just might get the energy
for another year of contributing and some good-vibes to tell the grand-
children "about the barnstorming days of computer networks" ...

but I am getting side-tracked, as I usually do at this hour ...

-- 
-------------------->PREFERED-RETURN-ADDRESS-FOLLOWS<---------------------
(INTERNET)	werner%rascal.ics.utexas.edu@cs.utexas.edu
(DIRECT)	werner@rascal.ics.utexas.edu   (Internet: 128.83.144.1)
(UUCP)		...{backbone-sites}!cs.utexas.edu!rascal.ics.utexas.edu!werner

twakeman@hpcea.CE.HP.COM (Teriann Wakeman) (07/26/88)

While we are on the subject.... i have yet to figgure out how to reassemble
multiple part postings. I can download single postings and unhex them OK.
The methods that I use are:
 1. save screen to file. this results in a text file with a header & 
footer for each screen that I need to manually strip off.

2. Cut from the screen and paste into a text editor (such as MockWrite).
  This second method initially takes longer but I end up with a clean
  download ready to run through Binhex.

I strongly suspect that there is a less combersome way to download from
binaries, but all the transfer protocals that I am aware of requires one
end to be sending in the protocal befor the other can receive it. I have
no idea of how I can talk binaries into XMODEMing me something.

Anyway, if I download a multiple part posting and clean up each part, how
do I join the parts so that they work. The text editor runs out of space,
and the word processing applications tell me I can not make a single 
paragraph that long. If I break it up into paragraphs, Binhex returns
an error statement. 

Being self-tought on this system, I strongly suspect that there is a
simpler solution that I have not been introduced to.

Networld <-> HP 300 series UNIX box <-> serial line (X.25) <-> MAC
                                                       VersatermHP emulating
                                                       HP2621 terminal

I would appriciate instructions on 'how to put it all together'.

TeriAnn
(415)857-5057

rdsesq@Jessica.stanford.edu (Rob Snevely) (07/26/88)

Do not try to due a text file capture using Red Ryder. It does not work well
at all. I found out the hard way after about 4 hours of doing it that 
binhex 4.0 would not read any of the files.

Someone mentioned a shell script that would help. I sure could use it and would
would be very grateful if someone would postit or send me a copy. address is
rdsesq@jessica.stanford.edu.

Coming from a micro background of stand alone machines, a lot of this stuff
still confuses me.

thanx in advance, (whoever you are)

rob

erc@pai.UUCP (Eric Johnson) (07/29/88)

In article <430037@hpcea.CE.HP.COM>, twakeman@hpcea.CE.HP.COM (Teriann Wakeman) writes:
> While we are on the subject.... i have yet to figgure out how to reassemble
> multiple part postings. I can download single postings and unhex them OK.
> The methods that I use are:
>  1. save screen to file. this results in a text file with a header & 
> footer for each screen that I need to manually strip off.
> 2. Cut from the screen and paste into a text editor (such as MockWrite).
>   This second method initially takes longer but I end up with a clean
>   download ready to run through Binhex.
> I strongly suspect that there is a less combersome way to download from
> binaries, but all the transfer protocals that I am aware of requires one
> end to be sending in the protocal befor the other can receive it. I have
> no idea of how I can talk binaries into XMODEMing me something.
> Anyway, if I download a multiple part posting and clean up each part, how
> do I join the parts so that they work. The text editor runs out of space,
> and the word processing applications tell me I can not make a single 
> paragraph that long. If I break it up into paragraphs, Binhex returns
> an error statement. 
> Being self-tought on this system, I strongly suspect that there is a
> simpler solution that I have not been introduced to.
> Networld <-> HP 300 series UNIX box <-> serial line (X.25) <-> MAC
>                                                        VersatermHP emulating
>                                                        HP2621 terminal
> I would appriciate instructions on 'how to put it all together'.
> TeriAnn
> (415)857-5057

Here is how I do it from:

Networld <-> HP 320 (HP-UX) <-> serial line (modem dial-in) <-> MAC
                                                                Kermit

I read netnews with vnews (version B 2.11 12/1/87), and can use
s to save the current message with the header, or w to save without
the header.  In either case, the binHEX info always seems to have extra
junk that needs to be removed, e.g., "-- end of part 3 --" at the end
and a "cut here" at the beginning.  What I do is save each part to its own
file, e.g., xlisp1.hex, xlisp2.hex. etc.

Then, I use the vi editor under HP-UX to create one large file
with all the parts, e.g., xlisp.hex.  I use the :r command to read in
each of the parts in order, and I manually strip off the beginning and
trailing stuff.  A HEX file needs, I believe, to begin with a line like:
"(This file must be converted with BinHex 4.0)"; and usually ends
with a colon (":"). Once all the parts are together in one file,
I save it as an ASCII text file.  Using vi with a Mac terminal
emulator can be kind of tricky, so I suggest using Kermit, which
seems to have enough vt100 terminal emulation to make HP 320 happy.

I am sure someone has developed a Unix program to automate this
process, but I haven't found one yet. (It gets difficult since most
postings begin the first part with an explanation of what the program
does -- and this section is of an indeterminant length.)

Now, once the file is all put together on the Unix end, I use
kermit (public distribution sources came by on the net -- and it
actually works on the HP).  On the mac end, I use all the defaults
(data fork, text mode) that came with the Kermit that was recently
distributed over comp.binaries.mac.  On the Unix end, I use
kermit -s file1 file2 [...] (-s means send), and everything seems
to go ok when I set the Mac to receive files.  Kermit seems to have
some DEC-isms in it about file names (VMS file names are much the same
as MS-DOS -- all caps, 8 char name with a period then a 3 char extension).
Thus, I have had trouble with foo.hex.a and foo.hex.b, etc. So, it is
a good idea to use short names with a 3 char extension, e.g., XLISP.HEX
and Kermit will like you all the more.  Kermit is real slow, but it
will send multiple files over in one batch (so you can enjoy a gin and tonic
while the Mac is downloading the files).  I have yet to run an xmodem
on the HP 320 (although Unix sources came by awhile ago, no one
here has tested it yet).  If you use cat on the Unix end to display
the file, and then capture the text on the Mac side, I found that
large files usually fail to come over correctly.  Small files seemed
to work ok, though.

Finally, once the *.HEX files are downloaded to the Mac, BinHex 4.0 should
work just fine on the files.  The only troubles I have had are related to
munged postings (at least one part came over netnews with bad data).

I hope this isn't too basic (please don't be offended).

Have fun,
Eric

-- 
Eric F. Johnson          | Phone +1 612-894-0313             | Are we
Prime Automation,Inc     | UUCP: bungia!pai!erc              | having
12201 Wood Lake Drive    | UUCP: sun!tundra!pai!erc          | fun
Burnsville, MN 55337 USA | BIX:  erc                         | yet?

hodas@eniac.seas.upenn.edu (Josh Hodas) (07/30/88)

In article <113@pai.UUCP> erc@pai.UUCP (Eric Johnson) writes:
>In article <430037@hpcea.CE.HP.COM>, twakeman@hpcea.CE.HP.COM (Teriann Wakeman) writes:
>> While we are on the subject.... i have yet to figgure out how to reassemble
>> multiple part postings. I can download single postings and unhex them OK.
>> The methods that I use are:

     [Questions about best way to download and recombine multi-part postings]

>> Networld <-> HP 300 series UNIX box <-> serial line (X.25) <-> MAC
>>                                                        VersatermHP emulating
>>                                                        HP2621 terminal
>> I would appriciate instructions on 'how to put it all together'.
>> TeriAnn
>> (415)857-5057
>
>Here is how I do it from:
>
>Networld <-> HP 320 (HP-UX) <-> serial line (modem dial-in) <-> MAC
>                                                                Kermit
>
>I read netnews with vnews (version B 2.11 12/1/87), and can use
>s to save the current message with the header, or w to save without
>the header.  In either case, the binHEX info always seems to have extra
>junk that needs to be removed, e.g., "-- end of part 3 --" at the end
>and a "cut here" at the beginning.  What I do is save each part to its own
>file, e.g., xlisp1.hex, xlisp2.hex. etc.
>

  [a somewhat invloved vi method for recombining]
>
>I am sure someone has developed a Unix program to automate this
>process, but I haven't found one yet. (It gets difficult since most
>postings begin the first part with an explanation of what the program
>does -- and this section is of an indeterminant length.)
>
      [Details of using kermit to download, then binhex]

>
>I hope this isn't too basic (please don't be offended).
>
>Have fun,
>Eric
>
>-- 
>Eric F. Johnson          | Phone +1 612-894-0313             | Are we
>Prime Automation,Inc     | UUCP: bungia!pai!erc              | having
>12201 Wood Lake Drive    | UUCP: sun!tundra!pai!erc          | fun
>Burnsville, MN 55337 USA | BIX:  erc                         | yet?


Well, I've ssen several requests of this sort in the last few months.
Some time ago the following shell script was posted (I assume by Oliver
Steele the attributed author, but I don't remember).  It does a wonderful
job of stripping out headers, and junk.  To use it, set it's mode to
excecutable    (ie:  chmod 700 cmb)  then, if youo have xlisp1, xlisp2,
xlisp3, xlisp4, type   

       cmb xlisp? > xlisp.hqx

and its done.

Hope this helps.  It has worked flawlessly for me for 6-7 months.


Josh Hodas

------------------------


#! /bin/csh -f
# File:		cmb
# Author:	Oliver Steele
# Date:		15 Oct 87
# Purpose:	combine multiple BinHex files
# Usage:	cmb foo.? > foo.hqx

set script = /tmp/comb$$
onintr exit

cat > $script << EOF
BEGIN		{FS = "\0";}
length == 64
/^\(This file must/
/:\$/
EOF

awk -f $script $*

exit:
rm -f $script


-------------------------

Josh Hodas    (hodas@eniac.seas.upenn.edu)
4223 Pine Street
Philadelphia, PA 19104

(215) 222-7112   (home)
(215) 898-9515   (school office)

twakeman@hpcea.CE.HP.COM (Teriann Wakeman) (08/01/88)

Thanks to everyone who replied to my request for help finding an easier
way to download from binaries. It looks like I was doing things backwards
by downloading directly from the Net then trying to clean things up
and put them together. When I first developed my method, I knew the Mac
well and was trying to read notes with no knowlage of UNIX or the editor.
I have since discovered the man command, and have printed the help screens
to ELLE, the editor that I'm using. So, little by little, I'm getting this
figured out.

THANKS AGAIN

TeriAnn