delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/27/01:46:50

Date: Mon, 27 Nov 2000 08:45:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Graham Reeds <grahamr AT dtn DOT ntl DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Buffering text...(additional).
In-Reply-To: <gXeU5.14033$vA4.257421@news6-win.server.ntlworld.com>
Message-ID: <Pine.SUN.3.91.1001127084505.15394G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 26 Nov 2000, Graham Reeds wrote:

> > Use cprintf instead of printf (and "\r\n" instead of "\n").  printf
> > doesn't pay attention to what textcolor does.
> 
> I've also noticed a large performance hit when using printf("\r\n"); instead
> of printf("\n");

I said to use "\r\n" with cprintf, not with printf.

Using "\r\n" with printf is a waste of CPU cycles when printing to the
screen and a Really Bad Idea when stdout is redirected to a file.

- Raw text -


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