[GRASS-dev] possible etc file finder function

William Kyngesburye woklist at kyngchaos.com
Tue Apr 3 10:00:59 EDT 2007


Yes, it's these sort of C details I have problems with.

On Apr 2, 2007, at 11:35 PM, Glynn Clements wrote:

> William Kyngesburye wrote:
>
>> Any comments on the C itself?  I wasn't sure about memory allocation
>> stuff, I'm not good with that.
>
> The main issue I see is that sprintf() doesn't return a pointer to the
> buffer, so you can't you it as an argument to access().
>
How would this be done, then?

> Also, what is "if (ETC_PATH_USER)" etc supposed to be testing?
>
Testing whether it is not empty.  I tried to use an example from  
elsewhere, but maybe the difference between a variable and a define  
makes this not usable?

Though, if I switch to using an env var, this will not be needed.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy





More information about the grass-dev mailing list