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
a8f11bb8
Commit
a8f11bb8
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 ImmGetConversionListW.
parent
27b587d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
27 deletions
+24
-27
imm.c
dlls/imm32/imm.c
+24
-27
No files found.
dlls/imm32/imm.c
View file @
a8f11bb8
...
...
@@ -1620,39 +1620,36 @@ DWORD WINAPI ImmGetConversionListA( HKL hkl, HIMC himc, const char *srcA, CANDID
/***********************************************************************
* ImmGetConversionListW (IMM32.@)
*/
DWORD
WINAPI
ImmGetConversionListW
(
HKL
hKL
,
HIMC
hIMC
,
LPCWSTR
pSrc
,
LPCANDIDATELIST
lpDst
,
DWORD
dwBufLen
,
UINT
uFlag
)
DWORD
WINAPI
ImmGetConversionListW
(
HKL
hkl
,
HIMC
himc
,
const
WCHAR
*
srcW
,
CANDIDATELIST
*
listW
,
DWORD
lengthW
,
UINT
flags
)
{
struct
ime
*
immHkl
=
IMM_GetImmHkl
(
hKL
);
TRACE
(
"(%p, %p, %s, %p, %ld, %d):
\n
"
,
hKL
,
hIMC
,
debugstr_w
(
pSrc
),
lpDst
,
dwBufLen
,
uFlag
);
if
(
immHkl
->
hIME
&&
immHkl
->
pImeConversionList
)
struct
ime
*
ime
=
IMM_GetImmHkl
(
hkl
);
DWORD
ret
;
TRACE
(
"hkl %p, himc %p, srcW %s, listW %p, lengthW %lu, flags %#x.
\n
"
,
hkl
,
himc
,
debugstr_w
(
srcW
),
listW
,
lengthW
,
flags
);
if
(
!
ime
->
hIME
||
!
ime
->
pImeConversionList
)
return
0
;
if
(
is_kbd_ime_unicode
(
ime
))
ret
=
ime
->
pImeConversionList
(
himc
,
srcW
,
listW
,
lengthW
,
flags
);
else
{
if
(
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeConversionList
(
hIMC
,
pSrc
,
lpDst
,
dwBufLen
,
uFlag
);
CANDIDATELIST
*
listA
;
char
*
srcA
=
strdupWtoA
(
srcW
);
DWORD
lengthA
=
ime
->
pImeConversionList
(
himc
,
(
const
WCHAR
*
)
srcA
,
NULL
,
0
,
flags
);
if
(
!
(
listA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lengthA
)))
ret
=
0
;
else
{
LPCANDIDATELIST
lpaDst
;
DWORD
ret
=
0
,
len
;
LPSTR
paSrc
=
strdupWtoA
(
pSrc
);
len
=
immHkl
->
pImeConversionList
(
hIMC
,
(
LPCWSTR
)
paSrc
,
NULL
,
0
,
uFlag
);
lpaDst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
lpaDst
)
{
immHkl
->
pImeConversionList
(
hIMC
,
(
LPCWSTR
)
paSrc
,
lpaDst
,
len
,
uFlag
);
ret
=
convert_candidatelist_AtoW
(
lpaDst
,
lpDst
,
dwBufLen
);
HeapFree
(
GetProcessHeap
(),
0
,
lpaDst
);
}
HeapFree
(
GetProcessHeap
(),
0
,
paSrc
);
return
ret
;
ime
->
pImeConversionList
(
himc
,
(
const
WCHAR
*
)
srcA
,
listA
,
lengthA
,
flags
);
ret
=
convert_candidatelist_AtoW
(
listA
,
listW
,
lengthW
);
HeapFree
(
GetProcessHeap
(),
0
,
listA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
srcA
);
}
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