25#if !defined(HAVE_UNISTD_H)
36static int cmp_dirent(
const void *,
const void *);
37static int get_perm(
char *);
38static void sort_dirent(
dbDirent *,
int);
92 for (i = 0; i <
count; i++) {
122 for (i = 0; i <
count; i++)
128static int get_perm(
char *
path)
144static int cmp_dirent(
const void *
aa,
const void *
bb)
153static void sort_dirent(
dbDirent *a,
int n)
175 for (i = 0; i <
count; i++)
AMI_err name(char **stream_name)
Main header of GRASS DataBase Management Interface.
int db_isdir(const char *)
Test if path is a directory.
void db_clear_error(void)
Clear error status.
void db_free_string(dbString *)
Free allocated space for dbString.
void * db_calloc(int, int)
Allocate memory.
char * db_get_string(const dbString *)
Get string.
int db_set_string(dbString *, const char *)
Inserts string to dbString (enlarge string)
void db_free(void *)
Free allocated memory.
void db_init_string(dbString *)
Initialize dbString.
void db_syserror(const char *)
Report system error.
void * db_malloc(int)
Allocate memory.
dbDirent * db_dirent(const char *dirname, int *n)
Read directory and build an array of dbDirent's.
void db_free_dirent_array(dbDirent *db_dirent, int count)
Free dbDirent.
dbDirent * db_alloc_dirent_array(int count)
Allocate dirent array.
DIR * opendir(const char *name)
struct dirent * readdir(DIR *dir)