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
f84858ac
Commit
f84858ac
authored
Dec 06, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _get_current_locale implementation.
parent
8d6354c5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
5 deletions
+26
-5
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
locale.c
dlls/msvcrt/locale.c
+22
-2
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
f84858ac
...
...
@@ -675,7 +675,7 @@
@ varargs _fwscanf_s_l(ptr wstr ptr) msvcrt._fwscanf_s_l
@ cdecl _gcvt(double long str) msvcrt._gcvt
@ cdecl _gcvt_s(ptr long double long) msvcrt._gcvt_s
@
stub
_get_current_locale
@
cdecl _get_current_locale() msvcrt.
_get_current_locale
@ stub _get_daylight
@ cdecl _get_doserrno(ptr) msvcrt._get_doserrno
@ stub _get_dstbias
...
...
dlls/msvcr80/msvcr80.spec
View file @
f84858ac
...
...
@@ -517,7 +517,7 @@
@ cdecl _gcvt(double long str) msvcrt._gcvt
@ cdecl _gcvt_s(ptr long double long) msvcrt._gcvt_s
@ stub _get_amblksiz
@
stub
_get_current_locale
@
cdecl _get_current_locale() msvcrt.
_get_current_locale
@ stub _get_daylight
@ cdecl _get_doserrno(ptr) msvcrt._get_doserrno
@ stub _get_dstbias
...
...
dlls/msvcr90/msvcr90.spec
View file @
f84858ac
...
...
@@ -512,7 +512,7 @@
@ cdecl _gcvt(double long str) msvcrt._gcvt
@ cdecl _gcvt_s(ptr long double long) msvcrt._gcvt_s
@ stub _get_amblksiz
@
stub
_get_current_locale
@
cdecl _get_current_locale() msvcrt.
_get_current_locale
@ stub _get_daylight
@ cdecl _get_doserrno(ptr) msvcrt._get_doserrno
@ stub _get_dstbias
...
...
dlls/msvcrt/locale.c
View file @
f84858ac
...
...
@@ -603,6 +603,9 @@ void free_locinfo(MSVCRT_pthreadlocinfo locinfo)
if
(
!
locinfo
)
return
;
if
(
InterlockedDecrement
(
&
locinfo
->
refcount
))
return
;
for
(
i
=
MSVCRT_LC_MIN
+
1
;
i
<=
MSVCRT_LC_MAX
;
i
++
)
{
MSVCRT_free
(
locinfo
->
lc_category
[
i
].
locale
);
MSVCRT_free
(
locinfo
->
lc_category
[
i
].
refcount
);
...
...
@@ -640,9 +643,26 @@ void free_mbcinfo(MSVCRT_pthreadmbcinfo mbcinfo)
if
(
!
mbcinfo
)
return
;
if
(
InterlockedDecrement
(
&
mbcinfo
->
refcount
))
return
;
MSVCRT_free
(
mbcinfo
);
}
/* _get_current_locale - not exported in native msvcrt */
MSVCRT__locale_t
CDECL
MSVCRT__get_current_locale
(
void
)
{
MSVCRT__locale_t
loc
=
MSVCRT_malloc
(
sizeof
(
MSVCRT__locale_tstruct
));
if
(
!
loc
)
return
NULL
;
loc
->
locinfo
=
get_locinfo
();
loc
->
mbcinfo
=
get_mbcinfo
();
InterlockedIncrement
(
&
loc
->
locinfo
->
refcount
);
InterlockedIncrement
(
&
loc
->
mbcinfo
->
refcount
);
return
loc
;
}
/* _free_locale - not exported in native msvcrt */
void
CDECL
MSVCRT__free_locale
(
MSVCRT__locale_t
locale
)
{
...
...
@@ -747,6 +767,8 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
}
memset
(
loc
->
locinfo
,
0
,
sizeof
(
MSVCRT_threadlocinfo
));
loc
->
locinfo
->
refcount
=
1
;
loc
->
mbcinfo
->
refcount
=
1
;
loc
->
locinfo
->
lconv
=
MSVCRT_malloc
(
sizeof
(
struct
MSVCRT_lconv
));
if
(
!
loc
->
locinfo
->
lconv
)
{
...
...
@@ -762,8 +784,6 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
return
NULL
;
}
loc
->
locinfo
->
refcount
=
1
;
if
(
lcid
[
MSVCRT_LC_COLLATE
]
&&
(
category
==
MSVCRT_LC_ALL
||
category
==
MSVCRT_LC_COLLATE
))
{
if
(
update_threadlocinfo_category
(
lcid
[
MSVCRT_LC_COLLATE
],
loc
,
MSVCRT_LC_COLLATE
))
{
MSVCRT__free_locale
(
loc
);
...
...
dlls/msvcrt/msvcrt.spec
View file @
f84858ac
...
...
@@ -1490,6 +1490,7 @@
@ cdecl -arch=i386 __control87_2(long long ptr ptr)
@ cdecl _configthreadlocale(long)
@ cdecl _create_locale(long str) MSVCRT__create_locale
@ cdecl _get_current_locale() MSVCRT__get_current_locale
@ cdecl _dupenv_s(ptr ptr str)
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ cdecl _get_invalid_parameter_handler()
...
...
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