projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mappings as standalone module
[apps/madmutt.git]
/
keymap.h
diff --git
a/keymap.h
b/keymap.h
index
55251e0
..
0f215c2
100644
(file)
--- a/
keymap.h
+++ b/
keymap.h
@@
-10,16
+10,19
@@
#ifndef KEYMAP_H
#define KEYMAP_H
#ifndef KEYMAP_H
#define KEYMAP_H
-#include
"mapping.h"
+#include
<lib-lib/mapping.h>
/* maximal length of a key binding sequence used for buffer in km_bindkey */
#define MAX_SEQ 8
/* maximal length of a key binding sequence used for buffer in km_bindkey */
#define MAX_SEQ 8
+/* flags for km_dokey() */
+#define M_KM_UNBUFFERED 1 /* don't read from the key buffer */
+
/* type for key storage, the rest of mutt works fine with int type */
typedef short keycode_t;
/* 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 (c
onst c
har *, int, int, char *, char *);
+void km_bindkey (c
onst c
har *, int, int);
int km_dokey (int);
/* entry in the keymap tree */
int km_dokey (int);
/* entry in the keymap tree */
@@
-33,7
+36,7
@@
struct keymap_t {
keycode_t *keys; /* key sequence */
};
keycode_t *keys; /* key sequence */
};
-char *km_keyname (int);
+c
onst c
har *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);
int km_expand_key (char *, size_t, struct keymap_t *);
struct keymap_t *km_find_func (int, int);
void km_init (void);
@@
-79,9
+82,9
@@
extern int LastKey;
extern struct mapping_t Menus[];
struct binding_t {
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);
};
struct binding_t *km_get_table (int menu);