Merge branch 'vendor/LESS'
[dragonfly.git] / contrib / less / pattern.h
1 /*
2  * Copyright (C) 1984-2011  Mark Nudelman
3  *
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.
6  *
7  * For more information about less, or for information on how to 
8  * contact the author, see the README file.
9  */
10
11 #if HAVE_POSIX_REGCOMP
12 #include <regex.h>
13 #ifdef REG_EXTENDED
14 #define REGCOMP_FLAG    REG_EXTENDED
15 #else
16 #define REGCOMP_FLAG    0
17 #endif
18 #define DEFINE_PATTERN(name)  regex_t *name
19 #define CLEAR_PATTERN(name)   name = NULL
20 #endif
21
22 #if HAVE_PCRE
23 #include <pcre.h>
24 #define DEFINE_PATTERN(name)  pcre *name
25 #define CLEAR_PATTERN(name)   name = NULL
26 #endif
27
28 #if HAVE_RE_COMP
29 char *re_comp();
30 int re_exec();
31 #define DEFINE_PATTERN(name)  int name
32 #define CLEAR_PATTERN(name)   name = 0
33 #endif
34
35 #if HAVE_REGCMP
36 char *regcmp();
37 char *regex();
38 extern char *__loc1;
39 #define DEFINE_PATTERN(name)  char *name
40 #define CLEAR_PATTERN(name)   name = NULL
41 #endif
42
43 #if HAVE_V8_REGCOMP
44 #include "regexp.h"
45 #define DEFINE_PATTERN(name)  struct regexp *name
46 #define CLEAR_PATTERN(name)   name = NULL
47 #endif
48