Subject: Re: cat and binary files
From: [email-masked] (Tim Iverson)

11 Apr 1997 09:00:30 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (Larry Hall)
Original-Cc: [email-masked], [email-masked], [email-masked],
        [email-masked]
In-Reply-To: <[email-masked]> from "Larry Hall" at Apr 10, 97 06:42:19 pm
X-Mailer: ELM [version 2.4 PL25]
Original-Sender: [email-masked]

While I would agree that it would be nice to say that all the GNU tools
are inherently binary, that's not really true.  Many of the tools are
line oriented, and thus require support for detecting a newline; eg.
sed, awk, diff, grep, gcc, gas, etc..

DOS/Windows does not have a "text-mode", it has an ugly newline
standard.  Text-mode was a portability hack introduced into the C
library by Lattice back in the days of DOS 2.0.  Putting CR+LF/LF
translation into read() and write() made it much easier to port C
programs to DOS from elsewhere and vice-versa.  Since then, all
production C compilers have supported an identical or similar feature.

One thing I have never really understood is why so many programs keep
insisting on appending Ctl-Z to files.  There has been no EOF character
in DOS since version 1.0 (and never ever in Windows)!  Ctl-Z == EOF
applies *only* to the con device.  You can test this for yourself with
the DOS copy command.

The other thing I don't understand is this list's seeming indifference
to interoperating with Windows.  If you don't want to play with Windows
files, why aren't you off running Unix?  That's what I do.

BTW, for anyone that's interested, you can fix the Ctl-Z bug by hacking
all support for Ctl-Z out of winsup/fhandler.cc%fhandler_base::read().
It's not hard -- too trivial to post a patch.

- Tim Iverson
  [email-masked]


+----------------
| Date: Thu, 10 Apr 1997 18:42:19 -0400
| To: Tim Iverson <[email-masked]>, [email-masked] (Ed Huott)
| From: "Larry Hall (RFK Partners Inc 617-239-1053)" <[email-masked]>
| Subject: Re: cat and binary files
| Cc: [email-masked], [email-masked]
| 
| At 07:38 PM 4/9/97 -0700, Tim Iverson wrote:
| >All this aside, IMHO, cat is inherently a binary program -- it shouldn't
| 
| I would submit that you can extend your binary program argument further
| to encompass all the GNU tools.  Certainly they were initially designed for
....
| don't want to open up an argument on how these tools should work in a 
| DOS based environment but I would like to point out that using them on 
| "text" files is basically an unsupported configuration.  While it would be
....
| offending file through some filter.  Other than this "inter-operability"
| with DOS/Windows-based programs issue, I've seen no deleterious effects 
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".