mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:04:47 +00:00
msvcrt: Implement _mbbtype according to MSDN.
This commit is contained in:
parent
dbef32e4ed
commit
24dbdf8fa5
|
@ -26,6 +26,7 @@
|
||||||
#include "msvcrt.h"
|
#include "msvcrt.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
#include "msvcrt/mbctype.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||||
|
|
||||||
|
@ -739,6 +740,31 @@ unsigned int CDECL _mbbtombc(unsigned int c)
|
||||||
return c; /* ASCII CP or no MB char */
|
return c; /* ASCII CP or no MB char */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* _mbbtype(MSVCRT.@)
|
||||||
|
*/
|
||||||
|
int CDECL _mbbtype(unsigned char c, int type)
|
||||||
|
{
|
||||||
|
if (type == 1)
|
||||||
|
{
|
||||||
|
if ((c >= 0x20 && c <= 0x7e) || (c >= 0xa1 && c <= 0xdf))
|
||||||
|
return _MBC_SINGLE;
|
||||||
|
else if ((c >= 0x40 && c <= 0x7e) || (c >= 0x80 && c <= 0xfc))
|
||||||
|
return _MBC_TRAIL;
|
||||||
|
else
|
||||||
|
return _MBC_ILLEGAL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((c >= 0x20 && c <= 0x7e) || (c >= 0xa1 && c <= 0xdf))
|
||||||
|
return _MBC_SINGLE;
|
||||||
|
else if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc))
|
||||||
|
return _MBC_LEAD;
|
||||||
|
else
|
||||||
|
return _MBC_ILLEGAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* _ismbbkana(MSVCRT.@)
|
* _ismbbkana(MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -338,7 +338,7 @@
|
||||||
@ cdecl _makepath(str str str str str)
|
@ cdecl _makepath(str str str str str)
|
||||||
@ cdecl _matherr(ptr) MSVCRT__matherr
|
@ cdecl _matherr(ptr) MSVCRT__matherr
|
||||||
@ cdecl _mbbtombc(long)
|
@ cdecl _mbbtombc(long)
|
||||||
@ stub _mbbtype #(long long)
|
@ cdecl _mbbtype(long long)
|
||||||
# extern _mbcasemap
|
# extern _mbcasemap
|
||||||
@ cdecl _mbccpy (str str)
|
@ cdecl _mbccpy (str str)
|
||||||
@ stub _mbcjistojms #(long)
|
@ stub _mbcjistojms #(long)
|
||||||
|
|
Loading…
Reference in a new issue