mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
* posix/regex_internal.h: Add forward declaration of re_dfa_t. Replace last two parameters of re_string_allocate and re_string_construct with pointer to DFA. (re_dfa_t): Add map_notascii field. * posix/regcomp.c (re_compile_internal): Add call of re_string_construct. (init_dfa): Initialize mpa_notascii. * posix/regex_internal.c: Adjust definitions of re_string_allocate and re_string_construct. Pass DFA to re_string_construct. Adjust definition. Initialize map_notascii field. (build_wcs_upper_buffer): If map_notascii is zero use simplfied method to map ASCII values to upper case. * posix/regex.c: Include localeinfo.h. * posix/regexec.c: Adjust call of re_string_allocate. * locale/langinfo.h: Add _NL_CTYPE_MAP_TO_NONASCII. * locale/localeinfo.h (LIMAGIC): Change value. * locale/categories.def. Add entry for _NL_CTYPE_MAP_TO_NONASCII. * locale/C-ctype.h: Likewise. * locale/programs/ld-ctype.c: Compute whether any mapping maps from ASCII to non-ASCII value. Write out that value.
This commit is contained in:
@@ -605,8 +605,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
|
||||
fl_longest_match = (nmatch != 0 || dfa->nbackref);
|
||||
|
||||
err = re_string_allocate (&input, string, length, dfa->nodes_len + 1,
|
||||
preg->translate, preg->syntax & RE_ICASE,
|
||||
dfa->mb_cur_max, dfa->is_utf8);
|
||||
preg->translate, preg->syntax & RE_ICASE, dfa);
|
||||
if (BE (err != REG_NOERROR, 0))
|
||||
goto free_return;
|
||||
input.stop = stop;
|
||||
@@ -1760,7 +1759,7 @@ check_dst_limits_calc_pos (dfa, mctx, limit, eclosures, subexp_idx, from_node,
|
||||
{
|
||||
struct re_backref_cache_entry *ent = mctx->bkref_ents + bi;
|
||||
int dst, cpos;
|
||||
|
||||
|
||||
/* If this backreference goes beyond the point we're
|
||||
examining, don't go any further. */
|
||||
if (ent->str_idx > str_idx)
|
||||
@@ -1797,12 +1796,12 @@ check_dst_limits_calc_pos (dfa, mctx, limit, eclosures, subexp_idx, from_node,
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case OP_OPEN_SUBEXP:
|
||||
if (str_idx == lim->subexp_from && subexp_idx == dfa->nodes[node].opr.idx)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
|
||||
case OP_CLOSE_SUBEXP:
|
||||
if (str_idx == lim->subexp_to && subexp_idx == dfa->nodes[node].opr.idx)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user