]> pd.if.org Git - pdclib/blobdiff - functions/wchar/wcscpy.c
* Test cleanups: surround the code for all functions by #ifndef REGTEST
[pdclib] / functions / wchar / wcscpy.c
diff --git a/functions/wchar/wcscpy.c b/functions/wchar/wcscpy.c
new file mode 100644 (file)
index 0000000..02394ee
--- /dev/null
@@ -0,0 +1,33 @@
+/* wchar_t * wcscpy( wchar_t restrict *, const wchar_t restrict * );\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
+wchar_t *wcscpy( wchar_t * _PDCLIB_restrict dest, \r
+                 const wchar_t * _PDCLIB_restrict src)\r
+{\r
+    wchar_t * rv = dest;\r
+    while(*src) {\r
+        *(dest++) = *(src++);\r
+    }\r
+\r
+    return rv;\r
+}\r
+\r
+\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+\r
+int main( void )\r
+{\r
+    return TEST_RESULTS;\r
+}\r
+\r
+#endif\r