]> pd.if.org Git - pdclib/blobdiff - includes/wctype.h
Sweeping cleanups. Sorry for the massive commit; I got sidetracked once too often.
[pdclib] / includes / wctype.h
index 4d6ed5e2427b63245d3516108bb4b799dbbc8b78..1e4989732e10e67d12dfc9176b6137ff00981323 100644 (file)
@@ -1,47 +1,65 @@
-/* 7.30 Wide Character Classification and Mapping Utilities <wctype.h>\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
-#ifndef _PDCLIB_WCTYPE_H\r
-#define _PDCLIB_WCTYPE_H _PDCLIB_WCTYPE_H\r
-#include <_PDCLIB_int.h>\r
-_PDCLIB_BEGIN_EXTERN_C\r
-\r
-#ifndef _PDCLIB_WINT_T_DEFINED\r
-#define _PDCLIB_WINT_T_DEFINED _PDCLIB_WINT_T_DEFINED\r
-typedef _PDCLIB_wint_t wint_t;\r
-#endif\r
-\r
-typedef int wctrans_t;\r
-typedef int wctype_t;\r
-\r
-/* 7.30.2.1 Character classification functions */\r
-int iswalnum( wint_t _Wc );\r
-int iswalpha( wint_t _Wc );\r
-int iswblank( wint_t _Wc );\r
-int iswcntrl( wint_t _Wc );\r
-int iswdigit( wint_t _Wc );\r
-int iswgraph( wint_t _Wc );\r
-int iswlower( wint_t _Wc );\r
-int iswprint( wint_t _Wc );\r
-int iswpunct( wint_t _Wc );\r
-int iswspace( wint_t _Wc );\r
-int iswupper( wint_t _Wc );\r
-int iswxdigit( wint_t _Wc );\r
-\r
-/* 7.30.2.2 Extensible character classification functions */\r
-int iswctype( wint_t _Wc, wctype_t _Desc );\r
-wctype_t wctype( const char * _Property );\r
-\r
-/* 7.30.3 Wide character case mapping utilities */\r
-wint_t towlower( wint_t _Wc );\r
-wint_t towupper( wint_t _Wc );\r
-\r
-/* 7.30.3.2 Extensible wide character case mapping functions */\r
-wint_t towctrans( wint_t _Wc, wctrans_t _Desc );\r
-wctrans_t wctrans( const char * _Property );\r
-\r
-_PDCLIB_END_EXTERN_C\r
-#endif // _PDCLIB_WCTYPE_H\r
+/* Wide character classification and mapping utilities <wctype.h>
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#ifndef _PDCLIB_WCTYPE_H
+#define _PDCLIB_WCTYPE_H _PDCLIB_WCTYPE_H
+#include <_PDCLIB_int.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _PDCLIB_WINT_T_DEFINED
+#define _PDCLIB_WINT_T_DEFINED _PDCLIB_WINT_T_DEFINED
+typedef _PDCLIB_wint_t wint_t;
+#endif
+
+#ifndef _PDCLIB_WEOF_DEFINED
+#define _PDCLIB_WEOF_DEFINED _PDCLIB_WEOF_DEFINED
+#define WEOF _PDCLIB_WEOF
+#endif
+
+/* Scalar type representing locale-specific character mappings */
+typedef int wctrans_t;
+
+/* Scalar type representing locale-specific character classifications */
+typedef int wctype_t;
+
+/* Character classification functions */
+
+int iswalnum( wint_t _Wc );
+int iswalpha( wint_t _Wc );
+int iswblank( wint_t _Wc );
+int iswcntrl( wint_t _Wc );
+int iswdigit( wint_t _Wc );
+int iswgraph( wint_t _Wc );
+int iswlower( wint_t _Wc );
+int iswprint( wint_t _Wc );
+int iswpunct( wint_t _Wc );
+int iswspace( wint_t _Wc );
+int iswupper( wint_t _Wc );
+int iswxdigit( wint_t _Wc );
+
+/* Extensible character classification functions */
+
+int iswctype( wint_t _Wc, wctype_t _Desc );
+wctype_t wctype( const char * _Property );
+
+/* Wide character case mapping utilities */
+
+wint_t towlower( wint_t _Wc );
+wint_t towupper( wint_t _Wc );
+
+/* Extensible wide character case mapping functions */
+
+wint_t towctrans( wint_t _Wc, wctrans_t _Desc );
+wctrans_t wctrans( const char * _Property );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif