delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/15/23:20:33

Date: Mon, 15 Sep 1997 20:18:49 -0700 (PDT)
Message-Id: <199709160318.UAA02826@adit.ap.net>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Please Help: Printf problem argv[] issues. LFN?
Cc: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019