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
f5c5839b
Commit
f5c5839b
authored
Feb 21, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Reorder control flow in ImmEscapeA.
parent
c358707a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
23 deletions
+20
-23
imm.c
dlls/imm32/imm.c
+20
-23
No files found.
dlls/imm32/imm.c
View file @
f5c5839b
...
...
@@ -988,36 +988,33 @@ static inline BOOL EscapeRequiresWA(UINT uEscape)
/***********************************************************************
* ImmEscapeA (IMM32.@)
*/
LRESULT
WINAPI
ImmEscapeA
(
HKL
hKL
,
HIMC
hIMC
,
UINT
uEscape
,
LPVOID
lpData
)
LRESULT
WINAPI
ImmEscapeA
(
HKL
hkl
,
HIMC
himc
,
UINT
code
,
void
*
data
)
{
struct
ime
*
im
mHkl
=
IMM_GetImmHkl
(
hKL
);
TRACE
(
"(%p, %p, %d, %p):
\n
"
,
hKL
,
hIMC
,
uEscape
,
lpData
)
;
struct
ime
*
im
e
=
IMM_GetImmHkl
(
hkl
);
LRESULT
ret
;
if
(
immHkl
->
hIME
&&
immHkl
->
pImeEscape
)
TRACE
(
"hkl %p, himc %p, code %u, data %p.
\n
"
,
hkl
,
himc
,
code
,
data
);
if
(
!
ime
->
hIME
||
!
ime
->
pImeEscape
)
return
0
;
if
(
!
EscapeRequiresWA
(
code
)
||
!
is_kbd_ime_unicode
(
ime
))
ret
=
ime
->
pImeEscape
(
himc
,
code
,
data
);
else
{
if
(
!
EscapeRequiresWA
(
uEscape
)
||
!
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
lpData
);
WCHAR
buffer
[
81
];
/* largest required buffer should be 80 */
if
(
code
==
IME_ESC_SET_EUDC_DICTIONARY
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
data
,
-
1
,
buffer
,
81
);
ret
=
ime
->
pImeEscape
(
himc
,
code
,
buffer
);
}
else
{
WCHAR
buffer
[
81
];
/* largest required buffer should be 80 */
LRESULT
rc
;
if
(
uEscape
==
IME_ESC_SET_EUDC_DICTIONARY
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
lpData
,
-
1
,
buffer
,
81
);
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
}
else
{
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,
lpData
,
80
,
NULL
,
NULL
);
}
return
rc
;
ret
=
ime
->
pImeEscape
(
himc
,
code
,
buffer
);
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,
data
,
80
,
NULL
,
NULL
);
}
}
else
return
0
;
return
ret
;
}
/***********************************************************************
...
...
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