[comp.sys.mac] UNIX-side support for ZMODEM

davidl@intelob.biin.com (David Levine) (02/06/89)

I use my modem mostly for downloading from my UNIX system.  I've been
using the old reliable combination of [n]xbin and macput on the UNIX
end and MacTerminal on the Mac end for years.  One place this
combination falls down is in downloading over high-speed (9600+ baud)
direct-connect lines, whose throughput is little better than 2400 baud
equivalent.

So I thought I'd try the recently-posted ZTerm to get better
throughput.  Unfortunately, I can't figure out how to send the
*.{info,data,rsrc} triad produced by xbin to a single Mac file
via sz --> ZTerm.  Downloading the BinHex file via ZTerm and
unBinHexing it on the Mac end is not an acceptable solution, because
the BinHex files are enough larger than the binaries to wipe out the
throughput gain.

Is there a program or shellscript to make downloading from UNIX to
ZTerm as easy as xbin --> macput --> MacTerminal?  The missing program
would seem to be either a replacement for xbin that would create a
MacBinary file for sz, or a replacement for macput that would assemble
an {info,data,rsrc} triad into a single MacBinary file and upload it.

(By the way, if none of this makes sense to you, just ignore it.)

Thanks in the proverbial advance,

David D. Levine                        BBBBBBBBB  IIII IIII NNN  NNNN TM
Senior Technical Writer                BBBB  BBBB iiii iiii NNNN NNNN
BiiN - An Information Systems Company  BBBBBBBBB  IIII IIII NNNNNNNNN
                                       BBBB  BBBB IIII IIII NNNN NNNN
 ...tektronix!ogcvax!inteloa!davidl    BBBBBBBBB  IIII IIII NNNN  NNN

dplatt@coherent.com (Dave Platt) (02/08/89)

In article <DAVIDL.89Feb6093548@intelob.biin.com> davidl@intelob.biin.com (David Levine) writes:

> So I thought I'd try the recently-posted ZTerm to get better
> throughput.  Unfortunately, I can't figure out how to send the
> *.{info,data,rsrc} triad produced by xbin to a single Mac file
> via sz --> ZTerm.  Downloading the BinHex file via ZTerm and
> unBinHexing it on the Mac end is not an acceptable solution, because
> the BinHex files are enough larger than the binaries to wipe out the
> throughput gain.

The MacBinary standard is very similar to the old "triad" standard
originally used by MacTerminal, and emulated by macput.  The major
difference between the MacTerminal protocol and MacBinary is that the
MacTerminal protocol sends the info, data, and rsrc "forks" as
individual XMODEM files;  MacBinary sends 'em all together.

So,  you should be able to do the follows:

	cat foo.info foo.data foo.rsrc >/tmp/foo
	sz /tmp/foo

No guarantees... but, as I read the MacBinary standard, this should work
just fine.
-- 
Dave Platt    FIDONET:  Dave Platt on 1:204/444        VOICE: (415) 493-8805
  UUCP: ...!{ames,sun,uunet}!coherent!dplatt     DOMAIN: dplatt@coherent.com
  INTERNET:   coherent!dplatt@ames.arpa,    ...@sun.com,    ...@uunet.uu.net 
  USNAIL: Coherent Thought Inc.  3350 West Bayshore #205  Palo Alto CA 94303

nagel@blanche.ics.uci.edu (Mark Nagel) (02/08/89)

In article <20162@coherent.com>, dplatt@coherent (Dave Platt) writes:

|So,  you should be able to do the follows:
|
|	cat foo.info foo.data foo.rsrc >/tmp/foo
|	sz /tmp/foo
|
|No guarantees... but, as I read the MacBinary standard, this should work
|just fine.

This shouldn't work in general.  I checked the .info file and it is
equivalent to the MacBinary I header.  However, the data fork and
resource fork each need to be padded to a multiple of 128 bytes with
ASCII NUL characters.  The above may work in robust MacBinary
implementations, but the standard says the padding must be there.

Mark Nagel @ UC Irvine, Dept of Info and Comp Sci
ARPA: nagel@ics.uci.edu              | Charisma doesn't have jelly in the
UUCP: {sdcsvax,ucbvax}!ucivax!nagel  | middle. -- Jim Ignatowski

pratt@boulder.Colorado.EDU (Jonathan Pratt) (02/08/89)

Regarding the unix side of mac file transfers: I have a number of useful
programs that I would be willing to email to those who don't have
ready ftp access (most of these are available at sumex).  These are
mostly C source files (in .shar format).  Anyway, I have

unxbin
xbin
macbin
unmacbin

Together xbin and macbin will convert .hqx files to macbinary.  unmacbin
and unxbin go the other direction.  .rsrc, .info, and .data files are
used as an intermediate stage.  My main use for these has been to check
for munged files before I go through the pain of downloading at 1200
baud.  Since my unix end refuses to deal in 8 bit characters I do all
my downloading in straight text dump.  I do this to avoid the overhead
of kermit.  Fortunately my line is clean, so I have yet to lose a file
to noise.

Jonathan

Disclaimer: Some of the programs are quick hacks, so don't ask me how
to make them run on your system, as I only know enough of unix to get
by. (login / rn / logout :-) )


/* Jonathan Pratt          Internet: pratt@boulder.colorado.edu     *
 * Campus Box 525              uucp: ..!{ncar|nbires}!boulder!pratt *
 * University of Colorado                                           *
 * Boulder, CO 80309          Phone: (303) 492-4293                 */

malis@bbn.com (Andy Malis) (02/09/89)

In article <6453@boulder.Colorado.EDU> pratt@boulder.Colorado.EDU (Jonathan Pratt) writes:
> ... I have unxbin, xbin, macbin, unmacbin ...

Sorry for the followup, but replies through several paths (both
Internet and uucp) couldn't make it through.

Jonathan, I would appreciate unxbin, macbin, and unmacbin.
Thanks much.

Andy Malis <malis@bbn.com>    UUCP: {harvard,rutgers,uunet}!bbn!malis

normt@ihlpa.ATT.COM (Norman R Tiedemann) (02/14/89)

> > So I thought I'd try the recently-posted ZTerm to get better
> > throughput.  Unfortunately, I can't figure out how to send the
> > *.{info,data,rsrc} triad produced by xbin to a single Mac file
> > via sz --> ZTerm.  
> The MacBinary standard is very similar to the old "triad" standard
> originally used by MacTerminal, and emulated by macput.  The major
> difference between the MacTerminal protocol and MacBinary is that the
> MacTerminal protocol sends the info, data, and rsrc "forks" as
> individual XMODEM files;  MacBinary sends 'em all together.
> So,  you should be able to do the follows:
> 
> 	cat foo.info foo.data foo.rsrc >/tmp/foo
> 	sz /tmp/foo

This may work, but in looking at the code for macbin.c, it looks 
like there are some special cases for "zeros". In any case I have 
a copy of a program called macbin.c which runs on a Unix machine
and takes the three files *.{info, rsrc, data} and converts them 
into a single *.bin file for downloading. This is in MacBinary format.

This program was originally written by Jim Budler, I have version 2.4
dated April 3, 1987. 

If anyone want a copy of this I will gladly send it to them, if there is
lots of requests I will post it.


My question is where can I find "sz". Obviously it is a "send ZMODEM"
command. Is this just a shell script or a program, and how can I get
it.
-- 

	Norm Tiedemann		AT&T Bell Labs IH 2G-331
	att!ihlpa!normt		2000 Naperville Rd.
	normt@ihlpa.att.com	Naperville, IL	60566