]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/less/pattern.h
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / less / pattern.h
1 /*
2  * Copyright (C) 1984-2009  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 extern int less_is_more;
15 #define REGCOMP_FLAG    (less_is_more ? 0 : REG_EXTENDED)
16 #else
17 #define REGCOMP_FLAG    0
18 #endif
19 #define DEFINE_PATTERN(name)  regex_t *name
20 #define CLEAR_PATTERN(name)   name = NULL
21 #endif
22
23 #if HAVE_PCRE
24 #include <pcre.h>
25 #define DEFINE_PATTERN(name)  pcre *name
26 #define CLEAR_PATTERN(name)   name = NULL
27 #endif
28
29 #if HAVE_RE_COMP
30 char *re_comp();
31 int re_exec();
32 #define DEFINE_PATTERN(name)  int name
33 #define CLEAR_PATTERN(name)   name = 0
34 #endif
35
36 #if HAVE_REGCMP
37 char *regcmp();
38 char *regex();
39 extern char *__loc1;
40 #define DEFINE_PATTERN(name)  char *name
41 #define CLEAR_PATTERN(name)   name = NULL
42 #endif
43
44 #if HAVE_V8_REGCOMP
45 #include "regexp.h"
46 #define DEFINE_PATTERN(name)  struct regexp *name
47 #define CLEAR_PATTERN(name)   name = NULL
48 #endif
49