www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/08/05:25:40

Date: Tue, 8 Aug 1995 11:24:53 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Brendan Simon <brendan AT rdt DOT monash DOT edu DOT au>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: printf.help

On Tue, 8 Aug 1995, Brendan Simon wrote:

> It only outputs the printf string after I press one of the appropriate keys.
> I looked at the FAQ and it suggested cprintf, cputs or using the fflush(stdout)
> to force the buffer's contents to the screen.  These methods haven't work.

How's that?  cprintf() should print immediately, so that is your 
solution.

> buffered output any differently to V1.  Should I be using cprintf instead of
> printf as a rule.  What about portability...

From the portability point of view, this problem is inherently 
non-portable.  Writing to the screen is special in every variety of OS, 
(e.g., on Unix platform packages such as termio or curses are used) so 
it's best to put such functions into a separate module and rewrite them 
for every platform.  This is what the FAQ tells you, btw.

- Raw text -


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