Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!unido!ztivax!tumuc!lan!foessmei From: foessmei@lan.informatik.tu-muenchen.dbp.de (Reinhard Foessmeier) Newsgroups: comp.lang.c Subject: Re: Does NEWLINE always flush stdio buffer? Summary: Depends on "setvbuf" Keywords: stdio printf I/O Message-ID: <669@tuminfo1.lan.informatik.tu-muenchen.dbp.de> Date: 5 Jul 89 07:01:11 GMT References: <11012@ihlpl.ATT.COM> Sender: news@lan.informatik.tu-muenchen.dbp.de Reply-To: foessmei@lan.informatik.tu-muenchen.dbp.de (Reinhard Foessmeier) Organization: Inst. fuer Informatik, TU Muenchen, FR Germanujo Lines: 15 In article <11012@ihlpl.ATT.COM> knudsen@ihlpl.ATT.COM (Knudsen) writes: >I'd always understood that printf'ing any string ending in '\n' >(newline) would flush the I/O buffer. ... >Does anyone know the "official" rules of the traditional stdio >library? (Not the ANSII standard; I'm dealing with an older >system). Thanks, mike k The System V manual says (setbuf (3) that "by default, output to a terminal line is buffered and all other input/output is fully buffered". So, the behavior observed by you seems to be correct standard. Reinhard F\"ossmeier, Technische Univ. M\"unchen | "Lasciate ogni speranza, foessmeier@infovax.informatik.tu-muenchen.dbp.de | voi che entrate!" [ { relay.cs.net | unido.uucp } ] | (Dante, Inferno)