X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=keymap.h;h=9849304cb4a52ed5f151090124bada64cb638ecf;hp=3668f18337a43c4b7c02604d824460a3a91a06e8;hb=7d29626ce4e1fa932c6349c7253e6f774df069fc;hpb=000b7ffd7d9cc9cfd9395727227bcbadbe8cdb18 diff --git a/keymap.h b/keymap.h index 3668f18..9849304 100644 --- a/keymap.h +++ b/keymap.h @@ -10,7 +10,7 @@ #ifndef KEYMAP_H #define KEYMAP_H -#include "mapping.h" +#include /* maximal length of a key binding sequence used for buffer in km_bindkey */ #define MAX_SEQ 8 @@ -21,8 +21,8 @@ /* type for key storage, the rest of mutt works fine with int type */ typedef short keycode_t; -void km_bind (char *, int, int, char *, char *); -void km_bindkey (char *, int, int); +void km_bind (const char *, int, int, char *, char *); +void km_bindkey (const char *, int, int); int km_dokey (int); /* entry in the keymap tree */ @@ -36,7 +36,7 @@ struct keymap_t { keycode_t *keys; /* key sequence */ }; -char *km_keyname (int); +const char *km_keyname (int); int km_expand_key (char *, size_t, struct keymap_t *); struct keymap_t *km_find_func (int, int); void km_init (void); @@ -54,8 +54,6 @@ enum { MENU_PAGER, MENU_POST, MENU_QUERY, - - MENU_PGP, MENU_SMIME, @@ -64,12 +62,7 @@ enum { MENU_KEY_SELECT_SMIME, #endif -#ifdef MIXMASTER MENU_MIX, -#endif - - - MENU_MAX }; @@ -82,31 +75,15 @@ extern int LastKey; extern struct mapping_t Menus[]; struct binding_t { - char *name; /* name of the function */ - int op; /* function id number */ - char *seq; /* default key binding */ + const char *name; /* name of the function */ + int op; /* function id number */ + const char *seq; /* default key binding */ }; struct binding_t *km_get_table (int menu); -extern struct binding_t OpGeneric[]; -extern struct binding_t OpPost[]; -extern struct binding_t OpMain[]; -extern struct binding_t OpAttach[]; -extern struct binding_t OpPager[]; -extern struct binding_t OpCompose[]; -extern struct binding_t OpBrowser[]; -extern struct binding_t OpEditor[]; -extern struct binding_t OpQuery[]; -extern struct binding_t OpAlias[]; - -extern struct binding_t OpPgp[]; - -extern struct binding_t OpSmime[]; - -#ifdef MIXMASTER -extern struct binding_t OpMix[]; -#endif +#define MUTT_FUNCTIONS_PROTO +#include "functions.def" #include "keymap_defs.h"