Commit 70db739c authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

msvcrt: Add _mbcjistojms_l implementation.

parent 35ae78c5
......@@ -1078,7 +1078,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms(long)
@ stub _mbcjistojms_l
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l
@ cdecl _mbclen(ptr)
......
......@@ -1435,7 +1435,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms(long)
@ stub _mbcjistojms_l
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l
@ cdecl _mbclen(ptr)
......
......@@ -1446,7 +1446,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms(long)
@ stub _mbcjistojms_l
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l
@ cdecl _mbclen(ptr)
......
......@@ -750,7 +750,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms(long)
@ stub _mbcjistojms_l
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l
@ cdecl _mbclen(ptr)
......
......@@ -728,7 +728,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms(long)
@ stub _mbcjistojms_l
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l
@ cdecl _mbclen(ptr)
......
......@@ -556,17 +556,24 @@ unsigned int CDECL _mbctombb(unsigned int c)
}
/*********************************************************************
* _mbcjistojms(MSVCRT.@)
* _mbcjistojms_l(MSVCRT.@)
*
* Converts a jis character to sjis.
* Based on description from
* http://www.slayers.ne.jp/~oouchi/code/jistosjis.html
*/
unsigned int CDECL _mbcjistojms(unsigned int c)
unsigned int CDECL _mbcjistojms_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(HIBYTE(c) >= 0x21 && HIBYTE(c) <= 0x7e &&
LOBYTE(c) >= 0x21 && LOBYTE(c) <= 0x7e)
......@@ -592,6 +599,14 @@ unsigned int CDECL _mbcjistojms(unsigned int c)
}
/*********************************************************************
* _mbcjistojms(MSVCRT.@)
*/
unsigned int CDECL _mbcjistojms(unsigned int c)
{
return _mbcjistojms_l(c, NULL);
}
/*********************************************************************
* _mbcjmstojis(MSVCRT.@)
*
* Converts a sjis character to jis.
......
......@@ -695,7 +695,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms (long)
# stub _mbcjistojms_l(long ptr)
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
# stub _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr)
......
......@@ -593,7 +593,7 @@
@ cdecl _mbccpy_s(ptr long ptr ptr)
@ cdecl _mbccpy_s_l(ptr long ptr ptr ptr)
@ cdecl _mbcjistojms(long)
@ stub _mbcjistojms_l
@ cdecl _mbcjistojms_l(long ptr)
@ cdecl _mbcjmstojis(long)
@ stub _mbcjmstojis_l
@ cdecl _mbclen(ptr)
......@@ -1163,7 +1163,7 @@
@ cdecl _o__mbccpy_s(ptr long ptr ptr) _mbccpy_s
@ cdecl _o__mbccpy_s_l(ptr long ptr ptr ptr) _mbccpy_s_l
@ cdecl _o__mbcjistojms(long) _mbcjistojms
@ stub _o__mbcjistojms_l
@ cdecl _o__mbcjistojms_l(long ptr) _mbcjistojms_l
@ cdecl _o__mbcjmstojis(long) _mbcjmstojis
@ stub _o__mbcjmstojis_l
@ cdecl _o__mbclen(ptr) _mbclen
......
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