Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c86bb606
Commit
c86bb606
authored
Jul 10, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Use nameless unions/structs.
parent
22c56f97
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
19 deletions
+13
-19
filedlg.c
dlls/comdlg32/filedlg.c
+9
-11
filedlgbrowser.c
dlls/comdlg32/filedlgbrowser.c
+4
-6
itemdlg.c
dlls/comdlg32/itemdlg.c
+0
-2
printdlg.c
dlls/comdlg32/printdlg.c
+0
-0
No files found.
dlls/comdlg32/filedlg.c
View file @
c86bb606
...
...
@@ -52,8 +52,6 @@
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
...
...
@@ -3780,7 +3778,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd)
if
(
FAILED
(
IDataObject_GetData
(
fodInfos
->
Shell
.
FOIDataObject
,
&
formatetc
,
&
medium
)))
return
;
cida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
cida
=
GlobalLock
(
medium
.
hGlobal
);
nFileSelected
=
cida
->
cidl
;
/* Allocate a buffer */
...
...
@@ -3846,17 +3844,17 @@ static HRESULT COMDLG32_StrRetToStrNW (LPWSTR dest, DWORD len, LPSTRRET src, con
switch
(
src
->
uType
)
{
case
STRRET_WSTR
:
lstrcpynW
(
dest
,
src
->
u
.
pOleStr
,
len
);
CoTaskMemFree
(
src
->
u
.
pOleStr
);
lstrcpynW
(
dest
,
src
->
pOleStr
,
len
);
CoTaskMemFree
(
src
->
pOleStr
);
break
;
case
STRRET_CSTR
:
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
u
.
cStr
,
-
1
,
dest
,
len
)
&&
len
)
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
cStr
,
-
1
,
dest
,
len
)
&&
len
)
dest
[
len
-
1
]
=
0
;
break
;
case
STRRET_OFFSET
:
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
u
Offset
,
-
1
,
dest
,
len
)
&&
len
)
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
uOffset
,
-
1
,
dest
,
len
)
&&
len
)
dest
[
len
-
1
]
=
0
;
break
;
...
...
@@ -3911,8 +3909,8 @@ static void COMCTL32_ReleaseStgMedium (STGMEDIUM medium)
}
else
{
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
...
...
@@ -3938,7 +3936,7 @@ LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex)
/* Get the pidls from IDataObject */
if
(
SUCCEEDED
(
IDataObject_GetData
(
doSelected
,
&
formatetc
,
&
medium
)))
{
LPIDA
cida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
cida
=
GlobalLock
(
medium
.
hGlobal
);
if
(
nPidlIndex
<=
cida
->
cidl
)
{
pidl
=
ILClone
((
LPITEMIDLIST
)(
&
((
LPBYTE
)
cida
)[
cida
->
aoffset
[
nPidlIndex
]]));
...
...
@@ -3967,7 +3965,7 @@ static UINT GetNumSelected( IDataObject *doSelected )
/* Get the pidls from IDataObject */
if
(
SUCCEEDED
(
IDataObject_GetData
(
doSelected
,
&
formatetc
,
&
medium
)))
{
LPIDA
cida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
cida
=
GlobalLock
(
medium
.
hGlobal
);
retVal
=
cida
->
cidl
;
COMCTL32_ReleaseStgMedium
(
medium
);
return
retVal
;
...
...
dlls/comdlg32/filedlgbrowser.c
View file @
c86bb606
...
...
@@ -24,8 +24,6 @@
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
...
...
@@ -155,19 +153,19 @@ static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITE
switch
(
src
->
uType
)
{
case
STRRET_WSTR
:
lstrcpynW
(
dest
,
src
->
u
.
pOleStr
,
len
);
CoTaskMemFree
(
src
->
u
.
pOleStr
);
lstrcpynW
(
dest
,
src
->
pOleStr
,
len
);
CoTaskMemFree
(
src
->
pOleStr
);
break
;
case
STRRET_CSTR
:
if
(
len
&&
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
u
.
cStr
,
-
1
,
dest
,
len
))
if
(
len
&&
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
cStr
,
-
1
,
dest
,
len
))
((
LPWSTR
)
dest
)[
len
-
1
]
=
0
;
break
;
case
STRRET_OFFSET
:
if
(
pidl
)
{
if
(
len
&&
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
u
Offset
,
if
(
len
&&
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
uOffset
,
-
1
,
dest
,
len
))
((
LPWSTR
)
dest
)[
len
-
1
]
=
0
;
}
...
...
dlls/comdlg32/itemdlg.c
View file @
c86bb606
...
...
@@ -21,8 +21,6 @@
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
...
...
dlls/comdlg32/printdlg.c
View file @
c86bb606
This diff is collapsed.
Click to expand it.
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