20 #include <grass/gis.h> 
   23 static int test_path_file(
const char *, 
const char *);
 
   26 static int test_path_file(
const char *path, 
const char *
file)
 
   31     buf = (
char *)G_malloc(strlen(path) + strlen(file) + 2);
 
   32     sprintf(buf, 
"%s/%s", path, file);
 
   34     ret = access(buf, F_OK);
 
   55     return test_path_file(path, 
"etc/element_list");
 
   69     return test_path_file(path, 
"PERMANENT/DEFAULT_WIND");
 
   83     return test_path_file(path, 
"WIND");
 
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
 
void G_free(void *buf)
Free allocated memory. 
 
int G_is_mapset(const char *path)
Test if specified directory is mapset. 
 
int G_is_location(const char *path)
Test if specified directory is location. 
 
int G_is_gisbase(const char *path)
Test if specified directory is GISBASE. 
 
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]