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
ea2b24d8
Commit
ea2b24d8
authored
Sep 30, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Move GetStrCodePages() to IMLangFontLink2 and forward to it.
parent
a67b97ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
39 deletions
+42
-39
mlang.c
dlls/mlang/mlang.c
+42
-39
No files found.
dlls/mlang/mlang.c
View file @
ea2b24d8
...
...
@@ -1837,41 +1837,15 @@ static HRESULT WINAPI fnIMLangFontLink_GetCharCodePages(
static
HRESULT
WINAPI
fnIMLangFontLink_GetStrCodePages
(
IMLangFontLink
*
iface
,
const
WCHAR
*
pszS
rc
,
LONG
cchSrc
,
DWORD
dwPriorityCodePages
,
DWORD
*
pdwCodeP
ages
,
LONG
*
pcchCodePages
)
const
WCHAR
*
s
rc
,
LONG
src_len
,
DWORD
priority_cp
,
DWORD
*
codep
ages
,
LONG
*
ret_len
)
{
LONG
i
;
DWORD
cps
=
0
;
TRACE
(
"(%p)->%s %d %x %p %p
\n
"
,
iface
,
debugstr_wn
(
pszSrc
,
cchSrc
),
cchSrc
,
dwPriorityCodePages
,
pdwCodePages
,
pcchCodePages
);
if
(
pdwCodePages
)
*
pdwCodePages
=
0
;
if
(
pcchCodePages
)
*
pcchCodePages
=
0
;
if
(
!
pszSrc
||
!
cchSrc
||
cchSrc
<
0
)
return
E_INVALIDARG
;
for
(
i
=
0
;
i
<
cchSrc
;
i
++
)
{
DWORD
cp
;
HRESULT
ret
;
ret
=
IMLangFontLink_GetCharCodePages
(
iface
,
pszSrc
[
i
],
&
cp
);
if
(
ret
!=
S_OK
)
return
E_FAIL
;
if
(
!
cps
)
cps
=
cp
;
else
cps
&=
cp
;
/* FIXME: not tested */
if
(
dwPriorityCodePages
&
cps
)
break
;
}
if
(
pdwCodePages
)
*
pdwCodePages
=
cps
;
if
(
pcchCodePages
)
*
pcchCodePages
=
min
(
i
+
1
,
cchSrc
);
return
S_OK
;
MLang_impl
*
This
=
impl_from_IMLangFontLink
(
iface
);
return
IMLangFontLink2_GetStrCodePages
(
&
This
->
IMLangFontLink2_iface
,
src
,
src_len
,
priority_cp
,
codepages
,
ret_len
);
}
static
HRESULT
WINAPI
fnIMLangFontLink_CodePageToCodePages
(
...
...
@@ -3192,12 +3166,41 @@ static HRESULT WINAPI fnIMLangFontLink2_GetCharCodePages( IMLangFontLink2* iface
return
S_OK
;
}
static
HRESULT
WINAPI
fnIMLangFontLink2_GetStrCodePages
(
IMLangFontLink2
*
This
,
const
WCHAR
*
pszSrc
,
LONG
cchSrc
,
DWORD
dwPriorityCodePages
,
DWORD
*
pdwCodePages
,
LONG
*
pcchCodePages
)
static
HRESULT
WINAPI
fnIMLangFontLink2_GetStrCodePages
(
IMLangFontLink2
*
iface
,
const
WCHAR
*
src
,
LONG
src_len
,
DWORD
priority_cp
,
DWORD
*
codepages
,
LONG
*
ret_len
)
{
return
fnIMLangFontLink_GetStrCodePages
((
IMLangFontLink
*
)
This
,
pszSrc
,
cchSrc
,
dwPriorityCodePages
,
pdwCodePages
,
pcchCodePages
);
MLang_impl
*
This
=
impl_from_IMLangFontLink2
(
iface
);
LONG
i
;
DWORD
cps
=
0
;
TRACE
(
"(%p)->(%s:%d %x %p %p)
\n
"
,
This
,
debugstr_wn
(
src
,
src_len
),
src_len
,
priority_cp
,
codepages
,
ret_len
);
if
(
codepages
)
*
codepages
=
0
;
if
(
ret_len
)
*
ret_len
=
0
;
if
(
!
src
||
!
src_len
||
src_len
<
0
)
return
E_INVALIDARG
;
for
(
i
=
0
;
i
<
src_len
;
i
++
)
{
DWORD
cp
;
HRESULT
ret
;
ret
=
IMLangFontLink2_GetCharCodePages
(
iface
,
src
[
i
],
&
cp
);
if
(
ret
!=
S_OK
)
return
E_FAIL
;
if
(
!
cps
)
cps
=
cp
;
else
cps
&=
cp
;
/* FIXME: not tested */
if
(
priority_cp
&
cps
)
break
;
}
if
(
codepages
)
*
codepages
=
cps
;
if
(
ret_len
)
*
ret_len
=
min
(
i
+
1
,
src_len
);
return
S_OK
;
}
static
HRESULT
WINAPI
fnIMLangFontLink2_CodePageToCodePages
(
IMLangFontLink2
*
iface
,
...
...
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