Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0b35b779
Commit
0b35b779
authored
Jul 16, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't use tolowerW in _tolower_l.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7d2fafc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
ctype.c
dlls/msvcrt/ctype.c
+6
-14
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
No files found.
dlls/msvcrt/ctype.c
View file @
0b35b779
...
...
@@ -425,8 +425,7 @@ int CDECL MSVCRT__toupper(int c)
int
CDECL
MSVCRT__tolower_l
(
int
c
,
MSVCRT__locale_t
locale
)
{
MSVCRT_pthreadlocinfo
locinfo
;
unsigned
char
str
[
2
],
*
p
=
str
;
WCHAR
wide
,
lower
;
unsigned
char
str
[
2
],
*
p
=
str
,
ret
[
2
];
if
(
!
locale
)
locinfo
=
get_locinfo
();
...
...
@@ -444,22 +443,15 @@ int CDECL MSVCRT__tolower_l(int c, MSVCRT__locale_t locale)
}
*
p
++
=
c
&
255
;
if
(
!
MultiByteToWideChar
(
locinfo
->
lc_codepage
,
MB_ERR_INVALID_CHARS
,
(
char
*
)
str
,
p
-
str
,
&
wide
,
1
))
return
c
;
lower
=
tolowerW
(
wide
);
if
(
lower
==
wide
)
return
str
[
0
]
+
(
str
[
1
]
<<
8
);
switch
(
WideCharToMultiByte
(
locinfo
->
lc_codepage
,
0
,
&
lower
,
1
,
(
char
*
)
str
,
2
,
NULL
,
NULL
))
{
switch
(
__crtLCMapStringA
(
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
],
LCMAP_LOWERCASE
,
(
char
*
)
str
,
p
-
str
,
(
char
*
)
ret
,
2
,
locinfo
->
lc_codepage
,
0
))
{
case
0
:
return
c
;
case
1
:
return
str
[
0
];
return
ret
[
0
];
default:
return
str
[
0
]
+
(
str
[
1
]
<<
8
);
return
ret
[
0
]
+
(
ret
[
1
]
<<
8
);
}
}
...
...
dlls/msvcrt/msvcrt.h
View file @
0b35b779
...
...
@@ -1130,6 +1130,7 @@ void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
void
free_locinfo
(
MSVCRT_pthreadlocinfo
)
DECLSPEC_HIDDEN
;
void
free_mbcinfo
(
MSVCRT_pthreadmbcinfo
)
DECLSPEC_HIDDEN
;
int
_setmbcp_l
(
int
,
LCID
,
MSVCRT_pthreadmbcinfo
)
DECLSPEC_HIDDEN
;
int
__cdecl
__crtLCMapStringA
(
LCID
,
DWORD
,
const
char
*
,
int
,
char
*
,
int
,
unsigned
int
,
int
)
DECLSPEC_HIDDEN
;
#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