msvcrt: Add _mbsspn_l implementation.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Piotr Caban 2019-10-28 13:29:05 +01:00 committed by Alexandre Julliard
parent 69ea905674
commit de8e6b6a28
9 changed files with 20 additions and 12 deletions

View File

@ -178,7 +178,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str) ucrtbase._mbsspn
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr) ucrtbase._mbsspn_l
@ cdecl _mbsspnp(str str) ucrtbase._mbsspnp
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str) ucrtbase._mbsstr

View File

@ -1184,7 +1184,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str)
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str)

View File

@ -1541,7 +1541,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str)
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str)

View File

@ -1551,7 +1551,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str)
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str)

View File

@ -856,7 +856,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str)
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str)

View File

@ -834,7 +834,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str)
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str)

View File

@ -2021,11 +2021,11 @@ int CDECL _mbsupr_s(unsigned char* s, MSVCRT_size_t len)
return 0;
}
/*********************************************************************
* _mbsspn (MSVCRT.@)
* _mbsspn_l (MSVCRT.@)
*/
MSVCRT_size_t CDECL _mbsspn(const unsigned char* string, const unsigned char* set)
MSVCRT_size_t CDECL _mbsspn_l(const unsigned char* string,
const unsigned char* set, MSVCRT__locale_t locale)
{
const unsigned char *p, *q;
@ -2033,7 +2033,7 @@ MSVCRT_size_t CDECL _mbsspn(const unsigned char* string, const unsigned char* se
{
for (q = set; *q; q++)
{
if (_ismbblead(*q))
if (_ismbblead_l(*q, locale))
{
/* duplicate a bug in native implementation */
if (!q[1]) break;
@ -2055,6 +2055,14 @@ MSVCRT_size_t CDECL _mbsspn(const unsigned char* string, const unsigned char* se
return p - string;
}
/*********************************************************************
* _mbsspn (MSVCRT.@)
*/
MSVCRT_size_t CDECL _mbsspn(const unsigned char* string, const unsigned char* set)
{
return _mbsspn_l(string, set, NULL);
}
/*********************************************************************
* _mbsspnp (MSVCRT.@)
*/

View File

@ -802,7 +802,7 @@
# stub _mbsset_s(ptr long long)
# stub _mbsset_s_l(ptr long long ptr)
@ cdecl _mbsspn(str str)
# stub _mbsspn_l(str str ptr)
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
# stub _mbsspnp_l(str str ptr)
@ cdecl _mbsstr(str str)

View File

@ -697,7 +697,7 @@
@ stub _mbsset_s
@ stub _mbsset_s_l
@ cdecl _mbsspn(str str)
@ stub _mbsspn_l
@ cdecl _mbsspn_l(str str ptr)
@ cdecl _mbsspnp(str str)
@ stub _mbsspnp_l
@ cdecl _mbsstr(str str)