public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove ui_out_flag::unfiltered_output
@ 2022-03-29 19:43 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-03-29 19:43 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7e9e74b6a8ac919227fc4432e01745217665762b

commit 7e9e74b6a8ac919227fc4432e01745217665762b
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jan 2 13:08:45 2022 -0700

    Remove ui_out_flag::unfiltered_output
    
    There is no longer any need for ui_out_flag::unfiltered_output --
    nothing ever sets this flag.  This used to be needed to make the
    _unfiltered output work, but now only printf_unfiltered can be used,
    and it uses the puts_unfiltered method.  This patch removes the flag
    and the dead code.

Diff:
---
 gdb/cli-out.c | 25 +++++--------------------
 gdb/ui-out.h  |  5 +----
 2 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 39279d96397..e0802df352b 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -173,10 +173,7 @@ cli_ui_out::do_field_string (int fldno, int width, ui_align align,
     {
       ui_file *stream = m_streams.back ();
       stream->emit_style_escape (style);
-      if (test_flags (unfiltered_output))
-	stream->puts_unfiltered (string);
-      else
-	stream->puts (string);
+      stream->puts (string);
       stream->emit_style_escape (ui_file_style ());
     }
 
@@ -208,10 +205,7 @@ cli_ui_out::do_spaces (int numspaces)
   if (m_suppress_output)
     return;
 
-  if (test_flags (unfiltered_output))
-    gdb_printf (m_streams.back (), "%*s", numspaces, "");
-  else
-    print_spaces (numspaces, m_streams.back ());
+  print_spaces (numspaces, m_streams.back ());
 }
 
 void
@@ -220,10 +214,7 @@ cli_ui_out::do_text (const char *string)
   if (m_suppress_output)
     return;
 
-  if (test_flags (unfiltered_output))
-    gdb_puts (string, m_streams.back ());
-  else
-    gdb_puts (string, m_streams.back ());
+  gdb_puts (string, m_streams.back ());
 }
 
 void
@@ -238,10 +229,7 @@ cli_ui_out::do_message (const ui_file_style &style,
     {
       ui_file *stream = m_streams.back ();
       stream->emit_style_escape (style);
-      if (test_flags (unfiltered_output))
-	stream->puts_unfiltered (str.c_str ());
-      else
-	stream->puts (str.c_str ());
+      stream->puts (str.c_str ());
       stream->emit_style_escape (ui_file_style ());
     }
 }
@@ -380,10 +368,7 @@ cli_ui_out::do_progress_end ()
 void
 cli_ui_out::field_separator ()
 {
-  if (test_flags (unfiltered_output))
-    gdb_putc (' ', m_streams.back ());
-  else
-    gdb_putc (' ', m_streams.back ());
+  gdb_putc (' ', m_streams.back ());
 }
 
 /* Constructor for cli_ui_out.  */
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index cd36211be1f..9e6ff9a29bf 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -53,12 +53,9 @@ enum ui_out_flag
 {
   ui_source_list = (1 << 0),
   fix_multi_location_breakpoint_output = (1 << 1),
-  /* For CLI output, this flag is set if unfiltered output is desired.
-     This should only be used by low-level formatting functions.  */
-  unfiltered_output = (1 << 2),
   /* This indicates that %pF should be disallowed in a printf format
      string.  */
-  disallow_ui_out_field = (1 << 3)
+  disallow_ui_out_field = (1 << 2)
 };
 
 DEF_ENUM_FLAGS_TYPE (ui_out_flag, ui_out_flags);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-29 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 19:43 [binutils-gdb] Remove ui_out_flag::unfiltered_output Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).