scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <wchar.h>
 2
 3#undef wcsncat
 4
 5wchar_t *
 6wcsncat(wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)
 7{
 8	wchar_t *ret;
 9
10	for (ret = s1; *s1; ++s1)
11		;
12	while (n-- > 0 && *s2)
13		*s1++ = *s2++;
14	*s1 = '\0';
15
16	return ret;
17
18}