[net.micro.atari16] --- Megamax Printf bug

nep.pgelhausen@AMES-VMSB.ARPA (03/27/86)

Despite Jwahar R. Bammi's rebuttal, the problem described (no printing
of statements not  ending in '\n' until explicit buffer flush) is a bug.
It is possible to use fflush(stdout) to get around it, as he describes,
but that is not how most standard library printf()s require things.
Sorry, Jwahar.
			-Richard Hartman
			nep.pgelhause@ames-vmsb
------

robert@megaron.UUCP (03/28/86)

> Despite Jwahar R. Bammi's rebuttal, the problem described (no printing
> of statements not  ending in '\n' until explicit buffer flush) is a bug.
> It is possible to use fflush(stdout) to get around it, as he describes,
> but that is not how most standard library printf()s require things.

No, no.  I have yet to see any printf do any automatic buffer flushing
on micros, minis, or main frames.
Jwahar was right!

Robert J. Drabek

freed@aum.UUCP (Erik Freed) (03/29/86)

> > Despite Jwahar R. Bammi's rebuttal, the problem described (no printing
> > of statements not  ending in '\n' until explicit buffer flush) is a bug.
> > It is possible to use fflush(stdout) to get around it, as he describes,
> > but that is not how most standard library printf()s require things.
> 
> No, no.  I have yet to see any printf do any automatic buffer flushing
> on micros, minis, or main frames.
> Jwahar was right!

I have only seen this behavior on one out of about 5 machines I have worked
on. Since, I believe, this is not documented in K&R (and in most Unix manuals) 
the nomer of "bug" does seem correct. It is just a widespread and familiar 
one...
-- 
-------------------------------------------------------------------------------
                           Erik James Freed
			   Aurora Systems
			   San Francisco, CA
			   {dual,ptsfa}!aum!freed

mcewan@uiucdcs.CS.UIUC.EDU (03/30/86)

> Despite Jwahar R. Bammi's rebuttal, the problem described (no printing
> of statements not  ending in '\n' until explicit buffer flush) is a bug.
> It is possible to use fflush(stdout) to get around it, as he describes,
> but that is not how most standard library printf()s require things.

Just because MOST standard library printf's do not buffer output to the
terminal does not mean that that is the only correct way. This is
implementation-dependent, and anyone who wants to write portatble code
should use fflush, even if it is not required by the library they are
using.

			Scott McEwan
			{ihnp4,pur-ee}!uiucdcs!mcewan

Green s/m watchlizard seeks s/f/wl - object: companionship. Reply
Box 23, Cynosure.

tainter@ihlpg.UUCP (Tainter) (03/31/86)

> 
> Despite Jwahar R. Bammi's rebuttal, the problem described (no printing
> of statements not  ending in '\n' until explicit buffer flush) is a bug.
> It is possible to use fflush(stdout) to get around it, as he describes,
> but that is not how most standard library printf()s require things.
> Sorry, Jwahar.
> 			-Richard Hartman
> 			nep.pgelhause@ames-vmsb
Really?  Most of the printf()s I have experienced have had this "feature".

The "bug" is not in printf().  The bug is in the OS where you cannot set a NOT
BUFFERED flag.
--j.a.tainter