Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!ukc!etive!epistemi!edai!rjc From: rjc@edai.ed.ac.uk (Richard Caley) Newsgroups: comp.sources.games.bugs Subject: Re: What setbuf() is and why you should use it Keywords: curses fflush setbuf stdio Message-ID: <475@edai.ed.ac.uk> Date: 20 Jul 89 02:43:36 GMT References: <283@wet.UUCP> <2245@auspex.auspex.com> <857@lakesys.UUCP> Reply-To: rjc@edai (Richard Caley) Organization: University of Edinburgh, Edinburgh Lines: 11 In article <857@lakesys.UUCP> chad@lakesys.UUCP (D. Chadwick Gibbons) writes: >|>The fix is very simple: put >|> setbuf(stdout, malloc(BUFSIZ)); But why use malloc at all, seems odd to dynamically allocats something which you will need every run and which will always be the same size . . . static char buffer[BUFSIZ]; setbuf(stdout,&buffer);