Commit 3c941962 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

msvcrt: Add _mbslwr_l implementation.

parent fce33118
......@@ -1120,7 +1120,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......
......@@ -1477,7 +1477,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......
......@@ -1488,7 +1488,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......
......@@ -792,7 +792,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......
......@@ -770,7 +770,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......
......@@ -2271,30 +2271,50 @@ unsigned char* CDECL _mbsncat(unsigned char* dst, const unsigned char* src, size
/*********************************************************************
* _mbslwr(MSVCRT.@)
* _mbslwr_l(MSVCRT.@)
*/
unsigned char* CDECL _mbslwr(unsigned char* s)
unsigned char* CDECL _mbslwr_l(unsigned char *s, _locale_t locale)
{
unsigned char *ret = s;
if (!s)
return NULL;
if (get_mbcinfo()->ismbcodepage)
{
unsigned int c;
while (*s)
pthreadmbcinfo mbcinfo;
unsigned char *ret = s;
if (!s)
return NULL;
if (locale)
mbcinfo = locale->mbcinfo;
else
mbcinfo = get_mbcinfo();
if (mbcinfo->ismbcodepage)
{
c = _mbctolower(_mbsnextc(s));
/* Note that I assume that the size of the character is unchanged */
if (c > 255)
{
*s++=(c>>8);
c=c & 0xff;
}
*s++=c;
unsigned int c;
while (*s)
{
c = _mbctolower_l(_mbsnextc_l(s, locale), locale);
/* Note that I assume that the size of the character is unchanged */
if (c > 255)
{
*s++ = (c >> 8);
c = c & 0xff;
}
*s++ = c;
}
}
}
else for ( ; *s; s++) *s = _tolower_l(*s, NULL);
return ret;
else
{
for ( ; *s; s++) *s = _tolower_l(*s, locale);
}
return ret;
}
/*********************************************************************
* _mbslwr(MSVCRT.@)
*/
unsigned char* CDECL _mbslwr(unsigned char *s)
{
return _mbslwr_l(s, NULL);
}
/*********************************************************************
......
......@@ -741,7 +741,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
# stub _mbslwr_l(str ptr)
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......
......@@ -636,7 +636,7 @@
@ cdecl _mbslen(str)
@ cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
@ cdecl _mbslwr_s_l(str long ptr)
@ cdecl _mbsnbcat(str str long)
......@@ -1205,7 +1205,7 @@
@ cdecl _o__mbslen(str) _mbslen
@ cdecl _o__mbslen_l(str ptr) _mbslen_l
@ cdecl _o__mbslwr(str) _mbslwr
@ stub _o__mbslwr_l
@ cdecl _o__mbslwr_l(str ptr) _mbslwr_l
@ cdecl _o__mbslwr_s(str long) _mbslwr_s
@ cdecl _o__mbslwr_s_l(str long ptr) _mbslwr_s_l
@ cdecl _o__mbsnbcat(str str long) _mbsnbcat
......
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