#include "system.h"
#include <stddef.h>
#include <assert.h>
#include <errno.h>
Go to the source code of this file.
Functions |
static const char *next_brace_sub | __P ((const char *begin)) |
static int glob_in_dir | __P ((const char *pattern, const char *directory, int flags, int(*errfunc)(const char *, int), glob_t *pglob)) |
static int prefix_array | __P ((const char *prefix, char **array, size_t n)) |
static int collated_compare | __P ((const __ptr_t, const __ptr_t)) |
static const char * | next_brace_sub (const char *begin) |
static int | __glob_pattern_p (const char *pattern, int quote) |
int | glob (const char *pattern, int flags, int(*errfunc) __P((const char *, int)), glob_t *pglob) |
void | globfree (glob_t *pglob) |
static int | collated_compare (const __ptr_t a, const __ptr_t b) |
static int | prefix_array (const char *dirname, char **array, size_t n) |
static int | glob_in_dir (const char *pattern, const char *directory, int flags, int(*errfunc) __P((const char *, int)), glob_t *pglob) |
Macro Definition Documentation
#define __set_errno |
( |
|
val | ) |
errno = (val) |
#define CONVERT_D_INO |
( |
|
d64, |
|
|
|
d32 |
|
) |
| (d64)->d_ino = (d32)->d_ino; |
#define CONVERT_D_NAMLEN |
( |
|
d64, |
|
|
|
d32 |
|
) |
| (d64)->d_namlen = (d32)->d_namlen; |
#define CONVERT_D_TYPE |
( |
|
d64, |
|
|
|
d32 |
|
) |
| |
#define CONVERT_DIRENT_DIRENT64 |
( |
|
d64, |
|
|
|
d32 |
|
) |
| |
Value:memcpy ((d64)->d_name, (d32)->d_name,
NAMLEN (d32) + 1); \
CONVERT_D_NAMLEN (d64, d32) \
CONVERT_D_INO (d64, d32) \
CONVERT_D_TYPE (d64, d32)
Definition at line 82 of file glob.c.
Referenced by glob_in_dir().
#define GLOB_INTERFACE_VERSION 1 |
#define REAL_DIR_ENTRY |
( |
|
dp | ) |
(dp->d_ino != 0) |
Function Documentation
static int __glob_pattern_p |
( |
const char * |
pattern, |
|
|
int |
quote |
|
) |
| |
|
static |
static int glob_in_dir __P |
( |
(const char *pattern, const char *directory, int flags, int(*errfunc)(const char *, int), glob_t *pglob) |
| ) |
|
|
static |
int glob |
( |
const char * |
pattern, |
|
|
int |
flags, |
|
|
int *errfunc |
__P(const char *, int), |
|
|
glob_t * |
pglob |
|
) |
| |
Definition at line 176 of file glob.c.
References __alloca, __GLOB_FLAGS, __glob_pattern_p(), __ptr_t, __set_errno, __stat, collated_compare(), errno, getenv(), glob_t::gl_closedir, glob_t::gl_flags, glob_t::gl_lstat, glob_t::gl_offs, glob_t::gl_opendir, glob_t::gl_pathc, glob_t::gl_pathv, glob_t::gl_readdir, glob_t::gl_stat, GLOB_ABORTED, GLOB_ALTDIRFUNC, GLOB_APPEND, GLOB_BRACE, GLOB_DOOFFS, GLOB_ERR, glob_in_dir(), GLOB_MAGCHAR, GLOB_MARK, GLOB_NOCHECK, GLOB_NOESCAPE, GLOB_NOMAGIC, GLOB_NOMATCH, GLOB_NOSORT, GLOB_NOSPACE, GLOB_ONLYDIR, GLOB_TILDE, GLOB_TILDE_CHECK, globfree(), name, next_brace_sub(), prefix_array(), xmalloc, xrealloc, and xstrdup().
Referenced by Glob().
static int glob_in_dir |
( |
const char * |
pattern, |
|
|
const char * |
directory, |
|
|
int |
flags, |
|
|
int *errfunc |
__P(const char *, int), |
|
|
glob_t * |
pglob |
|
) |
| |
|
static |
Definition at line 1017 of file glob.c.
References __alloca, __glob_pattern_p(), __ptr_t, __set_errno, __stat, CONVERT_DIRENT_DIRENT64, dirent, errno, FNM_CASEFOLD, FNM_NOESCAPE, FNM_PERIOD, fnmatch(), glob_t::gl_closedir, glob_t::gl_flags, glob_t::gl_offs, glob_t::gl_opendir, glob_t::gl_pathc, glob_t::gl_pathv, glob_t::gl_readdir, glob_t::gl_stat, GLOB_ABORTED, GLOB_ALTDIRFUNC, GLOB_DOOFFS, GLOB_ERR, GLOB_MAGCHAR, GLOB_NOCHECK, GLOB_NOESCAPE, GLOB_NOMAGIC, GLOB_NOMATCH, GLOB_NOSPACE, GLOB_ONLYDIR, GLOB_PERIOD, name, NAME_MAX, NAMLEN, REAL_DIR_ENTRY, xmalloc, and xrealloc.
Referenced by glob().
void globfree |
( |
glob_t * |
pglob | ) |
|
static const char* next_brace_sub |
( |
const char * |
begin | ) |
|
|
inlinestatic |
static int prefix_array |
( |
const char * |
dirname, |
|
|
char ** |
array, |
|
|
size_t |
n |
|
) |
| |
|
static |