Trivial console_putchar() fixes
cover Trivial console_putchar() fixes
Markus Armbruster (2):
console: Clean up confusing indentation in console_putchar()
console: Fix console_putchar() for CSI J
console.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.6.4
PATCH 1/2 console: Clean up confusing indentation in console_putchar()
--- console.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
console.c +9 -9
@@ -1009,16 +1009,16 @@ static void console_putchar(TextConsole *s, int ch)console_clear_xy (s, x, y); } } -break ; +break ; }case 'K' :switch (s->esc_params[0 ]) {case 0 : -/* clear to eol */ -for (x = s->x; x < s->width; x++) { +/* clear to eol */ +for (x = s->x; x < s->width; x++) {console_clear_xy (s, x, s->y); - } -break ; + } +break ;case 1 :/* clear from beginning of line */ for (x =0 ; x <= s->x; x++) {
@@ -1030,12 +1030,12 @@ static void console_putchar(TextConsole *s, int ch)for (x =0 ; x < s->width; x++) {console_clear_xy (s, x, s->y); } -break ; - } +break ; + }break ;case 'm' : -console_handle_escape (s); -break ; +console_handle_escape (s); +break ;case 'n' :/* report cursor position */ /* TODO: send ESC[row;colR */
Signature · 1 line
1.7.6.4
PATCH 2/2 console: Fix console_putchar() for CSI J
In reply to Markus ArmbrusterIt falls through to the code for CSI K. "Erase Down" also does "Erase End of Line", "Erase Up" also does "Erase Start of Line", and "Erase Screen" also does "Erase Line". Happens not to be visible. Fix it anyway. Spotted by Coverity.
--- console.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
console.c +1 -0
@@ -1011,6 +1011,7 @@ static void console_putchar(TextConsole *s, int ch) }break ; } +break ;case 'K' :switch (s->esc_params[0 ]) {case 0 :
Signature · 1 line
1.7.6.4
Stefan Hajnoczi
AppliedQuoted 8 lines · Markus Armbruster
Markus Armbruster (2):
console: Clean up confusing indentation inconsole_putchar()
console: Fixconsole_putchar()for CSI Jconsole.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-)
Thanks, applied to the trivial patches -next tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next
Stefan