X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..15de9d6b4ab2de27ae24b13b7b6c4d55fffe4aef:/locale/FreeBSD/runetype.c diff --git a/locale/FreeBSD/runetype.c b/locale/FreeBSD/runetype.c index bb1bbc4..6ffcf72 100644 --- a/locale/FreeBSD/runetype.c +++ b/locale/FreeBSD/runetype.c @@ -33,20 +33,24 @@ #include __FBSDID("$FreeBSD: src/lib/libc/locale/runetype.c,v 1.14 2007/01/09 00:28:00 imp Exp $"); +#include "xlocale_private.h" + #include #include #include unsigned long -___runetype(__ct_rune_t c) +___runetype_l(__ct_rune_t c, locale_t loc) { size_t lim; - _RuneRange *rr = &_CurrentRuneLocale->__runetype_ext; + _RuneRange *rr; _RuneEntry *base, *re; if (c < 0 || c == EOF) return(0L); + NORMALIZE_LOCALE(loc); + rr = &loc->__lc_ctype->_CurrentRuneLocale.__runetype_ext; /* Binary search -- see bsearch.c for explanation. */ base = rr->__ranges; for (lim = rr->__nranges; lim != 0; lim >>= 1) { @@ -64,3 +68,9 @@ ___runetype(__ct_rune_t c) return(0L); } + +unsigned long +___runetype(__ct_rune_t c) +{ + return ___runetype_l(c, __current_locale()); +}