diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-08-20 16:05:56 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-08-20 17:14:56 +0200 |
commit | 7630e384623f778b88be8926e2c2a2e6fcbd9008 (patch) | |
tree | 7a3efa5017679ab797cf264b9290ebd281cd0ddc /winsup/cygwin/regex/regcomp.c | |
parent | 06ac6718119dfd382c1904b1162f6cd7f9749dc3 (diff) | |
download | cygnal-7630e384623f778b88be8926e2c2a2e6fcbd9008.tar.gz cygnal-7630e384623f778b88be8926e2c2a2e6fcbd9008.tar.bz2 cygnal-7630e384623f778b88be8926e2c2a2e6fcbd9008.zip |
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>
Diffstat (limited to 'winsup/cygwin/regex/regcomp.c')
-rw-r--r-- | winsup/cygwin/regex/regcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c index 0dc59ffcc..63ca4f131 100644 --- a/winsup/cygwin/regex/regcomp.c +++ b/winsup/cygwin/regex/regcomp.c @@ -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 |