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 _issjis1 (int c);
11 int _issjis2 (int c);
12 int _iseucjp (int c);
13 int _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_ */
22