Subject: Re: ASCII and BINARY files. Why?
From: [email-masked] (Paul Shirley)

27 Jan 1997 19:52:49 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Original-To: Stephan Mueller <[email-masked]>
Original-Cc: "[email-masked]'" <[email-masked]>
In-Reply-To: <c=US%a=_%p=msft%l=[email-masked]>
X-Mailer: Turnpike Version 3.02 <XvxOq6RVjuMF4FZcD8CYlzCnSO>
Original-Sender: [email-masked]

In message <c=US%a=_%p=msft%l=RED-67-MSG-970127183114Z-12470@INET-
04-IMC.microsoft.com>, Stephan Mueller <[email-masked]> writes
>I agree that the 't' flag is really handy to have around.
>
>IMO, the only way to truly solve this problem once and for all is to
>gradually incorporate text/binary mode awareness into the official GNU
>sources.  That means that all fopens that really mean to open in binary
>should have the 'b' added, and all code that follows fopens that really
>mean text mode should be examined and changed if they assume things like
>'the size of the file equals the number of charcters in a read of the
>whole file'.  The code isn't 'bad' the way it is, it's just
>Unix-centric, and not entirely ANSI conformant.  It will be more useful
>and more portable if these things are fixed, and I'm sure in time they
>will be.

AFAIK the djgpp port already handles 't' and O_TEXT modes. I had assumed
that this came from the gnu sources ( I assumed that because who else
would add an O_BIN flag when native DOS compilers all use O_BINARY ;)

If not, borrowing from the djgpp source should be fairly
straightforward.

-- 
Paul Shirley
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".