qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] ui/console: add escape sequence \e[5, 6n


From: Ren Kimura
Subject: Re: [Qemu-devel] [PATCH v2] ui/console: add escape sequence \e[5, 6n
Date: Tue, 8 Mar 2016 19:05:09 +0900

Thank you for review.
OK I'll change these and send version3 later.

Ren

2016-03-08 18:40 GMT+09:00 Gerd Hoffmann <address@hidden>:
> +static void console_respond_str(QemuConsole *s, const char *buf)
> +{
> +    TextCell *c;
> +    int y1;
> +    while (*buf) {

> +        if (s->x >= s->width) {
> +            s->x = 0;
> +            console_put_lf(s);
> +        }
> +        y1 = (s->y_base + s->y) % s->total_height;
> +        c = &s->cells[y1 * s->width + s->x];
> +        c->ch = *buf;
> +        c->t_attrib = s->t_attrib;
> +        update_xy(s, s->x, s->y);
> +        s->x++;

I think you should just call console_putchar() here instead of cut
+pasting that code block.

If that doesn't work for some reason move the code block to a new
function which can be called from both console_putchar() and
console_respond_str().

thanks,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]