20#include "gis_local_proto.h"
30static struct state *st = &state;
32static void new_mapset(
const char *);
51 return st->
path.names[n];
62 if (st->
path.count > 0)
85 static const char perm[] =
"PERMANENT";
92void new_mapset(
const char *
name)
94 if (st->
path.count >= st->
path.size) {
108 st->path2.count = st->
path.count;
109 st->path2.names = st->
path.names;
122 count = st->path2.count;
123 names = st->path2.names;
125 st->path2.count = st->
path.count;
126 st->path2.names = st->
path.names;
129 st->
path.names = names;
156 G_debug(3,
"G_get_available_mapsets");
180 if (n + 2 >= alloc) {
221 for (i = 0; i < st->
path.count; i++) {
int G_mapset_permissions(const char *)
Check for user mapset permission.
void G_free(void *)
Free allocated memory.
FILE * G_fopen_old(const char *, const char *, const char *)
Open a database file for reading.
int G_stat(const char *, struct stat *)
Get file status.
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
char * G_location_path(void)
Get current location UNIX-like path.
const char * G_mapset(void)
Get current mapset name.
void G_add_mapset_to_search_path(const char *mapset)
Add mapset to the list of mapsets in search path.
void G_reset_mapsets(void)
Reset number of mapsets.
const char * G_get_mapset_name(int n)
Get name of the n'th mapset from the current mapset search path.
void G__get_list_of_mapsets(void)
Fill list of mapsets from search path (internal use only)
void G_create_alt_search_path(void)
Define alternative mapset search path.
void G_switch_search_path(void)
Switch mapset search path.
int G_is_mapset_in_search_path(const char *mapset)
Check if given mapset is in search path.
char ** G_get_available_mapsets(void)
Get list of available mapsets for current location.
DIR * opendir(const char *name)
struct dirent * readdir(DIR *dir)