diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2002-08-12 17:21:52 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-08-12 17:21:52 +0000 |
commit | a37374818c824faeb9ac4db40bcc0229995a84f6 (patch) | |
tree | eecda0597667c0067205004c3f73f65340d9b309 /gcc/cpphash.h | |
parent | d71f770043fd525ec3df1d33311f653ecdd80e88 (diff) | |
download | gcc-a37374818c824faeb9ac4db40bcc0229995a84f6.zip gcc-a37374818c824faeb9ac4db40bcc0229995a84f6.tar.gz gcc-a37374818c824faeb9ac4db40bcc0229995a84f6.tar.bz2 |
cpphash.h (struct printer): New from cppmain.c.
* 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.
From-SVN: r56233
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 5e69c85..547a70c 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; |