• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <wctype.h>
2 #ifndef __LITEOS__
3 #ifdef FEATURE_ICU_LOCALE
4 #include <string.h>
5 #include "locale_impl.h"
6 #endif
7 #endif
8 
iswgraph(wint_t wc)9 int iswgraph(wint_t wc)
10 {
11 	/* ISO C defines this function as: */
12 	return !iswspace(wc) && iswprint(wc);
13 }
14 
__iswgraph_l(wint_t c,locale_t l)15 int __iswgraph_l(wint_t c, locale_t l)
16 {
17 #ifndef __LITEOS__
18 #ifdef FEATURE_ICU_LOCALE
19 	if (icu_locale_wctype_enable && l && l->cat[LC_CTYPE]
20 		&& l->cat[LC_CTYPE]->flag == ICU_VALID) {
21 		char* type_name = (char*)(l->cat[LC_CTYPE]->name);
22 		if (!strcmp(type_name, "zh_CN") || !strcmp(type_name, "en_US.UTF-8")) {
23 			return g_icu_opt_func.u_isgraph(c);
24 		}
25 	}
26 #endif
27 #endif
28 	return iswgraph(c);
29 }
30 
31 weak_alias(__iswgraph_l, iswgraph_l);
32