123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #ifndef _GLOB_H_
- #define _GLOB_H_
- #ifndef PHP_WIN32
- # include <sys/cdefs.h>
- #endif
- #include "Zend/zend_stream.h"
- typedef struct {
- int gl_pathc;
- int gl_matchc;
- int gl_offs;
- int gl_flags;
- char **gl_pathv;
-
- int (*gl_errfunc)(const char *, int);
-
- void (*gl_closedir)(void *);
- struct dirent *(*gl_readdir)(void *);
- void *(*gl_opendir)(const char *);
- int (*gl_lstat)(const char *, zend_stat_t *);
- int (*gl_stat)(const char *, zend_stat_t *);
- } glob_t;
- #define GLOB_APPEND 0x0001
- #define GLOB_DOOFFS 0x0002
- #define GLOB_ERR 0x0004
- #define GLOB_MARK 0x0008
- #define GLOB_NOCHECK 0x0010
- #define GLOB_NOSORT 0x0020
- #ifndef _POSIX_SOURCE
- #define GLOB_ALTDIRFUNC 0x0040
- #define GLOB_BRACE 0x0080
- #define GLOB_MAGCHAR 0x0100
- #define GLOB_NOMAGIC 0x0200
- #define GLOB_QUOTE 0x0400
- #define GLOB_TILDE 0x0800
- #define GLOB_NOESCAPE 0x1000
- #define GLOB_LIMIT 0x2000
- #endif
- #define GLOB_NOSPACE (-1)
- #define GLOB_ABORTED (-2)
- #define GLOB_NOMATCH (-3)
- #define GLOB_NOSYS (-4)
- #define GLOB_ABEND GLOB_ABORTED
- BEGIN_EXTERN_C()
- PHPAPI int glob(const char *, int, int (*)(const char *, int), glob_t *);
- PHPAPI void globfree(glob_t *);
- END_EXTERN_C()
- #endif
|