From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gproxy3-pub.mail.unifiedlayer.com (gproxy3-pub.mail.unifiedlayer.com [69.89.30.42]) by sourceware.org (Postfix) with ESMTPS id 47ED23858424 for ; Sat, 22 Jan 2022 01:38:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47ED23858424 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway5.mail.pro1.eigbox.com (Postfix) with ESMTP id ABE6D10047D62 for ; Sat, 22 Jan 2022 01:38:08 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id B5M0nMKh7ikTnB5M0nyZpw; Sat, 22 Jan 2022 01:38:08 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=CeHNWJnl c=1 sm=1 tr=0 ts=61eb6000 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=DghFqjY3_ZEA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=yhuN7oXjngN0QO7ErOAA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=T2avacQ4O0Jf3dooII6LV3yICPEqXBXxeW4apqUOdiQ=; b=ZJASFbdkYPG6++B9WiB4n1evyX WpPpaqCciKTDtis7jx1AVuUTnaTmDgn2rhXmYDnTwqkyMHFd2gMqONY8blROG6bpuwoE2k0DwHwGG 8HQ8s/z0cv+jBSoBlA9dD3Yyo; Received: from 75-166-128-165.hlrn.qwest.net ([75.166.128.165]:40602 helo=prentzel.Home) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nB5Lz-001DeE-RP; Fri, 21 Jan 2022 18:38:07 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 08/19] Remove fputs_styled_unfiltered Date: Fri, 21 Jan 2022 18:37:50 -0700 Message-Id: <20220122013801.666659-9-tom@tromey.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220122013801.666659-1-tom@tromey.com> References: <20220122013801.666659-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.128.165 X-Source-L: No X-Exim-ID: 1nB5Lz-001DeE-RP X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-128-165.hlrn.qwest.net (prentzel.Home) [75.166.128.165]:40602 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3031.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2022 01:38:10 -0000 fputs_styled_unfiltered is only called from cli_ui_out, so remove it. This area will be further simplified in future patches. --- 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, if (string) { + ui_file *stream = 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 ()); } if (after) @@ -233,10 +236,13 @@ cli_ui_out::do_message (const ui_file_style &style, std::string str = string_vprintf (format, args); if (!str.empty ()) { + ui_file *stream = 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 ()); } } diff --git a/gdb/utils.c b/gdb/utils.c index fff914e92b0..0254286e8ac 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1776,17 +1776,6 @@ fputs_styled (const char *linebuffer, const ui_file_style &style, /* See utils.h. */ -void -fputs_styled_unfiltered (const char *linebuffer, const ui_file_style &style, - 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 7ec8198b2ff..cb322c34396 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -293,12 +293,6 @@ extern void fputs_styled (const char *linebuffer, const ui_file_style &style, struct ui_file *stream); -/* 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. */ -- 2.31.1