diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2003-03-06 23:12:30 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-03-06 23:12:30 +0000 |
commit | 9d10c9a9eb26bb822177b177e0f8edc7000a3b70 (patch) | |
tree | 67d3347376b5ce3e8f6b568c099d8391313de175 /gcc/cpplex.c | |
parent | d1867128b29a772691b9d5909558cf8f478cb531 (diff) | |
download | gcc-9d10c9a9eb26bb822177b177e0f8edc7000a3b70.tar.gz |
Makefile.in (c-ppoutput.o): Update.
* Makefile.in (c-ppoutput.o): Update.
* c-common.h (init_pp_output): New.
(preprocess_file): Update.
* c-lex.c (init_c_lex): Move mbchar initialization to cpplib.
Register builtins.
* c-opts.c (c_common_init): Call init_pp_output if preprocessing.
Make call to cpp_read_main_file common to whether preprocessing
or not. Don't register builtins.
* c-ppoutput.c: Include c-pragma.h.
(setup_callbacks): Rename init_pp_output.
(preprocess_file): No longer setup callbacks or call
cpp_read_main_file.
* cpphash.h (_cpp_init_mbchar): New.
* cppinit.c (init_library): Call _cpp_init_mbchar.
* cpplex.c (_cpp_init_mbchar): New.
From-SVN: r63913
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 169730d53ae..7a8af905a4c 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -89,6 +89,16 @@ static tokenrun *next_tokenrun PARAMS ((tokenrun *)); static unsigned int hex_digit_value PARAMS ((unsigned int)); static _cpp_buff *new_buff PARAMS ((size_t)); +/* Change to the native locale for multibyte conversions. */ +void +_cpp_init_mbchar () +{ +#ifdef MULTIBYTE_CHARS + setlocale (LC_CTYPE, ""); + GET_ENVIRONMENT (literal_codeset, "LANG"); +#endif +} + /* Utility routine: Compares, the token TOKEN to the NUL-terminated string STRING. |