summaryrefslogtreecommitdiff
path: root/gcc/pretty-print.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-10 18:17:06 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-10 18:17:06 +0000
commitbfdec0d1361ff370dfd86bbcbb16077eafaca5c3 (patch)
tree6b4733cd709d9969e774e038f5d1924ffe164466 /gcc/pretty-print.c
parentcd81f692b24d2a1fa8388e7b53e3644a0d90e9d8 (diff)
downloadgcc-bfdec0d1361ff370dfd86bbcbb16077eafaca5c3.tar.gz
* pretty-print.c (pp_base_indent): Rename from pp_indent.
* c-pretty-print.h (pp_c_pretty_print_flag)s: New datatype. (struct c_pretty_print_info): Add more fields. (pp_c_left_paren): Move to c-pretty-print.c. (pp_c_right_paren): Likewise. (pp_c_left_brace): Likewise. (pp_c_right_brace): Likewise. (pp_c_left_bracket): Likewise. (pp_c_right_bracket): Likewise. (pp_c_declarator): Declare. (pp_c_direct_declarator): Likewise. (pp_c_specifier_qualifier_list): Likewise. (pp_c_type_id): Likewise. * c-pretty-print.c (pp_c_cv_qualifier): Change prootype. Rework.. (pp_c_type_qualifier_list): New. (pp_c_pointer): Likewise. (pp_c_parameter_type_list): Likewise. (pp_c_function_definition): Likewise. (pp_c_id_expression): Likewise. (pp_c_simple_type_specifier): Tidy. (pp_c_unary_expression): Likewise. (pp_c_expression): Likewise. (pp_c_pretty_printer_init): Likewise. (pp_c_specifier_qualifier_list): Rework.. (pp_c_abstract_declarator): Likewise. (pp_c_postfix_expression): Likewise. (pp_c_primary_expression): Likewise. (pp_c_cast_expression): Likewise. (pp_c_direct_abstract_declarator): Likewise. (pp_c_storage_class_specifier): Likewise. (pp_c_function_specifier): Likewise. (pp_c_declaration_specifiers): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declaration): Likewise. (pp_c_statement): Likewise. (pp_c_integer_constant): Rename from pp_c_integer_literal. (pp_c_character_constant): Rename from pp_c_character_literal. (pp_c_bool_constant): Rename from pp_c_bool_literal. (pp_c_enumeration_constant): Rename from pp_c_enumerator. (pp_c_floating_constant): Rename from pp_c_real_literal. (pp_c_constant): Rename from pp_c_literal. * c-lang.c: Include diagnostic.h and c-pretty-print.h (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (c_initialize_diagnostics): New. * Makefile.in (c-lang.o): Update dependency. cp/ * error.c (dump_expr): Tidy. * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New. (pp_cxx_begin_template_argument_list): Likewise. (pp_cxx_end_template_argument_list): Likewise. (is_destructor_name): Likewise. (pp_cxx_unqualified_id): Likewise. (pp_cxx_qualified_id): Likewise. (pp_cxx_id_expression): Likewise. (pp_cxx_new_expression): Likewise. (pp_cxx_delete_expression): Likewise. (pp_cxx_pm_expression): Likewise. (pp_cxx_type_specifier): Rework. (pp_cxx_type_id): Likewise. (pp_cxx_primary_expression): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_unary_expression): Likewise. (pp_cxx_multiplicative_expression): Likewise. (pp_cxx_conditional_expression): Likewise. (pp_cxx_assignment_expression): Likewise. (pp_cxx_pretty_printer_init): Tidy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pretty-print.c')
-rw-r--r--gcc/pretty-print.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
index 9d0ed01d7cc..d865107d81f 100644
--- a/gcc/pretty-print.c
+++ b/gcc/pretty-print.c
@@ -90,19 +90,6 @@ pp_clear_state (pretty_printer *pp)
pp_indentation (pp) = 0;
}
-/* Insert enough spaces into the output area of PRETTY-PRINTER to bring
- the column position to the current indentation level, assuming that a
- newline has just been written to the buffer. */
-static void
-pp_indent (pretty_printer *pp)
-{
- int n = pp_indentation (pp);
- int i;
-
- for (i = 0; i < n; ++i)
- pp_space (pp);
-}
-
/* Flush the formatted text of PRETTY-PRINTER onto the attached stream. */
static inline void
pp_write_text_to_stream (pretty_printer *pp)
@@ -164,6 +151,19 @@ pp_append_r (pretty_printer *pp, const char *start, int length)
pp->buffer->line_length += length;
}
+/* Insert enough spaces into the output area of PRETTY-PRINTER to bring
+ the column position to the current indentation level, assuming that a
+ newline has just been written to the buffer. */
+void
+pp_base_indent (pretty_printer *pp)
+{
+ int n = pp_indentation (pp);
+ int i;
+
+ for (i = 0; i < n; ++i)
+ pp_space (pp);
+}
+
/* Format a message pointed to by TEXT. The following format specifiers are
recognized as being client independent:
%d, %i: (signed) integer in base ten.
@@ -399,7 +399,7 @@ pp_base_emit_prefix (pretty_printer *pp)
case DIAGNOSTICS_SHOW_PREFIX_ONCE:
if (pp->emitted_prefix)
{
- pp_indent (pp);
+ pp_base_indent (pp);
break;
}
pp_indentation (pp) += 3;