This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Coupling of stdin and stdout


On 5/10/06, Shaun Jackman <sjackman@gmail.com> wrote:
What is the mechanism whereby reading from stdin causes stdout to be flushed?

Cheers,
Shaun

Ah, found it.


libc/stdio/refill.c (__srefill):
 /*
  * Before reading from a line buffered or unbuffered file,
  * flush all line buffered output files, per the ANSI C
  * standard.
  */

 if (fp->_flags & (__SLBF | __SNBF))
   _CAST_VOID _fwalk (_GLOBAL_REENT, lflush);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]