1 #include <ctype.h> 2 #ifdef FEATURE_ICU_LOCALE_TMP 3 #include <locale.h> 4 #include "locale_impl.h" 5 #endif 6 ispunct(int c)7int ispunct(int c) 8 { 9 return isgraph(c) && !isalnum(c); 10 } 11 __ispunct_l(int c,locale_t l)12int __ispunct_l(int c, locale_t l) 13 { 14 #ifdef FEATURE_ICU_LOCALE_TMP 15 if (l && l->cat[LC_CTYPE] && l->cat[LC_CTYPE]->flag == ICU_VALID) { 16 get_icu_symbol(ICU_I18N, &(g_icu_opt_func.u_isgraph), ICU_UCHAR_ISGRAPH_SYMBOL); 17 get_icu_symbol(ICU_I18N, &(g_icu_opt_func.u_isalnum), ICU_UCHAR_ISALNUM_SYMBOL); 18 if (g_icu_opt_func.u_isgraph && g_icu_opt_func.u_isalnum) { 19 return g_icu_opt_func.u_isgraph(c) && !g_icu_opt_func.u_isalnum(c); 20 } 21 } 22 #endif 23 return ispunct(c); 24 } 25 26 weak_alias(__ispunct_l, ispunct_l); 27