summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-common.h
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-01 00:12:16 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-01 00:12:16 -0700
commit6e20c10dbc1b6740f94a01f74d6eeda8bb3a7ca4 (patch)
tree1904fdc604966c5a3b47ab0244840e109dbea83f /com32/hdt/hdt-common.h
parent78f771c881f9ef27ca4a35b3fc9efc407edba665 (diff)
downloadsyslinux-6e20c10dbc1b6740f94a01f74d6eeda8bb3a7ca4.tar.gz
hdt: use plain printf for help, not more_printf (CLI)
The help prints several elements on the same line. This can't work with more_printf() as the macro assumes each call contains one and only one \n. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt/hdt-common.h')
-rw-r--r--com32/hdt/hdt-common.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h
index dddcb55c..c84c0fea 100644
--- a/com32/hdt/hdt-common.h
+++ b/com32/hdt/hdt-common.h
@@ -65,6 +65,10 @@ extern int display_line_nb;
printf("\033[2K\033[1G\033[1F\n");\
} while (0);
+/* The brokeness of that macro is that
+ * it assumes that __VA_ARGS__ contains
+ * one \n (and only one)
+ */
#define more_printf(...) do {\
if (display_line_nb == 20) {\
printf("\n--More--");\
@@ -73,7 +77,7 @@ extern int display_line_nb;
printf("\033[2K\033[1G\033[1F");\
}\
printf(__VA_ARGS__);\
- display_line_nb++; \
+ display_line_nb++;\
} while (0);
/* Display CPU registers for debugging purposes */