msvcp90: Added wctrans and towctrans implementation.

This commit is contained in:
Piotr Caban 2012-11-16 10:53:37 +01:00 committed by Alexandre Julliard
parent 965543acff
commit a71acb3076
3 changed files with 29 additions and 2 deletions

View file

@ -26,6 +26,7 @@
#include "limits.h" #include "limits.h"
#include "math.h" #include "math.h"
#include "stdio.h" #include "stdio.h"
#include "wctype.h"
#include "wine/list.h" #include "wine/list.h"
@ -8541,6 +8542,27 @@ locale* __cdecl locale_global(locale *ret, const locale *loc)
return ret; return ret;
} }
/* wctrans */
wctrans_t __cdecl wctrans(const char *property)
{
static const char str_tolower[] = "tolower";
static const char str_toupper[] = "toupper";
if(!strcmp(property, str_tolower))
return 2;
if(!strcmp(property, str_toupper))
return 1;
return 0;
}
/* towctrans */
wint_t __cdecl towctrans(wint_t c, wctrans_t category)
{
if(category == 1)
return towupper(c);
return towlower(c);
}
DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@"); DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@");
DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@"); DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@");
DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@"); DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@");

View file

@ -5807,8 +5807,8 @@
@ stub _Wcsxfrm @ stub _Wcsxfrm
# extern _Xbig # extern _Xbig
@ stub __Wcrtomb_lk @ stub __Wcrtomb_lk
@ stub towctrans @ cdecl towctrans(long long)
@ stub wctrans @ cdecl wctrans(str)
@ cdecl wctype(str) @ cdecl wctype(str)
#Functions not exported in native dll: #Functions not exported in native dll:

View file

@ -68,6 +68,11 @@ wchar_t __cdecl towlower(wchar_t);
wchar_t __cdecl towupper(wchar_t); wchar_t __cdecl towupper(wchar_t);
#endif /* _WCTYPE_DEFINED */ #endif /* _WCTYPE_DEFINED */
typedef wchar_t wctrans_t;
wint_t __cdecl towctrans(wint_t,wctrans_t);
wctrans_t __cdecl wctrans(const char *);
wctype_t __cdecl wctype(const char *);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif