This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cat and binary files


At 09:04 PM 4/10/97 -0700, Tim Iverson wrote:
I'd like to inject two points here before this thread dies.  

>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..

My understanding is that this is an issue within the toolset since Cygnus 
forces pipe input and output to be opened in non-binary mode.  (Here I refer 
you to Chuck Bogorad's message in this same thread.)  However, I suppose 
there are some occasions when a DOS/Windows program may write some output 
to stdout in text mode that someone may want to pipe through to the tools 
you mention above.  I expect altering Cygnus's scheme for pipes would not 
remedy this situation....

>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.

Complete interoperability with non-binary files generated by Windows programs
is not possible at the moment without some work.  This work takes 1 of two 
forms:

  1. If you have a file that you created with a Windows/DOS based program 
     and the file was not created as binary, you need to strip the CRs from 
     the file to insure that it will work with the tools well (of course I'm 
     assuming your mounts are also binary).

  2. Go through all the utilities and alter them so they ignore all the 
     extra junk that comes along with using non-binary files.

(2) is doable and should allow someone to use the GNU versions of these tools
with no thought as to how the file was created but it is still allot of 
work.  It has yet to be done.  (1) is also doable, gets you most of the 
functionality that (2) does (with the possible exception of interoperable
pipe issues) and is available today.  I'm sure that perceptions of which of
these 2 general options is a necessity for these tools is highly subjective
but personally I've had very few times when I've needed to use a non-binary
Windows files with these tools where binary mounts and a filter to remove the
CRs has not sufficed....


Larry

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]