From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id C495F386EC0E; Tue, 29 Mar 2022 19:42:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C495F386EC0E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove fputs_styled_unfiltered X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 3cd5229387926dbd2fe842328e7d923bbb41322c X-Git-Newrev: f4bf8795b382327001cf467b855e5dcd6f30fe5d Message-Id: <20220329194240.C495F386EC0E@sourceware.org> Date: Tue, 29 Mar 2022 19:42:40 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2022 19:42:40 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df4bf8795b382= 327001cf467b855e5dcd6f30fe5d commit f4bf8795b382327001cf467b855e5dcd6f30fe5d Author: Tom Tromey Date: Sat Jan 1 15:25:53 2022 -0700 Remove fputs_styled_unfiltered =20 fputs_styled_unfiltered is only called from cli_ui_out, so remove it. This area will be further simplified in future patches. Diff: --- gdb/cli-out.c | 14 ++++++++++---- gdb/utils.c | 11 ----------- gdb/utils.h | 6 ------ 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/gdb/cli-out.c b/gdb/cli-out.c index a7fcc623897..f6a508393ef 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -171,10 +171,13 @@ cli_ui_out::do_field_string (int fldno, int width, ui= _align align, =20 if (string) { + ui_file *stream =3D m_streams.back (); + stream->emit_style_escape (style); if (test_flags (unfiltered_output)) - fputs_styled_unfiltered (string, style, m_streams.back ()); + stream->puts_unfiltered (string); else - fputs_styled (string, style, m_streams.back ()); + stream->puts (string); + stream->emit_style_escape (ui_file_style ()); } =20 if (after) @@ -233,10 +236,13 @@ cli_ui_out::do_message (const ui_file_style &style, std::string str =3D string_vprintf (format, args); if (!str.empty ()) { + ui_file *stream =3D m_streams.back (); + stream->emit_style_escape (style); if (test_flags (unfiltered_output)) - fputs_styled_unfiltered (str.c_str (), style, m_streams.back ()); + stream->puts_unfiltered (str.c_str ()); else - fputs_styled (str.c_str (), style, m_streams.back ()); + stream->puts (str.c_str ()); + stream->emit_style_escape (ui_file_style ()); } } =20 diff --git a/gdb/utils.c b/gdb/utils.c index 70b266019ca..a86d2c4d386 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1762,17 +1762,6 @@ fputs_styled (const char *linebuffer, const ui_file_= style &style, =20 /* See utils.h. */ =20 -void -fputs_styled_unfiltered (const char *linebuffer, const ui_file_style &styl= e, - struct ui_file *stream) -{ - stream->emit_style_escape (style); - stream->puts_unfiltered (linebuffer); - stream->emit_style_escape (ui_file_style ()); -} - -/* See utils.h. */ - void fputs_highlighted (const char *str, const compiled_regex &highlight, struct ui_file *stream) diff --git a/gdb/utils.h b/gdb/utils.h index c9c46135b21..e721b45d7ba 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -296,12 +296,6 @@ extern void fputs_styled (const char *linebuffer, const ui_file_style &style, struct ui_file *stream); =20 -/* Unfiltered variant of fputs_styled. */ - -extern void fputs_styled_unfiltered (const char *linebuffer, - const ui_file_style &style, - struct ui_file *stream); - /* Like fputs_styled, but uses highlight_style to highlight the parts of STR that match HIGHLIGHT. */