delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/27/19:52:49

From: Paul AT chocolat DOT foobar DOT co DOT uk (Paul Shirley)
Subject: Re: ASCII and BINARY files. Why?
27 Jan 1997 19:52:49 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <dptMxAA5aP7yEwYb.cygnus.gnu-win32@foobar.co.uk>
Mime-Version: 1.0
Original-To: Stephan Mueller <smueller AT microsoft DOT com>
Original-Cc: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>
In-Reply-To: <c=US%a=_%p=msft%l=RED-67-MSG-970127183114Z-12470@INET-04-IMC.microsoft.com>
X-Mailer: Turnpike Version 3.02 <XvxOq6RVjuMF4FZcD8CYlzCnSO>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

In message <c=US%a=_%p=msft%l=RED-67-MSG-970127183114Z-12470 AT INET-
04-IMC.microsoft.com>, Stephan Mueller <smueller AT MICROSOFT DOT com> 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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019