summaryrefslogtreecommitdiff
path: root/src/lib/evil/fnmatch.h
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-11 16:13:11 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-11 16:13:11 +0000
commitcd69ef4c8a66e7155967a8b661a014856979cf31 (patch)
tree4a351ae4a4ca91abf29c85254b85ea8da71f74b0 /src/lib/evil/fnmatch.h
parent59a9dfd11860888a35e96dfe51af63cea5cecfe1 (diff)
merge: add evil files
SVN revision: 76464
Diffstat (limited to 'src/lib/evil/fnmatch.h')
-rw-r--r--src/lib/evil/fnmatch.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/lib/evil/fnmatch.h b/src/lib/evil/fnmatch.h
new file mode 100644
index 0000000000..f2a9266e53
--- /dev/null
+++ b/src/lib/evil/fnmatch.h
@@ -0,0 +1,54 @@
1#ifndef __EVIL_FNMATCH_H__
2#define __EVIL_FNMATCH_H__
3
4#ifdef EAPI
5# undef EAPI
6#endif /* EAPI */
7
8#ifdef _WIN32
9# ifdef EFL_EVIL_BUILD
10# ifdef DLL_EXPORT
11# define EAPI __declspec(dllexport)
12# else
13# define EAPI
14# endif /* ! DLL_EXPORT */
15# else
16# define EAPI __declspec(dllimport)
17# endif /* ! EFL_EVIL_BUILD */
18#endif /* _WIN32 */
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/* We #undef these before defining them because some losing systems
25 (HP-UX A.08.07 for example) define these in <unistd.h>. */
26#undef FNM_PATHNAME
27#undef FNM_NOESCAPE
28#undef FNM_PERIOD
29
30/* Bits set in the FLAGS argument to `fnmatch'. */
31#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
32#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
33#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
34
35#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
36#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
37#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
38#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
39#endif
40
41/* Value returned by `fnmatch' if STRING does not match PATTERN. */
42#define FNM_NOMATCH 1
43#define FNM_SYNTAXERR 2
44#define FNM_NOMEM 3
45
46/* Match STRING against the filename pattern PATTERN,
47 returning zero if it matches, FNM_NOMATCH if not. */
48EAPI int fnmatch(const char *__pattern, const char *__string, int __flags);
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif /* __EVIL_FNMATCH_H__ */