Thank you for review. OK I'll change these and send version3 later. Ren
2016-03-08 18:40 GMT+09:00 Gerd Hoffmann <kra...@redhat.com>: > > +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 > >