diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-12 17:21:52 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-12 17:21:52 +0000 |
commit | 70b083ab390b4c7fd386fe753377cfcc759aac06 (patch) | |
tree | eecda0597667c0067205004c3f73f65340d9b309 /gcc/cpphash.h | |
parent | fcdf59b6e20095ae0a72bb1b51272ab471dc1306 (diff) | |
download | gcc-70b083ab390b4c7fd386fe753377cfcc759aac06.tar.gz |
* cpphash.h (struct printer): New from cppmain.c.
(cpp_reader): New member.
* cppmain.c (struct printer): Move to cpphash.h.
(options, print): Remove.
(account_for_newlines, print_line, maybe_print_line,
cpp_preprocess_file, setup_callbacks, scan_translation_unit,
scan_translation_unit_trad, cb_line_change, cb_ident,
cb_define, cb_undef, cb_include, cb_file_change, dump_macro,
cb_def_pragma): Make reentrant.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56233 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 5e69c853b98..547a70c2c60 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -253,6 +253,18 @@ struct spec_nodes cpp_hashnode *n__VA_ARGS__; /* C99 vararg macros */ }; +/* Encapsulates state used to convert a stream of tokens into a text + file. */ +struct printer +{ + FILE *outf; /* Stream to write to. */ + const struct line_map *map; /* Logical to physical line mappings. */ + const cpp_token *prev; /* Previous token. */ + const cpp_token *source; /* Source token for spacing. */ + unsigned int line; /* Line currently being written. */ + unsigned char printed; /* Nonzero if something output at line. */ +}; + /* Represents the contents of a file cpplib has read in. */ struct cpp_buffer { @@ -419,6 +431,9 @@ struct cpp_reader preprocessor. */ struct spec_nodes spec_nodes; + /* Used when doing preprocessed output. */ + struct printer print; + /* Whether cpplib owns the hashtable. */ unsigned char our_hashtable; |