Commit f905a1c4 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Fix the messed up indentation level in the STRRET functions.

parent 506f77f5
......@@ -64,28 +64,26 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
if (!dest)
return FALSE;
switch (src->uType)
{
case STRRET_WSTR:
WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, dest, len, NULL, NULL);
CoTaskMemFree(src->u.pOleStr);
break;
case STRRET_CSTR:
lstrcpynA(dest, src->u.cStr, len);
break;
case STRRET_OFFSET:
lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
break;
default:
switch (src->uType)
{
case STRRET_WSTR:
WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, dest, len, NULL, NULL);
CoTaskMemFree(src->u.pOleStr);
break;
case STRRET_CSTR:
lstrcpynA(dest, src->u.cStr, len);
break;
case STRRET_OFFSET:
lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
break;
default:
FIXME("unknown type %u!\n", src->uType);
if (len) *dest = '\0';
return FALSE;
}
TRACE("-- %s\n", debugstr_a(dest) );
return TRUE;
if (len)
*dest = '\0';
return FALSE;
}
TRACE("-- %s\n", debugstr_a(dest) );
return TRUE;
}
/************************************************************************/
......@@ -97,34 +95,33 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
if (!dest)
return FALSE;
switch (src->uType)
{
case STRRET_WSTR:
lstrcpynW(dest, src->u.pOleStr, len);
CoTaskMemFree(src->u.pOleStr);
break;
case STRRET_CSTR:
if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len)
dest[len-1] = 0;
break;
case STRRET_OFFSET:
if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, dest, len ) && len)
dest[len-1] = 0;
break;
default:
switch (src->uType)
{
case STRRET_WSTR:
lstrcpynW(dest, src->u.pOleStr, len);
CoTaskMemFree(src->u.pOleStr);
break;
case STRRET_CSTR:
if (!MultiByteToWideChar(CP_ACP, 0, src->u.cStr, -1, dest, len) && len)
dest[len-1] = 0;
break;
case STRRET_OFFSET:
if (!MultiByteToWideChar(CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, dest, len)
&& len)
dest[len-1] = 0;
break;
default:
FIXME("unknown type %u!\n", src->uType);
if (len) *dest = '\0';
return FALSE;
}
return TRUE;
if (len)
*dest = '\0';
return FALSE;
}
return TRUE;
}
/*************************************************************************
* StrRetToStrN [SHELL32.96]
* StrRetToStrN [SHELL32.96]
*
* converts a STRRET to a normal string
*
......@@ -133,7 +130,7 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
*/
BOOL WINAPI StrRetToStrNAW(LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
{
if(SHELL_OsIsUnicode())
if(SHELL_OsIsUnicode())
return StrRetToStrNW(dest, len, src, pidl);
else
return StrRetToStrNA(dest, len, src, pidl);
......
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