Mail Archives: djgpp/1997/09/15/23:20:33
At 02:37 9/15/1997 +0300, Eli Zaretskii wrote:
>
>On Sun, 14 Sep 1997, Nate Eldredge wrote:
>
>> At 05:17 9/13/1997 GMT, Paul Derbyshire wrote:
>> >
>> >Unlike Borland, DJGPP line-buffers stdio. Add fflush(stdout) after the
>> >printf's in the loop (or a \n at the end of the line) and all
>> >should work.
>>
>> Not entirely correct... stdout is not line buffered, but fully buffered. And
>> the buffer is 4K in size. So adding a \n will not help.
>
>No, Nate, Paul was right: stdout *is* line-buffered *if* it is
>connected to the console device. So if \n is added, it *will* output
>the string immediately. If stdout is redirected to a file or a pipe,
>then it is indeed fully buffered, but as far as I can see, the buffer
>size is the size of the transfer buffer, not 4K.
You are indeed right. Sorry about that. The 4K came from an old memory of
DJGPP V1, where the transfer buffer normally was 4K.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -