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
bd6590a8
Commit
bd6590a8
authored
Oct 19, 2002
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings when converting between an ATOM and a HSZ.
parent
0ba3dc75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
misc.c
dlls/user/dde/misc.c
+12
-8
No files found.
dlls/user/dde/misc.c
View file @
bd6590a8
...
...
@@ -42,6 +42,10 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ddeml
);
/* convert between ATOM and HSZ avoiding compiler warnings */
#define ATOM2HSZ(atom) ((HSZ) (ULONG_PTR)(atom))
#define HSZ2ATOM(hsz) ((ATOM) (ULONG_PTR)(hsz))
static
WDML_INSTANCE
*
WDML_InstanceList
=
NULL
;
static
DWORD
WDML_MaxInstanceID
=
0
;
/* OK for present, have to worry about wrap-around later */
const
char
WDML_szEventClass
[]
=
"DdeEventClass"
;
...
...
@@ -836,7 +840,7 @@ ATOM WDML_MakeAtomFromHsz(HSZ hsz)
{
WCHAR
nameBuffer
[
MAX_BUFFER_LEN
];
if
(
GetAtomNameW
(
(
ATOM
)
hsz
,
nameBuffer
,
MAX_BUFFER_LEN
))
if
(
GetAtomNameW
(
HSZ2ATOM
(
hsz
)
,
nameBuffer
,
MAX_BUFFER_LEN
))
return
GlobalAddAtomW
(
nameBuffer
);
WARN
(
"HSZ 0x%x not found
\n
"
,
hsz
);
return
0
;
...
...
@@ -910,7 +914,7 @@ BOOL WDML_DecHSZ(WDML_INSTANCE* pInstance, HSZ hsz)
pPrev
->
next
=
pCurrent
->
next
;
}
HeapFree
(
GetProcessHeap
(),
0
,
pCurrent
);
DeleteAtom
(
(
ATOM
)
hsz
);
DeleteAtom
(
HSZ2ATOM
(
hsz
)
);
}
return
TRUE
;
}
...
...
@@ -985,10 +989,10 @@ static int WDML_QueryString(WDML_INSTANCE* pInstance, HSZ hsz, LPVOID ptr, DWORD
switch
(
codepage
)
{
case
CP_WINANSI
:
ret
=
GetAtomNameA
(
(
ATOM
)
hsz
,
ptr
,
cchMax
);
ret
=
GetAtomNameA
(
HSZ2ATOM
(
hsz
)
,
ptr
,
cchMax
);
break
;
case
CP_WINUNICODE
:
ret
=
GetAtomNameW
(
(
ATOM
)
hsz
,
ptr
,
cchMax
);
ret
=
GetAtomNameW
(
HSZ2ATOM
(
hsz
)
,
ptr
,
cchMax
);
default:
ERR
(
"Unknown code page %d
\n
"
,
codepage
);
ret
=
0
;
...
...
@@ -1061,11 +1065,11 @@ static HSZ WDML_CreateString(WDML_INSTANCE* pInstance, LPCVOID ptr, int codepage
switch
(
codepage
)
{
case
CP_WINANSI
:
hsz
=
(
HSZ
)
AddAtomA
(
ptr
);
hsz
=
ATOM2HSZ
(
AddAtomA
(
ptr
)
);
TRACE
(
"added atom %s with HSZ 0x%x,
\n
"
,
debugstr_a
(
ptr
),
hsz
);
break
;
case
CP_WINUNICODE
:
hsz
=
(
HSZ
)
AddAtomW
(
ptr
);
hsz
=
ATOM2HSZ
(
AddAtomW
(
ptr
)
);
TRACE
(
"added atom %s with HSZ 0x%x,
\n
"
,
debugstr_w
(
ptr
),
hsz
);
break
;
default:
...
...
@@ -1203,8 +1207,8 @@ INT WINAPI DdeCmpStringHandles(HSZ hsz1, HSZ hsz2)
int
ret
=
0
;
int
ret1
,
ret2
;
ret1
=
GetAtomNameW
(
(
ATOM
)
hsz1
,
psz1
,
MAX_BUFFER_LEN
);
ret2
=
GetAtomNameW
(
(
ATOM
)
hsz2
,
psz2
,
MAX_BUFFER_LEN
);
ret1
=
GetAtomNameW
(
HSZ2ATOM
(
hsz1
)
,
psz1
,
MAX_BUFFER_LEN
);
ret2
=
GetAtomNameW
(
HSZ2ATOM
(
hsz2
)
,
psz2
,
MAX_BUFFER_LEN
);
TRACE
(
"(%x<%s> %x<%s>);
\n
"
,
hsz1
,
debugstr_w
(
psz1
),
hsz2
,
debugstr_w
(
psz2
));
...
...
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