From 434d3784f194e382d86edd72c9c6a1d0051a7b96 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 26 Apr 2002 20:52:02 +0000 Subject: Update. 2002-04-26 Isamu Hasegawa * posix/regcomp.c (re_compile_fastmap_iter): Fix fastmap in case of not _LIBC and RE_ENABLE_I18N. (build_range_exp): Implement for not _LIBC. (build_collating_symbol): Likewise. (parse_bracket_exp): Unify redundant error handlings. Don't erase mbcset for non matching list in multibyte envs. (build_word_op): Add '_' to matching list for \w operator. * posix/regex_internal.c (re_string_construct): Invoke build_upper_buffer in case of not RE_ENABLE_I18N. (re_string_reconstruct): Don't touch cur_state in case of not RE_ENABLE_I18N. * posix/regex_internal.h (attribute_hidden): New macro in case of not _LIBC. (re_charset_t): Define range_starts/ends in case of not _LIBC. * posix/regexec.c (sift_states_iter_mb): Hide in case of not RE_ENABLE_I18N. (transit_state_mb): Likewise. (check_node_accept_bytes): Implement the code evaluating range expression in case of not _LIBC. (find_collation_sequence_value): Hide in case of not _LIBC. 2002-04-26 Jakub Jelinek * sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Copied from i386/semctl.c. (__old_semctl, __new_semctl): Only use va_arg if the argument will be used. --- posix/regex_internal.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'posix/regex_internal.c') diff --git a/posix/regex_internal.c b/posix/regex_internal.c index b688d0f..5327c26 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -60,7 +60,9 @@ static void re_string_construct_common (const unsigned char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase); +#ifdef RE_ENABLE_I18N static int re_string_skip_chars (re_string_t *pstr, int new_raw_idx); +#endif /* RE_ENABLE_I18N */ static re_dfastate_t *create_newstate_common (re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash); @@ -134,8 +136,8 @@ re_string_construct (pstr, str, len, trans, icase) if (MB_CUR_MAX > 1) build_wcs_upper_buffer (pstr); else - build_upper_buffer (pstr); #endif /* RE_ENABLE_I18N */ + build_upper_buffer (pstr); } else { @@ -409,7 +411,10 @@ re_string_reconstruct (pstr, idx, eflags, newline) if (offset < 0) { /* Reset buffer. */ - memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); +#ifdef RE_ENABLE_I18N + if (MB_CUR_MAX > 1) + memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); +#endif /* RE_ENABLE_I18N */ pstr->valid_len = pstr->raw_mbs_idx = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); -- cgit v1.1