From 46ae113e7128956a4a77eac60e6019d640a92f4a Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 5 Mar 2011 02:28:28 +0300 Subject: [PATCH] msvcrt: Added partially complete _wcsupr_s_l (without locale support). --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/wcs.c | 16 +++++++++++++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 42d8310899d..d732d697351 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1318,7 +1318,7 @@ @ cdecl _wcsupr(wstr) msvcrt._wcsupr @ stub _wcsupr_l @ cdecl _wcsupr_s(wstr long) msvcrt._wcsupr_s -@ stub _wcsupr_s_l +@ cdecl _wcsupr_s_l(wstr long ptr) msvcrt._wcsupr_s_l @ stub _wcsxfrm_l @ cdecl _wctime32(ptr) msvcrt._wctime32 @ stub _wctime32_s diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index f9eaaf0e22c..1631fdb454f 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1171,7 +1171,7 @@ @ cdecl _wcsupr(wstr) msvcrt._wcsupr @ stub _wcsupr_l @ cdecl _wcsupr_s(wstr long) msvcrt._wcsupr_s -@ stub _wcsupr_s_l +@ cdecl _wcsupr_s_l(wstr long ptr) msvcrt._wcsupr_s_l @ stub _wcsxfrm_l @ cdecl _wctime32(ptr) msvcrt._wctime32 @ stub _wctime32_s diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index b7288da5ffe..8148caf0bf5 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1158,7 +1158,7 @@ @ cdecl _wcsupr(wstr) msvcrt._wcsupr @ stub _wcsupr_l @ cdecl _wcsupr_s(wstr long) msvcrt._wcsupr_s -@ stub _wcsupr_s_l +@ cdecl _wcsupr_s_l(wstr long ptr) msvcrt._wcsupr_s_l @ stub _wcsxfrm_l @ cdecl _wctime32(ptr) msvcrt._wctime32 @ stub _wctime32_s diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index d45094a53fc..93aa0f02e7d 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -103,10 +103,10 @@ MSVCRT_wchar_t* CDECL _wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c ) } /****************************************************************** - * _wcsupr_s (MSVCRT.@) - * + * _wcsupr_s_l (MSVCRT.@) */ -INT CDECL MSVCRT__wcsupr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) +int CDECL MSVCRT__wcsupr_s_l( MSVCRT_wchar_t* str, MSVCRT_size_t n, + MSVCRT__locale_t locale ) { MSVCRT_wchar_t* ptr = str; @@ -120,6 +120,7 @@ INT CDECL MSVCRT__wcsupr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) while (n--) { if (!*ptr) return 0; + /* FIXME: add locale support */ *ptr = toupperW(*ptr); ptr++; } @@ -131,6 +132,15 @@ INT CDECL MSVCRT__wcsupr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) return MSVCRT_EINVAL; } +/****************************************************************** + * _wcsupr_s (MSVCRT.@) + * + */ +INT CDECL MSVCRT__wcsupr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) +{ + return MSVCRT__wcsupr_s_l( str, n, NULL ); +} + /****************************************************************** * _wcslwr_s (MSVCRT.@) */