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
e374c8fe
Commit
e374c8fe
authored
Nov 06, 2011
by
Thomas Faber
Committed by
Alexandre Julliard
Nov 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix MSVC build in locale.c.
parent
54028273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
locale.c
dlls/msvcrt/locale.c
+20
-20
No files found.
dlls/msvcrt/locale.c
View file @
e374c8fe
...
...
@@ -330,7 +330,7 @@ static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int c
len
+=
GetLocaleInfoA
(
lcid
,
LOCALE_IDEFAULTANSICODEPAGE
|
LOCALE_NOUSEROVERRIDE
,
&
buf
[
len
],
256
-
len
);
loc
->
locinfo
->
lc_category
[
category
].
locale
=
MSVCRT_malloc
(
sizeof
(
char
[
len
])
);
loc
->
locinfo
->
lc_category
[
category
].
locale
=
MSVCRT_malloc
(
len
);
loc
->
locinfo
->
lc_category
[
category
].
refcount
=
MSVCRT_malloc
(
sizeof
(
int
));
if
(
!
loc
->
locinfo
->
lc_category
[
category
].
locale
||
!
loc
->
locinfo
->
lc_category
[
category
].
refcount
)
{
...
...
@@ -340,7 +340,7 @@ static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int c
loc
->
locinfo
->
lc_category
[
category
].
refcount
=
NULL
;
return
TRUE
;
}
memcpy
(
loc
->
locinfo
->
lc_category
[
category
].
locale
,
buf
,
sizeof
(
char
[
len
])
);
memcpy
(
loc
->
locinfo
->
lc_category
[
category
].
locale
,
buf
,
len
);
*
loc
->
locinfo
->
lc_category
[
category
].
refcount
=
1
;
return
FALSE
;
...
...
@@ -862,8 +862,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_SINTLSYMBOL
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
int_curr_symbol
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
int_curr_symbol
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
int_curr_symbol
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
int_curr_symbol
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -871,8 +871,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_SCURRENCY
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
currency_symbol
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
currency_symbol
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
currency_symbol
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
currency_symbol
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -880,8 +880,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_SMONDECIMALSEP
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
mon_decimal_point
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
mon_decimal_point
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
mon_decimal_point
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
mon_decimal_point
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -889,8 +889,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_SMONTHOUSANDSEP
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
mon_thousands_sep
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
mon_thousands_sep
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
mon_thousands_sep
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
mon_thousands_sep
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -900,7 +900,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
>
1
)
i
=
i
/
2
+
(
buf
[
i
-
2
]
==
'0'
?
0
:
1
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
mon_grouping
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
{
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
mon_grouping
=
MSVCRT_malloc
(
i
)))
{
for
(
i
=
0
;
buf
[
i
+
1
]
==
';'
;
i
+=
2
)
loc
->
locinfo
->
lconv
->
mon_grouping
[
i
/
2
]
=
buf
[
i
]
-
'0'
;
loc
->
locinfo
->
lconv
->
mon_grouping
[
i
/
2
]
=
buf
[
i
]
-
'0'
;
...
...
@@ -913,8 +913,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_SPOSITIVESIGN
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
positive_sign
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
positive_sign
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
positive_sign
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
positive_sign
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -922,8 +922,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_SNEGATIVESIGN
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
negative_sign
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
negative_sign
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
negative_sign
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
negative_sign
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -1047,8 +1047,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_NUMERIC
],
LOCALE_SDECIMAL
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
decimal_point
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
decimal_point
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
decimal_point
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
decimal_point
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -1056,8 +1056,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
i
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_NUMERIC
],
LOCALE_STHOUSAND
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
thousands_sep
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
memcpy
(
loc
->
locinfo
->
lconv
->
thousands_sep
,
buf
,
sizeof
(
char
[
i
])
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
thousands_sep
=
MSVCRT_malloc
(
i
)))
memcpy
(
loc
->
locinfo
->
lconv
->
thousands_sep
,
buf
,
i
);
else
{
MSVCRT__free_locale
(
loc
);
return
NULL
;
...
...
@@ -1067,7 +1067,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
i
>
1
)
i
=
i
/
2
+
(
buf
[
i
-
2
]
==
'0'
?
0
:
1
);
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
grouping
=
MSVCRT_malloc
(
sizeof
(
char
[
i
])
)))
{
if
(
i
&&
(
loc
->
locinfo
->
lconv
->
grouping
=
MSVCRT_malloc
(
i
)))
{
for
(
i
=
0
;
buf
[
i
+
1
]
==
';'
;
i
+=
2
)
loc
->
locinfo
->
lconv
->
grouping
[
i
/
2
]
=
buf
[
i
]
-
'0'
;
loc
->
locinfo
->
lconv
->
grouping
[
i
/
2
]
=
buf
[
i
]
-
'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