]> pd.if.org Git - pdclib/blobdiff - functions/wctype/wctrans.c
dos2unix
[pdclib] / functions / wctype / wctrans.c
index efc18bfad95591aec928794c5ef71f0f56e8c3d7..c15bde085c7009b007beb616f8bfba1e0dd1533d 100644 (file)
@@ -1,38 +1,38 @@
-/* wctrans( const char * )\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 <string.h>\r
-#include "_PDCLIB_locale.h"\r
-\r
-wctrans_t wctrans( const char * property )\r
-{\r
-    if(!property) {\r
-        return 0;\r
-    } else if(strcmp(property, "tolower") == 0) {\r
-        return _PDCLIB_WCTRANS_TOLOWER;\r
-    } else if(strcmp(property, "toupper") == 0) {\r
-        return _PDCLIB_WCTRANS_TOUPPER;\r
-    } else {\r
-        return 0;\r
-    }\r
-}\r
-\r
-#endif\r
-\r
-#ifdef TEST\r
-#include "_PDCLIB_test.h"\r
-\r
-int main( void )\r
-{\r
-    TESTCASE(wctrans("") == 0);\r
-    TESTCASE(wctrans("invalid") == 0);\r
-    TESTCASE(wctrans("toupper") != 0);\r
-    TESTCASE(wctrans("tolower") != 0);\r
-    return TEST_RESULTS;\r
-}\r
-#endif\r
+/* wctrans( const char * )
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#include <wctype.h>
+#ifndef REGTEST
+#include <string.h>
+#include "_PDCLIB_locale.h"
+
+wctrans_t wctrans( const char * property )
+{
+    if(!property) {
+        return 0;
+    } else if(strcmp(property, "tolower") == 0) {
+        return _PDCLIB_WCTRANS_TOLOWER;
+    } else if(strcmp(property, "toupper") == 0) {
+        return _PDCLIB_WCTRANS_TOUPPER;
+    } else {
+        return 0;
+    }
+}
+
+#endif
+
+#ifdef TEST
+#include "_PDCLIB_test.h"
+
+int main( void )
+{
+    TESTCASE(wctrans("") == 0);
+    TESTCASE(wctrans("invalid") == 0);
+    TESTCASE(wctrans("toupper") != 0);
+    TESTCASE(wctrans("tolower") != 0);
+    return TEST_RESULTS;
+}
+#endif