GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | G_set_list_hit_return (int flag) |
int | G_list_element (const char *element, const char *desc, const char *mapset, int(*lister)(const char *, const char *, const char *)) |
General purpose list function. More... | |
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. More... | |
void | G_free_list (char **list) |
Free list. More... | |
void G_free_list | ( | char ** | list | ) |
Free list.
list | char* array to be freed |
Definition at line 301 of file gis/list.c.
References G_free().
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.
element | Element type (G_ELEMENT_RASTER, G_ELEMENT_VECTOR, G_ELEMENT_REGION ) |
gisbase | Path to GISBASE |
location | Location name |
mapset | Mapset name |
Definition at line 226 of file gis/list.c.
References buf, count, G_fatal_error(), G_free(), NULL, opendir(), readdir(), and sprintf().
int G_list_element | ( | const char * | element, |
const char * | desc, | ||
const char * | mapset, | ||
int(*)(const char *, const char *, const char *) | lister | ||
) |
General purpose list function.
Will list files from all mapsets in the mapset list for a specified database element.
Note: output is to stdout piped thru the more utility
lister (char name char *mapset, char buf)
Given file 'name', and 'mapset', lister() should copy a string into 'buf' when called with name == "", should set buf to general title for mapset list.
element | Database element (eg, "cell", "cellhd", etc) |
desc | Description for element (if NULL, element is used) |
mapset | Mapset to be listed "" to list all mapsets in mapset search list "." will list current mapset |
lister | If given will call this routine to get a list title. NULL if no titles desired. |
Definition at line 60 of file gis/list.c.
References count, G__mapset_name(), int, and n.
Definition at line 32 of file gis/list.c.
References tools::flag.