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
462caf8f
Commit
462caf8f
authored
Mar 26, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use _stricmp instead of strcasecmp.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3f675c1a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
locale.c
dlls/msvcrt/locale.c
+5
-5
mbcs.c
dlls/msvcrt/mbcs.c
+1
-1
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
string.c
dlls/msvcrt/string.c
+1
-1
No files found.
dlls/msvcrt/locale.c
View file @
462caf8f
...
...
@@ -97,7 +97,7 @@ static void remap_synonym(char *name)
unsigned
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
_country_synonyms
);
i
+=
2
)
{
if
(
!
strcase
cmp
(
_country_synonyms
[
i
],
name
))
if
(
!
MSVCRT__stri
cmp
(
_country_synonyms
[
i
],
name
))
{
TRACE
(
":Mapping synonym %s to %s
\n
"
,
name
,
_country_synonyms
[
i
+
1
]);
strcpy
(
name
,
_country_synonyms
[
i
+
1
]);
...
...
@@ -140,7 +140,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp, BOO
/* Partial matches are only allowed on language/country names */
len
=
strlen
(
cmp
);
if
(
exact
||
len
<=
3
)
return
!
strcase
cmp
(
cmp
,
buff
);
return
!
MSVCRT__stri
cmp
(
cmp
,
buff
);
else
return
!
strncasecmp
(
cmp
,
buff
,
len
);
}
...
...
@@ -264,7 +264,7 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
if
(
!
search
.
search_country
[
0
]
&&
!
search
.
search_codepage
[
0
])
remap_synonym
(
search
.
search_language
);
if
(
!
strcase
cmp
(
search
.
search_country
,
"China"
))
if
(
!
MSVCRT__stri
cmp
(
search
.
search_country
,
"China"
))
strcpy
(
search
.
search_country
,
"People's Republic of China"
);
EnumResourceLanguagesA
(
GetModuleHandleA
(
"KERNEL32"
),
(
LPSTR
)
RT_STRING
,
...
...
@@ -291,10 +291,10 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
memcpy
(
search
.
found_codepage
,
search
.
search_codepage
,
MAX_ELEM_LEN
);
else
{
/* Special codepage values: OEM & ANSI */
if
(
!
strcase
cmp
(
search
.
search_codepage
,
"OCP"
))
{
if
(
!
MSVCRT__stri
cmp
(
search
.
search_codepage
,
"OCP"
))
{
GetLocaleInfoA
(
lcid
,
LOCALE_IDEFAULTCODEPAGE
,
search
.
found_codepage
,
MAX_ELEM_LEN
);
}
else
if
(
!
strcase
cmp
(
search
.
search_codepage
,
"ACP"
))
{
}
else
if
(
!
MSVCRT__stri
cmp
(
search
.
search_codepage
,
"ACP"
))
{
GetLocaleInfoA
(
lcid
,
LOCALE_IDEFAULTANSICODEPAGE
,
search
.
found_codepage
,
MAX_ELEM_LEN
);
}
else
...
...
dlls/msvcrt/mbcs.c
View file @
462caf8f
...
...
@@ -123,7 +123,7 @@ static inline int u_strcmp( const unsigned char *s1, const unsigned char *s2 )
static
inline
int
u_strcasecmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
)
{
return
strcase
cmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
);
return
MSVCRT__stri
cmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
);
}
static
inline
int
u_strncmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
MSVCRT_size_t
len
)
...
...
dlls/msvcrt/msvcrt.h
View file @
462caf8f
...
...
@@ -1148,6 +1148,7 @@ int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t);
int
__cdecl
MSVCRT__tolower_l
(
int
,
MSVCRT__locale_t
);
int
__cdecl
MSVCRT__towupper_l
(
MSVCRT_wint_t
,
MSVCRT__locale_t
);
int
__cdecl
MSVCRT__towlower_l
(
MSVCRT_wint_t
,
MSVCRT__locale_t
);
int
__cdecl
MSVCRT__stricmp
(
const
char
*
,
const
char
*
);
int
__cdecl
MSVCRT__strnicmp
(
const
char
*
,
const
char
*
,
MSVCRT_size_t
);
int
__cdecl
MSVCRT__strnicoll_l
(
const
char
*
,
const
char
*
,
MSVCRT_size_t
,
MSVCRT__locale_t
);
int
__cdecl
MSVCRT__strncoll_l
(
const
char
*
,
const
char
*
,
MSVCRT_size_t
,
MSVCRT__locale_t
);
...
...
dlls/msvcrt/string.c
View file @
462caf8f
...
...
@@ -641,7 +641,7 @@ int CDECL MSVCRT__stricoll_l( const char* str1, const char* str2, MSVCRT__locale
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
])
return
strcase
cmp
(
str1
,
str2
);
return
MSVCRT__stri
cmp
(
str1
,
str2
);
return
CompareStringA
(
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
],
NORM_IGNORECASE
,
str1
,
-
1
,
str2
,
-
1
)
-
CSTR_EQUAL
;
}
...
...
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