Implemented StrCatBuff.
This commit is contained in:
parent
6e99273cf9
commit
11ab5b90cc
|
@ -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
|
||||||
@ 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
|
||||||
|
|
Loading…
Reference in New Issue