X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=keymap.c;h=7be686949cefcc70bec4b80b8ed8f482de984667;hp=e8bd3978c4ed03c469e3dbe2ac8910825c3b91f4;hb=3433b743b81494973ff59ab796ce2bce63469d19;hpb=170858b383d48f00f5539517d668a1c41aa80cb1 diff --git a/keymap.c b/keymap.c index e8bd397..7be6869 100644 --- a/keymap.c +++ b/keymap.c @@ -7,28 +7,15 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include -#include -#include -#include -#include -#include -#include +#include +#include #include "mutt.h" -#include "mutt_menu.h" -#include "mutt_curses.h" #include "keymap.h" #include - -#include -#include -#include - #define MUTT_FUNCTIONS_VALUES #include "functions.def" @@ -49,19 +36,15 @@ struct mapping_t Menus[] = { {"key_select_smime", MENU_KEY_SELECT_SMIME}, #endif - #ifdef MIXMASTER {"mix", MENU_MIX}, #endif - {"query", MENU_QUERY}, {"generic", MENU_GENERIC}, {NULL, 0} }; -#define mutt_check_menu(s) mutt_getvaluebyname(s, Menus) - static struct mapping_t KeyNames[] = { {"", KEY_PPAGE}, {"", KEY_NPAGE}, @@ -477,7 +460,7 @@ const char *km_keyname(int c) } else if (c >= KEY_F0 && c < KEY_F (256)) /* this maximum is just a guess */ sprintf (buf, "", c - KEY_F0); - else if (IsPrint (c)) + else if (isprint((unsigned char)c)) snprintf (buf, sizeof (buf), "%c", (unsigned char) c); else snprintf (buf, sizeof (buf), "\\x%hx", (unsigned short) c); @@ -686,7 +669,7 @@ static char *parse_keymap (int *menu, BUFFER * s, int maxmenus, int *nummenus, if (q) *q = '\0'; - if ((menu[i] = mutt_check_menu (p)) == -1) { + if ((menu[i] = mutt_getvaluebyname(p, Menus)) == -1) { snprintf (err->data, err->dsize, _("%s: no such menu"), p); goto error; }