From 7e66707c7662c50c82c6eb62668134e3e342c34f Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 14 Feb 2014 11:23:57 +0100 Subject: input: Add BB_ prefix to KEY_ defines Our KEY_ defines conflict with the standard Linux KEY_ defines, so add a BB_ prefix to them. Signed-off-by: Sascha Hauer --- common/menu.c | 18 +++++++++--------- common/password.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'common') diff --git a/common/menu.c b/common/menu.c index ef56190604..4cefadb412 100644 --- a/common/menu.c +++ b/common/menu.c @@ -303,7 +303,7 @@ int menu_show(struct menu *m) int repaint = 0; if (m->auto_select >= 0) - ch = KEY_RETURN; + ch = BB_KEY_RETURN; else ch = read_key(); @@ -327,7 +327,7 @@ int menu_show(struct menu *m) } break; } - case KEY_UP: + case BB_KEY_UP: m->selected = list_entry(m->selected->list.prev, struct menu_entry, list); if (&(m->selected->list) == &(m->entries)) { @@ -336,7 +336,7 @@ int menu_show(struct menu *m) } repaint = 1; break; - case KEY_DOWN: + case BB_KEY_DOWN: m->selected = list_entry(m->selected->list.next, struct menu_entry, list); if (&(m->selected->list) == &(m->entries)) { @@ -353,11 +353,11 @@ int menu_show(struct menu *m) m->selected->action(m, m->selected); repaint = 1; break; - case KEY_ENTER: - if (ch_previous == KEY_RETURN) + case BB_KEY_ENTER: + if (ch_previous == BB_KEY_RETURN) break; - case KEY_RETURN: - if (ch_previous == KEY_ENTER) + case BB_KEY_RETURN: + if (ch_previous == BB_KEY_ENTER) break; clear(); gotoXY(1,1); @@ -368,11 +368,11 @@ int menu_show(struct menu *m) else print_menu(m); break; - case KEY_HOME: + case BB_KEY_HOME: m->selected = list_first_entry(&m->entries, struct menu_entry, list); repaint = 1; break; - case KEY_END: + case BB_KEY_END: m->selected = list_last_entry(&m->entries, struct menu_entry, list); repaint = 1; break; diff --git a/common/password.c b/common/password.c index 9c1e54a359..111c139286 100644 --- a/common/password.c +++ b/common/password.c @@ -65,8 +65,8 @@ int password(unsigned char *passwd, size_t length, int flags, int timeout) puts("\r\n"); return 0; case CTL_CH('h'): - case KEY_DEL7: - case KEY_DEL: + case BB_KEY_DEL7: + case BB_KEY_DEL: if (pos > 0) { if (flags & STAR) puts("\b \b"); -- cgit v1.2.3