[GRASS-dev] etc file finder, take 2
glynn at gclements.plus.com
Wed Apr 18 13:52:39 EDT 2007
William Kyngesburye wrote:
> > The main one is that I'd suggest using G_tokenize() to do most of the
> > work for you.
> (more C details that escape me...)
> My little (basic) C book says a program shouldn't alter an env var
> returned by getenv, and G_tokenize() says it changes the token to
> null to terminate token strings (which is what I originally did
> myself before I read that bit about getenv). Is that what that char
> ** or const char * takes care of somehow, do either make a copy of
> the env var? Or is it part of the tokenize initialization?
G_tokenize() makes a copy of the string.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev