From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12498 invoked by alias); 8 Jan 2015 13:43:03 -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 12487 invoked by uid 89); 8 Jan 2015 13:43:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pa0-f53.google.com Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 13:43:01 +0000 Received: by mail-pa0-f53.google.com with SMTP id kq14so11800636pab.12 for ; Thu, 08 Jan 2015 05:42:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=rgFkztnVCED7AFo81GTStvBxEVL71HDAK2CjvuMOhn4=; b=X8qNfCHxtDnVvFG+alv5TImnXdj/JJUEpIAm2ft9pSL8BAKIB88+SmfLlv1J4zuZVq YAeMmjpzMMY1H5JIbTHuinHflYzCxIqWJV+GR2Oaa+LHw7Bc+mHWvy7S+1pokXuFPvp6 7byIdXrx+1cNBs1B9yXezjr3nqvIwgLwImNc8vWQp/EBbO6GthKq9v23+0W9TKh1AeJv 6OiqCUUIrAJR+4RpkaWdAz8sqdXzYaX/b0tetPmgSGs1QYxGNGkzPaoYvj2sqaY/7cyX dG8XXUocPYiwRyTODuSzwOgaGVuIgOR+QvN6OJ3/l1i3V9fu2y8UcGKj2KRXKJ6K7Hhc 2lKg== X-Gm-Message-State: ALoCoQlFFVJ71sZjU6j7pumyeeNvrQq7JM4lPg38cAg/Akn4i6rZSO2LLyLNBgRHOoeRXfcijNYd X-Received: by 10.70.123.10 with SMTP id lw10mr14727582pdb.161.1420724579068; Thu, 08 Jan 2015 05:42:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 05:42:38 -0800 (PST) In-Reply-To: <831tn5760g.fsf@gnu.org> References: <1420689048-23538-1-git-send-email-patrick@parcs.ath.cx> <831tn5760g.fsf@gnu.org> From: Patrick Palka Date: Thu, 08 Jan 2015 13:43:00 -0000 Message-ID: Subject: Re: [PATCH] TUI: rewrite tui_query_hook() To: Eli Zaretskii Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-01/txt/msg00184.txt.bz2 On Thu, Jan 8, 2015 at 8:31 AM, Eli Zaretskii wrote: >> 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? I have been using this patch for a few months locally and have not seen any buffering issues. The recently-mentioned issues are mostly Windows-related, aren't they? I can add a wrefresh() if that is what's needed to prevent potential buffering issues. > > Thanks.