[GRASS-dev] etc file finder, take 2

Hamish hamish_nospam at yahoo.com
Thu Apr 19 00:54:15 EDT 2007


Glynn Clements wrote:
> use GPATH_MAX as the size of the path buffer (I've
> been replacing various random constants with that value as I find
> them; also for GNAME_MAX and GMAPSET_MAX)..


more of a comment than a question-

"char input_map[GNAME_MAX];" is often used to hold input=map at mapset
name, when the array often should be able to hold "GNAME_MAX + @ +
GMAPSET_MAX + \0" = 514 chars.

GNAME_MAX is long enough (256, gis.h) that map at mapset should rarely
exceed that, but it's something to look out for.

Perhaps gis.h should also have G_FULLYQUALIFIED_MAX ?


Hamish




More information about the grass-dev mailing list