Mail Archives: djgpp/1996/05/05/09:42:58
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 -