+2020-09-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ regex: no longer match glibc
+ * config/srclist.txt: Comment out regex_internal.c for now.
+
2020-09-23 Paul Eggert <eggert@cs.ucla.edu>
regex: fix ignore-case Turkish bug
#$LIBCSRC posix/regcomp.c lib
$LIBCSRC posix/regex.c lib
#$LIBCSRC posix/regex.h lib
-$LIBCSRC posix/regex_internal.c lib
+#$LIBCSRC posix/regex_internal.c lib
#$LIBCSRC posix/regex_internal.h lib
$LIBCSRC posix/regexec.c lib
$LIBCSRC time/timegm.c lib
while (byte_idx < end_idx)
{
wchar_t wc;
+ unsigned char ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
- if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])
- && mbsinit (&pstr->cur_state))
+ if (isascii (ch) && mbsinit (&pstr->cur_state))
{
- /* In case of a singlebyte character. */
- pstr->mbs[byte_idx]
- = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
/* The next step uses the assumption that wchar_t is encoded
ASCII-safe: all ASCII values can be converted like this. */
- pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
- ++byte_idx;
- continue;
+ wchar_t wcu = __towupper (ch);
+ if (isascii (wcu))
+ {
+ pstr->mbs[byte_idx] = wcu;
+ pstr->wcs[byte_idx] = wcu;
+ byte_idx++;
+ continue;
+ }
}
remain_len = end_idx - byte_idx;
{
/* It is an invalid character, an incomplete character
at the end of the string, or '\0'. Just use the byte. */
- int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
pstr->mbs[byte_idx] = ch;
/* And also cast it to wide char. */
pstr->wcs[byte_idx++] = (wchar_t) ch;