[GRASS5] Problem compiling Grass51

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed May 21 15:25:20 EDT 2003


On Wed, 21 May 2003, Glynn Clements wrote:

>
> Paul Kelly wrote:
>
> > 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);
>
> Is there any reason why it can't be changed to:
>
> 	str = G_asprintf("format etc..%s", otherstring);
>
> ?
>

That is maybe better, more like G_store() (whose functionality is quite
similar). Maybe it could be called G_storef() then. Whatever you think. Is
the main reason for changing it that it's confusing the way it is? I had
never seen that way of passing a pointer to a pointer before but it seems
to work?





More information about the grass-dev mailing list