]> pd.if.org Git - pdclib/blobdiff - functions/wctype/iswgraph.c
PDCLIB-3 implement isw* functions
[pdclib] / functions / wctype / iswgraph.c
diff --git a/functions/wctype/iswgraph.c b/functions/wctype/iswgraph.c
new file mode 100644 (file)
index 0000000..29d6e96
--- /dev/null
@@ -0,0 +1,31 @@
+/* iswgraph( wint_t )\r
+\r
+   This file is part of the Public Domain C Library (PDCLib).\r
+   Permission is granted to use, modify, and / or redistribute at will.\r
+*/\r
+\r
+#include <wctype.h>\r
+#ifndef REGTEST\r
+#include <_PDCLIB_locale.h>\r
+\r
+int iswgraph( wint_t wc )\r
+{\r
+    return iswctype( wc, _PDCLIB_CTYPE_GRAPH );\r
+}\r
+\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+\r
+int main( void )\r
+{\r
+    TESTCASE(iswgraph(L'a'));\r
+    TESTCASE(iswgraph(L'z'));\r
+    TESTCASE(iswgraph(L'E'));\r
+    TESTCASE(!iswgraph(L' '));\r
+    TESTCASE(!iswgraph(L'\t'));\r
+    TESTCASE(!iswgraph(L'\n'));\r
+    return TEST_RESULTS;\r
+}\r
+#endif\r