summaryrefslogtreecommitdiff
path: root/posix/regcomp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-02-05 15:23:55 +0000
committerUlrich Drepper <drepper@redhat.com>2007-02-05 15:23:55 +0000
commit784aacea3cdce36a6baef08cd504b89c1434fea9 (patch)
treef0aa696536571e272ed9e499ad3611af23f46ee9 /posix/regcomp.c
parentbf7a246393f27117a1ed0fc4d266f6f9f7f3d3c1 (diff)
[BZ #3957]
2007-02-05 Jakub Jelinek <jakub@redhat.com> [BZ #3957] * posix/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0' bit for RE_HAT_LISTS_NOT_NEWLINE. (build_charclass_op): Remove bogus comment. * posix/Makefile (tests): Add bug-regex27 and bug-regex28. * posix/bug-regex27.c: New test. * posix/bug-regex28.c: New test.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r--posix/regcomp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 78a1218cf8..e99fd74924 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -3019,7 +3019,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#endif /* not RE_ENABLE_I18N */
non_match = 1;
if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
- bitset_set (sbcset, '\0');
+ bitset_set (sbcset, '\n');
re_string_skip_bytes (regexp, token_len); /* Skip a token. */
token_len = peek_token_bracket (token, regexp, syntax);
if (BE (token->type == END_OF_RE, 0))
@@ -3549,10 +3549,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
if (non_match)
{
#ifdef RE_ENABLE_I18N
- /*
- if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
- bitset_set(cset->sbcset, '\0');
- */
mbcset->non_match = 1;
#endif /* not RE_ENABLE_I18N */
}