Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] TUI: rewrite tui_query_hook()
Date: Thu, 08 Jan 2015 13:43:00 -0000	[thread overview]
Message-ID: <CA+C-WL9PgF4j6mzX7Tytsu8a_rAvzfeVmDLbAxcDFfAAOoep1g@mail.gmail.com> (raw)
In-Reply-To: <831tn5760g.fsf@gnu.org>

On Thu, Jan 8, 2015 at 8:31 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Patrick Palka <patrick@parcs.ath.cx>
>> Cc: Patrick Palka <patrick@parcs.ath.cx>
>> 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.


  reply	other threads:[~2015-01-08 13:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  3:51 Patrick Palka
2015-01-08 11:03 ` Pedro Alves
2015-01-08 12:40   ` Patrick Palka
2015-01-08 13:53     ` Pedro Alves
2015-01-08 14:10       ` Patrick Palka
2015-01-08 14:14         ` Patrick Palka
2015-01-08 14:25         ` Patrick Palka
2015-01-08 15:17   ` [PATCH] Consolidate the custom TUI query hook with default query hook Patrick Palka
2015-01-08 15:50     ` Pedro Alves
2015-01-08 13:31 ` [PATCH] TUI: rewrite tui_query_hook() Eli Zaretskii
2015-01-08 13:43   ` Patrick Palka [this message]
2015-01-08 13:57     ` Pedro Alves
2015-01-08 14:14     ` Eli Zaretskii
2015-01-08 14:27       ` Patrick Palka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+C-WL9PgF4j6mzX7Tytsu8a_rAvzfeVmDLbAxcDFfAAOoep1g@mail.gmail.com \
    --to=patrick@parcs.ath.cx \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox