Mail Archives: djgpp/1997/08/20/20:48:52
In article <33F9BFCB DOT 4C7F628A AT alcyone DOT com>
max AT alcyone DOT com "Erik Max Francis" writes:
>Lawrence Kirby wrote:
>
>> 7.9.3 does *not* guarantee that stdout's buffer is flushed before a
>> character is read:
>>
>> 1. it doesn't guarantee that stdout refers to an interactive device
>>
>> 2. even if it does the stream can be line buffered and there is no
>> new-line character being output above.
>
>That's not the way I read it:
>
> "Furthermore, characters are intended to be transmitted as a block to
> the host environment when a buffer is filled, when inputi s requested
> on an unbuffered stream, or when input is requested on a line buffered
> stream that requires the transmission of characters from the host
> environment" (ANSI C 7.9.3).
You stop quoting at the critical point. The Standard continues "Support
for these characteristics is implementation-defined" so the standard
provides no guarantee here that code can rely on.
--
-----------------------------------------
Lawrence Kirby | fred AT genesis DOT demon DOT co DOT uk
Wilts, England | 70734 DOT 126 AT compuserve DOT com
-----------------------------------------
- Raw text -