]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove tee_file
authorTom Tromey <tom@tromey.com>
Sun, 7 Dec 2025 15:58:58 +0000 (09:58 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 9 Feb 2026 15:15:52 +0000 (08:15 -0700)
tee_file is no longer used and can be deleted.

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/ui-file.c
gdb/ui-file.h

index d655e7edd9e00ea37f9b035799e2521a88c56b94..2bd692274f793cc20d06b07759187d748de6486a 100644 (file)
@@ -342,66 +342,6 @@ stderr_file::stderr_file (FILE *stream)
 
 \f
 
-tee_file::tee_file (ui_file *one, ui_file *two)
-  : m_one (one),
-    m_two (two)
-{}
-
-tee_file::~tee_file ()
-{
-}
-
-void
-tee_file::flush ()
-{
-  m_one->flush ();
-  m_two->flush ();
-}
-
-void
-tee_file::write (const char *buf, long length_buf)
-{
-  m_one->write (buf, length_buf);
-  m_two->write (buf, length_buf);
-}
-
-void
-tee_file::write_async_safe (const char *buf, long length_buf)
-{
-  m_one->write_async_safe (buf, length_buf);
-  m_two->write_async_safe (buf, length_buf);
-}
-
-void
-tee_file::puts (const char *linebuffer)
-{
-  m_one->puts (linebuffer);
-  m_two->puts (linebuffer);
-}
-
-bool
-tee_file::isatty ()
-{
-  return m_one->isatty ();
-}
-
-/* See ui-file.h.  */
-
-bool
-tee_file::term_out ()
-{
-  return m_one->term_out ();
-}
-
-/* See ui-file.h.  */
-
-bool
-tee_file::can_emit_style_escape ()
-{
-  return (m_one->term_out ()
-         && term_cli_styling ());
-}
-
 /* See ui-file.h.  */
 
 void
index 84529de36186bf7d729c3dc98ed566d5cbf61e0f..94897ff0b774c0e3f5e4ea30da674d441ea6327d 100644 (file)
@@ -333,43 +333,6 @@ public:
   void puts (const char *linebuffer) override;
 };
 
-/* A ui_file implementation that maps onto two ui-file objects.  */
-
-class tee_file : public ui_file
-{
-public:
-  /* Create a file which writes to both ONE and TWO.  Ownership of
-     both files is up to the user.  */
-  tee_file (ui_file *one, ui_file *two);
-  ~tee_file () override;
-
-  void write (const char *buf, long length_buf) override;
-  void write_async_safe (const char *buf, long length_buf) override;
-  void puts (const char *) override;
-
-  bool isatty () override;
-  bool term_out () override;
-  bool can_emit_style_escape () override;
-  void flush () override;
-
-  void emit_style_escape (const ui_file_style &style) override
-  {
-    m_one->emit_style_escape (style);
-    m_two->emit_style_escape (style);
-  }
-
-  void puts_unfiltered (const char *str) override
-  {
-    m_one->puts_unfiltered (str);
-    m_two->puts_unfiltered (str);
-  }
-
-private:
-  /* The two underlying ui_files.  */
-  ui_file *m_one;
-  ui_file *m_two;
-};
-
 /* A ui_file implementation that buffers terminal escape sequences.
    Note that this does not buffer in general -- it only buffers when
    an incomplete but potentially recognizable escape sequence is