[GRASS-dev] making grass modules less verbose
Glynn Clements
glynn at gclements.plus.com
Thu Sep 21 13:03:00 EDT 2006
Jachym Cepicky wrote:
> Problem: I tryed to set env. variable like this:
>
> char buff[32];
> sprintf(buff,"GRASS_VERBOSE=%d",G_verbose_max());
> putenv(buff);
>
> but it did not work :-( how to fix it ? (parser.c, lines 738, 750)
putenv() doesn't copy the string, just the pointer. Consequently,
using an automatic (non-"static" local) array won't work; you need to
use e.g. G_store() to make a persistent copy of the string.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list