static int pg_wc_isprint(pg_wchar c) { switch (pg_regex_strategy) { case PG_REGEX_LOCALE_C: return (c <= (pg_wchar) 127 && (pg_char_properties[c] & PG_ISPRINT)); case PG_REGEX_LOCALE_WIDE: #ifdef USE_WIDE_UPPER_LOWER if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswprint((wint_t) c); #endif /* FALL THRU */ case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isprint((unsigned char) c)); case PG_REGEX_LOCALE_WIDE_L: #if defined(HAVE_LOCALE_T) && defined(USE_WIDE_UPPER_LOWER) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswprint_l((wint_t) c, pg_regex_locale); #endif /* FALL THRU */ case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && isprint_l((unsigned char) c, pg_regex_locale)); #endif break; } return 0; /* can't get here, but keep compiler quiet */ }
void wctype_check_functions(wint_t i, wctype_t t, wctrans_t tr, locale_t l) { (void)iswalnum(i); (void)iswalnum_l(i, l); (void)iswalpha(i); (void)iswalpha_l(i, l); (void)iswblank(i); (void)iswblank_l(i, l); (void)iswcntrl(i); (void)iswcntrl_l(i, l); (void)iswctype(i, t); (void)iswctype_l(i, t, l); (void)iswdigit(i); (void)iswdigit_l(i, l); (void)iswgraph(i); (void)iswgraph_l(i, l); (void)iswlower(i); (void)iswlower_l(i, l); (void)iswprint(i); (void)iswprint_l(i, l); (void)iswpunct(i); (void)iswpunct_l(i, l); (void)iswspace(i); (void)iswspace_l(i, l); (void)iswupper(i); (void)iswupper_l(i, l); (void)iswxdigit(i); (void)iswxdigit_l(i, l); (void)towctrans(i, tr); (void)towctrans_l(i, tr, l); (void)towlower(i); (void)towlower_l(i, l); (void)towupper(i); (void)towupper_l(i, l); (void)wctrans((const char *)1234); (void)wctrans_l((const char *)1234, l); (void)wctype((const char *)1234); (void)wctype_l((const char *)1234, l); }