aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index f4a7cfc..0e1bb39 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -35,6 +35,15 @@ typedef int iconv_t; /* dummy */
struct directive; /* Deliberately incomplete. */
struct pending_option;
struct op;
+struct strbuf;
+
+typedef bool (*convert_f) (iconv_t, const unsigned char *, size_t,
+ struct strbuf *);
+struct cset_converter
+{
+ convert_f func;
+ iconv_t cd;
+};
#ifndef HAVE_UCHAR
typedef unsigned char uchar;
@@ -369,14 +378,13 @@ struct cpp_reader
unsigned char *macro_buffer;
unsigned int macro_buffer_len;
- /* Iconv descriptor for converting from the source character set
- to the execution character set. (iconv_t)-1 for no conversion. */
- iconv_t narrow_cset_desc;
+ /* Descriptor for converting from the source character set to the
+ execution character set. */
+ struct cset_converter narrow_cset_desc;
- /* Iconv descriptor for converting from the execution character set
- to the wide execution character set. (iconv_t)-1 for no conversion
- other than zero-extending each character to the width of wchar_t. */
- iconv_t wide_cset_desc;
+ /* Descriptor for converting from the source character set to the
+ wide execution character set. */
+ struct cset_converter wide_cset_desc;
/* Tree of other included files. See cppfiles.c. */
struct splay_tree_s *all_include_files;
@@ -555,8 +563,11 @@ extern uchar *_cpp_copy_replacement_text (const cpp_macro *, uchar *);
extern size_t _cpp_replacement_text_len (const cpp_macro *);
/* In cppcharset.c. */
-cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **, const uchar *, int);
-void _cpp_destroy_iconv (cpp_reader *);
+extern cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **,
+ const uchar *, int);
+extern void _cpp_destroy_iconv (cpp_reader *);
+extern bool _cpp_interpret_string_notranslate (cpp_reader *, const cpp_string *,
+ cpp_string *);
/* Utility routines and macros. */
#define DSC(str) (const uchar *)str, sizeof str - 1