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:
Bjoern Walk
2024-04-29 19:48:24 +02:00
committed by Jan Höppner
parent 57eef7c412
commit 589090f79a
3 changed files with 3 additions and 4 deletions

View File

@@ -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");
}
/*

View File

@@ -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");
}

View File

@@ -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");
}
/*