Date: Mon, 10 Mar 1997 17:14:14 +0200 (IST) From: Eli Zaretskii To: Paul Derbyshire cc: djgpp AT delorie DOT com Subject: Re: Buffered stdio and ANSI In-Reply-To: <5g0cg5$t6k@freenet-news.carleton.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 10 Mar 1997, Paul Derbyshire wrote: > I notice a lot of people are very puzzlled by DJGPP's buffered STDIO > functions. It seems peculiar to me, since stdio functions are ANSI > standardized, that their functioning would vary so significantly depending > on compiler platform. I suspect this is because many DJGPP users have previous experience with real-mode compilers which are much more aggressive about flushing the buffers. In protected mode, it makes sense to minimize actual writes because they involve a mode switch which eats up a lot of cycles. AFAIK, the DJGPP behavior is closer to what you'd see on Unix, but most people here got their initial experience elsewhere. A lot of books which teach C are also sloppy in this respect (it seems that their authors only used a real-mode DOS compiler).