hammer2 - Add kernel-thread-based async bulk free
[dragonfly.git] / contrib / less / pattern.h
blobca4b8648c69c238a9ce278b0b7d4f2b6a3fe9873
1 /*
2 * Copyright (C) 1984-2015 Mark Nudelman
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
7 * For more information, see the README file.
8 */
10 #if HAVE_GNU_REGEX
11 #define __USE_GNU 1
12 #include <regex.h>
13 #define DEFINE_PATTERN(name) struct re_pattern_buffer *name
14 #define CLEAR_PATTERN(name) name = NULL
15 #endif
17 #if HAVE_POSIX_REGCOMP
18 #include <regex.h>
19 #ifdef REG_EXTENDED
20 #define REGCOMP_FLAG REG_EXTENDED
21 #else
22 #define REGCOMP_FLAG 0
23 #endif
24 #define DEFINE_PATTERN(name) regex_t *name
25 #define CLEAR_PATTERN(name) name = NULL
26 #endif
28 #if HAVE_PCRE
29 #include <pcre.h>
30 #define DEFINE_PATTERN(name) pcre *name
31 #define CLEAR_PATTERN(name) name = NULL
32 #endif
34 #if HAVE_RE_COMP
35 char *re_comp();
36 int re_exec();
37 #define DEFINE_PATTERN(name) int name
38 #define CLEAR_PATTERN(name) name = 0
39 #endif
41 #if HAVE_REGCMP
42 char *regcmp();
43 char *regex();
44 extern char *__loc1;
45 #define DEFINE_PATTERN(name) char *name
46 #define CLEAR_PATTERN(name) name = NULL
47 #endif
49 #if HAVE_V8_REGCOMP
50 #include "regexp.h"
51 extern int reg_show_error;
52 #define DEFINE_PATTERN(name) struct regexp *name
53 #define CLEAR_PATTERN(name) name = NULL
54 #endif
56 #if NO_REGEX
57 #define DEFINE_PATTERN(name)
58 #define CLEAR_PATTERN(name)
59 #endif