aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-22 17:54:20 -0600
committerTom Tromey <tom@tromey.com>2018-04-24 07:34:03 -0600
commit05b1d8d6fcde4805d25c9121f5b051f59580887a (patch)
tree77652eb2c67a6ab77841ee06688c26d69aac39da
parent0f703942d7c4f373e2aea5000081dbdc9ef8e2b1 (diff)
downloadgdb-05b1d8d6fcde4805d25c9121f5b051f59580887a.zip
gdb-05b1d8d6fcde4805d25c9121f5b051f59580887a.tar.gz
gdb-05b1d8d6fcde4805d25c9121f5b051f59580887a.tar.bz2
Remove cli_ui_out::out_field_fmt
I noticed that cli_ui_out::out_field_fmt is only used by a single caller, and it can easily be replaced by fputs_filtered. So, this patch removes it. ChangeLog 2018-04-24 Tom Tromey <tom@tromey.com> * cli-out.c (cli_ui_out::out_field_fmt): Remove. (cli_ui_out::do_field_string): Use fputs_filtered. * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/cli-out.c18
-rw-r--r--gdb/cli-out.h2
3 files changed, 7 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bec33b6..7101934 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-24 Tom Tromey <tom@tromey.com>
+
+ * cli-out.c (cli_ui_out::out_field_fmt): Remove.
+ (cli_ui_out::do_field_string): Use fputs_filtered.
+ * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
+
2018-04-23 Tom Tromey <tom@tromey.com>
* guile/scm-frame.c (gdbscm_frame_read_var): Use
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 1679ed4..ad0a34e 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -156,7 +156,7 @@ cli_ui_out::do_field_string (int fldno, int width, ui_align align,
spaces (before);
if (string)
- out_field_fmt (fldno, fldname, "%s", string);
+ fputs_filtered (string, m_streams.back ());
if (after)
spaces (after);
@@ -238,22 +238,6 @@ cli_ui_out::do_redirect (ui_file *outstream)
/* local functions */
-/* Like cli_ui_out::do_field_fmt, but takes a variable number of args
- and makes a va_list and does not insert a separator. */
-
-/* VARARGS */
-void
-cli_ui_out::out_field_fmt (int fldno, const char *fldname,
- const char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- vfprintf_filtered (m_streams.back (), format, args);
-
- va_end (args);
-}
-
void
cli_ui_out::field_separator ()
{
diff --git a/gdb/cli-out.h b/gdb/cli-out.h
index b95c998..adbd244 100644
--- a/gdb/cli-out.h
+++ b/gdb/cli-out.h
@@ -68,8 +68,6 @@ protected:
private:
void field_separator ();
- void out_field_fmt (int fldno, const char *fldname, const char *format, ...)
- ATTRIBUTE_PRINTF (4, 5);
std::vector<ui_file *> m_streams;
bool m_suppress_output;