summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-03-05 22:06:07 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-03-05 22:06:07 -0800
commit703a777878cb84a59e1eb98926e81e0e223b1d0b (patch)
tree04142e3c57e12c7cfddc6595e2f9530ed1b30ec2
parent58e98acb054add0809619eaa62a614679f36d7af (diff)
downloadsyslinux-3.40-pre11.tar.gz
menu system: make the help message end row a configurable.syslinux-3.40-pre11
-rw-r--r--README.menu6
-rw-r--r--com32/modules/menumain.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/README.menu b/README.menu
index 98526299..18e93c6e 100644
--- a/README.menu
+++ b/README.menu
@@ -259,14 +259,18 @@ MENU PASSWORDMARGIN 3
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 18
-MENU ENDROW 24
+MENU ENDROW -1
MENU PASSWORDROW 11
MENU TIMEOUTROW 20
MENU HELPMSGROW 22
+MENU HELPMSGENDROW -1
These options control the layout of the menu on the screen.
The values above are the defaults.
+ A negative value is relative to the calculated length of the
+ screen (25 for text mode, 28 for VESA graphics mode.)
+
The menu system honours the TIMEOUT command; if TIMEOUT is specified
it will execute the ONTIMEOUT command if one exists, otherwise it will
diff --git a/com32/modules/menumain.c b/com32/modules/menumain.c
index e44207d1..342e587c 100644
--- a/com32/modules/menumain.c
+++ b/com32/modules/menumain.c
@@ -92,6 +92,7 @@ struct menu_parameter mparm[] = {
{ "passwordrow", 11 },
{ "timeoutrow", 20 },
{ "helpmsgrow", 22 },
+ { "helpmsgendrow", -1 },
{ NULL, 0 }
};
@@ -105,6 +106,7 @@ struct menu_parameter mparm[] = {
#define PASSWD_ROW mparm[7].value
#define TIMEOUT_ROW mparm[8].value
#define HELPMSG_ROW mparm[9].value
+#define HELPMSGEND_ROW mparm[10].value
static void
install_default_color_table(void)
@@ -422,7 +424,7 @@ display_help(const char *text)
printf("\1#16\033[%d;1H", HELPMSG_ROW);
}
- for (p = text, row = HELPMSG_ROW; *p && row < END_ROW; p++) {
+ for (p = text, row = HELPMSG_ROW; *p && row <= HELPMSGEND_ROW; p++) {
switch (*p) {
case '\r':
case '\f':
@@ -439,7 +441,7 @@ display_help(const char *text)
fputs("\033[K", stdout);
- while (row < END_ROW) {
+ while (row <= HELPMSGEND_ROW) {
printf("\033[K\033[%d;1H", ++row);
}
}