1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

check_hotkeys_common(): @res -> @found.

This commit is contained in:
Laurent MONIN 2006-01-06 21:37:36 +01:00 committed by Laurent MONIN
parent c08d932433
commit d767650585

View File

@ -138,7 +138,7 @@ check_hotkeys_common(struct menu *menu, unsigned char hotkey, struct terminal *t
do { do {
struct menu_item *item; struct menu_item *item;
unsigned char *text; unsigned char *text;
int res; int found;
if (++i == menu->size) i = 0; if (++i == menu->size) i = 0;
@ -158,15 +158,15 @@ check_hotkeys_common(struct menu *menu, unsigned char hotkey, struct terminal *t
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (key_pos < 0) key_pos = -key_pos; if (key_pos < 0) key_pos = -key_pos;
#endif #endif
res = (key_pos && (toupper(text[key_pos]) == key)); found = (key_pos && (toupper(text[key_pos]) == key));
} else { } else {
/* Does the key (upcased) matches first letter /* Does the key (upcased) matches first letter
* of menu item left text ? */ * of menu item left text ? */
res = (toupper(*text) == key); found = (toupper(*text) == key);
} }
if (res) { if (found) {
menu->selected = i; menu->selected = i;
return 1; return 1;
} }