pattern.h (009e81b16465ea457c0e63fd49fe77f47cc27a5a) | pattern.h (f6b74a7d164b5fada266d00e723155a178a4529f) |
---|---|
1/* | 1/* |
2 * Copyright (C) 1984-2015 Mark Nudelman | 2 * Copyright (C) 1984-2017 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, see the README file. 8 */ 9 10#if HAVE_GNU_REGEX 11#define __USE_GNU 1 12#include <regex.h> | 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, see the README file. 8 */ 9 10#if HAVE_GNU_REGEX 11#define __USE_GNU 1 12#include <regex.h> |
13#define DEFINE_PATTERN(name) struct re_pattern_buffer *name | 13#define PATTERN_TYPE struct re_pattern_buffer * |
14#define CLEAR_PATTERN(name) name = NULL 15#endif 16 17#if HAVE_POSIX_REGCOMP 18#include <regex.h> 19#ifdef REG_EXTENDED 20extern int less_is_more; | 14#define CLEAR_PATTERN(name) name = NULL 15#endif 16 17#if HAVE_POSIX_REGCOMP 18#include <regex.h> 19#ifdef REG_EXTENDED 20extern int less_is_more; |
21#define REGCOMP_FLAG (less_is_more ? 0 : REG_EXTENDED) | 21#define REGCOMP_FLAG (less_is_more ? 0 : REG_EXTENDED) |
22#else | 22#else |
23#define REGCOMP_FLAG 0 | 23#define REGCOMP_FLAG 0 |
24#endif | 24#endif |
25#define DEFINE_PATTERN(name) regex_t *name | 25#define PATTERN_TYPE regex_t * |
26#define CLEAR_PATTERN(name) name = NULL 27#endif 28 29#if HAVE_PCRE 30#include <pcre.h> | 26#define CLEAR_PATTERN(name) name = NULL 27#endif 28 29#if HAVE_PCRE 30#include <pcre.h> |
31#define DEFINE_PATTERN(name) pcre *name | 31#define PATTERN_TYPE pcre * |
32#define CLEAR_PATTERN(name) name = NULL 33#endif 34 35#if HAVE_RE_COMP 36char *re_comp(); 37int re_exec(); | 32#define CLEAR_PATTERN(name) name = NULL 33#endif 34 35#if HAVE_RE_COMP 36char *re_comp(); 37int re_exec(); |
38#define DEFINE_PATTERN(name) int name | 38#define PATTERN_TYPE int |
39#define CLEAR_PATTERN(name) name = 0 40#endif 41 42#if HAVE_REGCMP 43char *regcmp(); 44char *regex(); 45extern char *__loc1; | 39#define CLEAR_PATTERN(name) name = 0 40#endif 41 42#if HAVE_REGCMP 43char *regcmp(); 44char *regex(); 45extern char *__loc1; |
46#define DEFINE_PATTERN(name) char *name | 46#define PATTERN_TYPE char ** |
47#define CLEAR_PATTERN(name) name = NULL 48#endif 49 50#if HAVE_V8_REGCOMP 51#include "regexp.h" 52extern int reg_show_error; | 47#define CLEAR_PATTERN(name) name = NULL 48#endif 49 50#if HAVE_V8_REGCOMP 51#include "regexp.h" 52extern int reg_show_error; |
53#define DEFINE_PATTERN(name) struct regexp *name | 53#define PATTERN_TYPE struct regexp * |
54#define CLEAR_PATTERN(name) name = NULL 55#endif 56 57#if NO_REGEX | 54#define CLEAR_PATTERN(name) name = NULL 55#endif 56 57#if NO_REGEX |
58#define DEFINE_PATTERN(name) | 58#define PATTERN_TYPE void * |
59#define CLEAR_PATTERN(name) 60#endif | 59#define CLEAR_PATTERN(name) 60#endif |