33 #if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
55 #define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
60 #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
66 #define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
80 #define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
88 #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
92 #define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
96 #define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
100 #define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
104 #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
109 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
113 #define RE_LIMITED_OPS (RE_INTERVALS << 1)
117 #define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
122 #define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
126 #define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
130 #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
134 #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
140 #define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
144 #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
148 #define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
152 #define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
160 #define RE_DEBUG (RE_NO_GNU_OPS << 1)
165 #define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
177 #define RE_SYNTAX_EMACS 0
179 #define RE_SYNTAX_AWK \
180 (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
181 | RE_NO_BK_PARENS | RE_NO_BK_REFS \
182 | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
183 | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
184 | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
186 #define RE_SYNTAX_GNU_AWK \
187 ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
188 & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
190 #define RE_SYNTAX_POSIX_AWK \
191 (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
192 | RE_INTERVALS | RE_NO_GNU_OPS)
194 #define RE_SYNTAX_GREP \
195 (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
196 | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
199 #define RE_SYNTAX_EGREP \
200 (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
201 | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
202 | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
205 #define RE_SYNTAX_POSIX_EGREP \
206 (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
207 | RE_INVALID_INTERVAL_ORD)
210 #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
212 #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
215 #define _RE_SYNTAX_POSIX_COMMON \
216 (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
217 | RE_INTERVALS | RE_NO_EMPTY_RANGES)
219 #define RE_SYNTAX_POSIX_BASIC \
220 (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
225 #define RE_SYNTAX_POSIX_MINIMAL_BASIC \
226 (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
228 #define RE_SYNTAX_POSIX_EXTENDED \
229 (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
230 | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
231 | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
232 | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
236 #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
237 (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
238 | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
239 | RE_NO_BK_PARENS | RE_NO_BK_REFS \
240 | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
250 #define RE_DUP_MAX (0x7fff)
257 #define REG_EXTENDED 1
261 #define REG_ICASE (REG_EXTENDED << 1)
266 #define REG_NEWLINE (REG_ICASE << 1)
270 #define REG_NOSUB (REG_NEWLINE << 1)
283 #define REG_NOTEOL (1 << 1)
324 #ifndef RE_TRANSLATE_TYPE
325 # define RE_TRANSLATE_TYPE char *
370 #define REGS_UNALLOCATED 0
371 #define REGS_REALLOCATE 1
443 # define _RE_ARGS(args) args
447 # define _RE_ARGS(args) ()
453 extern reg_syntax_t re_set_syntax
_RE_ARGS ((reg_syntax_t
syntax));
458 extern const char *re_compile_pattern
481 extern int re_search_2
483 int length1,
const char *
string2,
int length2,
495 extern int re_match_2
497 int length1,
const char *
string2,
int length2,
513 extern void re_set_registers
517 #if defined _REGEX_RE_COMP || defined _LIBC
520 extern char *re_comp
_RE_ARGS ((
const char *));
521 extern int re_exec
_RE_ARGS ((
const char *));
528 # if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
529 # if defined restrict || 199901L <= __STDC_VERSION__
530 # define __restrict restrict
539 #define __restrict_arr
547 const char *
__restrict __string,
size_t __nmatch,
551 extern size_t regerror
_RE_ARGS ((
int __errcode,
const regex_t *__preg,
552 char *__errbuf,
size_t __errbuf_size));
unsigned long int active_reg_t
struct re_registers * regs
unsigned long int reg_syntax_t
reg_syntax_t reg_syntax_t syntax
#define RE_TRANSLATE_TYPE
unsigned fastmap_accurate
const char *const char * pattern
unsigned long int allocated
reg_syntax_t re_syntax_options
RE_TRANSLATE_TYPE translate