diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-05-24 08:49:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-05-24 08:49:00 +0000 |
commit | c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7 (patch) | |
tree | 8cf43cdab37f80704e698ccc65b752b93320fa11 /posix/regex_internal.c | |
parent | 12b7f470d21eeb897e25b9ef6dae4bfd787168f6 (diff) | |
download | glibc-c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7.tar.gz glibc-c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7.tar.xz glibc-c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7.zip |
Update.
2002-05-21 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex.c: Define `inline' as a macro into nothing for the compilers which lack the keyword. * posix/regex.h: (RE_SYNTAX_GNU_AWK): Remove RE_CONTEXT_INVALID_OPS for the compatibility of gawk. * posix/regcomp.c: Add fake implementation of isblank() for the environments which lack the function. Don't use free_charset() in case of non-i18n envs. (build_range_exp): Don't use i18n related code in case of non-i18n envs. (build_collating_symbol): Likewise. (build_equiv_class): Likewise. (build_charclass): Likewise. (re_compile_fastmap_iter): Likewise. (parse_bracket_exp): Likewise. (build_word_op): Likewise. (regfree): Don't use free_charset() in case of non-i18n envs. * posix/regex_internal.h: Remove COMPLEX_BRACKET from re_token_type_t in case of non-i18n envs. Don't define re_charset_t in case of non-i18n envs. Change the type of wcs of re_string_t from wchar_t to wint_t, since we store also WEOF. * posix/regex_internal.c: (re_string_realloc_buffers): Change the type of wcs of re_string_t from wchar_t to wint_t. (re_string_reconstruct): Likewise. (create_ci_newstate): Don't use i18n related code in case of non-i18n envs. (create_cd_newstate): Likewise. 2002-05-24 Ulrich Drepper <drepper@redhat.com> * iconv/loop.c: Fix typo. 2002-05-23 Jakub Jelinek <jakub@redhat.com> * inet/ether_line.c (ether_line): Fix a typo causing only lower 4 bits of each ethernet address byte being assigned. Don't modify what line points to. * inet/tst-ether_aton.c (main): Add ether_line tests. 2002-05-23 Marcus Brinkmann <marcus@gnu.org> * manual/filesys.texi: Don't make readlink example leak memory when readlink fails.
Diffstat (limited to 'posix/regex_internal.c')
-rw-r--r-- | posix/regex_internal.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/posix/regex_internal.c b/posix/regex_internal.c index 5327c265c2..2809c45132 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -169,7 +169,7 @@ re_string_realloc_buffers (pstr, new_buf_len) #ifdef RE_ENABLE_I18N if (MB_CUR_MAX > 1) { - pstr->wcs = re_realloc (pstr->wcs, wchar_t, new_buf_len); + pstr->wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (pstr->wcs == NULL, 0)) return REG_ESPACE; } @@ -436,7 +436,7 @@ re_string_reconstruct (pstr, idx, eflags, newline) #ifdef RE_ENABLE_I18N if (MB_CUR_MAX > 1) memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wchar_t)); + (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (MBS_ALLOCATED (pstr)) memmove (pstr->mbs, pstr->mbs + offset, @@ -1166,9 +1166,11 @@ create_ci_newstate (dfa, nodes, hash) /* If the state has the halt node, the state is a halt state. */ else if (type == END_OF_RE) newstate->halt = 1; +#ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET || (type == OP_PERIOD && MB_CUR_MAX > 1)) newstate->accept_mb = 1; +#endif /* RE_ENABLE_I18N */ else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || OP_CONTEXT_NODE) @@ -1213,9 +1215,11 @@ create_cd_newstate (dfa, nodes, context, hash) /* If the state has the halt node, the state is a halt state. */ else if (type == END_OF_RE) newstate->halt = 1; +#ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET || (type == OP_PERIOD && MB_CUR_MAX > 1)) newstate->accept_mb = 1; +#endif /* RE_ENABLE_I18N */ else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR) @@ -1228,9 +1232,11 @@ create_cd_newstate (dfa, nodes, context, hash) newstate->halt = 1; else if (ctype == OP_BACK_REF) newstate->has_backref = 1; +#ifdef RE_ENABLE_I18N else if (ctype == COMPLEX_BRACKET || (type == OP_PERIOD && MB_CUR_MAX > 1)) newstate->accept_mb = 1; +#endif /* RE_ENABLE_I18N */ } if (constraint) |