delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/03/04:18:23

Date: Wed, 3 Jan 2001 11:16:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Subject: Re: Bug 000323 (LONG)
In-Reply-To: <200101030654.HAA01457@father.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.1010103111220.1129X-100000@is>
MIME-Version: 1.0
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

On Wed, 3 Jan 2001, Martin Str|mberg wrote:

> >   - Instead of adding an fseek to each buffered stdio function (such
> >     as putc, fwrite, etc.), isn't it better to do that inside _flsbuf,
> >     which is the only function used by buffered functions to actually
> >     write to the file?
> 
> Ok. I'm not an expert. There isn't anything that doesn't go through
> _flsbuf() that we must watch out for? (Like unbuffered output?)

_All_ output from buffered stdio functions goes through _flsbuf.  In the 
unbuffered case, _flsbuf is called for each character.

The data gets into _flsbuf either directly, from functions like fwrite, 
or via putc (either directly or from _doprnt).

If _flsbuf is not called in some case, that is a grave bug, because 
_flsbuf provides several important features, such as the termios hooks, 
that would be badly broken if _flsbuf is bypassed.

- Raw text -


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