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
dbec2506
Commit
dbec2506
authored
Dec 24, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _stricmp_l implementation.
parent
7726e018
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
7 deletions
+77
-7
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
msvcrt.h
dlls/msvcrt/msvcrt.h
+2
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+3
-3
string.c
dlls/msvcrt/string.c
+38
-1
string.c
dlls/msvcrt/tests/string.c
+31
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
dbec2506
...
...
@@ -1331,7 +1331,7 @@
@ stub _strerror_s
@ stub _strftime_l
@ cdecl _stricmp(str str) msvcrt._stricmp
@
stub
_stricmp_l
@
cdecl _stricmp_l(str str ptr) msvcrt.
_stricmp_l
@ cdecl _stricoll(str str) msvcrt._stricoll
@ cdecl _stricoll_l(str str ptr) msvcrt._stricoll_l
@ cdecl _strlwr(str) msvcrt._strlwr
...
...
dlls/msvcr80/msvcr80.spec
View file @
dbec2506
...
...
@@ -993,7 +993,7 @@
@ stub _strerror_s
@ stub _strftime_l
@ cdecl _stricmp(str str) msvcrt._stricmp
@
stub
_stricmp_l
@
cdecl _stricmp_l(str str ptr) msvcrt.
_stricmp_l
@ cdecl _stricoll(str str) msvcrt._stricoll
@ cdecl _stricoll_l(str str ptr) msvcrt._stricoll_l
@ cdecl _strlwr(str) msvcrt._strlwr
...
...
dlls/msvcr90/msvcr90.spec
View file @
dbec2506
...
...
@@ -986,7 +986,7 @@
@ stub _strerror_s
@ stub _strftime_l
@ cdecl _stricmp(str str) msvcrt._stricmp
@
stub
_stricmp_l
@
cdecl _stricmp_l(str str ptr) msvcrt.
_stricmp_l
@ cdecl _stricoll(str str) msvcrt._stricoll
@ cdecl _stricoll_l(str str ptr) msvcrt._stricoll_l
@ cdecl _strlwr(str) msvcrt._strlwr
...
...
dlls/msvcrt/msvcrt.h
View file @
dbec2506
...
...
@@ -863,6 +863,8 @@ typedef void (__cdecl *MSVCRT___sighandler_t)(int);
/* _get_output_format return code */
#define MSVCRT__TWO_DIGIT_EXPONENT 0x1
#define MSVCRT__NLSCMPERROR ((unsigned int)0x7fffffff)
void
__cdecl
MSVCRT_free
(
void
*
);
void
*
__cdecl
MSVCRT_malloc
(
MSVCRT_size_t
);
void
*
__cdecl
MSVCRT_calloc
(
MSVCRT_size_t
,
MSVCRT_size_t
);
...
...
dlls/msvcrt/msvcrt.spec
View file @
dbec2506
...
...
@@ -918,7 +918,7 @@
@ cdecl _stat64(str ptr) MSVCRT_stat64
@ cdecl _stati64(str ptr) MSVCRT_stati64
@ cdecl _statusfp()
@ cdecl _strcmpi(str str)
ntdll._strcmpi
@ cdecl _strcmpi(str str)
MSVCRT__stricmp
@ cdecl _strcoll_l(str str ptr) MSVCRT_strcoll_l
@ cdecl _strdate(ptr) MSVCRT__strdate
@ cdecl _strdate_s(ptr long)
...
...
@@ -926,8 +926,8 @@
# stub _strdup_dbg(str long str long)
@ cdecl _strerror(long) MSVCRT__strerror
# stub _strerror_s(ptr long long)
@ cdecl _stricmp(str str)
ntdll.
_stricmp
# stub _stricmp_l(str str ptr)
@ cdecl _stricmp(str str)
MSVCRT_
_stricmp
@ cdecl _stricmp_l(str str ptr) MSVCRT__stricmp_l
@ cdecl _stricoll(str str) MSVCRT__stricoll
@ cdecl _stricoll_l(str str ptr) MSVCRT__stricoll_l
@ cdecl _strlwr(str) MSVCRT__strlwr
...
...
dlls/msvcrt/string.c
View file @
dbec2506
...
...
@@ -1551,9 +1551,46 @@ int CDECL MSVCRT_I10_OUTPUT(MSVCRT__LDOUBLE ld80, int prec, int flag, struct _I1
#undef I10_OUTPUT_MAX_PREC
/*********************************************************************
* memcpy (
NTDLL
.@)
* memcpy (
MSVCRT
.@)
*/
void
*
__cdecl
MSVCRT_memcpy
(
void
*
dst
,
const
void
*
src
,
size_t
n
)
{
return
memmove
(
dst
,
src
,
n
);
}
/*********************************************************************
* _stricmp_l (MSVCRT.@)
*/
int
__cdecl
MSVCRT__stricmp_l
(
const
char
*
s1
,
const
char
*
s2
,
MSVCRT__locale_t
locale
)
{
MSVCRT_pthreadlocinfo
locinfo
;
char
c1
,
c2
;
if
(
!
MSVCRT_CHECK_PMT
(
s1
!=
NULL
&&
s2
!=
NULL
))
return
MSVCRT__NLSCMPERROR
;
if
(
!
locale
)
locinfo
=
get_locinfo
();
else
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
])
return
strcasecmp
(
s1
,
s2
);
do
{
c1
=
MSVCRT__tolower_l
(
*
s1
++
,
locale
);
c2
=
MSVCRT__tolower_l
(
*
s2
++
,
locale
);
if
(
c1
!=
c2
)
break
;
}
while
(
c1
&&
c1
==
c2
);
return
c1
-
c2
;
}
/*********************************************************************
* _stricmp (MSVCRT.@)
*/
int
__cdecl
MSVCRT__stricmp
(
const
char
*
s1
,
const
char
*
s2
)
{
return
MSVCRT__stricmp_l
(
s1
,
s2
,
NULL
);
}
dlls/msvcrt/tests/string.c
View file @
dbec2506
...
...
@@ -2438,6 +2438,36 @@ static void test__atodbl(void)
ok
(
ret
==
_OVERFLOW
,
"_atodbl(&d,
\"
1e309
\"
) returned %d, expected _OVERFLOW
\n
"
,
ret
);
}
static
void
test__stricmp
(
void
)
{
int
ret
;
ret
=
_stricmp
(
"test"
,
"test"
);
ok
(
ret
==
0
,
"_stricmp returned %d
\n
"
,
ret
);
ret
=
_stricmp
(
"a"
,
"z"
);
ok
(
ret
<
0
,
"_stricmp returned %d
\n
"
,
ret
);
ret
=
_stricmp
(
"z"
,
"a"
);
ok
(
ret
>
0
,
"_stricmp returned %d
\n
"
,
ret
);
ret
=
_stricmp
(
"
\xa5
"
,
"
\xb9
"
);
ok
(
ret
<
0
,
"_stricmp returned %d
\n
"
,
ret
);
if
(
!
setlocale
(
LC_ALL
,
"polish"
))
{
win_skip
(
"stricmp tests"
);
return
;
}
ret
=
_stricmp
(
"test"
,
"test"
);
ok
(
ret
==
0
,
"_stricmp returned %d
\n
"
,
ret
);
ret
=
_stricmp
(
"a"
,
"z"
);
ok
(
ret
<
0
,
"_stricmp returned %d
\n
"
,
ret
);
ret
=
_stricmp
(
"z"
,
"a"
);
ok
(
ret
>
0
,
"_stricmp returned %d
\n
"
,
ret
);
ret
=
_stricmp
(
"
\xa5
"
,
"
\xb9
"
);
ok
(
ret
==
0
,
"_stricmp returned %d
\n
"
,
ret
);
setlocale
(
LC_ALL
,
"C"
);
}
START_TEST
(
string
)
{
char
mem
[
100
];
...
...
@@ -2533,4 +2563,5 @@ START_TEST(string)
test_wctomb
();
test_tolower
();
test__atodbl
();
test__stricmp
();
}
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