summaryrefslogtreecommitdiffhomepage
path: root/src/string/ntapi_tt_memcpy_utf16.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-07-27 04:01:18 -0400
committermidipix <writeonce@midipix.org>2015-07-27 04:01:18 -0400
commitdd89bb8ad4fe184a34b5dbdda237e640fc82121b (patch)
tree5e80d2da35f5892f92be29f57982b2708e6bd99b /src/string/ntapi_tt_memcpy_utf16.c
parentdcdadc2702712fa750ed255ed1dfa354522797a0 (diff)
downloadntapi-dd89bb8ad4fe184a34b5dbdda237e640fc82121b.tar.bz2
ntapi-dd89bb8ad4fe184a34b5dbdda237e640fc82121b.tar.xz
entered advanced internal development stage.
Diffstat (limited to 'src/string/ntapi_tt_memcpy_utf16.c')
-rw-r--r--src/string/ntapi_tt_memcpy_utf16.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/string/ntapi_tt_memcpy_utf16.c b/src/string/ntapi_tt_memcpy_utf16.c
new file mode 100644
index 0000000..0a2b7af
--- /dev/null
+++ b/src/string/ntapi_tt_memcpy_utf16.c
@@ -0,0 +1,28 @@
+/********************************************************/
+/* ntapi: Native API core library */
+/* Copyright (C) 2013,2014,2015 Z. Gilboa */
+/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */
+/********************************************************/
+
+#include <psxtypes/psxtypes.h>
+#include <pemagine/pemagine.h>
+
+wchar16_t * __cdecl __ntapi_tt_memcpy_utf16(
+ __in wchar16_t * dst,
+ __in wchar16_t * src,
+ __in size_t bytes)
+{
+ wchar16_t * wch_cap;
+ wchar16_t * wch_ret;
+
+ wch_cap = (wchar16_t *)((uintptr_t)src + bytes);
+ wch_ret = dst;
+
+ while (src < wch_cap) {
+ *dst = *src;
+ src++;
+ dst++;
+ }
+
+ return wch_ret;
+}