]> wimlib.net Git - wimlib/blob - include/wimlib/glob.h
New helper macro: ALIGN()
[wimlib] / include / wimlib / glob.h
1 #ifndef _WIMLIB_GLOB_H
2 #define _WIMLIB_GLOB_H
3
4 #ifndef __WIN32__
5 #  include <glob.h>
6 #else
7 #include <stddef.h>
8 #include <wchar.h>
9
10 typedef struct {
11         size_t    gl_pathc;
12         wchar_t **gl_pathv;
13         size_t    gl_offs;
14 } glob_t;
15
16 /* WARNING: this is a reduced functionality replacement */
17 extern int
18 win32_wglob(const wchar_t *pattern, int flags,
19             int (*errfunc)(const wchar_t *epath, int eerrno),
20             glob_t *pglob);
21
22 extern void globfree(glob_t *pglob);
23
24 #define GLOB_ERR        0x1 /* Return on read errors.  */
25 #define GLOB_NOSORT     0x2 /* Don't sort the names.  */
26
27 /* Error returns from `glob'.  */
28 #define GLOB_NOSPACE    1       /* Ran out of memory.  */
29 #define GLOB_ABORTED    2       /* Read error.  */
30 #define GLOB_NOMATCH    3       /* No matches found.  */
31
32 #endif /* __WIN32__ */
33
34 #endif /* _WIMLIB_GLOB_H */