From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21648 invoked by alias); 29 Nov 2018 22:44:04 -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 21626 invoked by uid 89); 29 Nov 2018 22:44:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sends, Zaretskii, H*i:sk:83k1kxf, H*f:sk:83k1kxf X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.55.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Nov 2018 22:44:01 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 373AB400EFEC4 for ; Thu, 29 Nov 2018 16:44:00 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id SV2Og1478PvAdSV2OggXTw; Thu, 29 Nov 2018 16:44:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To: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=Do4rFH/hmKQAEnrhlpRvjQXfjPfa/EYdphXHQz+25dY=; b=fAdUqFBLprfuGhTtuxu9zHt8sY KU/pe6DyEs+Z/bSFZQ/eC8w+oE8TDY3Gx4oWzTSBoe/PCzeDLQ3uFbLEbKjegCEIBUN772BA3okyt +xaqpfMkO7vEHzYy1QiVaORlj; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:33914 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gSV2N-001waA-UU; Thu, 29 Nov 2018 16:44:00 -0600 From: Tom Tromey To: Eli Zaretskii Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 00/16] Add styling to the gdb CLI and TUI References: <20181128001435.12703-1-tom@tromey.com> <83k1kxfzwo.fsf@gnu.org> Date: Thu, 29 Nov 2018 22:44:00 -0000 In-Reply-To: <83k1kxfzwo.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Nov 2018 09:02:15 +0200") Message-ID: <8736rja4i8.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-11/txt/msg00556.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: Eli> Will the Windows TUI build support styling out of the box? It uses Eli> ncurses. I think it should work, but you'd have to "set style enabled on" first. Eli> And I don't think I understand what you mean by "filter escape Eli> sequences from the output". Where (on what level) would such filter Eli> be installed, given that output is written directly to the console? I think either utils.c would have to be modified to change where it sends output, or stdio_file::puts would have to be modified. The idea there would be to call a host-specific function; and then on Windows do the filtering+styling if the output is going to the terminal. Eli> I see that you introduced the emit_style_escape function that switches Eli> styles. What I don't think I understand is whether it will work to Eli> have a Windows implementation of that that calls a function which Eli> causes the text output after that to use given colors? It seems it Eli> will, because the code calls emit_style_escape before and after each Eli> string, but I cannot be sure. Doing it that way can't work due to buffering. Also, this approach would be undesirable anyway, because GNU Source Highlight emits escape codes -- that's why I abandoned my earlier plan of implementing styling as objects in the utils.c buffer. Instead, I think filtering the escape sequences is really the only way. Tom