summaryrefslogtreecommitdiff
path: root/com32/cmenu
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 10:15:35 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 10:15:35 -0700
commit7aa59fb655a899ef9f2c7206fbc45e743e7e8536 (patch)
tree207de6db403fa87f1f5739c45c84ebc7d4eaf280 /com32/cmenu
parent6c072f6d79ff275284c1bcc9cd70fad87c517aaa (diff)
downloadsyslinux-7aa59fb655a899ef9f2c7206fbc45e743e7e8536.tar.gz
cmenu: fix Login/Password and Kernel Arguments lines (complex.c)
Update the cmenu example complex.c to use clear_line(): cprint behavior has changed w.r.t. cursor positioning (it is automatically advanced now). Note: need to reset the colors before clearing the line since the status bar is printed just before the Kernel Arguments line and it changes the background color. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/complex.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/com32/cmenu/complex.c b/com32/cmenu/complex.c
index 4bd74d54..9dd43729 100644
--- a/com32/cmenu/complex.c
+++ b/com32/cmenu/complex.c
@@ -87,7 +87,7 @@ void keys_handler(t_menuitem * mi, unsigned int scancode)
csprint("Command line:", 0x07);
editstring(mi->data, ACTIONLEN);
gotoxy(EDITPROMPT, 1);
- cprint(' ', 0x07, nc - 1);
+ clear_line();
}
}
@@ -109,11 +109,11 @@ t_handler_return login_handler(t_menuitem * mi)
csprint("Enter Username: ", 0x07);
getstring(login, sizeof username);
gotoxy(PWDPROMPT, 1);
- cprint(' ', 0x07, nc);
+ clear_line();
csprint("Enter Password: ", 0x07);
getpwd(pwd, sizeof pwd);
gotoxy(PWDPROMPT, 1);
- cprint(' ', 0x07, nc);
+ clear_line();
if (authenticate_user(login, pwd)) {
strcpy(username, login);
@@ -159,9 +159,10 @@ void msys_handler(t_menusystem * ms, t_menuitem * mi)
if (mi->parindex != PREPMENU) // If we are not in the PREP MENU
{
gotoxy(INFLINE, 0);
- cprint(' ', 0x07, nc);
+ reset_colors();
+ clear_line();
gotoxy(INFLINE + 1, 0);
- cprint(' ', 0x07, nc);
+ clear_line();
return;
}
strcpy(infoline, " ");
@@ -181,9 +182,10 @@ void msys_handler(t_menusystem * ms, t_menuitem * mi)
strcat(infoline, "repair=lin ");
gotoxy(INFLINE, 0);
- cprint(' ', 0x07, nc);
+ reset_colors();
+ clear_line();
gotoxy(INFLINE + 1, 0);
- cprint(' ', 0x07, nc);
+ clear_line();
gotoxy(INFLINE, 0);
csprint("Kernel Arguments:", 0x07);
gotoxy(INFLINE, 17);