www.delorie.com/archives/browse.cgi | search |
From: | Douglas Gleichman <doug AT tcville DOT es DOT hac DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Ghosts in DJGPP :-) |
Date: | 03 Feb 1997 10:16:48 -0800 |
Organization: | Hughes Aircraft Company |
Lines: | 26 |
Sender: | doug AT X-147-16-128-32 DOT es DOT hac DOT com |
Message-ID: | <qm3evdah67.fsf@X-147-16-128-32.es.hac.com> |
References: | <Pine DOT GSO DOT 3 DOT 95 DOT 970128014035 DOT 27048B-100000 AT hops DOT cs DOT jhu DOT edu> |
<qmenf4nywj DOT fsf AT X-147-16-128-32 DOT es DOT hac DOT com> <32F0120D DOT 462C AT cs DOT com> | |
NNTP-Posting-Host: | x-147-16-128-32.es.hac.com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
"John M. Aldrich" <fighteer AT cs DOT com> writes: > > Douglas Gleichman wrote: > > > > Or just put > > > > setbuf(stdout, NULL); > > > > at the beginning of main. > > This doesn't always work because DOS sometimes uses its own buffers for > stdout. When? I've never seen this. > fflush() or a newline always works, though. Turbo C/ Microsoft C have buffering turned off by default. DJGPP has it on. The above call to setbuf will make DJGPP operate like those other compilers. If you are porting a program over to DJGPP it seems that it would be a lot easier to add one line than to search for every printf and add a fflush after it.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |