• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <ctype.h>
2 #ifdef FEATURE_ICU_LOCALE_TMP
3 #include <locale.h>
4 #include "locale_impl.h"
5 #endif
6 
toupper(int c)7 int toupper(int c)
8 {
9 	if (islower(c)) return c & 0x5f;
10 	return c;
11 }
12 
__toupper_l(int c,locale_t l)13 int __toupper_l(int c, locale_t l)
14 {
15 #ifdef FEATURE_ICU_LOCALE_TMP
16 	if (l && l->cat[LC_CTYPE] && l->cat[LC_CTYPE]->flag == ICU_VALID) {
17 		get_icu_symbol(ICU_I18N, &(g_icu_opt_func.u_toupper), ICU_UCHAR_TOUPPER_SYMBOL);
18 		if (g_icu_opt_func.u_toupper) {
19 			return g_icu_opt_func.u_toupper(c);
20 		}
21 	}
22 #endif
23 
24 	return toupper(c);
25 }
26 
27 weak_alias(__toupper_l, toupper_l);
28