Create a branch for header work.

svn path=/branches/header-work/; revision=45691
This commit is contained in:
Timo Kreuzer 2010-02-26 22:57:55 +00:00
parent 14fe274b1c
commit 9ea495ba33
19538 changed files with 0 additions and 1063950 deletions

View file

@ -0,0 +1,28 @@
#include <mbstring.h>
/*
* @implemented
*/
unsigned int _mbcjmstojis(unsigned int c)
{
int c1, c2;
c2 = (unsigned char)c;
c1 = c >> 8;
if (c1 < 0xf0 && _ismbblead(c1) && _ismbbtrail(c2)) {
if (c1 >= 0xe0)
c1 -= 0x40;
c1 -= 0x70;
c1 <<= 1;
if (c2 < 0x9f) {
c1 --;
c2 -= 0x1f;
if (c2 >= (0x80-0x1f))
c2 --;
} else {
c2 -= 0x7e;
}
return ((c1 << 8) | c2);
}
return 0;
}