Blame src/string/ntapi_tt_memcpy_utf16.c

dd89bb
/********************************************************/
dd89bb
/*  ntapi: Native API core library                      */
59d585
/*  Copyright (C) 2013--2021  Z. Gilboa                 */
dd89bb
/*  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  */
dd89bb
/********************************************************/
dd89bb
dd89bb
#include <psxtypes/psxtypes.h>
dd89bb
#include <pemagine/pemagine.h>
dd89bb
766a63
__attr_protected__
dd89bb
wchar16_t * __cdecl __ntapi_tt_memcpy_utf16(
dd89bb
	__in	wchar16_t *	dst,
dd89bb
	__in	wchar16_t *	src,
dd89bb
	__in	size_t		bytes)
dd89bb
{
dd89bb
	wchar16_t *	wch_cap;
dd89bb
	wchar16_t *	wch_ret;
dd89bb
dd89bb
	wch_cap = (wchar16_t *)((uintptr_t)src + bytes);
dd89bb
	wch_ret = dst;
dd89bb
dd89bb
	while (src < wch_cap) {
dd89bb
		*dst = *src;
dd89bb
		src++;
dd89bb
		dst++;
dd89bb
	}
dd89bb
dd89bb
	return wch_ret;
dd89bb
}