mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:30:50 +00:00
Implement ParseFieldW function based on its ANSI sibling.
This commit is contained in:
parent
bc8bd72297
commit
247457c184
|
@ -64,7 +64,8 @@ BOOL HCR_GetClassName (REFIID riid, LPSTR szDest, DWORD len);
|
|||
BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest);
|
||||
|
||||
INT_PTR CALLBACK AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
|
||||
DWORD WINAPI ParseFieldA(LPCSTR src,DWORD field,LPSTR dst,DWORD len);
|
||||
DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len);
|
||||
DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len);
|
||||
|
||||
/****************************************************************************
|
||||
* Class constructors
|
||||
|
|
|
@ -107,9 +107,25 @@ DWORD WINAPI ParseFieldA(
|
|||
*/
|
||||
DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len)
|
||||
{
|
||||
FIXME("(%s,0x%08lx,%p,%ld) stub\n",
|
||||
debugstr_w(src), nField, dst, len);
|
||||
return FALSE;
|
||||
WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n", debugstr_w(src), nField, dst, len);
|
||||
|
||||
if (!src || !src[0] || !dst || !len)
|
||||
return 0;
|
||||
|
||||
/* skip n fields delimited by ',' */
|
||||
while (nField > 1)
|
||||
{
|
||||
if (*src == 0x0) return FALSE;
|
||||
if (*src++ == ',') nField--;
|
||||
}
|
||||
|
||||
/* copy part till the next ',' to dst */
|
||||
while ( *src != 0x0 && *src != ',' && (len--)>0 ) *(dst++) = *(src++);
|
||||
|
||||
/* finalize the string */
|
||||
*dst = 0x0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
Loading…
Reference in a new issue