mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:55:39 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
34
sdk/lib/crt/mbstring/jmstojis.c
Normal file
34
sdk/lib/crt/mbstring/jmstojis.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <precomp.h>
|
||||
#include <mbstring.h>
|
||||
#include <locale.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
unsigned int __cdecl _mbcjmstojis(unsigned int c)
|
||||
{
|
||||
/* Conversion takes place only when codepage is 932.
|
||||
In all other cases, c is returned unchanged */
|
||||
if(get_mbcinfo()->mbcodepage == 932)
|
||||
{
|
||||
if(_ismbclegal(c) && HIBYTE(c) < 0xf0)
|
||||
{
|
||||
if(HIBYTE(c) >= 0xe0)
|
||||
c -= 0x4000;
|
||||
|
||||
c = (((HIBYTE(c) - 0x81)*2 + 0x21) << 8) | LOBYTE(c);
|
||||
|
||||
if(LOBYTE(c) > 0x7f)
|
||||
c -= 0x1;
|
||||
|
||||
if(LOBYTE(c) > 0x9d)
|
||||
c += 0x83;
|
||||
else
|
||||
c -= 0x1f;
|
||||
}
|
||||
else
|
||||
return 0; /* Codepage is 932, but c can't be converted */
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue