Commit fce3c3cc authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

msvcrt: Add _mbschr_l implementation.

parent 0c0efd3f
......@@ -1100,7 +1100,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
@ stub _mbschr_l
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......
......@@ -1457,7 +1457,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
@ stub _mbschr_l
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......
......@@ -1468,7 +1468,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
@ stub _mbschr_l
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......
......@@ -772,7 +772,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
@ stub _mbschr_l
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......
......@@ -750,7 +750,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
@ stub _mbschr_l
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......
......@@ -1344,18 +1344,25 @@ unsigned char * CDECL _mbsstr(const unsigned char *haystack, const unsigned char
}
/*********************************************************************
* _mbschr(MSVCRT.@)
*
* Find a multibyte character in a multibyte string.
* _mbschr_l(MSVCRT.@)
*/
unsigned char* CDECL _mbschr(const unsigned char* s, unsigned int x)
unsigned char* CDECL _mbschr_l(const unsigned char* s, unsigned int x, _locale_t locale)
{
if(get_mbcinfo()->ismbcodepage)
pthreadmbcinfo mbcinfo;
if(!MSVCRT_CHECK_PMT(s))
return NULL;
if(locale)
mbcinfo = locale->mbcinfo;
else
mbcinfo = get_mbcinfo();
if(mbcinfo->ismbcodepage)
{
unsigned int c;
while (1)
{
c = _mbsnextc(s);
c = _mbsnextc_l(s, locale);
if (c == x)
return (unsigned char*)s;
if (!c)
......@@ -1367,6 +1374,14 @@ unsigned char* CDECL _mbschr(const unsigned char* s, unsigned int x)
}
/*********************************************************************
* _mbschr(MSVCRT.@)
*/
unsigned char* CDECL _mbschr(const unsigned char* s, unsigned int x)
{
return _mbschr_l(s, x, NULL);
}
/*********************************************************************
* _mbsrchr(MSVCRT.@)
*/
unsigned char* CDECL _mbsrchr(const unsigned char* s, unsigned int x)
......
......@@ -718,7 +718,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
# stub _mbschr_l(str long ptr)
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......
......@@ -614,7 +614,7 @@
@ cdecl _mbscat_s(ptr long str)
@ cdecl _mbscat_s_l(ptr long str ptr)
@ cdecl _mbschr(str long)
@ stub _mbschr_l
@ cdecl _mbschr_l(str long ptr)
@ cdecl _mbscmp(str str)
@ cdecl _mbscmp_l(str str ptr)
@ cdecl _mbscoll(str str)
......@@ -1184,7 +1184,7 @@
@ cdecl _o__mbscat_s(ptr long str) _mbscat_s
@ cdecl _o__mbscat_s_l(ptr long str ptr) _mbscat_s_l
@ cdecl _o__mbschr(str long) _mbschr
@ stub _o__mbschr_l
@ cdecl _o__mbschr_l(str long ptr) _mbschr_l
@ cdecl _o__mbscmp(str str) _mbscmp
@ cdecl _o__mbscmp_l(str str ptr) _mbscmp_l
@ cdecl _o__mbscoll(str str) _mbscoll
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment