1 --- toupper.c.orig 2005-02-17 16:40:25.000000000 -0800
2 +++ toupper.c 2005-02-17 16:42:30.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/toupper.c,v 1.11 2004/07/29 06:16:19 tjr Exp $");
7 +#include "xlocale_private.h"
19 - _RuneRange *rr = &_CurrentRuneLocale->__mapupper_ext;
21 _RuneEntry *base, *re;
23 if (c < 0 || c == EOF)
26 + NORMALIZE_LOCALE(loc);
28 + * the following is not used by toupper(), but can be used by
29 + * toupper_l(). This provides the oppurtunity to optimize toupper()
30 + * when compatibility for Panther and lower is no longer needed
32 + if (c < _CACHED_RUNES)
33 + return loc->__lc_ctype->_CurrentRuneLocale.__mapupper[c];
34 + rr = &loc->__lc_ctype->_CurrentRuneLocale.__mapupper_ext;
35 /* Binary search -- see bsearch.c for explanation. */
37 for (lim = rr->__nranges; lim != 0; lim >>= 1) {
47 + return ___toupper_l(c, __current_locale());