www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/10/12:26:27

Date: Thu, 10 Dec 1998 19:25:17 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: HANRIGOU <HANRIGOU AT cgste DOT mq>
cc: "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Subject: Re: read/write in binary mode: fopen/open behaviour
In-Reply-To: <366FE4BC.E1996DDC@CGSTE.MQ>
Message-ID: <Pine.SUN.3.91.981210192346.4044C-100000@is>
MIME-Version: 1.0
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.

- Raw text -


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