Commit a3737481 by Neil Booth Committed by Neil Booth

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
parent d71f7700
2002-08-12 Neil Booth <neil@daikokuya.co.uk>
* 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.
2002-08-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* real.c (ieee_64): Always define.
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment