Commit 07c80924 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Implemented wcscat_s.

parent dfb64699
...@@ -762,6 +762,7 @@ ...@@ -762,6 +762,7 @@
@ cdecl vswprintf(ptr wstr ptr) MSVCRT_vswprintf @ cdecl vswprintf(ptr wstr ptr) MSVCRT_vswprintf
@ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf
@ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat(wstr wstr) ntdll.wcscat
@ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s
@ cdecl wcschr(wstr long) ntdll.wcschr @ cdecl wcschr(wstr long) ntdll.wcschr
@ cdecl wcscmp(wstr wstr) ntdll.wcscmp @ cdecl wcscmp(wstr wstr) ntdll.wcscmp
@ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll @ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll
......
...@@ -1077,3 +1077,29 @@ INT CDECL MSVCRT_wcsncpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, co ...@@ -1077,3 +1077,29 @@ INT CDECL MSVCRT_wcsncpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, co
return 0; return 0;
} }
/******************************************************************
* wcscat_s (MSVCRT.@)
*
*/
INT CDECL MSVCRT_wcscat_s(MSVCRT_wchar_t* dst, MSVCRT_size_t elem, const MSVCRT_wchar_t* src)
{
MSVCRT_wchar_t* ptr = dst;
if (!dst || elem == 0) return MSVCRT_EINVAL;
if (!src)
{
dst[0] = '\0';
return MSVCRT_EINVAL;
}
/* seek to end of dst string (or elem if no end of string is found */
while (ptr < dst + elem && *ptr != '\0') ptr++;
while (ptr < dst + elem)
{
if ((*ptr++ = *src++) == '\0') return 0;
}
/* not enough space */
dst[0] = '\0';
return MSVCRT_ERANGE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment