Subject: Re: Why text=binary mounts
From: [email-masked]

12 Jan 1998 15:02:39 -0800
Message-ID: <[email-masked]>
To: [email-masked]

?? 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)" <[email-masked]> writes:
> Not necessarily.  Various programs do this, including vim and, I think,
>NTEmacs.

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
"[email-masked]" with one line of text: "help".