1 /* 2 Copyright (c) 1990 Regents of the University of California. 3 All rights reserved. 4 */ 5 #ifndef _MBCTYPE_H_ 6 7 #define _MBCTYPE_H_ 8 9 /* escape character used for JIS encoding */ 10 #define ESC_CHAR 0x1b 11 12 /* functions used to support SHIFT_JIS, EUC-JP, and JIS multibyte encodings */ 13 14 int _issjis1 (int c); 15 int _issjis2 (int c); 16 int _iseucjp (int c); 17 int _isjis (int c); 18 19 #define _issjis1(c) (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef)) 20 #define _issjis2(c) (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc)) 21 #define _iseucjp1(c) ((c) == 0x8e || (c) == 0x8f || ((c) >= 0xa1 && (c) <= 0xfe)) 22 #define _iseucjp2(c) ((c) >= 0xa1 && (c) <= 0xfe) 23 #define _isjis(c) ((c) >= 0x21 && (c) <= 0x7e) 24 25 #endif /* _MBCTYPE_H_ */ 26