Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e84ae0e7
Commit
e84ae0e7
authored
May 29, 2009
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Return HRESULT from lcid_to_rfc1766 helper.
parent
2449eea0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
mlang.c
dlls/mlang/mlang.c
+10
-16
No files found.
dlls/mlang/mlang.c
View file @
e84ae0e7
...
...
@@ -1135,7 +1135,7 @@ HRESULT WINAPI IsConvertINetStringAvailable(
return
S_FALSE
;
}
static
inline
IN
T
lcid_to_rfc1766A
(
LCID
lcid
,
LPSTR
rfc1766
,
INT
len
)
static
inline
HRESUL
T
lcid_to_rfc1766A
(
LCID
lcid
,
LPSTR
rfc1766
,
INT
len
)
{
INT
n
=
GetLocaleInfoA
(
lcid
,
LOCALE_SISO639LANGNAME
,
rfc1766
,
len
);
if
(
n
)
...
...
@@ -1143,12 +1143,12 @@ static inline INT lcid_to_rfc1766A( LCID lcid, LPSTR rfc1766, INT len )
rfc1766
[
n
-
1
]
=
'-'
;
n
+=
GetLocaleInfoA
(
lcid
,
LOCALE_SISO3166CTRYNAME
,
rfc1766
+
n
,
len
-
n
);
LCMapStringA
(
LOCALE_USER_DEFAULT
,
LCMAP_LOWERCASE
,
rfc1766
,
n
,
rfc1766
,
len
);
return
n
;
return
S_OK
;
}
return
0
;
return
E_FAIL
;
}
static
inline
IN
T
lcid_to_rfc1766W
(
LCID
lcid
,
LPWSTR
rfc1766
,
INT
len
)
static
inline
HRESUL
T
lcid_to_rfc1766W
(
LCID
lcid
,
LPWSTR
rfc1766
,
INT
len
)
{
INT
n
=
GetLocaleInfoW
(
lcid
,
LOCALE_SISO639LANGNAME
,
rfc1766
,
len
);
INT
save
=
n
;
...
...
@@ -1159,9 +1159,9 @@ static inline INT lcid_to_rfc1766W( LCID lcid, LPWSTR rfc1766, INT len )
if
(
n
==
save
)
rfc1766
[
n
-
1
]
=
'\0'
;
LCMapStringW
(
LOCALE_USER_DEFAULT
,
LCMAP_LOWERCASE
,
rfc1766
,
n
,
rfc1766
,
len
);
return
n
;
return
S_OK
;
}
return
0
;
return
E_FAIL
;
}
HRESULT
WINAPI
LcidToRfc1766A
(
...
...
@@ -1171,10 +1171,7 @@ HRESULT WINAPI LcidToRfc1766A(
{
TRACE
(
"%04x %p %u
\n
"
,
lcid
,
pszRfc1766
,
nChar
);
if
(
lcid_to_rfc1766A
(
lcid
,
pszRfc1766
,
nChar
))
return
S_OK
;
return
S_FALSE
;
return
lcid_to_rfc1766A
(
lcid
,
pszRfc1766
,
nChar
);
}
HRESULT
WINAPI
LcidToRfc1766W
(
...
...
@@ -1184,10 +1181,7 @@ HRESULT WINAPI LcidToRfc1766W(
{
TRACE
(
"%04x %p %u
\n
"
,
lcid
,
pszRfc1766
,
nChar
);
if
(
lcid_to_rfc1766W
(
lcid
,
pszRfc1766
,
nChar
))
return
S_OK
;
return
S_FALSE
;
return
lcid_to_rfc1766W
(
lcid
,
pszRfc1766
,
nChar
);
}
static
HRESULT
lcid_from_rfc1766
(
IEnumRfc1766
*
iface
,
LCID
*
lcid
,
LPCWSTR
rfc1766
)
...
...
@@ -2239,7 +2233,7 @@ static HRESULT WINAPI fnIMultiLanguage_GetRfc1766FromLcid(
TRACE
(
"%p %04x %p
\n
"
,
iface
,
lcid
,
pbstrRfc1766
);
if
(
lcid_to_rfc1766W
(
lcid
,
buf
,
MAX_RFC1766_NAME
))
if
(
!
lcid_to_rfc1766W
(
lcid
,
buf
,
MAX_RFC1766_NAME
))
{
*
pbstrRfc1766
=
SysAllocString
(
buf
);
return
S_OK
;
...
...
@@ -2794,7 +2788,7 @@ static HRESULT WINAPI fnIMultiLanguage2_GetRfc1766FromLcid(
TRACE
(
"%p %04x %p
\n
"
,
iface
,
lcid
,
pbstrRfc1766
);
if
(
lcid_to_rfc1766W
(
lcid
,
buf
,
MAX_RFC1766_NAME
))
if
(
!
lcid_to_rfc1766W
(
lcid
,
buf
,
MAX_RFC1766_NAME
))
{
*
pbstrRfc1766
=
SysAllocString
(
buf
);
return
S_OK
;
...
...
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