xref: /openbsd/gnu/usr.bin/gcc/gcc/mbchar.h (revision c87b03e5)
1*c87b03e5Sespie /* Various declarations for functions found in mbchar.c
2*c87b03e5Sespie    Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
3*c87b03e5Sespie 
4*c87b03e5Sespie This file is part of GCC.
5*c87b03e5Sespie 
6*c87b03e5Sespie GCC is free software; you can redistribute it and/or modify it under
7*c87b03e5Sespie the terms of the GNU General Public License as published by the Free
8*c87b03e5Sespie Software Foundation; either version 2, or (at your option) any later
9*c87b03e5Sespie version.
10*c87b03e5Sespie 
11*c87b03e5Sespie GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12*c87b03e5Sespie WARRANTY; without even the implied warranty of MERCHANTABILITY or
13*c87b03e5Sespie FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14*c87b03e5Sespie for more details.
15*c87b03e5Sespie 
16*c87b03e5Sespie You should have received a copy of the GNU General Public License
17*c87b03e5Sespie along with GCC; see the file COPYING.  If not, write to the Free
18*c87b03e5Sespie Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19*c87b03e5Sespie 02111-1307, USA.  */
20*c87b03e5Sespie 
21*c87b03e5Sespie #ifndef GCC_MBCHAR_H
22*c87b03e5Sespie #define GCC_MBCHAR_H
23*c87b03e5Sespie 
24*c87b03e5Sespie #ifdef MULTIBYTE_CHARS
25*c87b03e5Sespie 
26*c87b03e5Sespie /* Escape character used for JIS encoding */
27*c87b03e5Sespie #define JIS_ESC_CHAR 0x1b
28*c87b03e5Sespie 
29*c87b03e5Sespie #define ISSJIS1(c)   (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef))
30*c87b03e5Sespie #define ISSJIS2(c)   (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc))
31*c87b03e5Sespie #define ISEUCJP(c)   ((c) >= 0xa1 && (c) <= 0xfe)
32*c87b03e5Sespie #define ISJIS(c)     ((c) >= 0x21 && (c) <= 0x7e)
33*c87b03e5Sespie 
34*c87b03e5Sespie extern int local_mbtowc     PARAMS ((wchar_t *, const char *, size_t));
35*c87b03e5Sespie extern int local_mblen      PARAMS ((const char *, size_t));
36*c87b03e5Sespie extern int local_mb_cur_max PARAMS ((void));
37*c87b03e5Sespie 
38*c87b03e5Sespie /* The locale being used for multibyte characters in string/char literals.  */
39*c87b03e5Sespie extern const char *literal_codeset;
40*c87b03e5Sespie #endif /* MULTIBYTE_CHARS */
41*c87b03e5Sespie #endif /* ! GCC_MBCHAR_H */
42