From f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Nov 2003 07:14:28 +0000 Subject: 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. --- posix/regcomp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'posix/regcomp.c') diff --git a/posix/regcomp.c b/posix/regcomp.c index 9f56b389df..68ce551c3a 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -748,8 +748,7 @@ re_compile_internal (preg, pattern, length, syntax) #endif err = re_string_construct (®exp, pattern, length, preg->translate, - syntax & RE_ICASE, dfa->mb_cur_max, - dfa->is_utf8); + syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) { re_free (dfa); @@ -828,6 +827,8 @@ init_dfa (dfa, pat_len) if (dfa->mb_cur_max > 1 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; + dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) + != 0); #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL -- cgit v1.2.3