Blame src/u16_wcsncpy.c

06fa6a
/*******************************************************************/
06fa6a
/*  u16ports: u16 variants of wide character string functions.     */
06fa6a
/*  Copyright (C) 2017  Z. Gilboa                                  */
06fa6a
/*  Released under the Standard MIT License; see COPYING.U16PORTS. */
06fa6a
/*******************************************************************/
06fa6a
06fa6a
#include <stdint.h>
06fa6a
#include <u16ports/u16ports.h>
06fa6a
06fa6a
uint16_t * u16_wcsncpy(uint16_t * dst, const uint16_t * src, size_t len)
06fa6a
{
06fa6a
	uint16_t * ret;
06fa6a
	uint16_t * cap;
06fa6a
06fa6a
	ret = dst;
06fa6a
	cap = dst + len;
06fa6a
06fa6a
	for (; dst
06fa6a
		*dst++ = *src++;
06fa6a
06fa6a
	for (; dst
06fa6a
		*dst++ = 0;
06fa6a
06fa6a
	return ret;
06fa6a
}