Why text=binary mounts

marcus@bighorn.dr.lucent.com marcus@bighorn.dr.lucent.com
Mon Jan 12 09:17:00 GMT 1998

?? originally wrote:
}Maybe the reading operations could track what kind of
}line termination is being used on a file, then succeeding write operations
}could use the same style (unless overridden by the open() flags)?  That
}sounds weird...and probably unworkable...just food for thought.

"Larry Hall (RFK Partners Inc)" <lhall@rfk.com> writes:
> Not necessarily.  Various programs do this, including vim and, I think,

So long as the program knows that it is a text file (or that it is going
to treat it as such), then it could just as easily pass some indication of
that to the {f}open() routine.  Given a reliable indication of text/binary
content of a file, cygwin32 could do a fine job of translating line endings
from the native system to the \n termination expectation of the program.

The problem, though, seems to be in getting all the programs to reliably
pass this information to the {f}open() call, so cygwin32 does not know
if the file is binary or not.

Trying to tell which of several likely line endings is used in a file is
not too difficult, once you know it is a text file.  Trying to tell if
it is a text file or a binary file, however, is not nearly so easy.

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

More information about the Cygwin mailing list