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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
25 deletions
+22
-25
imm.c
dlls/imm32/imm.c
+22
-25
No files found.
dlls/imm32/imm.c
View file @
27b587d9
...
@@ -1585,39 +1585,36 @@ HIMC WINAPI ImmGetContext(HWND hWnd)
...
@@ -1585,39 +1585,36 @@ HIMC WINAPI ImmGetContext(HWND hWnd)
/***********************************************************************
/***********************************************************************
* ImmGetConversionListA (IMM32.@)
* ImmGetConversionListA (IMM32.@)
*/
*/
DWORD
WINAPI
ImmGetConversionListA
(
DWORD
WINAPI
ImmGetConversionListA
(
HKL
hkl
,
HIMC
himc
,
const
char
*
srcA
,
CANDIDATELIST
*
listA
,
HKL
hKL
,
HIMC
hIMC
,
DWORD
lengthA
,
UINT
flags
)
LPCSTR
pSrc
,
LPCANDIDATELIST
lpDst
,
DWORD
dwBufLen
,
UINT
uFlag
)
{
{
struct
ime
*
immHkl
=
IMM_GetImmHkl
(
hKL
);
struct
ime
*
ime
=
IMM_GetImmHkl
(
hkl
);
TRACE
(
"(%p, %p, %s, %p, %ld, %d):
\n
"
,
hKL
,
hIMC
,
debugstr_a
(
pSrc
),
lpDst
,
DWORD
ret
;
dwBufLen
,
uFlag
);
if
(
immHkl
->
hIME
&&
immHkl
->
pImeConversionList
)
TRACE
(
"hkl %p, himc %p, srcA %s, listA %p, lengthA %lu, flags %#x.
\n
"
,
hkl
,
himc
,
{
debugstr_a
(
srcA
),
listA
,
lengthA
,
flags
);
if
(
!
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeConversionList
(
hIMC
,(
LPCWSTR
)
pSrc
,
lpDst
,
dwBufLen
,
uFlag
);
if
(
!
ime
->
hIME
||
!
ime
->
pImeConversionList
)
return
0
;
if
(
!
is_kbd_ime_unicode
(
ime
))
ret
=
ime
->
pImeConversionList
(
himc
,
(
const
WCHAR
*
)
srcA
,
listA
,
lengthA
,
flags
);
else
else
{
{
LPCANDIDATELIST
lpwDst
;
CANDIDATELIST
*
listW
;
DWORD
ret
=
0
,
len
;
WCHAR
*
srcW
=
strdupAtoW
(
srcA
)
;
LPWSTR
pwSrc
=
strdupAtoW
(
pSrc
);
DWORD
lengthW
=
ime
->
pImeConversionList
(
himc
,
srcW
,
NULL
,
0
,
flags
);
len
=
immHkl
->
pImeConversionList
(
hIMC
,
pwSrc
,
NULL
,
0
,
uFlag
);
if
(
!
(
listW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lengthW
)))
ret
=
0
;
lpwDst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
else
if
(
lpwDst
)
{
{
immHkl
->
pImeConversionList
(
hIMC
,
pwSrc
,
lpwDst
,
len
,
uFlag
);
ime
->
pImeConversionList
(
himc
,
srcW
,
listW
,
lengthW
,
flags
);
ret
=
convert_candidatelist_WtoA
(
lpwDst
,
lpDst
,
dwBufLen
);
ret
=
convert_candidatelist_WtoA
(
listW
,
listA
,
lengthA
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwDst
);
HeapFree
(
GetProcessHeap
(),
0
,
listW
);
}
HeapFree
(
GetProcessHeap
(),
0
,
srcW
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
pwSrc
);
return
ret
;
return
ret
;
}
}
else
return
0
;
}
}
/***********************************************************************
/***********************************************************************
...
...
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