56f48ce976
Mon Jul 20 16:16:38 1998 Dave Brolley <brolley@cygnus.com> * configure.in (enable_c_mbchar): New configure option. (extra_cpp_objs): Always available now. * cexp.y (mbchar.h): #include it. (yylex): Handle Multibyte characters in character literals. * cccp.c (mbchar.h): #include it. (main): Set character set based on LANG environment variable. (rescan): Handle multibyte characters in comments. (skip_if_group): See above. (validate_else): See above. (skip_to_end_of_comment): See above. (macarg1): See above. (discard_comments): See above. (rescan): Handle multibyte characters in string and character literals. (collect_expansion): See above. (skip_quoted_string): See above. (macroexpand): See above. (macarg1): See above. (discard_comments): See above. (change_newlines): See above. * c-lex.c (mbchar.h): #include it. (GET_ENVIRONMENT): New macro. (init_lex): Set character set based on LANG environment variable. (yylex): Handle multibyte characters in character literals. (yylex): Handle multibyte characters in string literals. * Makefile.in (mbchar.o): New target. (cccp$(exeext)): @extra_cpp_objs@ is always available. (cppmain$(exeext)): @extra_cpp_objs@ is always available. * mbchar.[ch]: New files for multibyte character handling. From-SVN: r21303
26 lines
856 B
C
26 lines
856 B
C
/* mbchar.h - Various declarations for functions found in mbchar.c
|
|
Copyright (C) 1998 Free Software Foundation, Inc.
|
|
*/
|
|
|
|
#ifndef __GCC_MBCHAR_H__
|
|
#define __GCC_MBCHAR_H__
|
|
|
|
#ifdef MULTIBYTE_CHARS
|
|
/* escape character used for JIS encoding */
|
|
#define JIS_ESC_CHAR 0x1b
|
|
|
|
#define ISSJIS1(c) ((c) >= 0x81 && (c) <= 0x9f || (c) >= 0xe0 && (c) <= 0xef)
|
|
#define ISSJIS2(c) ((c) >= 0x40 && (c) <= 0x7e || (c) >= 0x80 && (c) <= 0xfc)
|
|
#define ISEUCJP(c) ((c) >= 0xa1 && (c) <= 0xfe)
|
|
#define ISJIS(c) ((c) >= 0x21 && (c) <= 0x7e)
|
|
|
|
int local_mbtowc PROTO ((wchar_t *, const char *, size_t));
|
|
int local_mblen PROTO ((const char *, size_t));
|
|
int local_mb_cur_max PROTO ((void));
|
|
|
|
/* The locale being used for multibyte characters in string/char literals. */
|
|
extern char *literal_codeset;
|
|
#endif /* MULTIBYTE_CHARS */
|
|
|
|
#endif /* __GCC_MBCHAR_H__ */
|