6 static char *G__find_etc(
const char *
name)
9 const char *pathlist =
getenv(
"GRASS_ADDON_ETC");
14 if (*name == 0 || *name ==
'.')
25 for (i = 0; dirs[i]; i++) {
26 sprintf(path,
"%s/%s", dirs[i], name);
28 if (access(path, 0) == 0) {
44 if (access(path, 0) == 0)
65 return G__find_etc(name);
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
char * G_find_etc(const char *name)
searches for a file from the etc search list in GRASS_ADDON_ETC returns the full path to where the fi...
char * G_store(const char *s)
Copy string to allocated memory.
int G_free_tokens(char **tokens)
Free memory allocated to tokens.
char ** G_tokenize(const char *buf, const char *delim)
Tokenize string.
char * G_gisbase(void)
top level module directory