Commit 5556eba0 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

msvcrt: Add _mbsupr_l implementation.

parent 2b7dcfb4
......@@ -1200,7 +1200,7 @@
@ stub _mbstrnlen
@ stub _mbstrnlen_l
@ cdecl _mbsupr(str)
@ stub _mbsupr_l
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......
......@@ -1557,7 +1557,7 @@
@ stub _mbstrnlen
@ stub _mbstrnlen_l
@ cdecl _mbsupr(str)
@ stub _mbsupr_l
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......
......@@ -1568,7 +1568,7 @@
@ stub _mbstrnlen
@ stub _mbstrnlen_l
@ cdecl _mbsupr(str)
@ stub _mbsupr_l
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......
......@@ -872,7 +872,7 @@
@ stub _mbstrnlen
@ stub _mbstrnlen_l
@ cdecl _mbsupr(str)
@ stub _mbsupr_l
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......
......@@ -850,7 +850,7 @@
@ stub _mbstrnlen
@ stub _mbstrnlen_l
@ cdecl _mbsupr(str)
@ stub _mbsupr_l
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......
......@@ -2437,33 +2437,50 @@ int CDECL _mbslwr_s(unsigned char* str, size_t len)
}
/*********************************************************************
* _mbsupr(MSVCRT.@)
* _mbsupr_l(MSVCRT.@)
*/
unsigned char* CDECL _mbsupr(unsigned char* s)
unsigned char* CDECL _mbsupr_l(unsigned char* s, _locale_t locale)
{
unsigned char *ret = s;
if (!s)
pthreadmbcinfo mbcinfo;
if (!MSVCRT_CHECK_PMT(s))
return NULL;
if (get_mbcinfo()->ismbcodepage)
if (locale)
mbcinfo = locale->mbcinfo;
else
mbcinfo = get_mbcinfo();
if (mbcinfo->ismbcodepage)
{
unsigned int c;
while (*s)
{
c = _mbctoupper(_mbsnextc(s));
c = _mbctoupper_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 >> 8);
c = c & 0xff;
}
*s++=c;
*s++ = c;
}
}
else for ( ; *s; s++) *s = _toupper_l(*s, NULL);
else
for ( ; *s; s++) *s = _toupper_l(*s, locale);
return ret;
}
/*********************************************************************
* _mbsupr(MSVCRT.@)
*/
unsigned char* CDECL _mbsupr(unsigned char* s)
{
return _mbsupr_l(s, NULL);
}
/*********************************************************************
* _mbsupr_s_l(MSVCRT.@)
*/
int CDECL _mbsupr_s_l(unsigned char* s, size_t len, _locale_t locale)
......
......@@ -821,7 +821,7 @@
# stub _mbstrnlen(str long)
# stub _mbstrnlen_l(str long ptr)
@ cdecl _mbsupr(str)
# stub _mbsupr_l(str ptr)
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......
......@@ -716,7 +716,7 @@
@ stub _mbstrnlen
@ stub _mbstrnlen_l
@ cdecl _mbsupr(str)
@ stub _mbsupr_l
@ cdecl _mbsupr_l(str ptr)
@ cdecl _mbsupr_s(str long)
@ cdecl _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
......@@ -1285,7 +1285,7 @@
@ stub _o__mbstrnlen
@ stub _o__mbstrnlen_l
@ cdecl _o__mbsupr(str) _mbsupr
@ stub _o__mbsupr_l
@ cdecl _o__mbsupr_l(str ptr) _mbsupr_l
@ cdecl _o__mbsupr_s(str long) _mbsupr_s
@ cdecl _o__mbsupr_s_l(str long ptr) _mbsupr_s_l
@ cdecl _o__mbtowc_l(ptr str long ptr) _mbtowc_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