diff options
Diffstat (limited to 'libc/misc/regex')
-rw-r--r-- | libc/misc/regex/regcomp.c | 4 | ||||
-rw-r--r-- | libc/misc/regex/regex_internal.c | 4 |
2 files changed, 1 insertions, 7 deletions
diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c index 8f2e18ce4..b25850ccd 100644 --- a/libc/misc/regex/regcomp.c +++ b/libc/misc/regex/regcomp.c @@ -819,11 +819,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; -#ifdef __UCLIBC_HAS_WCHAR__ dfa->mb_cur_max = MB_CUR_MAX; -#else - dfa->mb_cur_max = 1; -#endif #if 0 if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) diff --git a/libc/misc/regex/regex_internal.c b/libc/misc/regex/regex_internal.c index de640e08d..c6ac8dda1 100644 --- a/libc/misc/regex/regex_internal.c +++ b/libc/misc/regex/regex_internal.c @@ -627,7 +627,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) if (pstr->is_utf8) { - const unsigned char *raw, *p, *q, *end; + const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ @@ -654,13 +654,11 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) unsigned char buf[6]; size_t mbclen; - q = p; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; - q = buf; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ |