delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/13/05:09:11

Date: Mon, 13 Nov 1995 11:34:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "J. A. McNamara" <grulm AT netaxs DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: stupid C question

On Sun, 12 Nov 1995, J. A. McNamara wrote:

> So, is there any way to force the buffer to flush to standard output 
> without a newline?  (and also w/o just bumming Zortech off this guy and 
> using that, which seems inelegant)

Use fflush(stdout) immediately after the last printf() call.
In some compilers you also may achieve this by requesting that stdout be 
unbuffered, by a call to setvbuf() at the beginning of the program, but 
fflush() is safer.

- Raw text -


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