17 #include <grass/gis.h>
34 const char *element,
const char *
name,
const char *mapset)
36 char xname[GNAME_MAX];
38 const char *pname =
name;
48 sprintf(path,
"%s/%s", location, xmapset);
50 else if (mapset && *mapset)
51 sprintf(path,
"%s/%s", location, mapset);
57 if (element && *element) {
59 strcat(path, element);
62 if (pname && *pname) {
73 const char *
name,
const char *mapset)
75 char xname[GNAME_MAX];
77 const char *pname =
name;
87 sprintf(path,
"%s/%s", location, xmapset);
89 else if (mapset && *mapset)
90 sprintf(path,
"%s/%s", location, mapset);
101 if (pname && *pname) {
106 if (element && *element) {
108 strcat(path, element);
char * G_mapset(void)
current mapset name
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
void G_free(void *buf)
Free allocated memory.
char * G__file_name_misc(char *path, const char *dir, const char *element, const char *name, const char *mapset)
char * G__location_path(void)
Get current location path.
char * G__file_name(char *path, const char *element, const char *name, const char *mapset)
Builds full path names to GIS data files.
int G__name_is_fully_qualified(const char *fullname, char *name, char *mapset)
Check if map name is fully qualified (map @ mapset)