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
33d697c0
Commit
33d697c0
authored
Aug 29, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add _wsetlocale implementation.
parent
4ce3dded
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
14 deletions
+35
-14
locale.c
dlls/msvcrt/locale.c
+34
-14
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
No files found.
dlls/msvcrt/locale.c
View file @
33d697c0
...
...
@@ -407,20 +407,6 @@ static inline char* construct_lc_all(MSVCRT_pthreadlocinfo locinfo) {
/*********************************************************************
* wsetlocale (MSVCRT.@)
*/
MSVCRT_wchar_t
*
CDECL
MSVCRT__wsetlocale
(
int
category
,
const
MSVCRT_wchar_t
*
locale
)
{
static
MSVCRT_wchar_t
fake
[]
=
{
'E'
,
'n'
,
'g'
,
'l'
,
'i'
,
's'
,
'h'
,
'_'
,
'U'
,
'n'
,
'i'
,
't'
,
'e'
,
'd'
,
' '
,
'S'
,
't'
,
'a'
,
't'
,
'e'
,
's'
,
'.'
,
'1'
,
'2'
,
'5'
,
'2'
,
0
};
FIXME
(
"%d %s
\n
"
,
category
,
debugstr_w
(
locale
));
return
fake
;
}
/*********************************************************************
* _Getdays (MSVCRT.@)
*/
char
*
CDECL
_Getdays
(
void
)
...
...
@@ -1435,6 +1421,40 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
return
locinfo
->
lc_category
[
category
].
locale
;
}
/*********************************************************************
* _wsetlocale (MSVCRT.@)
*/
MSVCRT_wchar_t
*
CDECL
MSVCRT__wsetlocale
(
int
category
,
const
MSVCRT_wchar_t
*
wlocale
)
{
static
MSVCRT_wchar_t
current_lc_all
[
MAX_LOCALE_LENGTH
];
char
*
locale
=
NULL
;
const
char
*
ret
;
MSVCRT_size_t
len
;
if
(
wlocale
)
{
len
=
MSVCRT_wcstombs
(
NULL
,
wlocale
,
0
);
if
(
len
==
-
1
)
return
NULL
;
locale
=
MSVCRT_malloc
(
++
len
);
if
(
!
locale
)
return
NULL
;
MSVCRT_wcstombs
(
locale
,
wlocale
,
len
);
}
LOCK_LOCALE
;
ret
=
MSVCRT_setlocale
(
category
,
locale
);
MSVCRT_free
(
locale
);
if
(
ret
&&
MSVCRT_mbstowcs
(
current_lc_all
,
ret
,
MAX_LOCALE_LENGTH
)
==-
1
)
ret
=
NULL
;
UNLOCK_LOCALE
;
return
ret
?
current_lc_all
:
NULL
;
}
/* _configthreadlocale - not exported in native msvcrt */
int
CDECL
_configthreadlocale
(
int
type
)
{
...
...
dlls/msvcrt/msvcrt.h
View file @
33d697c0
...
...
@@ -953,6 +953,7 @@ int __cdecl _ismbclegal(unsigned int c);
int
__cdecl
_ismbstrail
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
);
int
__cdecl
MSVCRT_mbtowc
(
MSVCRT_wchar_t
*
,
const
char
*
,
MSVCRT_size_t
);
MSVCRT_size_t
__cdecl
MSVCRT_mbstowcs
(
MSVCRT_wchar_t
*
,
const
char
*
,
MSVCRT_size_t
);
MSVCRT_size_t
__cdecl
MSVCRT_wcstombs
(
char
*
,
const
MSVCRT_wchar_t
*
,
MSVCRT_size_t
);
MSVCRT_intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_intptr_t
__cdecl
MSVRT__spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_intptr_t
__cdecl
MSVCRT__wspawnve
(
int
,
const
MSVCRT_wchar_t
*
,
const
MSVCRT_wchar_t
*
const
*
,
const
MSVCRT_wchar_t
*
const
*
);
...
...
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