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

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?

> +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.

Paolo

  reply	other threads:[~2011-09-27 13:32 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 [this message]
2011-09-27 14:12   ` Fabien Chouteau

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=4E81D04C.2020106@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chouteau@adacore.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).