msvcrt: Add _mbcjmstojis_l implementation.
This commit is contained in:
parent
70db739c3d
commit
7984319248
9 changed files with 28 additions and 12 deletions
|
@ -1080,7 +1080,7 @@
|
|||
@ cdecl _mbcjistojms(long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
@ stub _mbcjmstojis_l
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
|
|
@ -1437,7 +1437,7 @@
|
|||
@ cdecl _mbcjistojms(long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
@ stub _mbcjmstojis_l
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
|
|
@ -1448,7 +1448,7 @@
|
|||
@ cdecl _mbcjistojms(long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
@ stub _mbcjmstojis_l
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
|
|
@ -752,7 +752,7 @@
|
|||
@ cdecl _mbcjistojms(long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
@ stub _mbcjmstojis_l
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
|
|
@ -730,7 +730,7 @@
|
|||
@ cdecl _mbcjistojms(long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
@ stub _mbcjmstojis_l
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
|
|
@ -607,17 +607,24 @@ unsigned int CDECL _mbcjistojms(unsigned int c)
|
|||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbcjmstojis(MSVCRT.@)
|
||||
* _mbcjmstojis_l(MSVCRT.@)
|
||||
*
|
||||
* Converts a sjis character to jis.
|
||||
*/
|
||||
unsigned int CDECL _mbcjmstojis(unsigned int c)
|
||||
unsigned int CDECL _mbcjmstojis_l(unsigned int c, _locale_t locale)
|
||||
{
|
||||
pthreadmbcinfo mbcinfo;
|
||||
|
||||
if(locale)
|
||||
mbcinfo = locale->mbcinfo;
|
||||
else
|
||||
mbcinfo = get_mbcinfo();
|
||||
|
||||
/* Conversion takes place only when codepage is 932.
|
||||
In all other cases, c is returned unchanged */
|
||||
if(get_mbcinfo()->mbcodepage == 932)
|
||||
if(mbcinfo->mbcodepage == 932)
|
||||
{
|
||||
if(_ismbclegal(c) && HIBYTE(c) < 0xf0)
|
||||
if(_ismbclegal_l(c, locale) && HIBYTE(c) < 0xf0)
|
||||
{
|
||||
if(HIBYTE(c) >= 0xe0)
|
||||
c -= 0x4000;
|
||||
|
@ -639,6 +646,14 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
|
|||
return c;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbcjmstojis(MSVCRT.@)
|
||||
*/
|
||||
unsigned int CDECL _mbcjmstojis(unsigned int c)
|
||||
{
|
||||
return _mbcjmstojis_l(c, NULL);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbsdec(MSVCRT.@)
|
||||
*/
|
||||
|
|
|
@ -697,7 +697,7 @@
|
|||
@ cdecl _mbcjistojms (long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
# stub _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
|
|
@ -595,7 +595,7 @@
|
|||
@ cdecl _mbcjistojms(long)
|
||||
@ cdecl _mbcjistojms_l(long ptr)
|
||||
@ cdecl _mbcjmstojis(long)
|
||||
@ stub _mbcjmstojis_l
|
||||
@ cdecl _mbcjmstojis_l(long ptr)
|
||||
@ cdecl _mbclen(ptr)
|
||||
@ cdecl _mbclen_l(ptr ptr)
|
||||
@ cdecl _mbctohira(long)
|
||||
|
@ -1165,7 +1165,7 @@
|
|||
@ cdecl _o__mbcjistojms(long) _mbcjistojms
|
||||
@ cdecl _o__mbcjistojms_l(long ptr) _mbcjistojms_l
|
||||
@ cdecl _o__mbcjmstojis(long) _mbcjmstojis
|
||||
@ stub _o__mbcjmstojis_l
|
||||
@ cdecl _o__mbcjmstojis_l(long ptr) _mbcjmstojis_l
|
||||
@ cdecl _o__mbclen(ptr) _mbclen
|
||||
@ cdecl _o__mbclen_l(ptr ptr) _mbclen_l
|
||||
@ cdecl _o__mbctohira(long) _mbctohira
|
||||
|
|
|
@ -43,6 +43,7 @@ _ACRTIMP int __cdecl _ismbcl0(unsigned int);
|
|||
_ACRTIMP int __cdecl _ismbcl1(unsigned int);
|
||||
_ACRTIMP int __cdecl _ismbcl2(unsigned int);
|
||||
_ACRTIMP int __cdecl _ismbclegal(unsigned int);
|
||||
_ACRTIMP int __cdecl _ismbclegal_l(unsigned int, _locale_t);
|
||||
_ACRTIMP int __cdecl _ismbclower(unsigned int);
|
||||
_ACRTIMP int __cdecl _ismbcprint(unsigned int);
|
||||
_ACRTIMP int __cdecl _ismbcpunct(unsigned int);
|
||||
|
|
Loading…
Add table
Reference in a new issue