Date: Thu, 10 Dec 1998 19:25:17 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: HANRIGOU cc: "djgpp AT delorie DOT com" Subject: Re: read/write in binary mode: fopen/open behaviour In-Reply-To: <366FE4BC.E1996DDC@CGSTE.MQ> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Thu, 10 Dec 1998, HANRIGOU wrote: > Then I ran this program with a foo file containing many ^Z to check > that we read the entire file. > And... everything is OK. In fact in my first tests I had kept too much > from the original GNU code and, between first fopen() and read() loop > there was a call to a function that resets file mode to ascii. Okay, now it's clear. Thanks for digging. > BTW is there an easy way to test current file type associated to a file > descriptor? I haven't been able to find this in libc. Look at the sources of the function __file_handle_set.