From 4e9546fba4d66a012ab40353a8706fbc659a37f5 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Thu, 19 Mar 2009 12:08:34 +0100 Subject: [PATCH] hdt: more_printf must use getkey Impact: Users can now press a key to continue Since we switch to an ansi raw console, the fgets() used to catch the return when we display to much lines didn't worked. We now use the getkey function to grab __any__ key, which is better then. --- com32/hdt/hdt-common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h index 8cdf663..8f5da7b 100644 --- a/com32/hdt/hdt-common.h +++ b/com32/hdt/hdt-common.h @@ -46,10 +46,9 @@ extern int display_line_nb; #define more_printf(...) do {\ if (display_line_nb == 23) {\ - char tempbuf[10];\ - printf("Press enter to continue\n");\ + printf("Press any key to continue\n");\ display_line_nb=0;\ - fgets(tempbuf, sizeof(tempbuf), stdin);\ + get_key(stdin, 0);\ }\ printf ( __VA_ARGS__);\ display_line_nb++; \ -- 2.7.4