1 /* 2 ** Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved. 3 ** Distributed under the terms of the MIT License. 4 */ 5 6 #include <wchar_private.h> 7 8 9 wchar_t* 10 __wcsncat(wchar_t* destIn, const wchar_t* src, size_t n) 11 { 12 wchar_t* dest = destIn; 13 const wchar_t* srcEnd = src + n; 14 15 while (*dest != L'\0') 16 dest++; 17 while (src < srcEnd && *src != L'\0') 18 *dest++ = *src++; 19 *dest = L'\0'; 20 21 return destIn; 22 } 23 24 25 B_DEFINE_WEAK_ALIAS(__wcsncat, wcsncat); 26