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