Commit 79843192 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

msvcrt: Add _mbcjmstojis_l implementation.

parent 70db739c
...@@ -1080,7 +1080,7 @@ ...@@ -1080,7 +1080,7 @@
@ cdecl _mbcjistojms(long) @ cdecl _mbcjistojms(long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
......
...@@ -1437,7 +1437,7 @@ ...@@ -1437,7 +1437,7 @@
@ cdecl _mbcjistojms(long) @ cdecl _mbcjistojms(long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
......
...@@ -1448,7 +1448,7 @@ ...@@ -1448,7 +1448,7 @@
@ cdecl _mbcjistojms(long) @ cdecl _mbcjistojms(long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
......
...@@ -752,7 +752,7 @@ ...@@ -752,7 +752,7 @@
@ cdecl _mbcjistojms(long) @ cdecl _mbcjistojms(long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
......
...@@ -730,7 +730,7 @@ ...@@ -730,7 +730,7 @@
@ cdecl _mbcjistojms(long) @ cdecl _mbcjistojms(long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
......
...@@ -607,17 +607,24 @@ unsigned int CDECL _mbcjistojms(unsigned int c) ...@@ -607,17 +607,24 @@ unsigned int CDECL _mbcjistojms(unsigned int c)
} }
/********************************************************************* /*********************************************************************
* _mbcjmstojis(MSVCRT.@) * _mbcjmstojis_l(MSVCRT.@)
* *
* Converts a sjis character to jis. * 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. /* Conversion takes place only when codepage is 932.
In all other cases, c is returned unchanged */ 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) if(HIBYTE(c) >= 0xe0)
c -= 0x4000; c -= 0x4000;
...@@ -640,6 +647,14 @@ unsigned int CDECL _mbcjmstojis(unsigned int c) ...@@ -640,6 +647,14 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
} }
/********************************************************************* /*********************************************************************
* _mbcjmstojis(MSVCRT.@)
*/
unsigned int CDECL _mbcjmstojis(unsigned int c)
{
return _mbcjmstojis_l(c, NULL);
}
/*********************************************************************
* _mbsdec(MSVCRT.@) * _mbsdec(MSVCRT.@)
*/ */
unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cur) unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cur)
......
...@@ -697,7 +697,7 @@ ...@@ -697,7 +697,7 @@
@ cdecl _mbcjistojms (long) @ cdecl _mbcjistojms (long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
# stub _mbcjmstojis_l(long ptr) @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
......
...@@ -595,7 +595,7 @@ ...@@ -595,7 +595,7 @@
@ cdecl _mbcjistojms(long) @ cdecl _mbcjistojms(long)
@ cdecl _mbcjistojms_l(long ptr) @ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long) @ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l @ cdecl _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr) @ cdecl _mbclen(ptr)
@ cdecl _mbclen_l(ptr ptr) @ cdecl _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long) @ cdecl _mbctohira(long)
...@@ -1165,7 +1165,7 @@ ...@@ -1165,7 +1165,7 @@
@ cdecl _o__mbcjistojms(long) _mbcjistojms @ cdecl _o__mbcjistojms(long) _mbcjistojms
@ cdecl _o__mbcjistojms_l(long ptr) _mbcjistojms_l @ cdecl _o__mbcjistojms_l(long ptr) _mbcjistojms_l
@ cdecl _o__mbcjmstojis(long) _mbcjmstojis @ 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(ptr) _mbclen
@ cdecl _o__mbclen_l(ptr ptr) _mbclen_l @ cdecl _o__mbclen_l(ptr ptr) _mbclen_l
@ cdecl _o__mbctohira(long) _mbctohira @ cdecl _o__mbctohira(long) _mbctohira
......
...@@ -43,6 +43,7 @@ _ACRTIMP int __cdecl _ismbcl0(unsigned int); ...@@ -43,6 +43,7 @@ _ACRTIMP int __cdecl _ismbcl0(unsigned int);
_ACRTIMP int __cdecl _ismbcl1(unsigned int); _ACRTIMP int __cdecl _ismbcl1(unsigned int);
_ACRTIMP int __cdecl _ismbcl2(unsigned int); _ACRTIMP int __cdecl _ismbcl2(unsigned int);
_ACRTIMP int __cdecl _ismbclegal(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 _ismbclower(unsigned int);
_ACRTIMP int __cdecl _ismbcprint(unsigned int); _ACRTIMP int __cdecl _ismbcprint(unsigned int);
_ACRTIMP int __cdecl _ismbcpunct(unsigned int); _ACRTIMP int __cdecl _ismbcpunct(unsigned int);
......
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