diff options
author | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-10-31 22:32:26 -0700 |
---|---|---|
committer | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-10-31 22:32:26 -0700 |
commit | 78f771c881f9ef27ca4a35b3fc9efc407edba665 (patch) | |
tree | bc0e01ee84e7d44b8e89a309f7121d7891878aa0 /com32/hdt/hdt-common.h | |
parent | 111fe227a44f170e91f2d6f57dd6ce285b67a56a (diff) | |
download | syslinux-78f771c881f9ef27ca4a35b3fc9efc407edba665.tar.gz |
hdt: change remaining printf to more_printf (CLI)
A lot of places still had printf() instead of more_printf().
This patch does a bulk update and add missing reset_more_printf(),
used to reset the pager counter between each command call.
This also changes the more_printf() routine to delete the "--More--"
line while scrolling.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt/hdt-common.h')
-rw-r--r-- | com32/hdt/hdt-common.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h index 8ef24e7b..dddcb55c 100644 --- a/com32/hdt/hdt-common.h +++ b/com32/hdt/hdt-common.h @@ -60,18 +60,19 @@ extern int display_line_nb; #define pause_printf() do {\ - printf("--More--");\ - get_key(stdin, 0);\ - printf("\n");\ + printf("--More--");\ + get_key(stdin, 0);\ + printf("\033[2K\033[1G\033[1F\n");\ } while (0); #define more_printf(...) do {\ if (display_line_nb == 20) {\ - printf("\nPress any key to continue");\ + printf("\n--More--");\ display_line_nb=0;\ get_key(stdin, 0);\ + printf("\033[2K\033[1G\033[1F");\ }\ - printf ( __VA_ARGS__);\ + printf(__VA_ARGS__);\ display_line_nb++; \ } while (0); |