From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78044 invoked by alias); 18 Aug 2019 17:27:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 77665 invoked by uid 89); 18 Aug 2019 17:27:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Draw, passing X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.4.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 18 Aug 2019 17:27:43 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 69657400C63B1 for ; Sun, 18 Aug 2019 11:23:12 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id zOxyhZKxFdnCezOxyhywSf; Sun, 18 Aug 2019 12:27:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: 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=OlKrE/tbwxdu9NK6IkhAGlngEQ4fZHL08eZDs78MKfU=; b=wl8tb0O20pV7kjOdZo2hR1yIJl sY4HMnquL/qtMSC22Q3kRbMCC6Iluh9h+0YiVJuKxxBLRV1tHGHDjGYfDbxalg0NmlcYm5MBiTAY8 +M9VzvrCR2rCdWY7FzgEBSeKa; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:44512 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hzOxx-002aYY-Vl; Sun, 18 Aug 2019 12:27:42 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 13/14] Remove some defines from tui-data.h Date: Sun, 18 Aug 2019 17:27:00 -0000 Message-Id: <20190818172735.17477-14-tom@tromey.com> In-Reply-To: <20190818172735.17477-1-tom@tromey.com> References: <20190818172735.17477-1-tom@tromey.com> X-SW-Source: 2019-08/txt/msg00401.txt.bz2 This removes the HILITE and NO_HILITE defines from tui-data.h, in favor of simply passing a bool to box_win. gdb/ChangeLog 2019-08-18 Tom Tromey * tui/tui-wingeneral.c (box_win): Change type of highlight_flag. (tui_unhighlight_win, tui_highlight_win) (tui_win_info::make_window): Update. * tui/tui-data.h (HILITE, NO_HILITE): Remove. --- gdb/ChangeLog | 7 +++++++ gdb/tui/tui-data.h | 2 -- gdb/tui/tui-wingeneral.c | 10 +++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index dda15d1fbe1..6dfea41d49e 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -102,8 +102,6 @@ public: #define CMD_NAME "cmd" #define DATA_NAME "regs" #define DISASSEM_NAME "asm" -#define HILITE TRUE -#define NO_HILITE FALSE #define MIN_WIN_HEIGHT 3 #define MIN_CMD_WIN_HEIGHT 3 diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 5fa4cfd9eee..ab0363f856c 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -56,7 +56,7 @@ tui_delete_win (WINDOW *window) /* Draw a border arround the window. */ static void box_win (struct tui_win_info *win_info, - int highlight_flag) + bool highlight_flag) { if (win_info && win_info->handle) { @@ -64,7 +64,7 @@ box_win (struct tui_win_info *win_info, int attrs; win = win_info->handle; - if (highlight_flag == HILITE) + if (highlight_flag) attrs = tui_active_border_attrs; else attrs = tui_border_attrs; @@ -92,7 +92,7 @@ tui_unhighlight_win (struct tui_win_info *win_info) && win_info->can_highlight && win_info->handle != NULL) { - box_win (win_info, NO_HILITE); + box_win (win_info, false); win_info->refresh_window (); win_info->set_highlight (false); } @@ -106,7 +106,7 @@ tui_highlight_win (struct tui_win_info *win_info) && win_info->can_highlight && win_info->handle != NULL) { - box_win (win_info, HILITE); + box_win (win_info, true); win_info->refresh_window (); win_info->set_highlight (true); } @@ -138,7 +138,7 @@ tui_win_info::make_window () { tui_gen_win_info::make_window (); if (handle != NULL && can_box ()) - box_win (this, NO_HILITE); + box_win (this, false); } /* We can't really make windows visible, or invisible. So we have to -- 2.17.2