aboutsummaryrefslogtreecommitdiff
path: root/posix/regex.h
diff options
context:
space:
mode:
Diffstat (limited to 'posix/regex.h')
-rw-r--r--posix/regex.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/posix/regex.h b/posix/regex.h
index ae0165e89c..8e2bd8f394 100644
--- a/posix/regex.h
+++ b/posix/regex.h
@@ -152,6 +152,14 @@ typedef unsigned long int reg_syntax_t;
If not set, then the GNU regex operators are recognized. */
#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+#define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
/* This global variable defines the particular regexp syntax to use (for
some interfaces). When a regexp is compiled, the syntax used is
stored in the pattern buffer, so changing this does not affect
@@ -168,15 +176,16 @@ extern reg_syntax_t re_syntax_options;
(RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
- | RE_DOT_NEWLINE \
+ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
| RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
#define RE_SYNTAX_GNU_AWK \
- ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) \
- & ~(RE_DOT_NOT_NULL | RE_INTERVALS))
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
+ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
#define RE_SYNTAX_POSIX_AWK \
- (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_NO_GNU_OPS)
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INTERVALS | RE_NO_GNU_OPS)
#define RE_SYNTAX_GREP \
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
@@ -316,10 +325,10 @@ struct re_pattern_buffer
unsigned char *buffer;
/* Number of bytes to which `buffer' points. */
- unsigned long allocated;
+ unsigned long int allocated;
/* Number of bytes actually used in `buffer'. */
- unsigned long used;
+ unsigned long int used;
/* Syntax setting with which the pattern was compiled. */
reg_syntax_t syntax;