Does NEWLINE always flush stdio buffer?

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Jul 7 02:25:50 AEST 1989


In article <4861 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>>The cost of implementing this can be substantial!
>No, it is not. In fact, if ... _filbuf(stdin) calls _flsbuf(stdout) ...

It is not just stdout, but ALL terminal-associated streams that are
supposed to be flushed.  Also, during output it is necessary to check
each character against new-line to implement line buffering.

I stand by my assessment that line buffering is a mistake.



More information about the Comp.lang.c mailing list