delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2008/04/06/18:19:12

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Sun, 6 Apr 2008 18:19:08 -0400
Message-Id: <200804062219.m36MJ8dK023662@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <200804062347.42980.juan.guerrero@gmx.de> (message from Juan
Manuel Guerrero on Sun, 6 Apr 2008 23:47:40 +0200)
Subject: Re: Implementation of [v]as[n]printf() family of functions.
References: <200804062347 DOT 42980 DOT juan DOT guerrero AT gmx DOT de>
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

> +@example
> +char *strbuf;  /*  Pointer to the allocated buffer by asnprintf.  */
> +int strlng;
> +long double pi = 3.1415926535897932384626433832795L;
> +
> +strlng = asnprintf(&strbuf, 100, "Pi = %.15Lf\n", pi);

I think that comment needs to read "Pointer to an allocated buffer
used by asnprintf".  The current wording is a little confusing.

Also, it would be a good idea to explicitly show the strbuf=malloc()
command as well, else the example shows us using an uninitialized
pointer.

Likewise for the other examples.

Otherwise, it's OK.

- Raw text -


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