www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2007/08/06/11:44:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Mon, 6 Aug 2007 11:43:40 -0400
Message-Id: <200708061543.l76FheeN022780@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <200708061404.13903.juan.guerrero@gmx.de> (message from Juan
Manuel Guerrero on Mon, 6 Aug 2007 14:04:13 +0200)
Subject: Re: A couple of questions about fflush
References: <200708061404 DOT 13903 DOT juan DOT guerrero AT gmx DOT de>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

The CVS version of fflush only returns EOF, 0, or -1.  It also does
nothing to any file that's read-only.  It's also undefined to call it
on an input stream:

7.19.5.2 Ifstream points to an output stream or an update stream
         . . .; otherwise, the behavior is undefined.

Also, fseek only returns an error code, not a file position.  Only
lseek() returns a position, and using it to peek behind the stdio
buffers is undefined.

>  1) Where is an exact definition of the meaning of all bits in the
>      _flag component of the FILE * structure?

See <libc/file.h>

Not all have comments, but their meanings should be obvious either
from their names or the sources that use them.

Note: user applications are NOT supposed to use, or even know about,
these flags.

>  2)  What of this bits are supported by djgpp?

All of them that we define.

>  3)  In which files are the macros/values of the bits defined?

See <libc/file.h>

- Raw text -


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