Commit 80c97dc3 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

msvcrt: Add _ismbslead_l implementation.

parent 927a9a5a
......@@ -1007,9 +1007,9 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
@ stub _ismbslead_l
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
@ stub _ismbstrail_l
@ stub _ismbstrail_l(ptr ptr ptr)
@ cdecl _isnan(double)
@ cdecl -arch=x86_64 _isnanf(float)
@ cdecl _isprint_l(long ptr)
......
......@@ -1353,7 +1353,7 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
@ stub _ismbslead_l
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
@ stub _ismbstrail_l
@ cdecl _isnan(double)
......
......@@ -1359,7 +1359,7 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
@ stub _ismbslead_l
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
@ stub _ismbstrail_l
@ cdecl _isnan(double)
......
......@@ -679,7 +679,7 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
@ stub _ismbslead_l
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
@ stub _ismbstrail_l
@ cdecl _isnan(double)
......
......@@ -657,7 +657,7 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
@ stub _ismbslead_l
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
@ stub _ismbstrail_l
@ cdecl _isnan(double)
......
......@@ -1808,13 +1808,22 @@ int CDECL _ismbclegal(unsigned int c)
}
/*********************************************************************
* _ismbslead(MSVCRT.@)
* _ismbslead_l(MSVCRT.@)
*/
int CDECL _ismbslead(const unsigned char* start, const unsigned char* str)
int CDECL _ismbslead_l(const unsigned char* start, const unsigned char* str, _locale_t locale)
{
pthreadmbcinfo mbcinfo;
int lead = 0;
if(!get_mbcinfo()->ismbcodepage)
if (!MSVCRT_CHECK_PMT(start && str))
return 0;
if(locale)
mbcinfo = locale->mbcinfo;
else
mbcinfo = get_mbcinfo();
if(!mbcinfo->ismbcodepage)
return 0;
/* Lead bytes can also be trail bytes so we need to analyse the string
......@@ -1823,7 +1832,7 @@ int CDECL _ismbslead(const unsigned char* start, const unsigned char* str)
{
if (!*start)
return 0;
lead = !lead && _ismbblead(*start);
lead = !lead && _ismbblead_l(*start, locale);
start++;
}
......@@ -1831,6 +1840,14 @@ int CDECL _ismbslead(const unsigned char* start, const unsigned char* str)
}
/*********************************************************************
* _ismbslead(MSVCRT.@)
*/
int CDECL _ismbslead(const unsigned char* start, const unsigned char* str)
{
return _ismbslead_l(start, str, NULL);
}
/*********************************************************************
* _ismbstrail(MSVCRT.@)
*/
int CDECL _ismbstrail(const unsigned char* start, const unsigned char* str)
......
......@@ -628,7 +628,7 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
# stub _ismbslead_l(long ptr)
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
# stub _ismbstrail_l(long ptr)
@ cdecl _isnan(double)
......
......@@ -499,7 +499,7 @@
@ cdecl _ismbcupper(long)
@ cdecl _ismbcupper_l(long ptr)
@ cdecl _ismbslead(ptr ptr)
@ stub _ismbslead_l
@ cdecl _ismbslead_l(ptr ptr ptr)
@ cdecl _ismbstrail(ptr ptr)
@ stub _ismbstrail_l
@ cdecl _isnan(double)
......@@ -1098,7 +1098,7 @@
@ cdecl _o__ismbcupper(long) _ismbcupper
@ cdecl _o__ismbcupper_l(long ptr) _ismbcupper_l
@ cdecl _o__ismbslead(ptr ptr) _ismbslead
@ stub _o__ismbslead_l
@ cdecl _o__ismbslead_l(ptr ptr ptr) _ismbslead_l
@ cdecl _o__ismbstrail(ptr ptr) _ismbstrail
@ stub _o__ismbstrail_l
@ cdecl _o__iswctype_l(long long ptr) _iswctype_l
......
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