summaryrefslogtreecommitdiff
path: root/gcc/pretty-print.h
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-05 19:23:14 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-05 19:23:14 +0000
commit0de2b732140837dba441a8ae38145e15143cdc58 (patch)
treec9868a248f403aa9b1d76b6b3cc12ee64a26d1b1 /gcc/pretty-print.h
parentfa1fcea85db9f807a874bf913d616ae421806f06 (diff)
downloadgcc-0de2b732140837dba441a8ae38145e15143cdc58.tar.gz
* pretty-print.h (pp_set_line_maximum_length): Make macro.
(pp_set_prefix): Likewise. (pp_destroy_prefix): Likewise. (pp_remaining_character_count_for_line): Likewise. (pp_clear_output_area): Likewise. (pp_formatted_text): Likewise. (pp_last_position_in_text): Likewise. (pp_emit_prefix): Likewise. (pp_append_text): Likewise. (pp_flush): Likewise. (pp_format_text): Likewise. (pp_format_verbatim): Likewise. (pp_tree_identifier): Tidy. * pretty-print.c (pp_base_format_text): Rename from pp_format_text. (pp_base_format_verbatim): Rename from pp_format_verbatim. (pp_base_flush): Rename from pp_flush. (pp_base_set_line_maximum_length): Rename from pp_set_line_maximum_length. (pp_base_clear_output_area): Rename from pp_clear_output_area. (pp_base_set_prefix): Rename from pp_set_prefix. (pp_base_destroy_prefix): Rename from pp_destroy_prefix. (pp_base_emit_prefix): Rename from pp_emit_prefix. (pp_base_append_text): Rename from pp_append_text. (pp_base_formatted_text): Rename from pp_formatted_text. (pp_base_last_position_in_text): Rename from pp_last_position_in_text. (pp_base_remaining_character_count_for_line): Rename from pp_remaining_character_count_for_line. * diagnostic.h (diagnostic_format_decoder): Tidy. (diagnostic_flush_buffer): Likewise. * c-pretty-print.h: (pp_c_string_literal): Declare. (pp_c_real_literal): Likewise. (pp_c_integer_literal): Likewise. * c-pretty-print.c (pp_c_char): Use pp_string in lieu of pp_identifier. (pp_c_character_literal): Tidy. (pp_c_string_literal): Make public. (pp_c_bool_literal): Likewise. (pp_c_integer_literal): Likewise. (pp_c_real_literal): Likewise. * Makefile.in (C_PRETTY_PRINT_H): New variable. (c-pretty-print.o): Update dependence. cp/ * cxx-pretty-print.h: New file. * cxx-pretty-print.c: Likewise. * error.c (scratch_pretty_printer): Change type. (init_error): Tidy. (dump_aggr_type): Likewise. (dump_global_iord): Likewise. (dump_expr): Likewise. (dump_char): Remove. * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (cxx_initialize_diagnostics): New function. * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o (CXX_PRETTY_PRINT_H): New variable. (cp/cxx-pretty-print.o): New rule. (cp/cp-lang.o): Update dependence. (cp/error.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70182 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pretty-print.h')
-rw-r--r--gcc/pretty-print.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h
index d55f94198b0..484f6913608 100644
--- a/gcc/pretty-print.h
+++ b/gcc/pretty-print.h
@@ -145,9 +145,29 @@ struct pretty_print_info
bool need_newline;
};
+#define pp_set_line_maximum_length(PP, L) \
+ pp_base_set_line_maximum_length (pp_base (PP), L)
+#define pp_set_prefix(PP, P) pp_base_set_prefix (pp_base (PP), P)
+#define pp_destroy_prefix(PP) pp_base_destroy_prefix (pp_base (PP))
+#define pp_remaining_character_count_for_line(PP) \
+ pp_base_remaining_character_count_for_line (pp_base (PP))
+#define pp_clear_output_area(PP) \
+ pp_base_clear_output_area (pp_base (PP))
+#define pp_formatted_text(PP) pp_base_formatted_text (pp_base (PP))
+#define pp_last_position_in_text(PP) \
+ pp_base_last_position_in_text (pp_base (PP))
+#define pp_emit_prefix(PP) pp_base_emit_prefix (pp_base (PP))
+#define pp_append_text(PP, B, E) \
+ pp_base_append_text (pp_base (PP), B, E)
+#define pp_flush(PP) pp_base_flush (pp_base (PP))
+#define pp_format_text(PP, TI) pp_base_format_text (pp_base (PP), TI)
+#define pp_format_verbatim(PP, TI) \
+ pp_base_format_verbatim (pp_base (PP), TI)
+
#define pp_character(PP, C) pp_base_character (pp_base (PP), C)
#define pp_string(PP, S) pp_base_string (pp_base (PP), S)
#define pp_newline(PP) pp_base_newline (pp_base (PP))
+
#define pp_space(PP) pp_character (PP, ' ')
#define pp_left_paren(PP) pp_character (PP, '(')
#define pp_right_paren(PP) pp_character (PP, ')')
@@ -202,7 +222,7 @@ struct pretty_print_info
#define pp_identifier(PP, ID) pp_string (PP, ID)
#define pp_tree_identifier(PP, T) \
- pp_append_text(pp_base (PP), IDENTIFIER_POINTER (T), \
+ pp_append_text(PP, IDENTIFIER_POINTER (T), \
IDENTIFIER_POINTER (T) + IDENTIFIER_LENGTH (T))
#define pp_unsupported_tree(PP, T) \
@@ -216,20 +236,20 @@ struct pretty_print_info
#define pp_base(PP) (PP)
extern void pp_construct (pretty_printer *, const char *, int);
-extern void pp_set_line_maximum_length (pretty_printer *, int);
-extern void pp_set_prefix (pretty_printer *, const char *);
-extern void pp_destroy_prefix (pretty_printer *);
-extern int pp_remaining_character_count_for_line (pretty_printer *);
-extern void pp_clear_output_area (pretty_printer *);
-extern const char *pp_formatted_text (pretty_printer *);
-extern const char *pp_last_position_in_text (const pretty_printer *);
-extern void pp_emit_prefix (pretty_printer *);
-extern void pp_append_text (pretty_printer *, const char *, const char *);
+extern void pp_base_set_line_maximum_length (pretty_printer *, int);
+extern void pp_base_set_prefix (pretty_printer *, const char *);
+extern void pp_base_destroy_prefix (pretty_printer *);
+extern int pp_base_remaining_character_count_for_line (pretty_printer *);
+extern void pp_base_clear_output_area (pretty_printer *);
+extern const char *pp_base_formatted_text (pretty_printer *);
+extern const char *pp_base_last_position_in_text (const pretty_printer *);
+extern void pp_base_emit_prefix (pretty_printer *);
+extern void pp_base_append_text (pretty_printer *, const char *, const char *);
extern void pp_printf (pretty_printer *, const char *, ...) ATTRIBUTE_PRINTF_2;
extern void pp_verbatim (pretty_printer *, const char *, ...);
-extern void pp_flush (pretty_printer *);
-extern void pp_format_text (pretty_printer *, text_info *);
-extern void pp_format_verbatim (pretty_printer *, text_info *);
+extern void pp_base_flush (pretty_printer *);
+extern void pp_base_format_text (pretty_printer *, text_info *);
+extern void pp_base_format_verbatim (pretty_printer *, text_info *);
extern void pp_base_newline (pretty_printer *);
extern void pp_base_character (pretty_printer *, int);