delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/24/01:15:15

From: Chris Mears <chris AT adjective-army DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: re-directing printf.
Date: Mon, 24 Jun 2002 15:06:56 +1000
Organization: The Adjective Army
Message-ID: <h5adhusm0o689hq9s99gkki4u97lomustf@4ax.com>
References: <20020624044813 DOT 76710 DOT qmail AT web11306 DOT mail DOT yahoo DOT com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Lines: 24
NNTP-Posting-Host: 210.49.154.22
X-Trace: 1024895402 31828 210.49.154.22
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sun, 23 Jun 2002 21:48:13 -0700 (PDT), Pedro Izecksohn
<izecksohn AT yahoo DOT com> wrote:

>   Hello,
>
>   How is the correct (ANSI) way of re-directing printf to
>a piece of memory ?

sprintf()?

>   I need the result of printf to Allegro's
>text_length(font, phrase);, and after to show it using
>textprintf(screen, font, x, y, fg, "%s", phrase);, at the
>correct place on the screen, without blotting other things
>on the screen.
>   The problem is that text_length doesn't take the char *
>fmt parameter.
>   I thought to use a virtual FILE and fprintf, but I don't
>know how to create a virtual only file.
>   By the way: Does ANSI define how should be inside the
>struct FILE ?

No.

- Raw text -


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