mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 19:46:09 +08:00
Remove printfi_filtered and fprintfi_filtered
After seeing Simon's patch, I thought maybe it was finally time to remove printfi_filtered and fprintfi_filtered, in favor of using the "%*s" approach to indenting. In this patch I took the straightforward approach of always adding a leading "%*s", even when the format already started with "%s", to avoid the trickier form of: printf ("%*s", -indent, string) Regression tested on x86-64 Fedora 32. Let me know what you think. gdb/ChangeLog 2020-12-17 Tom Tromey <tromey@adacore.com> * gdbtypes.c (print_args, dump_fn_fieldlists, print_cplus_stuff) (print_gnat_stuff, print_fixed_point_type_info) (recursive_dump_type): Update. * go32-nat.c (go32_sysinfo, display_descriptor): Update. * c-typeprint.c (c_type_print_base_struct_union) (c_type_print_base_1): Update. * rust-lang.c (rust_internal_print_type): Update. * f-typeprint.c (f_language::f_type_print_base): Update. * utils.h (fprintfi_filtered, printfi_filtered): Remove. * m2-typeprint.c (m2_record_fields): Update. * p-typeprint.c (pascal_type_print_base): Update. * compile/compile-loc2c.c (push, pushf, unary, binary) (do_compile_dwarf_expr_to_c): Update. * utils.c (fprintfi_filtered, printfi_filtered): Remove.
This commit is contained in:
30
gdb/utils.c
30
gdb/utils.c
@ -2183,22 +2183,6 @@ fprintf_unfiltered (struct ui_file *stream, const char *format, ...)
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
/* Like fprintf_filtered, but prints its result indented.
|
||||
Called as fprintfi_filtered (spaces, stream, format, ...); */
|
||||
|
||||
void
|
||||
fprintfi_filtered (int spaces, struct ui_file *stream, const char *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
print_spaces_filtered (spaces, stream);
|
||||
|
||||
vfprintf_filtered (stream, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
/* See utils.h. */
|
||||
|
||||
void
|
||||
@ -2263,20 +2247,6 @@ printf_unfiltered (const char *format, ...)
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
/* Like printf_filtered, but prints it's result indented.
|
||||
Called as printfi_filtered (spaces, format, ...); */
|
||||
|
||||
void
|
||||
printfi_filtered (int spaces, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
print_spaces_filtered (spaces, gdb_stdout);
|
||||
vfprintf_filtered (gdb_stdout, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
/* Easy -- but watch out!
|
||||
|
||||
This routine is *not* a replacement for puts()! puts() appends a newline.
|
||||
|
Reference in New Issue
Block a user