fix cli redraw

This commit is contained in:
Matthias Ringwald 2015-10-15 23:47:47 +02:00
parent 6ef426db84
commit 44d6ef7ea0

View File

@ -754,6 +754,11 @@ void reset_screen(void){
rows[i] = NULL;
}
num_rows = 0;
for (i=0;i<num_lines;i++) {
free((void*)lines[i]);
lines[i] = NULL;
}
num_lines = 0;
}
void print_line(const char * format, ...){
@ -797,8 +802,12 @@ void print_screen(void){
printf(" ");
pos++;
}
printf("| %s\n", rows[i+second_half]);
if (i + second_half < num_rows){
printf("| %s", rows[i+second_half]);
}
printf("\n");
}
printf("\n");
}
void show_usage(void){
@ -864,7 +873,6 @@ void show_usage(void){
printf_row("y/Y - OOB data off/on/toggle A/B");
printf_row("---");
printf_row("Ctrl-c - exit");
printf_row("---");
print_screen();
}