1 --- toupper.c.bsdnew 2009-11-09 15:05:25.000000000 -0800
2 +++ toupper.c 2009-11-09 17:30:20.000000000 -0800
6 __FBSDID("$FreeBSD: src/lib/libc/locale/toupper.c,v 1.13 2007/01/09 00:28:01 imp Exp $");
8 +#include "xlocale_private.h"
21 - _RuneRange *rr = &_CurrentRuneLocale->__mapupper_ext;
23 _RuneEntry *base, *re;
25 if (c < 0 || c == EOF)
28 + NORMALIZE_LOCALE(loc);
30 + * the following is not used by toupper(), but can be used by
31 + * toupper_l(). This provides the oppurtunity to optimize toupper()
32 + * when compatibility for Panther and lower is no longer needed
34 + if (c < _CACHED_RUNES)
35 + return loc->__lc_ctype->_CurrentRuneLocale.__mapupper[c];
36 + rr = &loc->__lc_ctype->_CurrentRuneLocale.__mapupper_ext;
37 /* Binary search -- see bsearch.c for explanation. */
39 for (lim = rr->__nranges; lim != 0; lim >>= 1) {
40 @@ -62,3 +74,10 @@ ___toupper(c)
49 + return ___toupper_l(c, __current_locale());