mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-16 01:03:31 +00:00
fixed LF interpretation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2054 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3c656346c9
commit
bd468840d4
|
@ -619,7 +619,6 @@ static void console_put_lf(TextConsole *s)
|
||||||
TextCell *c;
|
TextCell *c;
|
||||||
int x, y1;
|
int x, y1;
|
||||||
|
|
||||||
s->x = 0;
|
|
||||||
s->y++;
|
s->y++;
|
||||||
if (s->y >= s->height) {
|
if (s->y >= s->height) {
|
||||||
s->y = s->height - 1;
|
s->y = s->height - 1;
|
||||||
|
@ -773,6 +772,7 @@ static void console_putchar(TextConsole *s, int ch)
|
||||||
break;
|
break;
|
||||||
case '\t': /* tabspace */
|
case '\t': /* tabspace */
|
||||||
if (s->x + (8 - (s->x % 8)) > s->width) {
|
if (s->x + (8 - (s->x % 8)) > s->width) {
|
||||||
|
s->x = 0;
|
||||||
console_put_lf(s);
|
console_put_lf(s);
|
||||||
} else {
|
} else {
|
||||||
s->x = s->x + (8 - (s->x % 8));
|
s->x = s->x + (8 - (s->x % 8));
|
||||||
|
@ -791,8 +791,10 @@ static void console_putchar(TextConsole *s, int ch)
|
||||||
c->t_attrib = s->t_attrib;
|
c->t_attrib = s->t_attrib;
|
||||||
update_xy(s, s->x, s->y);
|
update_xy(s, s->x, s->y);
|
||||||
s->x++;
|
s->x++;
|
||||||
if (s->x >= s->width)
|
if (s->x >= s->width) {
|
||||||
|
s->x = 0;
|
||||||
console_put_lf(s);
|
console_put_lf(s);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue