]> wimlib.net Git - wimlib/blob - include/wimlib/wildcard.h
764f478617f382071e0815b2bdeb0b6f396792e8
[wimlib] / include / wimlib / wildcard.h
1 #ifndef _WIMLIB_WILDCARD_H
2 #define _WIMLIB_WILDCARD_H
3
4 #include <wimlib/types.h>
5
6 #define WILDCARD_FLAG_USE_LITERAL_IF_NO_MATCHES 0x00000001
7 #define WILDCARD_FLAG_WARN_IF_NO_MATCH          0x00000002
8 #define WILDCARD_FLAG_ERROR_IF_NO_MATCH         0x00000004
9 #define WILDCARD_FLAG_CASE_INSENSITIVE          0x00000008
10
11 extern int
12 expand_wildcard_wim_paths(WIMStruct *wim,
13                           const char * const *wildcards,
14                           size_t num_wildcards,
15                           tchar ***expanded_paths_ret,
16                           size_t *num_expanded_paths_ret,
17                           u32 flags);
18
19 #ifdef __WIN32__
20 extern int
21 fnmatch(const tchar *pattern, const tchar *string, int flags);
22 #  define FNM_CASEFOLD 0
23 #else
24 #  include <fnmatch.h>
25 #  ifndef FNM_CASEFOLD
26 #    warning "FNM_CASEFOLD not defined!"
27 #    define FNM_CASEFOLD 0
28 #  endif
29 #endif
30
31 #endif /* _WIMLIB_WILDCARD_H  */