mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-17 12:41:05 +03:00
regex: match current GNU grep behavior
These symbols have not matched GNU grep behavior for quite some time. Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974 * lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP): Change to match current GNU behavior. Simplify by expressing it as differences from POSIX BREs and EREs. (RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2015-07-04 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
regex: match current GNU grep behavior
|
||||||
|
These symbols have not matched GNU grep behavior for quite some time.
|
||||||
|
Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974
|
||||||
|
* lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP):
|
||||||
|
Change to match current GNU behavior.
|
||||||
|
Simplify by expressing it as differences from POSIX BREs and EREs.
|
||||||
|
(RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.
|
||||||
|
|
||||||
2015-07-03 Jim Meyering <meyering@fb.com>
|
2015-07-03 Jim Meyering <meyering@fb.com>
|
||||||
|
|
||||||
set-permissions.c: adjust acl_from_mode's cpp guard
|
set-permissions.c: adjust acl_from_mode's cpp guard
|
||||||
|
15
lib/regex.h
15
lib/regex.h
@@ -244,19 +244,16 @@ extern reg_syntax_t re_syntax_options;
|
|||||||
| RE_INVALID_INTERVAL_ORD)
|
| RE_INVALID_INTERVAL_ORD)
|
||||||
|
|
||||||
# define RE_SYNTAX_GREP \
|
# define RE_SYNTAX_GREP \
|
||||||
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
|
((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \
|
||||||
| RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
|
& ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL))
|
||||||
| RE_NEWLINE_ALT)
|
|
||||||
|
|
||||||
# define RE_SYNTAX_EGREP \
|
# define RE_SYNTAX_EGREP \
|
||||||
(RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
|
((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \
|
||||||
| RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
|
& ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL))
|
||||||
| RE_NEWLINE_ALT | RE_NO_BK_PARENS \
|
|
||||||
| RE_NO_BK_VBAR)
|
|
||||||
|
|
||||||
|
/* POSIX grep -E behavior is no longer incompatible with GNU. */
|
||||||
# define RE_SYNTAX_POSIX_EGREP \
|
# define RE_SYNTAX_POSIX_EGREP \
|
||||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
|
RE_SYNTAX_EGREP
|
||||||
| RE_INVALID_INTERVAL_ORD)
|
|
||||||
|
|
||||||
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
||||||
# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
||||||
|
Reference in New Issue
Block a user