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
f48ea297
Commit
f48ea297
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 _strnicmp instead of strncasecmp.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
462caf8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
12 deletions
+3
-12
locale.c
dlls/msvcrt/locale.c
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+1
-1
string.c
dlls/msvcrt/string.c
+1
-10
No files found.
dlls/msvcrt/locale.c
View file @
f48ea297
...
...
@@ -142,7 +142,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp, BOO
if
(
exact
||
len
<=
3
)
return
!
MSVCRT__stricmp
(
cmp
,
buff
);
else
return
!
strncase
cmp
(
cmp
,
buff
,
len
);
return
!
MSVCRT__strni
cmp
(
cmp
,
buff
,
len
);
}
static
BOOL
CALLBACK
...
...
dlls/msvcrt/mbcs.c
View file @
f48ea297
...
...
@@ -133,7 +133,7 @@ static inline int u_strncmp( const unsigned char *s1, const unsigned char *s2, M
static
inline
int
u_strncasecmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
MSVCRT_size_t
len
)
{
return
strncase
cmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
,
len
);
return
MSVCRT__strni
cmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
,
len
);
}
static
inline
unsigned
char
*
u_strchr
(
const
unsigned
char
*
s
,
unsigned
char
x
)
...
...
dlls/msvcrt/string.c
View file @
f48ea297
...
...
@@ -694,7 +694,7 @@ int CDECL MSVCRT__strnicoll_l( const char* str1, const char* str2, MSVCRT_size_t
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
])
return
strncase
cmp
(
str1
,
str2
,
count
);
return
MSVCRT__strni
cmp
(
str1
,
str2
,
count
);
return
CompareStringA
(
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
],
NORM_IGNORECASE
,
str1
,
MSVCRT_strnlen
(
str1
,
count
),
str2
,
MSVCRT_strnlen
(
str2
,
count
))
-
CSTR_EQUAL
;
...
...
@@ -1960,7 +1960,6 @@ int __cdecl MSVCRT_strncmp(const char *str1, const char *str2, MSVCRT_size_t len
int
__cdecl
MSVCRT__strnicmp_l
(
const
char
*
s1
,
const
char
*
s2
,
MSVCRT_size_t
count
,
MSVCRT__locale_t
locale
)
{
MSVCRT_pthreadlocinfo
locinfo
;
int
c1
,
c2
;
if
(
s1
==
NULL
||
s2
==
NULL
)
...
...
@@ -1969,14 +1968,6 @@ int __cdecl MSVCRT__strnicmp_l(const char *s1, const char *s2,
if
(
!
count
)
return
0
;
if
(
!
locale
)
locinfo
=
get_locinfo
();
else
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
])
return
strncasecmp
(
s1
,
s2
,
count
);
do
{
c1
=
MSVCRT__tolower_l
(
*
s1
++
,
locale
);
c2
=
MSVCRT__tolower_l
(
*
s2
++
,
locale
);
...
...
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