Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!gatech!ukma!rutgers!bellcore!tness7!tness1!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.unix.wizards Subject: Line Buffered output (Re: Is Unix stdio slow?) Keywords: RMS, file system, stream files, stdio Message-ID: <1613@ficc.uu.net> Date: 26 Sep 88 14:28:31 GMT References: <411@marob.MASA.COM> <178@arnold.UUCP> <3442@crash.cts.com> <13733@mimsy.UUCP> Organization: SCADA Lines: 17 In article <13733@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: [ a bunch of stuff including a reference to line buffered output ] It always depresses me when I think that people are still doing line buffered output. The problem of handling stdout and stdin is a solved problem: do a flushbuf on all interactive streams whenever you do a fillbuf on any interactive stream. This would also make 90% of the explicit calls to fflush() unnecessary, since most of them are something like: printf("Command> "); fflush(stdout); gets(buffer); AND it's more efficient since it takes that test out of putchar! -- Peter da Silva `-_-' Ferranti International Controls Corporation. "Have you hugged U your wolf today?" peter@ficc.uu.net