msvcrt: Added btowc implementation.

This commit is contained in:
Piotr Caban 2010-04-26 12:33:19 +02:00 committed by Alexandre Julliard
parent 40aa4dc459
commit 815840e972
4 changed files with 19 additions and 3 deletions

View File

@ -1235,7 +1235,7 @@
@ cdecl atol(str) msvcrt.atol
@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch
@ stub bsearch_s
@ stub btowc
@ cdecl btowc(long) msvcrt.btowc
@ cdecl calloc(long long) msvcrt.calloc
@ cdecl ceil(double) msvcrt.ceil
@ cdecl clearerr(ptr) msvcrt.clearerr

View File

@ -1219,7 +1219,7 @@
@ cdecl atol(str) msvcrt.atol
@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch
@ stub bsearch_s
@ stub btowc
@ cdecl btowc(long) msvcrt.btowc
@ cdecl calloc(long long) msvcrt.calloc
@ cdecl ceil(double) msvcrt.ceil
@ cdecl clearerr(ptr) msvcrt.clearerr

View File

@ -484,6 +484,22 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, MSVCRT_wchar_t *buffer, i
return GetLocaleInfoW( lcid, type, buffer, len );
}
/*********************************************************************
* btowc(MSVCRT.@)
*/
MSVCRT_wint_t CDECL MSVCRT_btowc(int c)
{
MSVCRT__locale_t locale = get_locale();
unsigned char letter = c;
MSVCRT_wchar_t ret;
if(!MultiByteToWideChar(locale->locinfo->lc_handle[MSVCRT_LC_CTYPE],
0, (LPCSTR)&letter, 1, &ret, 1))
return 0;
return ret;
}
/*********************************************************************
* __crtGetStringTypeW(MSVCRT.@)
*

View File

@ -1165,7 +1165,7 @@
@ cdecl atol(str) ntdll.atol
@ cdecl bsearch(ptr ptr long long ptr) ntdll.bsearch
# stub bsearch_s
# stub btowc
@ cdecl btowc(long) MSVCRT_btowc
@ cdecl calloc(long long) MSVCRT_calloc
@ cdecl ceil(double) MSVCRT_ceil
@ cdecl clearerr(ptr) MSVCRT_clearerr