delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/05/09:42:58

Date: Sun, 5 May 1996 16:27:13 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Rafael R. Sevilla" <rsevilla AT upd DOT edu DOT ph>
Cc: DJGPP Mail Server <djgpp AT delorie DOT com>
Subject: Re: Screen updates with \b
In-Reply-To: <Pine.SOL.3.91.960505205409.13837B-100000@sauron>
Message-Id: <Pine.SUN.3.91.960505162425.12428A-100000@is>
Mime-Version: 1.0

On Sun, 5 May 1996, Rafael R. Sevilla wrote:

> things like status displays on a single line, I repeatedly printed the
> backspace character (ASCII 8, or "\b") to standard output until I get back
> to the start of the output line and then printed the update. This works
> properly with Turbo C under DOS and GCC 2.7.2 under Solaris 5.3, but not
> under djgpp. What djgpp does is wait until the _last_ such update before
> printing anything! Why? An example of this usage follows:

`printf' writes to stdout, and stdout is line-buffered.  That means 
single characters aren't written.  If you want an immediate update, call 
`fflush(stdout)' after each `printf'.  Or switch stdout to be unbuffered 
by calling `setvbuf' before you start printing.  (This is explained in 
the FAQ btw.)

- Raw text -


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