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: Mime-Version: 1.0 Original-To: Stephan Mueller Original-Cc: "'gnu-win32 AT cygnus DOT com'" In-Reply-To: X-Mailer: Turnpike Version 3.02 Original-Sender: owner-gnu-win32 AT cygnus DOT com In message , Stephan Mueller 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".