httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: snprintf()
Date Wed, 08 Jan 1997 01:42:11 GMT
Dean Gaudet wrote:
> 
> Other than varags issues (which I think we've already made portable
> because of other functions we've got) ... how hard would it be to make an
> snprintf that parses the string and uses native sprintf() to do the dirty
> work for each piece?
> 
> Doing things piece by piece it is pretty easy to limit how much native
> sprint will write.
> 

Hmmm... I'm guessing you mean if snprintf() is given, for example,
("%d %s %s", val, str, nstr) we would do "subcontract" it out as
sprintf(buf, "%d", val) - adjust buf - sprintf(buf, "%s", str) ....
Hmmm, would be even better if, while doing that we "adjust" the
format statements to include precision values based on the 'len'
parameter and keep reducing that as the buf is used up. Tricky but
do-able. If the recently posted snprintf() doesn't work, I'm all
for trying this approach.

-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
                  "Not the Craw... the CRAW!"

Mime
View raw message