From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30095 invoked by alias); 8 Jan 2015 13:31:50 -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 30084 invoked by uid 89); 8 Jan 2015 13:31:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout26.012.net.il Received: from mtaout26.012.net.il (HELO mtaout26.012.net.il) (80.179.55.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Jan 2015 13:31:47 +0000 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NHV008001KA2Z00@mtaout26.012.net.il> for gdb-patches@sourceware.org; Thu, 08 Jan 2015 15:31:22 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHV005BE1KAOQ20@mtaout26.012.net.il>; Thu, 08 Jan 2015 15:31:22 +0200 (IST) Date: Thu, 08 Jan 2015 13:31:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] TUI: rewrite tui_query_hook() In-reply-to: <1420689048-23538-1-git-send-email-patrick@parcs.ath.cx> To: Patrick Palka Cc: gdb-patches@sourceware.org, patrick@parcs.ath.cx Reply-to: Eli Zaretskii Message-id: <831tn5760g.fsf@gnu.org> References: <1420689048-23538-1-git-send-email-patrick@parcs.ath.cx> X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00180.txt.bz2 > From: Patrick Palka > Cc: Patrick Palka > Date: Wed, 7 Jan 2015 22:50:48 -0500 > > @@ -80,30 +80,18 @@ tui_query_hook (const char *msg, va_list argp) > echo (); > while (1) > { > - wrap_here (""); /* Flush any buffered output. */ > - gdb_flush (gdb_stdout); > + char response[2], answer; > > - fputs_filtered (question, gdb_stdout); > - printf_filtered (_("(y or n) ")); > + tui_puts (question); > + tui_puts (_("(y or n) ")); > > - wrap_here (""); > - gdb_flush (gdb_stdout); > - > - answer = tui_getc (stdin); > - clearerr (stdin); /* in case of C-d */ > - if (answer == EOF) /* C-d */ > + if (wgetnstr (win, response, 1) == ERR) Given the latest discussions about buffering, don't you need to call wrefresh after the second tui_puts? Thanks.