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
c9571587
Commit
c9571587
authored
Mar 29, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Reimplement values computed from currency formats in GetLocaleInfoW/Ex.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08a9dc50
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
locale.c
dlls/kernelbase/locale.c
+27
-6
No files found.
dlls/kernelbase/locale.c
View file @
c9571587
...
...
@@ -1042,6 +1042,9 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
WCHAR
*
buffer
,
int
len
)
{
static
const
WCHAR
spermille
[]
=
{
0x2030
,
0
};
/* this one seems hardcoded */
static
const
BYTE
ipossignposn
[]
=
{
3
,
3
,
4
,
2
,
1
,
1
,
3
,
4
,
1
,
3
,
4
,
2
,
4
,
3
,
3
,
1
};
static
const
BYTE
inegsignposn
[]
=
{
0
,
3
,
4
,
2
,
0
,
1
,
3
,
4
,
1
,
3
,
4
,
2
,
4
,
3
,
0
,
0
};
static
const
BYTE
inegsymprecedes
[]
=
{
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
1
,
1
,
0
,
1
,
0
,
};
const
WCHAR
*
sort
;
UINT
val
;
...
...
@@ -1234,22 +1237,40 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
locale_return_string
(
locale
->
snegativesign
,
type
,
buffer
,
len
);
case
LOCALE_IPOSSIGNPOSN
:
return
-
1
;
if
(
!
get_locale_info
(
locale
,
lcid
,
LOCALE_INEGCURR
|
LOCALE_RETURN_NUMBER
|
(
type
&
LOCALE_NOUSEROVERRIDE
),
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
)
))
break
;
return
locale_return_number
(
ipossignposn
[
val
],
type
,
buffer
,
len
);
case
LOCALE_INEGSIGNPOSN
:
return
-
1
;
if
(
!
get_locale_info
(
locale
,
lcid
,
LOCALE_INEGCURR
|
LOCALE_RETURN_NUMBER
|
(
type
&
LOCALE_NOUSEROVERRIDE
),
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
)
))
break
;
return
locale_return_number
(
inegsignposn
[
val
],
type
,
buffer
,
len
);
case
LOCALE_IPOSSYMPRECEDES
:
return
-
1
;
if
(
!
get_locale_info
(
locale
,
lcid
,
LOCALE_ICURRENCY
|
LOCALE_RETURN_NUMBER
|
(
type
&
LOCALE_NOUSEROVERRIDE
),
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
)
))
break
;
return
locale_return_number
(
!
(
val
&
1
),
type
,
buffer
,
len
);
case
LOCALE_IPOSSEPBYSPACE
:
return
-
1
;
if
(
!
get_locale_info
(
locale
,
lcid
,
LOCALE_ICURRENCY
|
LOCALE_RETURN_NUMBER
|
(
type
&
LOCALE_NOUSEROVERRIDE
),
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
)
))
break
;
return
locale_return_number
(
!!
(
val
&
2
),
type
,
buffer
,
len
);
case
LOCALE_INEGSYMPRECEDES
:
return
-
1
;
if
(
!
get_locale_info
(
locale
,
lcid
,
LOCALE_INEGCURR
|
LOCALE_RETURN_NUMBER
|
(
type
&
LOCALE_NOUSEROVERRIDE
),
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
)
))
break
;
return
locale_return_number
(
inegsymprecedes
[
val
],
type
,
buffer
,
len
);
case
LOCALE_INEGSEPBYSPACE
:
return
-
1
;
if
(
!
get_locale_info
(
locale
,
lcid
,
LOCALE_INEGCURR
|
LOCALE_RETURN_NUMBER
|
(
type
&
LOCALE_NOUSEROVERRIDE
),
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
)
))
break
;
return
locale_return_number
(
(
val
>=
8
),
type
,
buffer
,
len
);
case
LOCALE_FONTSIGNATURE
:
return
locale_return_data
(
locale_strings
+
locale
->
fontsignature
+
1
,
...
...
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