Introduce __current_locale_charset/__locale_charset
The former __locale_charset always fetched the current locale's charset. We need the per-locale charset, too, in future. Rename __locale_charset to __current_locale_charset and change __locale_charset to take a locale_t as parameter. Accommodate througout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -1132,7 +1132,7 @@ wgetnext(struct parse *p)
|
||||
invalid ASCII chars. To be more Linux-compatible, we align the
|
||||
behaviour to glibc here. Allow any character value if the current
|
||||
local's codeset is ASCII. */
|
||||
if (*__locale_charset () == 'A') /* SCII */
|
||||
if (*__current_locale_charset () == 'A') /* SCII */
|
||||
return (wint_t) (unsigned char) *p->next++;
|
||||
#endif
|
||||
memset(&mbs, 0, sizeof(mbs));
|
||||
@ -1503,7 +1503,7 @@ findmust(struct parse *p, struct re_guts *g)
|
||||
*/
|
||||
if (MB_CUR_MAX > 1 &&
|
||||
#ifdef __CYGWIN__
|
||||
strcmp(__locale_charset (), "UTF-8") != 0)
|
||||
strcmp(__current_locale_charset (), "UTF-8") != 0)
|
||||
#else
|
||||
strcmp(_CurrentRuneLocale->__encoding, "UTF-8") != 0)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user