[comp.sys.mac.comm] Microphone II

davea@kgw2.bwi.WEC.COM (Dave Alverson) (05/24/90)

In article <18081@well.sf.ca.us>, svc@well.sf.ca.us (Leonard Rosenthol) writes:
> Summary: ZTerm cheats
I call it innovation.  (You say tomato, I say tomahtoe.)

> 	I will tell you how ZTerm is able to 'distinquish'.  If you read the
> ZTerm docs, you will see that Dave talks about a couple of resources that he
> uses to determine the type of file that is sent by comparing the first couple
> bytes of the file for specific things. This ways he can special case for things
> like GIFs, Text, etc.
> 	Although this sounds like a really neat thing, we feel that this is
> only going to lead to trouble when someone tries to send a file which JUST 
> happens to look like a GIF file (for example) and ZTerm starts playing with 
> the data since it 'looked liked a GIF'.  Would you want that to happen to
> your Tax Return???

When receiving a file, ZTerm looks at the first 128 bytes to determine
what kind of file it is.  If there is a MacBinary header, its MacBin.
If all the chars are "normal text" chars, its a text file.  If its not
one of these 2, it is treated as binary.  ZTerm does not "play with the
data" in a binary file.  (I have heard of some programs that strip LFs
from files that are not MacBinary, which really screws up ARC files and
most other binary files.)  

Only if ZTerm has decided its binary does it use the resource to
determine what type creator to use.  The worse that could happen is
it might incorrectly set the creator/type.  I can't see that this is
much worse than setting it to the default ????/???? for binary files.

The biggest weakness is a binary file that has all "normal text" in
the first 128 bytes.  ZTerm would think it is text, and do end
of line conversions.  For a binary file, this would be bad.  But
I think files of this type are rare.  So in ZTerm, you might have
a few rare occasions that you need to set it to binary; in other
programs, you would have to tell it more often: this file is text,
this file is binary.

  -- Dave

-- 
Z  Dave Alverson,   Cincinnati & Mason, Ohio
Z  Address: davea@kgw2.bwi.WEC.COM