X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=regex.h;h=ef4284cdce2894645bd705d1a41314fb21cf9d70;hb=0822bcc5bbeddba780a4c68b62a310ccb9db875d;hp=d0c32d50d27cc3cbd06a1be1ebd2e206d9a4f96d;hpb=ef7d99e12b474ce2787bd6090e4ce0b4306a291e;p=gnulib.git diff --git a/regex.h b/regex.h index d0c32d50d..ef4284cdc 100644 --- a/regex.h +++ b/regex.h @@ -144,19 +144,22 @@ 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, then *?, +? and ?? match non greedily. */ +#define RE_FRUGAL (RE_NO_GNU_OPS << 1) + +/* If this bit is set, then (?:...) is treated as a shy group. */ +#define RE_SHY_GROUPS (RE_FRUGAL << 1) + +/* If this bit is set, ^ and $ only match at beg/end of buffer. */ +#define RE_NO_NEWLINE_ANCHOR (RE_SHY_GROUPS << 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) - -/* If this bit is set, then *?, +? and ?? match non greedily. */ -#define RE_FRUGAL (RE_DEBUG << 1) - -/* If this bit is set, then (?:...) is treated as a shy group. */ -#define RE_SHY_GROUPS (RE_FRUGAL << 1) +#define RE_DEBUG (RE_NO_NEWLINE_ANCHOR << 1) /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is @@ -335,10 +338,10 @@ struct re_pattern_buffer unsigned char *buffer; /* Number of bytes to which `buffer' points. */ - unsigned long int allocated; + size_t allocated; /* Number of bytes actually used in `buffer'. */ - unsigned long int used; + size_t used; /* Syntax setting with which the pattern was compiled. */ reg_syntax_t syntax; @@ -387,9 +390,6 @@ struct re_pattern_buffer /* Similarly for an end-of-line anchor. */ unsigned not_eol : 1; - /* If true, an anchor at a newline matches. */ - unsigned newline_anchor : 1; - #ifdef emacs /* If true, multi-byte form in the `buffer' should be recognized as a multibyte character. */