aboutsummaryrefslogtreecommitdiff
path: root/posix/regex_internal.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-27 08:20:17 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-27 08:20:17 +0000
commitac3d553b8b5bcfbc7a13bd746966036422cf5275 (patch)
treebbec8a946e4ecb0f3e36fadc722aa00d8e000d1c /posix/regex_internal.c
parent85ae1f3949469ce2bb01a3f55708b83d09e84ec8 (diff)
downloadglibc-ac3d553b8b5bcfbc7a13bd746966036422cf5275.zip
glibc-ac3d553b8b5bcfbc7a13bd746966036422cf5275.tar.gz
glibc-ac3d553b8b5bcfbc7a13bd746966036422cf5275.tar.bz2
Update.
2002-07-27 Ulrich Drepper <drepper@redhat.com> * iconvdata/Makefile (CPPFLAGS): Add NOT_IN_libc. * iconv/iconv_prog.c (main): Improve error message for the cases where -t and/or -f parameter are missing. 2002-07-10 Stepan Kasal <kasal@math.cas.cz> * posix/regexec.c (re_match): Reorganize to remove duplicate code. (re_search): Likewise. (re_match_2): Likewise. (re_search_2): Likewise. (re_search_stub): New function. (re_search_2_stub): New function. * regcomp.c (re_compile_pattern): Typo in a comment fixed. 2002-07-10 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex_internal.h: Add new member STOP to struct re_string_t. (re_string_eoi): Use STOP instead of LEN. * posix/regex_internal.c (re_string_allocate): Initialize pstr->len. (re_string_construct): Likewise. (re_string_reconstruct): Adjust pstr->stop like pstr->len. * posix/regexec.c (re_search_internal): Add a new argument STOP so that it can handle the argument STOP of re_search_2 and re_match_2 correctly. (regexec): Adapt to new I/F of re_search_internal. (re_search_stub): Likewise.
Diffstat (limited to 'posix/regex_internal.c')
-rw-r--r--posix/regex_internal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index 2809c45..25e7b7e 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -93,6 +93,7 @@ re_string_allocate (pstr, str, len, init_len, trans, icase)
reg_errcode_t ret;
int init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
re_string_construct_common (str, len, pstr, trans, icase);
+ pstr->stop = pstr->len;
ret = re_string_realloc_buffers (pstr, init_buf_len);
if (BE (ret != REG_NOERROR, 0))
@@ -117,6 +118,7 @@ re_string_construct (pstr, str, len, trans, icase)
{
reg_errcode_t ret;
re_string_construct_common (str, len, pstr, trans, icase);
+ pstr->stop = pstr->len;
/* Set 0 so that this function can initialize whole buffers. */
pstr->valid_len = 0;
@@ -473,6 +475,7 @@ re_string_reconstruct (pstr, idx, eflags, newline)
}
pstr->raw_mbs_idx = idx;
pstr->len -= offset;
+ pstr->stop -= offset;
/* Then build the buffers. */
#ifdef RE_ENABLE_I18N