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
698afdca
Commit
698afdca
authored
Oct 26, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't search for LCID in _setmbcp_l if it was already done.
parent
df5d3e34
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
locale.c
dlls/msvcrt/locale.c
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+7
-2
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-1
No files found.
dlls/msvcrt/locale.c
View file @
698afdca
...
...
@@ -842,7 +842,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
}
}
_setmbcp_l
(
loc
->
locinfo
->
lc_id
[
MSVCRT_LC_CTYPE
].
wCodePage
,
loc
->
mbcinfo
);
_setmbcp_l
(
loc
->
locinfo
->
lc_id
[
MSVCRT_LC_CTYPE
].
wCodePage
,
l
cid
[
MSVCRT_LC_CTYPE
],
l
oc
->
mbcinfo
);
if
(
lcid
[
MSVCRT_LC_MONETARY
]
&&
(
category
==
MSVCRT_LC_ALL
||
category
==
MSVCRT_LC_MONETARY
))
{
if
(
update_threadlocinfo_category
(
lcid
[
MSVCRT_LC_MONETARY
],
loc
,
MSVCRT_LC_MONETARY
))
{
...
...
dlls/msvcrt/mbcs.c
View file @
698afdca
...
...
@@ -184,7 +184,7 @@ int* CDECL ___mb_cur_max_l_func(MSVCRT__locale_t locale)
/*********************************************************************
* INTERNAL: _setmbcp_l
*/
int
_setmbcp_l
(
int
cp
,
MSVCRT_pthreadmbcinfo
mbcinfo
)
int
_setmbcp_l
(
int
cp
,
LCID
lcid
,
MSVCRT_pthreadmbcinfo
mbcinfo
)
{
const
char
format
[]
=
".%d"
;
...
...
@@ -222,8 +222,13 @@ int _setmbcp_l(int cp, MSVCRT_pthreadmbcinfo mbcinfo)
break
;
}
if
(
lcid
==
-
1
)
{
sprintf
(
bufA
,
format
,
newcp
);
mbcinfo
->
mblcid
=
MSVCRT_locale_to_LCID
(
bufA
);
}
else
{
mbcinfo
->
mblcid
=
lcid
;
}
if
(
mbcinfo
->
mblcid
==
-
1
)
{
WARN
(
"Can't assign LCID to codepage (%d)
\n
"
,
mbcinfo
->
mblcid
);
...
...
@@ -347,7 +352,7 @@ int _setmbcp_l(int cp, MSVCRT_pthreadmbcinfo mbcinfo)
*/
int
CDECL
_setmbcp
(
int
cp
)
{
return
_setmbcp_l
(
cp
,
NULL
);
return
_setmbcp_l
(
cp
,
-
1
,
NULL
);
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.h
View file @
698afdca
...
...
@@ -888,7 +888,7 @@ MSVCRT_pthreadmbcinfo get_mbcinfo(void);
void
__cdecl
MSVCRT__free_locale
(
MSVCRT__locale_t
);
void
free_locinfo
(
MSVCRT_pthreadlocinfo
);
void
free_mbcinfo
(
MSVCRT_pthreadmbcinfo
);
int
_setmbcp_l
(
int
,
MSVCRT_pthreadmbcinfo
);
int
_setmbcp_l
(
int
,
LCID
,
MSVCRT_pthreadmbcinfo
);
#ifndef __WINE_MSVCRT_TEST
int
__cdecl
MSVCRT__write
(
int
,
const
void
*
,
unsigned
int
);
...
...
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