ChangeLog: * dlls/shell32/shellord.c - Implement ParseFieldW function based on its ANSI sibling Rolf Kalbermatter Index: dlls/shell32/shellord.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/shellord.c,v retrieving revision 1.107 diff -u -r1.107 shellord.c --- dlls/shell32/shellord.c 5 Dec 2002 20:33:08 -0000 1.107 +++ dlls/shell32/shellord.c 6 Dec 2002 13:27:15 -0000 @@ -107,9 +107,25 @@ */ 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; } Index: dlls/shell32/shell32_main.h =================================================================== RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v retrieving revision 1.58 diff -u -r1.58 shell32_main.h --- dlls/shell32/shell32_main.h 21 Nov 2002 23:56:42 -0000 1.58 +++ dlls/shell32/shell32_main.h 6 Dec 2002 13:36:56 -0000 @@ -64,7 +64,8 @@ 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 /*************************************************************************