diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-07-03 18:23:59 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-07-03 18:26:07 -0700 |
commit | 0e8fda0d880cccd0e1997a905eb9a7910f957245 (patch) | |
tree | 8997572072957a45a77a16dfa7e87ceeb3283b2f /src | |
parent | 4fedddefdf373d4335223a4a589d86bccdeca65b (diff) | |
download | grep-0e8fda0d880cccd0e1997a905eb9a7910f957245.tar.gz |
grep: -z '.' now consistently matches newline
Problem reported by Balazs Kezes in: http://bugs.gnu.org/20974
* NEWS: Document this.
* tests/utf8-bracket: New file, to test for this bug.
* src/grep.c (Gcompile, Ecompile): Also specify RE_DOT_NEWLINE.
* tests/Makefile.am (TESTS): Add it.
Diffstat (limited to 'src')
-rw-r--r-- | src/grep.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1861,15 +1861,16 @@ if any error occurs and -q is not given, the exit status is 2.\n")); static void Gcompile (char const *pattern, size_t size) { - GEAcompile (pattern, size, RE_SYNTAX_GREP | RE_NO_EMPTY_RANGES); + GEAcompile (pattern, size, + RE_SYNTAX_GREP | RE_DOT_NEWLINE | RE_NO_EMPTY_RANGES); } static void Ecompile (char const *pattern, size_t size) { GEAcompile (pattern, size, - (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES - | RE_UNMATCHED_RIGHT_PAREN_ORD)); + (RE_SYNTAX_POSIX_EGREP | RE_DOT_NEWLINE + | RE_NO_EMPTY_RANGES | RE_UNMATCHED_RIGHT_PAREN_ORD)); } static void |