msvcrt: Add _mbctohira_l implementation.

This commit is contained in:
Bartosz Kosiorek 2022-10-27 21:13:03 +02:00 committed by Alexandre Julliard
parent 5d71a61253
commit 6f9695c459
8 changed files with 19 additions and 11 deletions

View file

@ -1084,7 +1084,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)

View file

@ -1441,7 +1441,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)

View file

@ -1452,7 +1452,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)

View file

@ -756,7 +756,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)

View file

@ -734,7 +734,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)

View file

@ -2950,17 +2950,25 @@ int CDECL mbsrtowcs_s(size_t *ret, wchar_t *wcstr, size_t len,
}
/*********************************************************************
* _mbctohira (MSVCRT.@)
* _mbctohira_l (MSVCRT.@)
*
* Converts a sjis katakana character to hiragana.
*/
unsigned int CDECL _mbctohira(unsigned int c)
unsigned int CDECL _mbctohira_l(unsigned int c, _locale_t locale)
{
if(_ismbckata(c) && c <= 0x8393)
if(_ismbckata_l(c, locale) && c <= 0x8393)
return (c - 0x8340 - (c >= 0x837f ? 1 : 0)) + 0x829f;
return c;
}
/*********************************************************************
* _mbctohira (MSVCRT.@)
*/
unsigned int CDECL _mbctohira(unsigned int c)
{
return _mbctohira_l(c, NULL);
}
/*********************************************************************
* _mbctokata (MSVCRT.@)
*

View file

@ -701,7 +701,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
# stub _mbctohira_l(long ptr)
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
# stub _mbctokata_l(long ptr)
@ cdecl _mbctolower(long)

View file

@ -599,7 +599,7 @@
@ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@ cdecl _mbctohira_l(long ptr)
@ cdecl _mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)
@ -1169,7 +1169,7 @@
@ cdecl _o__mbclen(ptr) _mbclen
@ cdecl _o__mbclen_l(ptr ptr) _mbclen_l
@ cdecl _o__mbctohira(long) _mbctohira
@ stub _o__mbctohira_l
@ cdecl _o__mbctohira_l(long ptr) _mbctohira_l
@ cdecl _o__mbctokata(long) _mbctokata
@ stub _o__mbctokata_l
@ cdecl _o__mbctolower(long) _mbctolower