qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabien Chouteau <chouteau@adacore.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add stdio char device on windows
Date: Tue, 27 Sep 2011 16:12:03 +0200	[thread overview]
Message-ID: <4E81D9B3.8040209@adacore.com> (raw)
In-Reply-To: <4E81D04C.2020106@redhat.com>

On 27/09/2011 15:31, Paolo Bonzini wrote:
> On 09/27/2011 03:14 PM, Fabien Chouteau wrote:
>> +        /* Some terminal emulator returns \r\n for Enter, just pass \n */
>> +        if (win_stdio_buf == '\r') {
>> +            continue;
>> +        }
>
> Does the \r actually do any damage?
>

It's just more convenient to have the same behavior on all hosts (i.e.
no \r).

>> +static void qemu_chr_set_echo_win_stdio(CharDriverState *chr, bool echo)
>> +{
>> +    DWORD mode = 0;
>> +
>> +    GetConsoleMode(hStdIn, &mode);
>> +
>> +    if (echo) {
>> +        SetConsoleMode(hStdIn, mode | (ENABLE_ECHO_INPUT));
>> +    } else {
>> +        SetConsoleMode(hStdIn, mode & (~ENABLE_ECHO_INPUT));
>> +    }
>> +}
> 
> You also need to enable ENABLE_LINE_INPUT for ENABLE_ECHO_INPUT to have effect.
> 

OK thanks, I missed that...

Regards,

-- 
Fabien Chouteau

      reply	other threads:[~2011-09-27 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 13:14 [Qemu-devel] [PATCH] Add stdio char device on windows Fabien Chouteau
2011-09-27 13:31 ` Paolo Bonzini
2011-09-27 14:12   ` Fabien Chouteau [this message]

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=4E81D9B3.8040209@adacore.com \
    --to=chouteau@adacore.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).