summaryrefslogtreecommitdiff
path: root/src/ctype/iswprint.c
blob: 7717671ad18928eb140ef1f08bf919dae9890f92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include <wctype.h>

int iswprint(wint_t wc)
{
	unsigned c = wc;
	/* assume any non-control, non-illegal codepoint is printable */
	if (c>0x10ffff || c-0xd800<0x800 || (c&0xfffe)==0xfffe || iswcntrl(c))
		return 0;
	return 1;
}