Commit 247457c1 authored by Rolf Kalbermatter's avatar Rolf Kalbermatter Committed by Alexandre Julliard

Implement ParseFieldW function based on its ANSI sibling.

parent bc8bd722
......@@ -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;
}
/*************************************************************************
......
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