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