aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-06-05 14:08:01 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-06-05 14:08:01 -0700
commit64f2f028926ae3bc6de7d99130f5ac03a69c3c0d (patch)
treecad018473c67889ccac9f17bfdc847fe234d6a13
parentbc97f0c0b51bd1fdc49f756200dd2805f7aac08d (diff)
downloadsyslinux-64f2f028926ae3bc6de7d99130f5ac03a69c3c0d.tar.gz
syslinux-64f2f028926ae3bc6de7d99130f5ac03a69c3c0d.tar.xz
syslinux-64f2f028926ae3bc6de7d99130f5ac03a69c3c0d.zip
Fix alignment of tab and timeout messagessyslinux-3.50-pre19
-rw-r--r--com32/modules/menumain.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/com32/modules/menumain.c b/com32/modules/menumain.c
index 6f890f2b..f5d2dd33 100644
--- a/com32/modules/menumain.c
+++ b/com32/modules/menumain.c
@@ -440,6 +440,7 @@ draw_menu(int sel, int top, int edit_line)
int x, y;
int sbtop = 0, sbbot = 0;
const char *tabmsg;
+ int tabmsg_len;
if ( nentries > MENU_ROWS ) {
int sblen = MENU_ROWS*MENU_ROWS/nentries;
@@ -476,7 +477,10 @@ draw_menu(int sel, int top, int edit_line)
else
tabmsg = messages[MSG_NOTAB].msg;
- printf("\1#8\033[%d;1H%s", TABMSG_ROW, pad_line(tabmsg, 1, WIDTH));
+ tabmsg_len = strlen(tabmsg);
+
+ printf("\1#8\033[%d;%dH%s",
+ TABMSG_ROW, 1+HSHIFT+((WIDTH-tabmsg_len)>>1), tabmsg);
printf("\1#0\033[%d;1H", END_ROW);
}
@@ -816,7 +820,8 @@ run_menu(void)
}
*tq = '\0';
- printf("\033[%d;%dH\2#14 %s ", TIMEOUT_ROW, HSHIFT+1+((WIDTH-nc)>>1), buf);
+ printf("\033[%d;%dH\2#14 %s ", TIMEOUT_ROW,
+ HSHIFT+1+((WIDTH-nc-2)>>1), buf);
to_clear = 1;
} else {
to_clear = 0;