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
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
Show 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 @@
...
@@ -52,8 +52,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winternl.h"
#include "winternl.h"
...
@@ -3780,7 +3778,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd)
...
@@ -3780,7 +3778,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd)
if
(
FAILED
(
IDataObject_GetData
(
fodInfos
->
Shell
.
FOIDataObject
,
&
formatetc
,
&
medium
)))
if
(
FAILED
(
IDataObject_GetData
(
fodInfos
->
Shell
.
FOIDataObject
,
&
formatetc
,
&
medium
)))
return
;
return
;
cida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
cida
=
GlobalLock
(
medium
.
hGlobal
);
nFileSelected
=
cida
->
cidl
;
nFileSelected
=
cida
->
cidl
;
/* Allocate a buffer */
/* Allocate a buffer */
...
@@ -3846,17 +3844,17 @@ static HRESULT COMDLG32_StrRetToStrNW (LPWSTR dest, DWORD len, LPSTRRET src, con
...
@@ -3846,17 +3844,17 @@ static HRESULT COMDLG32_StrRetToStrNW (LPWSTR dest, DWORD len, LPSTRRET src, con
switch
(
src
->
uType
)
switch
(
src
->
uType
)
{
{
case
STRRET_WSTR
:
case
STRRET_WSTR
:
lstrcpynW
(
dest
,
src
->
u
.
pOleStr
,
len
);
lstrcpynW
(
dest
,
src
->
pOleStr
,
len
);
CoTaskMemFree
(
src
->
u
.
pOleStr
);
CoTaskMemFree
(
src
->
pOleStr
);
break
;
break
;
case
STRRET_CSTR
:
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
;
dest
[
len
-
1
]
=
0
;
break
;
break
;
case
STRRET_OFFSET
:
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
;
dest
[
len
-
1
]
=
0
;
break
;
break
;
...
@@ -3911,8 +3909,8 @@ static void COMCTL32_ReleaseStgMedium (STGMEDIUM medium)
...
@@ -3911,8 +3909,8 @@ static void COMCTL32_ReleaseStgMedium (STGMEDIUM medium)
}
}
else
else
{
{
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
}
}
...
@@ -3938,7 +3936,7 @@ LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex)
...
@@ -3938,7 +3936,7 @@ LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex)
/* Get the pidls from IDataObject */
/* Get the pidls from IDataObject */
if
(
SUCCEEDED
(
IDataObject_GetData
(
doSelected
,
&
formatetc
,
&
medium
)))
if
(
SUCCEEDED
(
IDataObject_GetData
(
doSelected
,
&
formatetc
,
&
medium
)))
{
{
LPIDA
cida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
cida
=
GlobalLock
(
medium
.
hGlobal
);
if
(
nPidlIndex
<=
cida
->
cidl
)
if
(
nPidlIndex
<=
cida
->
cidl
)
{
{
pidl
=
ILClone
((
LPITEMIDLIST
)(
&
((
LPBYTE
)
cida
)[
cida
->
aoffset
[
nPidlIndex
]]));
pidl
=
ILClone
((
LPITEMIDLIST
)(
&
((
LPBYTE
)
cida
)[
cida
->
aoffset
[
nPidlIndex
]]));
...
@@ -3967,7 +3965,7 @@ static UINT GetNumSelected( IDataObject *doSelected )
...
@@ -3967,7 +3965,7 @@ static UINT GetNumSelected( IDataObject *doSelected )
/* Get the pidls from IDataObject */
/* Get the pidls from IDataObject */
if
(
SUCCEEDED
(
IDataObject_GetData
(
doSelected
,
&
formatetc
,
&
medium
)))
if
(
SUCCEEDED
(
IDataObject_GetData
(
doSelected
,
&
formatetc
,
&
medium
)))
{
{
LPIDA
cida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
cida
=
GlobalLock
(
medium
.
hGlobal
);
retVal
=
cida
->
cidl
;
retVal
=
cida
->
cidl
;
COMCTL32_ReleaseStgMedium
(
medium
);
COMCTL32_ReleaseStgMedium
(
medium
);
return
retVal
;
return
retVal
;
...
...
dlls/comdlg32/filedlgbrowser.c
View file @
c86bb606
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winnls.h"
#include "winnls.h"
...
@@ -155,19 +153,19 @@ static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITE
...
@@ -155,19 +153,19 @@ static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITE
switch
(
src
->
uType
)
switch
(
src
->
uType
)
{
{
case
STRRET_WSTR
:
case
STRRET_WSTR
:
lstrcpynW
(
dest
,
src
->
u
.
pOleStr
,
len
);
lstrcpynW
(
dest
,
src
->
pOleStr
,
len
);
CoTaskMemFree
(
src
->
u
.
pOleStr
);
CoTaskMemFree
(
src
->
pOleStr
);
break
;
break
;
case
STRRET_CSTR
:
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
;
((
LPWSTR
)
dest
)[
len
-
1
]
=
0
;
break
;
break
;
case
STRRET_OFFSET
:
case
STRRET_OFFSET
:
if
(
pidl
)
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
))
-
1
,
dest
,
len
))
((
LPWSTR
)
dest
)[
len
-
1
]
=
0
;
((
LPWSTR
)
dest
)[
len
-
1
]
=
0
;
}
}
...
...
dlls/comdlg32/itemdlg.c
View file @
c86bb606
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#include <stdarg.h>
#include <stdarg.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winuser.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