aboutsummaryrefslogtreecommitdiff
path: root/gcc/mbchar.h
diff options
context:
space:
mode:
authorDave Brolley <brolley@cygnus.com>1998-07-20 13:35:38 +0000
committerDave Brolley <brolley@gcc.gnu.org>1998-07-20 09:35:38 -0400
commit56f48ce9765aa2b6d4742a4923fee581a12c1418 (patch)
tree671dda9b98d314335b4825d12e41d06427ebd8ce /gcc/mbchar.h
parent689fcba8611f93ce241fa090a0423e8d35324027 (diff)
downloadgcc-56f48ce9765aa2b6d4742a4923fee581a12c1418.zip
gcc-56f48ce9765aa2b6d4742a4923fee581a12c1418.tar.gz
gcc-56f48ce9765aa2b6d4742a4923fee581a12c1418.tar.bz2
configure.in (enable_c_mbchar): New configure option.
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
Diffstat (limited to 'gcc/mbchar.h')
-rw-r--r--gcc/mbchar.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/mbchar.h b/gcc/mbchar.h
new file mode 100644
index 0000000..a4b82c0
--- /dev/null
+++ b/gcc/mbchar.h
@@ -0,0 +1,25 @@
+/* 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__ */