From: iverson AT cisco DOT com (Tim Iverson) Subject: Re: cat and binary files 11 Apr 1997 09:00:30 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199704110404.VAA01784.cygnus.gnu-win32@rottweiler.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: lhall AT rfk DOT com (Larry Hall) Original-Cc: iverson AT cisco DOT com, huott AT pinebush DOT com, marc AT watson DOT ibm DOT com, gnu-win32 AT cygnus DOT com In-Reply-To: <2.2.32.19970410224219.0093fac0@ma.ultranet.com> from "Larry Hall" at Apr 10, 97 06:42:19 pm X-Mailer: ELM [version 2.4 PL25] Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 iverson AT cisco DOT com +---------------- | Date: Thu, 10 Apr 1997 18:42:19 -0400 | To: Tim Iverson , huott AT pinebush DOT com (Ed Huott) | From: "Larry Hall (RFK Partners Inc 617-239-1053)" | Subject: Re: cat and binary files | Cc: marc AT watson DOT ibm DOT com, gnu-win32 AT cygnus DOT com | | 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".