diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-11-18 23:40:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-11-18 23:40:59 +0000 |
commit | ad7f28c29d06ddb4506d0d75e089732740b5bd2b (patch) | |
tree | de9ee40c2d213a4113e3da2b8cedc3d505386bc1 /posix/regex_internal.c | |
parent | 5146ec9a2c092cb74b5cd0eb8b5e938b46f1631b (diff) | |
download | glibc-ad7f28c29d06ddb4506d0d75e089732740b5bd2b.tar.gz glibc-ad7f28c29d06ddb4506d0d75e089732740b5bd2b.tar.xz glibc-ad7f28c29d06ddb4506d0d75e089732740b5bd2b.zip |
Update.
* posix/regex_internal.h (re_token_type_t): Remove unused ALT, END_OF_RE_TOKEN_T and SUBEXP. Reorder values. Add OP_UTF8_PERIOD and EPSILON_BIT. (IS_EPSILON_NODE): Just test if EPSILON_BIT is set. (ACCEPT_MB_NODE): Return 1 for OP_UTF8_PERIOD as well. * posix/regex_internal.c (create_ci_newstate, create_cd_newstate): Handle OP_UTF8_PERIOD. (re_string_reconstruct): Set valid_len for single byte char searching with no translation and case sensitivity. * posix/regcomp.c (re_compile_fastmap_iter, calc_first): Handle OP_UTF8_PERIOD. (re_compile_internal): Don't call optimize_utf8 if preg->translate != NULL. (optimize_utf8): Remove BACK_SLASH case. Transform OP_PERIOD into OP_UTF8_PERIOD if the searching can be optimized. (parse_bracket_exp): Don't create SIMPLE_BRACKET if it doesn't have any bits set and COMPLEX_BRACKET is used. * posix/regexec.c (transit_state_mb): Fix comment typo. (group_nodes_into_DFAstates, check_node_accept): Handle OP_UTF8_PERIOD. (check_node_accept_bytes): Likewise. Reorder slightly so that re_string_char_size_at and re_string_elem_size_at are called only when needed. * posix/bug-regex20.c (BRE, ERE): Define. (tests): Use them to make lines shorter. Expect . to be optimized. Add lots of new tests. (main): Run (ATM just case sensitive) test with backwards searching as well. 2003-11-18 Jakub Jelinek <jakub@redhat.com>
Diffstat (limited to 'posix/regex_internal.c')
-rw-r--r-- | posix/regex_internal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/posix/regex_internal.c b/posix/regex_internal.c index 6f07bd4dd1..c1605a0393 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -581,6 +581,8 @@ re_string_reconstruct (pstr, idx, eflags, newline) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); + else + pstr->valid_len = pstr->len; } pstr->cur_idx = 0; @@ -1257,6 +1259,7 @@ create_ci_newstate (dfa, nodes, hash) newstate->halt = 1; #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET + || type == OP_UTF8_PERIOD || (type == OP_PERIOD && dfa->mb_cur_max > 1)) newstate->accept_mb = 1; #endif /* RE_ENABLE_I18N */ @@ -1308,6 +1311,7 @@ create_cd_newstate (dfa, nodes, context, hash) newstate->halt = 1; #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET + || type == OP_UTF8_PERIOD || (type == OP_PERIOD && dfa->mb_cur_max > 1)) newstate->accept_mb = 1; #endif /* RE_ENABLE_I18N */ |