mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[SHLWAPI] Import Wine commit 4b33a33 by Sebastian Lackner: Add implementation for StrCatChainW. Based on a patch by Huw Campbell.
CORE-7556 svn path=/trunk/; revision=65749
This commit is contained in:
parent
58d4218202
commit
cfcca647bc
2 changed files with 42 additions and 1 deletions
|
@ -767,7 +767,7 @@
|
||||||
767 stdcall StrCSpnW(wstr wstr)
|
767 stdcall StrCSpnW(wstr wstr)
|
||||||
768 stdcall StrCatBuffA(str str long)
|
768 stdcall StrCatBuffA(str str long)
|
||||||
769 stdcall StrCatBuffW(wstr wstr long)
|
769 stdcall StrCatBuffW(wstr wstr long)
|
||||||
#770 StrCatChainW
|
770 stdcall StrCatChainW (ptr long long wstr)
|
||||||
771 stdcall StrCatW(ptr wstr)
|
771 stdcall StrCatW(ptr wstr)
|
||||||
772 stdcall StrChrA(str long)
|
772 stdcall StrChrA(str long)
|
||||||
773 stdcall StrChrIA(str long)
|
773 stdcall StrChrIA(str long)
|
||||||
|
|
|
@ -437,6 +437,47 @@ LPWSTR WINAPI StrCatW(LPWSTR lpszStr, LPCWSTR lpszSrc)
|
||||||
return lpszStr;
|
return lpszStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* StrCatChainW [SHLWAPI.@]
|
||||||
|
*
|
||||||
|
* Concatenates two unicode strings.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* lpszStr [O] Initial string
|
||||||
|
* cchMax [I] Length of destination buffer
|
||||||
|
* ichAt [I] Offset from the destination buffer to begin concatenation
|
||||||
|
* lpszCat [I] String to concatenate
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* The offset from the beginning of pszDst to the terminating NULL.
|
||||||
|
*/
|
||||||
|
DWORD WINAPI StrCatChainW(LPWSTR lpszStr, DWORD cchMax, DWORD ichAt, LPCWSTR lpszCat)
|
||||||
|
{
|
||||||
|
TRACE("(%s,%u,%d,%s)\n", debugstr_w(lpszStr), cchMax, ichAt, debugstr_w(lpszCat));
|
||||||
|
|
||||||
|
if (ichAt == -1)
|
||||||
|
ichAt = strlenW(lpszStr);
|
||||||
|
|
||||||
|
if (!cchMax)
|
||||||
|
return ichAt;
|
||||||
|
|
||||||
|
if (ichAt == cchMax)
|
||||||
|
ichAt--;
|
||||||
|
|
||||||
|
if (lpszCat && ichAt < cchMax)
|
||||||
|
{
|
||||||
|
lpszStr += ichAt;
|
||||||
|
while (ichAt < cchMax - 1 && *lpszCat)
|
||||||
|
{
|
||||||
|
*lpszStr++ = *lpszCat++;
|
||||||
|
ichAt++;
|
||||||
|
}
|
||||||
|
*lpszStr = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ichAt;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* StrCpyW [SHLWAPI.@]
|
* StrCpyW [SHLWAPI.@]
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue