Commit 11ab5b90 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Implemented StrCatBuff.

parent 6e99273c
...@@ -336,6 +336,42 @@ int WINAPI StrCSpnW (LPCWSTR lpStr, LPCWSTR lpSet) ...@@ -336,6 +336,42 @@ int WINAPI StrCSpnW (LPCWSTR lpStr, LPCWSTR lpSet)
return pos; return pos;
} }
/*************************************************************************
* StrCatBuffA [SHLWAPI]
*
* Appends back onto front, stopping when front is size-1 characters long.
* Returns front.
*
*/
LPSTR WINAPI StrCatBuffA(LPSTR front, LPCSTR back, INT size)
{
LPSTR dst = front + lstrlenA(front);
LPCSTR src = back, end = front + size - 1;
while(dst < end && *src)
*dst++ = *src++;
*dst = '\0';
return front;
}
/*************************************************************************
* StrCatBuffW [SHLWAPI]
*
* Appends back onto front, stopping when front is size-1 characters long.
* Returns front.
*
*/
LPWSTR WINAPI StrCatBuffW(LPWSTR front, LPCWSTR back, INT size)
{
LPWSTR dst = front + lstrlenW(front);
LPCWSTR src = back, end = front + size - 1;
while(dst < end && *src)
*dst++ = *src++;
*dst = '\0';
return front;
}
/************************* OLESTR functions ****************************/ /************************* OLESTR functions ****************************/
/************************************************************************ /************************************************************************
......
...@@ -608,6 +608,8 @@ init ShlwapiLibMain ...@@ -608,6 +608,8 @@ init ShlwapiLibMain
@ stub StrCSpnIA @ stub StrCSpnIA
@ stub StrCSpnIW @ stub StrCSpnIW
@ stdcall StrCSpnW (wstr wstr) StrCSpnW @ stdcall StrCSpnW (wstr wstr) StrCSpnW
@ stdcall StrCatBuffA (str str long) StrCatBuffA
@ stdcall StrCatBuffW (wstr wstr long) StrCatBuffW
@ stub StrCatW @ stub StrCatW
@ stdcall StrChrA (str long) StrChrA @ stdcall StrChrA (str long) StrChrA
@ stub StrChrIA @ stub StrChrIA
......
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