summaryrefslogtreecommitdiff
path: root/com32/cmenu
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 22:55:28 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 22:55:28 -0700
commit3523370478ffae39eac099ecd217c42122e7443d (patch)
treed28a6146a0bb0b964b4cc020fac7536cdc3e1ac0 /com32/cmenu
parent843f0ef16067d920e9e181ef897abbaa4a432da9 (diff)
downloadsyslinux-3523370478ffae39eac099ecd217c42122e7443d.tar.gz
cmenu: fix handlers signature in the examples
The keys handler accepts three arguments: the current menu system, the current menu entry and the key pressed. Misc: fix timeout in complex.c to actually be 10 seconds. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/adv_menu.tpl2
-rw-r--r--com32/cmenu/complex.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/com32/cmenu/adv_menu.tpl b/com32/cmenu/adv_menu.tpl
index 9c38407b..be3c558e 100644
--- a/com32/cmenu/adv_menu.tpl
+++ b/com32/cmenu/adv_menu.tpl
@@ -193,7 +193,7 @@ TIMEOUTCODE ontotaltimeout()
return timeout(totaltimeoutcmd);
}
-void keys_handler(t_menuitem *mi,unsigned int scancode)
+void keys_handler(t_menusystem * ms __attribute__ (( unused )), t_menuitem * mi, int scancode)
{
int nc, nr;
diff --git a/com32/cmenu/complex.c b/com32/cmenu/complex.c
index ce5e1f74..90d43e75 100644
--- a/com32/cmenu/complex.c
+++ b/com32/cmenu/complex.c
@@ -67,7 +67,7 @@ TIMEOUTCODE ontimeout()
#define PWDATTR 0x74
#define EDITPROMPT 21
-void keys_handler(t_menuitem * mi, unsigned int scancode)
+void keys_handler(t_menusystem * ms __attribute__ (( unused )), t_menuitem * mi, int scancode)
{
int nc, nr;
@@ -268,7 +268,7 @@ int main()
reg_handler(HDLR_SCREEN, &msys_handler);
reg_handler(HDLR_KEYS, &keys_handler);
// Register the ontimeout handler, with a time out of 10 seconds
- reg_ontimeout(ontimeout, 1000, 0);
+ reg_ontimeout(ontimeout, 10, 0);
NETMENU = add_menu(" Init Network ", -1);
none = add_item("<N>one", "Dont start network", OPT_RADIOITEM, "no ", 0);