msvcrt: Added btowc implementation.
This commit is contained in:
parent
40aa4dc459
commit
815840e972
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.@)
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue