delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/08/07:31:26

Date: Wed, 8 Oct 1997 13:31:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Newbie <new AT no_spam DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Why don't printf work properly with getch ()?
In-Reply-To: <01bcd38e$b9e2da40$0b0867d1@default>
Message-ID: <Pine.SUN.3.91.971008132648.28780D-100000@is>
MIME-Version: 1.0

On 8 Oct 1997, Newbie wrote:

> Is this a know bug with djgpp?

Known: yes.  Bug: NO.  stdout is line-buffered, so incomplete lines don't
get printed.  The reason is performance: writing to the screen requires a
switch from protected mode to real mode and back, which would 
tremendously slow down the output if you do that for each character. 

> Is there any way to work around this?

Please read section 9.4 of the DJGPP FAQ.  It describes several ways to 
make that code do what you'd expect.  The FAQ is available as 
v2/faq210b.zip from the same place you get DJGPP.

- Raw text -


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