X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..15de9d6b4ab2de27ae24b13b7b6c4d55fffe4aef:/locale/FreeBSD/nextwctype.c diff --git a/locale/FreeBSD/nextwctype.c b/locale/FreeBSD/nextwctype.c index 89c63df..75e5056 100644 --- a/locale/FreeBSD/nextwctype.c +++ b/locale/FreeBSD/nextwctype.c @@ -27,28 +27,32 @@ #include __FBSDID("$FreeBSD: src/lib/libc/locale/nextwctype.c,v 1.1 2004/07/08 06:43:37 tjr Exp $"); +#include "xlocale_private.h" + #include #include #include wint_t -nextwctype(wint_t wc, wctype_t wct) +nextwctype_l(wint_t wc, wctype_t wct, locale_t loc) { size_t lim; - _RuneRange *rr = &_CurrentRuneLocale->__runetype_ext; + _RuneRange *rr; _RuneEntry *base, *re; int noinc; + _RuneLocale *rl = &loc->__lc_ctype->_CurrentRuneLocale; noinc = 0; if (wc < _CACHED_RUNES) { wc++; while (wc < _CACHED_RUNES) { - if (_CurrentRuneLocale->__runetype[wc] & wct) + if (rl->__runetype[wc] & wct) return (wc); wc++; } wc--; } + rr = &rl->__runetype_ext; if (rr->__ranges != NULL && wc < rr->__ranges[0].__min) { wc = rr->__ranges[0].__min; noinc = 1; @@ -88,3 +92,9 @@ found: } return (-1); } + +wint_t +nextwctype(wint_t wc, wctype_t wct) +{ + return nextwctype_l(wc, wct, __current_locale()); +}