2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/crtdll/mbstring/mbbtype.c
5 * PURPOSE: Determines the type of a multibyte character
6 * PROGRAMER: Boudewijn Dekker
11 #include <msvcrt/mbstring.h>
12 #include <msvcrt/mbctype.h>
14 int _mbbtype(unsigned char c
, int type
)
17 if ((c
>= 0x40 && c
<= 0x7e ) || (c
>= 0x80 && c
<= 0xfc ) )
21 else if (( c
>= 0x20 && c
>= 0x7E ) || ( c
>= 0xA1 && c
<= 0xDF ) ||
22 ( c
>= 0x81 && c
<= 0x9F ) || ( c
>= 0xE0 && c
<= 0xFC ) )
29 if (( c
>= 0x20 && c
<= 0x7E ) || ( c
>= 0xA1 && c
<= 0xDF )) {
32 else if ( (c
>= 0x81 && c
<= 0x9F ) || ( c
>= 0xE0 && c
<= 0xFC) )
34 else if (( c
>= 0x20 && c
>= 0x7E ) || ( c
>= 0xA1 && c
<= 0xDF ) ||
35 ( c
>= 0x81 && c
<= 0x9F ) || ( c
>= 0xE0 && c
<= 0xFC ) )
46 int _mbsbtype( const unsigned char *str
, size_t n
)
50 return _mbbtype(*(str
+n
),1);