|
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 |
> +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
[Prev in Thread] | Current Thread | [Next in Thread] |