]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Merge with GNU awk version.
authorUlrich Drepper <drepper@redhat.com>
Tue, 20 May 1997 23:58:00 +0000 (23:58 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 20 May 1997 23:58:00 +0000 (23:58 +0000)
posix/regex.h

index ae0165e89cc7cf5bcfa1ea921f0a763a7d5c9cd8..8e2bd8f39408f780af04bc442538f1ec31d539d3 100644 (file)
@@ -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;