mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
hyptop: Move separator line to table update
The separator line is written as part of the input processing step and is better be moved to the place where the table is actually written. Same goes for the terminating '\n' which is performed as the final step while updating the terminal in batch mode. While at it, use the designated print functions over raw printf(). Reviewed-by: Mete Durlu <meted@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -296,7 +296,6 @@ static void l_update_term_curses(void)
|
||||
static void l_update_term_batch(void)
|
||||
{
|
||||
g.w.cur->update_term(g.w.cur);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -435,8 +435,5 @@ void opts_iterations_next(void)
|
||||
if (g.o.iterations_act >= g.o.iterations)
|
||||
hyptop_exit(0);
|
||||
}
|
||||
if (g.o.batch_mode_specified)
|
||||
printf("---------------------------------------------------"
|
||||
"----------------------------\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -950,6 +950,9 @@ static void l_table_print_all(struct table *t)
|
||||
hyptop_print_nl();
|
||||
}
|
||||
l_row_print(t, t->row_last);
|
||||
hyptop_print_nl();
|
||||
hyptop_printf("------------------------------------------------------"
|
||||
"-------------------------\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user