Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Does NEWLINE always flush stdio buffer? Message-ID: <10490@smoke.BRL.MIL> Date: 6 Jul 89 16:25:50 GMT References: <11012@ihlpl.ATT.COM> <12375@bloom-beacon.MIT.EDU> <10487@smoke.BRL.MIL> <4861@ficc.uu.net> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 9 In article <4861@ficc.uu.net> peter@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.