[GRASS5] Problem compiling Grass51
Paul Kelly
paul-grass at stjohnspoint.co.uk
Wed May 21 13:14:27 EDT 2003
Hello Radim
On Wed, 30 Apr 2003, Radim Blazek wrote:
> On Tuesday 29 April 2003 05:18 pm, Paul Kelly wrote:
> > I think we need a G_snprintf() and G_vsnprintf() or something like that.
> > Would it be all right just to copy the code straight from a 3rd party
> > snprintf implementation to enable this?
>
> I replaced vsnprintf by vfprintf. G_asprintf() seems to be even better
> than G_snprintf(). Can I add G_asprintf() suggested by Eric G. Miller
> (http://grass.itc.it/pipermail/grass5/2002-May/002936.html) to 5.1?
I have added Eric's G_asprintf to 5.1 now as I tested it a bit and it
seemed to work best for me. So now it can get a bit more testing. I didn't
realise before but it needs to be used like:
char *str;
G_asprintf( &str, "format etc..%s", otherstring);
/*
do something
*/
G_free(str);
I hope it works and is useful
Paul
More information about the grass-dev
mailing list