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
af926f1b
Commit
af926f1b
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 ImmEscapeW.
parent
f5c5839b
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 @
af926f1b
...
...
@@ -1020,36 +1020,33 @@ LRESULT WINAPI ImmEscapeA( HKL hkl, HIMC himc, UINT code, void *data )
/***********************************************************************
* ImmEscapeW (IMM32.@)
*/
LRESULT
WINAPI
ImmEscapeW
(
HKL
hKL
,
HIMC
hIMC
,
UINT
uEscape
,
LPVOID
lpData
)
LRESULT
WINAPI
ImmEscapeW
(
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
);
char
buffer
[
81
];
/* largest required buffer should be 80 */
if
(
code
==
IME_ESC_SET_EUDC_DICTIONARY
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
data
,
-
1
,
buffer
,
81
,
NULL
,
NULL
);
ret
=
ime
->
pImeEscape
(
himc
,
code
,
buffer
);
}
else
{
CHAR
buffer
[
81
];
/* largest required buffer should be 80 */
LRESULT
rc
;
if
(
uEscape
==
IME_ESC_SET_EUDC_DICTIONARY
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
lpData
,
-
1
,
buffer
,
81
,
NULL
,
NULL
);
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
}
else
{
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buffer
,
-
1
,
lpData
,
80
);
}
return
rc
;
ret
=
ime
->
pImeEscape
(
himc
,
code
,
buffer
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buffer
,
-
1
,
data
,
80
);
}
}
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