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
59c2201a
Commit
59c2201a
authored
Apr 15, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add helper function that returns current locale.
parent
d58b385b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
locale.c
dlls/msvcrt/locale.c
+10
-0
main.c
dlls/msvcrt/main.c
+1
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+2
-0
No files found.
dlls/msvcrt/locale.c
View file @
59c2201a
...
...
@@ -317,6 +317,16 @@ static inline void swap_pointers(void **p1, void **p2) {
*
p2
=
hlp
;
}
/* INTERNAL: returns _locale_t struct for current locale */
MSVCRT__locale_t
get_locale
(
void
)
{
thread_data_t
*
data
=
msvcrt_get_thread_data
();
if
(
!
data
||
!
data
->
locale
)
return
MSVCRT_locale
;
return
data
->
locale
;
}
/*********************************************************************
* wsetlocale (MSVCRT.@)
...
...
dlls/msvcrt/main.c
View file @
59c2201a
...
...
@@ -69,6 +69,7 @@ static inline void msvcrt_free_tls_mem(void)
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
asctime_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
wasctime_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
strerror_buffer
);
_free_locale
(
tls
->
locale
);
}
HeapFree
(
GetProcessHeap
(),
0
,
tls
);
}
...
...
dlls/msvcrt/msvcrt.h
View file @
59c2201a
...
...
@@ -115,6 +115,7 @@ struct __thread_data {
MSVCRT_unexpected_function
unexpected_handler
;
MSVCRT__se_translator_function
se_translator
;
EXCEPTION_RECORD
*
exc_record
;
struct
MSVCRT_localeinfo_struct
*
locale
;
};
typedef
struct
__thread_data
thread_data_t
;
...
...
@@ -791,6 +792,7 @@ typedef struct MSVCRT_localeinfo_struct
}
MSVCRT__locale_tstruct
,
*
MSVCRT__locale_t
;
extern
MSVCRT__locale_t
MSVCRT_locale
;
MSVCRT__locale_t
get_locale
(
void
);
void
__cdecl
_free_locale
(
MSVCRT__locale_t
);
#ifndef __WINE_MSVCRT_TEST
...
...
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