OSDN Git Service

* libc/stdlib/mbctype.h (_iseucjp1): Like _iseucjp, but also
[pf3gnuchains/pf3gnuchains3x.git] / newlib / libc / stdlib / mbctype.h
1 #ifndef _MBCTYPE_H_
2
3 #define _MBCTYPE_H_
4
5 /* escape character used for JIS encoding */
6 #define ESC_CHAR 0x1b
7
8 /* functions used to support SHIFT_JIS, EUC-JP, and JIS multibyte encodings */
9
10 int _EXFUN(_issjis1, (int c));
11 int _EXFUN(_issjis2, (int c));
12 int _EXFUN(_iseucjp, (int c));
13 int _EXFUN(_isjis, (int c));
14
15 #define _issjis1(c)    (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef))
16 #define _issjis2(c)    (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc))
17 #define _iseucjp1(c)   ((c) == 0x8e || (c) == 0x8f || ((c) >= 0xa1 && (c) <= 0xfe))
18 #define _iseucjp2(c)   ((c) >= 0xa1 && (c) <= 0xfe)
19 #define _isjis(c)      ((c) >= 0x21 && (c) <= 0x7e)
20
21 #endif /* _MBCTYPE_H_ */