24static int list_element(
FILE *,
const char *,
const char *,
const char *,
25 int (*)(
const char *,
const char *,
char *));
52 int (*
lister)(
const char *,
const char *,
char *))
60 if (desc == 0 || *desc == 0)
67 fprintf(more,
"----------------------------------------------\n");
74 if (mapset == 0 || *mapset == 0)
81 if (mapset == 0 || *mapset == 0)
82 fprintf(more,
_(
"no %s files available in current mapset\n"), desc);
84 fprintf(more,
_(
"no %s files available in mapset <%s>\n"), desc,
87 fprintf(more,
"----------------------------------------------\n");
95static int list_element(
FILE *
out,
const char *
element,
const char *desc,
97 int (*
lister)(
const char *,
const char *,
char *))
107 if (
strcmp(mapset,
".") == 0)
130 fprintf(
out,
_(
"%s files available in mapset <%s>:\n"), desc, mapset);
143 for (i = 0; i <
count; i++) {
155 for (i = 0; i <
count; i++)
220 if (
dp->d_name[0] ==
'.')
230 if (
dp->d_name[0] ==
'.')
void G_free(void *)
Free allocated memory.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_close_pager(struct Popen *)
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
void G_ls_format(char **, int, int, FILE *)
Prints a listing of items to a stream, in prettified column format.
const char * G_get_mapset_name(int)
Get name of the n'th mapset from the current mapset search path.
char ** G_ls2(const char *, int *)
Stores a sorted directory listing in an array.
FILE * G_open_pager(struct Popen *)
const char * G_mapset(void)
Get current mapset name.
void G_list_element(const char *element, const char *desc, const char *mapset, int(*lister)(const char *, const char *, char *))
General purpose list function.
char ** G_list(int element, const char *gisbase, const char *location, const char *mapset)
List specified type of elements. Application must release the allocated memory.
void G_free_list(char **list)
Free list.
DIR * opendir(const char *name)
struct dirent * readdir(DIR *dir)