From fe290baf3c7c294e3fa200279169b44791a34b45 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Thu, 26 Nov 2009 00:01:12 +0100 Subject: [PATCH] hdt: print_history have to use more_printf Impact: managing scrolling in history() History can generates some scrolling, so let's use more_printf --- com32/hdt/hdt-cli.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index f2acb29..dc0bdff 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -781,14 +781,15 @@ void start_auto_mode(struct s_hardware *hardware) void print_history() { + reset_more_printf(); for (int i = 1; i < MAX_HISTORY_SIZE - 1; i++) { if (i == hdt_cli.history_pos) { - printf("*%d:'%s'\n", i, hdt_cli.history[i]); + more_printf("*%d:'%s'\n", i, hdt_cli.history[i]); continue; } if (strlen(hdt_cli.history[i]) == 0) continue; - printf(" %d:'%s'\n", i, hdt_cli.history[i]); + more_printf(" %d:'%s'\n", i, hdt_cli.history[i]); } } -- 2.7.4