Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f905a1c4
Commit
f905a1c4
authored
Sep 12, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Sep 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Fix the messed up indentation level in the STRRET functions.
parent
506f77f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
45 deletions
+42
-45
shellstring.c
dlls/shell32/shellstring.c
+42
-45
No files found.
dlls/shell32/shellstring.c
View file @
f905a1c4
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment