Commit bd468840d4db56198a3d7ce4692711ddc2217771
1 parent
3c656346
fixed LF interpretation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2054 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
2 deletions
console.c
@@ -619,7 +619,6 @@ static void console_put_lf(TextConsole *s) | @@ -619,7 +619,6 @@ static void console_put_lf(TextConsole *s) | ||
619 | TextCell *c; | 619 | TextCell *c; |
620 | int x, y1; | 620 | int x, y1; |
621 | 621 | ||
622 | - s->x = 0; | ||
623 | s->y++; | 622 | s->y++; |
624 | if (s->y >= s->height) { | 623 | if (s->y >= s->height) { |
625 | s->y = s->height - 1; | 624 | s->y = s->height - 1; |
@@ -773,6 +772,7 @@ static void console_putchar(TextConsole *s, int ch) | @@ -773,6 +772,7 @@ static void console_putchar(TextConsole *s, int ch) | ||
773 | break; | 772 | break; |
774 | case '\t': /* tabspace */ | 773 | case '\t': /* tabspace */ |
775 | if (s->x + (8 - (s->x % 8)) > s->width) { | 774 | if (s->x + (8 - (s->x % 8)) > s->width) { |
775 | + s->x = 0; | ||
776 | console_put_lf(s); | 776 | console_put_lf(s); |
777 | } else { | 777 | } else { |
778 | s->x = s->x + (8 - (s->x % 8)); | 778 | s->x = s->x + (8 - (s->x % 8)); |
@@ -791,8 +791,10 @@ static void console_putchar(TextConsole *s, int ch) | @@ -791,8 +791,10 @@ static void console_putchar(TextConsole *s, int ch) | ||
791 | c->t_attrib = s->t_attrib; | 791 | c->t_attrib = s->t_attrib; |
792 | update_xy(s, s->x, s->y); | 792 | update_xy(s, s->x, s->y); |
793 | s->x++; | 793 | s->x++; |
794 | - if (s->x >= s->width) | 794 | + if (s->x >= s->width) { |
795 | + s->x = 0; | ||
795 | console_put_lf(s); | 796 | console_put_lf(s); |
797 | + } | ||
796 | break; | 798 | break; |
797 | } | 799 | } |
798 | break; | 800 | break; |