Re: Maybe we should use "snprintf" instead of "sprintf".

michael@surfnetcity.com.au
Wed, 16 Jun 1999 10:21:02 +1000


On Tue, Jun 15, 1999 at 10:11:40PM +0800, Ming-I Hsieh wrote:

> Ok! But there aren't others function can instend of sprintf? If not,
> maybe we should think a way to pack sprintf. Otherwise, we will waste
> some space to make a ``infinitely long string''.

An "infinately long string" is easy to figure out, you figure out the number
of characters the format string, and each of it's elements take up.

If we wanted, we could even do a vsprintf() hack that would malloc() the
string automatically. (Yes, I know there's a GNU extension that will do this
already)

-- 
-- Michael Samuel <michael@surfnetcity.com.au>


This archive was generated by hypermail 1.03b2.