Commit 3db957e3 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added _strupr_s_l implementation.

parent 504231ff
......@@ -954,10 +954,10 @@
@ cdecl -ret64 _strtoui64(str ptr long) MSVCRT_strtoui64
@ cdecl -ret64 _strtoui64_l(str ptr long ptr) MSVCRT_strtoui64_l
# stub _strtoul_l(str ptr long ptr)
@ cdecl _strupr(str) ntdll._strupr
# stub _strupr_l(str ptr)
# stub _strupr_s(str long)
# stub _strupr_s_l(str long ptr)
@ cdecl _strupr(str)
@ cdecl _strupr_l(str ptr)
@ cdecl _strupr_s(str long)
@ cdecl _strupr_s_l(str long ptr)
# stub _strxfrm_l(ptr str long ptr)
@ cdecl _swab(str str long) MSVCRT__swab
@ varargs _swprintf(ptr wstr) MSVCRT_swprintf
......
......@@ -113,6 +113,68 @@ int CDECL _strlwr(char *str)
}
/*********************************************************************
* _strupr_s_l (MSVCRT.@)
*/
int CDECL _strupr_s_l(char *str, MSVCRT_size_t len, MSVCRT__locale_t locale)
{
char *ptr = str;
if(!locale)
locale = get_locale();
if (!str || !len)
{
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
while (len && *ptr)
{
len--;
ptr++;
}
if (!len)
{
str[0] = '\0';
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
while (*str)
{
*str = MSVCRT__toupper_l(*str, locale);
str++;
}
return 0;
}
/*********************************************************************
* _strupr_s (MSVCRT.@)
*/
int CDECL _strupr_s(char *str, MSVCRT_size_t len)
{
return _strupr_s_l(str, len, NULL);
}
/*********************************************************************
* _strupr_l (MSVCRT.@)
*/
int CDECL _strupr_l(char *str, MSVCRT__locale_t locale)
{
return _strupr_s_l(str, -1, locale);
}
/*********************************************************************
* _strupr (MSVCRT.@)
*/
int CDECL _strupr(char *str)
{
return _strupr_s_l(str, -1, NULL);
}
/*********************************************************************
* _strnset (MSVCRT.@)
*/
char* CDECL MSVCRT__strnset(char* str, int value, MSVCRT_size_t len)
......
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