]> pd.if.org Git - pdclib/blob - functions/wctype/iswcntrl.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / wctype / iswcntrl.c
1 /* iswcntrl( wint_t )\r
2 \r
3    This file is part of the Public Domain C Library (PDCLib).\r
4    Permission is granted to use, modify, and / or redistribute at will.\r
5 */\r
6 \r
7 #include <wctype.h>\r
8 #ifndef REGTEST\r
9 #include "_PDCLIB_locale.h"\r
10 \r
11 int iswcntrl( wint_t wc )\r
12 {\r
13     return iswctype( wc, _PDCLIB_CTYPE_CNTRL );\r
14 }\r
15 \r
16 #endif\r
17 \r
18 #ifdef TEST\r
19 #include "_PDCLIB_test.h"\r
20 \r
21 int main( void )\r
22 {\r
23     TESTCASE(iswcntrl(L'\0'));\r
24     TESTCASE(iswcntrl(L'\n'));\r
25     TESTCASE(iswcntrl(L'\v'));\r
26     TESTCASE(!iswcntrl(L'\t'));\r
27     TESTCASE(!iswcntrl(L'a'));\r
28     return TEST_RESULTS;\r
29 }\r
30 #endif\r