delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/13/09:32:26

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Wed, 13 Jun 2001 15:32:16 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: alex bodnaru <alexbodn AT NewMail DOT Net>
cc: djgpp workers list <djgpp-workers AT delorie DOT com>
Subject: _doprnt modifications (was: no subject at all)
In-Reply-To: <3b27b278.56c.0@NewMail.Net>
Message-ID: <Pine.LNX.4.10.10106131526150.2678-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 13 Jun 2001, alex bodnaru wrote:

> the use i make of this enhancement is for a data structure
> that simulates stdio operations on a memory string. 

IOW: A C workalike of what C++ knows as an sstream or strstream.

But then, I honestly don't see why you can't do this straightforwardly
with existing sprintf() or the upcoming snprintf(), which in turn call the
exisint _doprnt().

You have a design choice to make, here. Either your string-stream is
supposed to behave like a file. In that case, you really should write it
as an FSEXT --- that's what it was invented for. Or you want it to behave
more like an ordinary string (but dynamically growing), in which case you
should be fine just calling sprintf().

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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