-/* wmemcmp( const wchar_t *, const wchar_t *, size_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 <wchar.h>\r
-\r
-#ifndef REGTEST\r
-\r
-int wmemcmp( const wchar_t * p1, const wchar_t * p2, size_t n )\r
-{\r
- while ( n-- )\r
- {\r
- if ( *p1 != *p2 )\r
- {\r
- return *p1 - *p2;\r
- }\r
- ++p1;\r
- ++p2;\r
- }\r
- return 0;\r
-}\r
-\r
-#endif\r
-\r
-#ifdef TEST\r
-#include "_PDCLIB_test.h"\r
-\r
-int main( void )\r
-{\r
- wchar_t const xxxxx[] = L"xxxxx";\r
- TESTCASE( wmemcmp( wabcde, wabcdx, 5 ) < 0 );\r
- TESTCASE( wmemcmp( wabcde, wabcdx, 4 ) == 0 );\r
- TESTCASE( wmemcmp( wabcde, xxxxx, 0 ) == 0 );\r
- TESTCASE( wmemcmp( xxxxx, wabcde, 1 ) > 0 );\r
- return 0;\r
-}\r
-#endif\r
+/* wmemcmp( const wchar_t *, const wchar_t *, size_t )
+
+ This file is part of the Public Domain C Library (PDCLib).
+ Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#include <wchar.h>
+
+#ifndef REGTEST
+
+int wmemcmp( const wchar_t * p1, const wchar_t * p2, size_t n )
+{
+ while ( n-- )
+ {
+ if ( *p1 != *p2 )
+ {
+ return *p1 - *p2;
+ }
+ ++p1;
+ ++p2;
+ }
+ return 0;
+}
+
+#endif
+
+#ifdef TEST
+#include "_PDCLIB_test.h"
+
+int main( void )
+{
+ wchar_t const xxxxx[] = L"xxxxx";
+ TESTCASE( wmemcmp( wabcde, wabcdx, 5 ) < 0 );
+ TESTCASE( wmemcmp( wabcde, wabcdx, 4 ) == 0 );
+ TESTCASE( wmemcmp( wabcde, xxxxx, 0 ) == 0 );
+ TESTCASE( wmemcmp( xxxxx, wabcde, 1 ) > 0 );
+ return 0;
+}
+#endif