aboutsummaryrefslogtreecommitdiff
path: root/posix/regex_internal.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-26 20:52:02 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-26 20:52:02 +0000
commit434d3784f194e382d86edd72c9c6a1d0051a7b96 (patch)
tree3678759b0c16bc0f694e6892eb7f111c0605dc8d /posix/regex_internal.c
parent58fe8d109631d84a4392c7a8f77db3d163e37345 (diff)
downloadglibc-434d3784f194e382d86edd72c9c6a1d0051a7b96.tar
glibc-434d3784f194e382d86edd72c9c6a1d0051a7b96.tar.gz
glibc-434d3784f194e382d86edd72c9c6a1d0051a7b96.tar.bz2
glibc-434d3784f194e382d86edd72c9c6a1d0051a7b96.zip
Update.
2002-04-26 Isamu Hasegawa <isamu@yamato.ibm.com> * 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 <jakub@redhat.com> * 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.
Diffstat (limited to 'posix/regex_internal.c')
-rw-r--r--posix/regex_internal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index b688d0f7d9..5327c265c2 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);