Commit c0f9ea08 authored by Stefan Monnier's avatar Stefan Monnier

* regex.h (RE_NO_NEWLINE_ANCHOR): New syntax flag.

(struct re_pattern_buffer): Remove newline_anchor.
* regex.c: Keep namespace clean for GNU libc by renaming <fun>
to __<fun> and using `weak_alias (__<fun>, <fun>)'.
(re_max_failures, fail_stack): Use size_t rather than unsigned.
(regex_compile): For ^ and $, choose between buffer and line (beg|end)
depending on the new RE_NO_NEWLINE_ANCHOR syntax flag.
(print_compiled_pattern, re_search_2, mutually_exclusive_p)
(re_match_2_internal, re_compile_pattern, re_comp, regcomp):
Get rid of references to newline_anchor.
(regcomp): Allocate and precompute a fastmap.
parent d04efc64
2000-08-31 Stefan Monnier <monnier@cs.yale.edu>
* regex.h (RE_NO_NEWLINE_ANCHOR): New syntax flag.
(struct re_pattern_buffer): Remove newline_anchor.
* regex.c: Keep namespace clean for GNU libc by renaming <fun>
to __<fun> and using `weak_alias (__<fun>, <fun>)'.
(re_max_failures, fail_stack): Use size_t rather than unsigned.
(regex_compile): For ^ and $, choose between buffer and line (beg|end)
depending on the new RE_NO_NEWLINE_ANCHOR syntax flag.
(print_compiled_pattern, re_search_2, mutually_exclusive_p)
(re_match_2_internal, re_compile_pattern, re_comp, regcomp):
Get rid of references to newline_anchor.
(regcomp): Allocate and precompute a fastmap.
2000-08-31 Gerd Moellmann <gerd@gnu.org>
* lread.c (openp): GCPRO local variable `filename'.
......
This diff is collapsed.
......@@ -150,6 +150,17 @@ typedef unsigned long int reg_syntax_t;
/* 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_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
stored in the pattern buffer, so changing this does not affect
......@@ -379,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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment