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
225dad5d
Commit
225dad5d
authored
Oct 28, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add _mbscspn_l implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
de8e6b6a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
17 deletions
+56
-17
api-ms-win-crt-multibyte-l1-1-0.spec
...crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec
+1
-1
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+30
-9
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
string.c
dlls/msvcrt/tests/string.c
+18
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec
View file @
225dad5d
...
...
@@ -101,7 +101,7 @@
@ cdecl _mbscpy_s(ptr long str) ucrtbase._mbscpy_s
@ cdecl _mbscpy_s_l(ptr long str ptr) ucrtbase._mbscpy_s_l
@ cdecl _mbscspn(str str) ucrtbase._mbscspn
@
stub
_mbscspn_l
@
cdecl _mbscspn_l(str str ptr) ucrtbase.
_mbscspn_l
@ cdecl _mbsdec(ptr ptr) ucrtbase._mbsdec
@ stub _mbsdec_l
@ cdecl _mbsdup(str) ucrtbase._mbsdup
...
...
dlls/msvcr100/msvcr100.spec
View file @
225dad5d
...
...
@@ -1108,7 +1108,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
@
stub _mbscspn_l
@
cdecl _mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
@ stub _mbsdec_l
@ cdecl _mbsicmp(str str)
...
...
dlls/msvcr110/msvcr110.spec
View file @
225dad5d
...
...
@@ -1465,7 +1465,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
@
stub _mbscspn_l
@
cdecl _mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
@ stub _mbsdec_l
@ cdecl _mbsicmp(str str)
...
...
dlls/msvcr120/msvcr120.spec
View file @
225dad5d
...
...
@@ -1475,7 +1475,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
@
stub _mbscspn_l
@
cdecl _mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
@ stub _mbsdec_l
@ cdecl _mbsicmp(str str)
...
...
dlls/msvcr80/msvcr80.spec
View file @
225dad5d
...
...
@@ -780,7 +780,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
@
stub _mbscspn_l
@
cdecl _mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
@ stub _mbsdec_l
@ cdecl _mbsicmp(str str)
...
...
dlls/msvcr90/msvcr90.spec
View file @
225dad5d
...
...
@@ -758,7 +758,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
@
stub _mbscspn_l
@
cdecl _mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
@ stub _mbsdec_l
@ cdecl _mbsicmp(str str)
...
...
dlls/msvcrt/mbcs.c
View file @
225dad5d
...
...
@@ -156,11 +156,6 @@ static inline unsigned char *u__strnset( unsigned char *s, unsigned char c, MSVC
return
(
unsigned
char
*
)
MSVCRT__strnset
(
(
char
*
)
s
,
c
,
len
);
}
static
inline
MSVCRT_size_t
u_strcspn
(
const
unsigned
char
*
s
,
const
unsigned
char
*
rej
)
{
return
strcspn
(
(
const
char
*
)
s
,
(
const
char
*
)
rej
);
}
/*********************************************************************
* __p__mbctype (MSVCRT.@)
*/
...
...
@@ -2073,13 +2068,39 @@ unsigned char* CDECL _mbsspnp(const unsigned char* string, const unsigned char*
}
/*********************************************************************
* _mbscspn(MSVCRT.@)
* _mbscspn_l (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbscspn_l
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
MSVCRT__locale_t
locale
)
{
const
unsigned
char
*
p
,
*
q
;
for
(
p
=
str
;
*
p
;
p
++
)
{
for
(
q
=
cmp
;
*
q
;
q
++
)
{
if
(
_ismbblead_l
(
*
q
,
locale
))
{
/* duplicate a bug in native implementation */
if
(
!
q
[
1
])
return
0
;
if
(
p
[
0
]
==
q
[
0
]
&&
p
[
1
]
==
q
[
1
])
return
p
-
str
;
q
++
;
}
else
if
(
p
[
0
]
==
q
[
0
])
return
p
-
str
;
}
}
return
p
-
str
;
}
/*********************************************************************
* _mbscspn (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbscspn
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
)
{
if
(
get_mbcinfo
()
->
ismbcodepage
)
FIXME
(
"don't handle double character case
\n
"
);
return
u_strcspn
(
str
,
cmp
);
return
_mbscspn_l
(
str
,
cmp
,
NULL
);
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.spec
View file @
225dad5d
...
...
@@ -724,7 +724,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
# stub
_mbscspn_l(str str ptr)
@ cdecl
_mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
# stub _mbsdec_l(ptr ptr ptr)
@ cdecl _mbsdup(str) MSVCRT__strdup
...
...
dlls/msvcrt/tests/string.c
View file @
225dad5d
...
...
@@ -553,6 +553,13 @@ static void test_mbsspn( void)
ret
=
_mbsspn
(
str1
,
empty
);
ok
(
ret
==
0
,
"_mbsspn returns %d should be 0
\n
"
,
ret
);
ret
=
_mbscspn
(
str1
,
set
);
ok
(
ret
==
0
,
"_mbscspn returns %d should be 0
\n
"
,
ret
);
ret
=
_mbscspn
(
str2
,
set
);
ok
(
ret
==
4
,
"_mbscspn returns %d should be 4
\n
"
,
ret
);
ret
=
_mbscspn
(
str1
,
empty
);
ok
(
ret
==
8
,
"_mbscspn returns %d should be 8
\n
"
,
ret
);
_setmbcp
(
932
);
ret
=
_mbsspn
(
mbstr
,
mbset1
);
ok
(
ret
==
8
,
"_mbsspn returns %d should be 8
\n
"
,
ret
);
...
...
@@ -565,6 +572,17 @@ static void test_mbsspn( void)
ret
=
_mbsspn
(
mbstr
,
mbset3
);
ok
(
ret
==
14
,
"_mbsspn returns %d should be 14
\n
"
,
ret
);
ret
=
_mbscspn
(
mbstr
,
mbset1
);
ok
(
ret
==
0
,
"_mbscspn returns %d should be 0
\n
"
,
ret
);
ret
=
_mbscspn
(
mbstr
,
mbset2
);
ok
(
ret
==
0
,
"_mbscspn returns %d should be 0
\n
"
,
ret
);
ret
=
_mbscspn
(
mbstr
+
8
,
mbset1
);
ok
(
ret
==
2
,
"_mbscspn returns %d should be 2
\n
"
,
ret
);
ret
=
_mbscspn
(
mbstr
+
8
,
mbset2
);
ok
(
ret
==
0
,
"_mbscspn returns %d should be 0
\n
"
,
ret
);
ret
=
_mbscspn
(
mbstr
,
mbset3
);
ok
(
ret
==
0
,
"_mbscspn returns %d should be 0
\n
"
,
ret
);
_setmbcp
(
cp
);
}
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
225dad5d
...
...
@@ -620,7 +620,7 @@
@ cdecl _mbscpy_s(ptr long str)
@ cdecl _mbscpy_s_l(ptr long str ptr)
@ cdecl _mbscspn(str str)
@
stub _mbscspn_l
@
cdecl _mbscspn_l(str str ptr)
@ cdecl _mbsdec(ptr ptr)
@ stub _mbsdec_l
@ stub _mbsdup(str)
...
...
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