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
27b587d9
Commit
27b587d9
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 ImmGetConversionListA.
parent
af926f1b
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 @
27b587d9
...
...
@@ -1585,39 +1585,36 @@ HIMC WINAPI ImmGetContext(HWND hWnd)
/***********************************************************************
* ImmGetConversionListA (IMM32.@)
*/
DWORD
WINAPI
ImmGetConversionListA
(
HKL
hKL
,
HIMC
hIMC
,
LPCSTR
pSrc
,
LPCANDIDATELIST
lpDst
,
DWORD
dwBufLen
,
UINT
uFlag
)
DWORD
WINAPI
ImmGetConversionListA
(
HKL
hkl
,
HIMC
himc
,
const
char
*
srcA
,
CANDIDATELIST
*
listA
,
DWORD
lengthA
,
UINT
flags
)
{
struct
ime
*
immHkl
=
IMM_GetImmHkl
(
hKL
);
TRACE
(
"(%p, %p, %s, %p, %ld, %d):
\n
"
,
hKL
,
hIMC
,
debugstr_a
(
pSrc
),
lpDst
,
dwBufLen
,
uFlag
);
if
(
immHkl
->
hIME
&&
immHkl
->
pImeConversionList
)
struct
ime
*
ime
=
IMM_GetImmHkl
(
hkl
);
DWORD
ret
;
TRACE
(
"hkl %p, himc %p, srcA %s, listA %p, lengthA %lu, flags %#x.
\n
"
,
hkl
,
himc
,
debugstr_a
(
srcA
),
listA
,
lengthA
,
flags
);
if
(
!
ime
->
hIME
||
!
ime
->
pImeConversionList
)
return
0
;
if
(
!
is_kbd_ime_unicode
(
ime
))
ret
=
ime
->
pImeConversionList
(
himc
,
(
const
WCHAR
*
)
srcA
,
listA
,
lengthA
,
flags
);
else
{
if
(
!
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeConversionList
(
hIMC
,(
LPCWSTR
)
pSrc
,
lpDst
,
dwBufLen
,
uFlag
);
CANDIDATELIST
*
listW
;
WCHAR
*
srcW
=
strdupAtoW
(
srcA
);
DWORD
lengthW
=
ime
->
pImeConversionList
(
himc
,
srcW
,
NULL
,
0
,
flags
);
if
(
!
(
listW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lengthW
)))
ret
=
0
;
else
{
LPCANDIDATELIST
lpwDst
;
DWORD
ret
=
0
,
len
;
LPWSTR
pwSrc
=
strdupAtoW
(
pSrc
);
len
=
immHkl
->
pImeConversionList
(
hIMC
,
pwSrc
,
NULL
,
0
,
uFlag
);
lpwDst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
lpwDst
)
{
immHkl
->
pImeConversionList
(
hIMC
,
pwSrc
,
lpwDst
,
len
,
uFlag
);
ret
=
convert_candidatelist_WtoA
(
lpwDst
,
lpDst
,
dwBufLen
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwDst
);
}
HeapFree
(
GetProcessHeap
(),
0
,
pwSrc
);
return
ret
;
ime
->
pImeConversionList
(
himc
,
srcW
,
listW
,
lengthW
,
flags
);
ret
=
convert_candidatelist_WtoA
(
listW
,
listA
,
lengthA
);
HeapFree
(
GetProcessHeap
(),
0
,
listW
);
}
HeapFree
(
GetProcessHeap
(),
0
,
srcW
);
}
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