Commit 815840e9 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added btowc implementation.

parent 40aa4dc4
...@@ -1235,7 +1235,7 @@ ...@@ -1235,7 +1235,7 @@
@ cdecl atol(str) msvcrt.atol @ cdecl atol(str) msvcrt.atol
@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch @ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch
@ stub bsearch_s @ stub bsearch_s
@ stub btowc @ cdecl btowc(long) msvcrt.btowc
@ cdecl calloc(long long) msvcrt.calloc @ cdecl calloc(long long) msvcrt.calloc
@ cdecl ceil(double) msvcrt.ceil @ cdecl ceil(double) msvcrt.ceil
@ cdecl clearerr(ptr) msvcrt.clearerr @ cdecl clearerr(ptr) msvcrt.clearerr
......
...@@ -1219,7 +1219,7 @@ ...@@ -1219,7 +1219,7 @@
@ cdecl atol(str) msvcrt.atol @ cdecl atol(str) msvcrt.atol
@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch @ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch
@ stub bsearch_s @ stub bsearch_s
@ stub btowc @ cdecl btowc(long) msvcrt.btowc
@ cdecl calloc(long long) msvcrt.calloc @ cdecl calloc(long long) msvcrt.calloc
@ cdecl ceil(double) msvcrt.ceil @ cdecl ceil(double) msvcrt.ceil
@ cdecl clearerr(ptr) msvcrt.clearerr @ cdecl clearerr(ptr) msvcrt.clearerr
......
...@@ -485,6 +485,22 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, MSVCRT_wchar_t *buffer, i ...@@ -485,6 +485,22 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, MSVCRT_wchar_t *buffer, i
} }
/********************************************************************* /*********************************************************************
* 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.@) * __crtGetStringTypeW(MSVCRT.@)
* *
* This function was accepting different number of arguments in older * This function was accepting different number of arguments in older
......
...@@ -1165,7 +1165,7 @@ ...@@ -1165,7 +1165,7 @@
@ cdecl atol(str) ntdll.atol @ cdecl atol(str) ntdll.atol
@ cdecl bsearch(ptr ptr long long ptr) ntdll.bsearch @ cdecl bsearch(ptr ptr long long ptr) ntdll.bsearch
# stub bsearch_s # stub bsearch_s
# stub btowc @ cdecl btowc(long) MSVCRT_btowc
@ cdecl calloc(long long) MSVCRT_calloc @ cdecl calloc(long long) MSVCRT_calloc
@ cdecl ceil(double) MSVCRT_ceil @ cdecl ceil(double) MSVCRT_ceil
@ cdecl clearerr(ptr) MSVCRT_clearerr @ cdecl clearerr(ptr) MSVCRT_clearerr
......
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