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
d1fa8b64
Commit
d1fa8b64
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: Use per thread locale in many functions.
parent
87dee43b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
43 deletions
+48
-43
ctype.c
dlls/msvcrt/ctype.c
+7
-5
file.c
dlls/msvcrt/file.c
+1
-1
locale.c
dlls/msvcrt/locale.c
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+39
-36
No files found.
dlls/msvcrt/ctype.c
View file @
d1fa8b64
...
...
@@ -62,7 +62,7 @@ WORD* MSVCRT__pctype;
*/
WORD
**
CDECL
MSVCRT___pctype_func
(
void
)
{
return
&
MSVCRT__
pctype
;
return
&
get_locale
()
->
locinfo
->
pctype
;
}
/*********************************************************************
...
...
@@ -70,21 +70,23 @@ WORD** CDECL MSVCRT___pctype_func(void)
*/
int
CDECL
_isctype
(
int
c
,
int
type
)
{
MSVCRT__locale_t
locale
=
get_locale
();
if
(
c
>=
-
1
&&
c
<=
255
)
return
MSVCRT__
pctype
[
c
]
&
type
;
return
locale
->
locinfo
->
pctype
[
c
]
&
type
;
if
(
MSVCRT___
mb_cur_max
!=
1
&&
c
>
0
)
if
(
locale
->
locinfo
->
mb_cur_max
!=
1
&&
c
>
0
)
{
/* FIXME: Is there a faster way to do this? */
WORD
typeInfo
;
char
convert
[
3
],
*
pconv
=
convert
;
if
(
MSVCRT__
pctype
[(
UINT
)
c
>>
8
]
&
MSVCRT__LEADBYTE
)
if
(
locale
->
locinfo
->
pctype
[(
UINT
)
c
>>
8
]
&
MSVCRT__LEADBYTE
)
*
pconv
++
=
(
UINT
)
c
>>
8
;
*
pconv
++
=
c
&
0xff
;
*
pconv
=
0
;
/* FIXME: Use ctype LCID, not lc_all */
if
(
GetStringTypeExA
(
MSVCRT_locale
->
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
],
if
(
GetStringTypeExA
(
get_locale
()
->
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
],
CT_CTYPE1
,
convert
,
convert
[
1
]
?
2
:
1
,
&
typeInfo
))
return
typeInfo
&
type
;
}
...
...
dlls/msvcrt/file.c
View file @
d1fa8b64
...
...
@@ -2467,7 +2467,7 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file)
}
c
=
MSVCRT_fgetc
(
file
);
if
((
MSVCRT___
mb_cur_max
>
1
)
&&
MSVCRT_isleadbyte
(
c
))
if
((
get_locale
()
->
locinfo
->
mb_cur_max
>
1
)
&&
MSVCRT_isleadbyte
(
c
))
{
FIXME
(
"Treat Multibyte characters
\n
"
);
}
...
...
dlls/msvcrt/locale.c
View file @
d1fa8b64
...
...
@@ -526,7 +526,7 @@ int CDECL ___lc_codepage_func(void)
*/
int
CDECL
___lc_collate_cp_func
(
void
)
{
return
MSVCRT___
lc_collate_cp
;
return
get_locale
()
->
locinfo
->
lc_collate_cp
;
}
/* _free_locale - not exported in native msvcrt */
...
...
dlls/msvcrt/mbcs.c
View file @
d1fa8b64
This diff is collapsed.
Click to expand it.
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