X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fregex.h;h=63c2fef6967b2c87a68eeefd79e7abd444d05382;hb=3b3e7e80daac86fbdded8b0047a4a52ec2324ab8;hp=47f4af7b554bf2386ce6a011d8aa8637952803d3;hpb=fb523b1e75c60d60366f6339305f3d00416f4c3d;p=gnulib.git diff --git a/lib/regex.h b/lib/regex.h index 47f4af7b5..63c2fef69 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -160,6 +160,11 @@ typedef unsigned long int reg_syntax_t; this bit set, and it won't affect anything in the normal case. */ #define RE_DEBUG (RE_NO_GNU_OPS << 1) +/* If this bit is set, a syntactically invalid interval is treated as + a string of ordinary characters. For example, the ERE 'a{1' is + treated as 'a\{1'. */ +#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 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 @@ -199,7 +204,8 @@ extern reg_syntax_t re_syntax_options; | RE_NO_BK_VBAR) #define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ + | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC @@ -523,11 +529,11 @@ extern int re_exec _RE_ARGS ((const char *)); # define __restrict # endif # endif +#endif /* For now unconditionally define __restrict_arr to expand to nothing. Ideally we would have a test for the compiler which allows defining it to restrict. */ -# define __restrict_arr -#endif +#define __restrict_arr /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,