mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
2003-11-18 Ulrich Drepper <drepper@redhat.com> * posix/regexec.c (get_subexp): Adter calling get_subexp_seb reload buf and bkref_str. Little optimization by avoiding memcmp. 2003-11-14 David Mosberger <davidm@hpl.hp.com>
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2003-11-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* posix/regexec.c (get_subexp): Adter calling get_subexp_seb
|
||||||
|
reload buf and bkref_str. Little optimization by avoiding memcmp.
|
||||||
|
|
||||||
2003-11-14 David Mosberger <davidm@hpl.hp.com>
|
2003-11-14 David Mosberger <davidm@hpl.hp.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/ia64/sysdep.h
|
* sysdeps/unix/sysv/linux/ia64/sysdep.h
|
||||||
|
@ -519,6 +519,8 @@ re_string_reconstruct (pstr, idx, eflags, newline)
|
|||||||
mbstate_t cur_state;
|
mbstate_t cur_state;
|
||||||
wchar_t wc2;
|
wchar_t wc2;
|
||||||
|
|
||||||
|
/* XXX Don't use mbrtowc, we know which conversion
|
||||||
|
to use (UTF-8 -> UCS4). */
|
||||||
memset (&cur_state, 0, sizeof (cur_state));
|
memset (&cur_state, 0, sizeof (cur_state));
|
||||||
if (mbrtowc (&wc2, p, raw + offset - p, &cur_state)
|
if (mbrtowc (&wc2, p, raw + offset - p, &cur_state)
|
||||||
== raw + offset - p)
|
== raw + offset - p)
|
||||||
|
@ -2550,6 +2550,12 @@ get_subexp (preg, mctx, bkref_node, bkref_str_idx)
|
|||||||
sl_str += sl_str_diff;
|
sl_str += sl_str_diff;
|
||||||
err = get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node,
|
err = get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node,
|
||||||
bkref_str_idx);
|
bkref_str_idx);
|
||||||
|
|
||||||
|
/* Reload buf and bkref_str, since the preceding call might
|
||||||
|
have reallocated the buffer. */
|
||||||
|
buf = (char *) re_string_get_buffer (mctx->input);
|
||||||
|
bkref_str = buf + bkref_str_idx;
|
||||||
|
|
||||||
if (err == REG_NOMATCH)
|
if (err == REG_NOMATCH)
|
||||||
continue;
|
continue;
|
||||||
if (BE (err != REG_NOERROR, 0))
|
if (BE (err != REG_NOERROR, 0))
|
||||||
@ -2567,8 +2573,7 @@ get_subexp (preg, mctx, bkref_node, bkref_str_idx)
|
|||||||
sl_str_off = sl_str - sub_top->str_idx;
|
sl_str_off = sl_str - sub_top->str_idx;
|
||||||
/* The matched string by the sub expression match with the substring
|
/* The matched string by the sub expression match with the substring
|
||||||
at the back reference? */
|
at the back reference? */
|
||||||
if (sl_str_off > 0
|
if (sl_str_off > 0 && *bkref_str++ != buf[sl_str - 1])
|
||||||
&& memcmp (bkref_str++, buf + sl_str - 1, 1) != 0)
|
|
||||||
break; /* We don't need to search this sub expression any more. */
|
break; /* We don't need to search this sub expression any more. */
|
||||||
if (mctx->state_log[sl_str] == NULL)
|
if (mctx->state_log[sl_str] == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user