summaryrefslogtreecommitdiff
path: root/keymaps.h
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-23 19:00:13 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-23 19:00:13 -0500
commitf8d82ba21c017f4d23a0ee77ecb13d8d3ff1aab7 (patch)
treeacf568c234913c50f2cc159bdf4973e6f697a879 /keymaps.h
parent2916980bde9ae4d8b8e9d60062660bdca947f56e (diff)
downloadreadline-f8d82ba21c017f4d23a0ee77ecb13d8d3ff1aab7.tar.gz
Readline-4.2 import
Diffstat (limited to 'keymaps.h')
-rw-r--r--keymaps.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/keymaps.h b/keymaps.h
index 3a504fb..d8cba23 100644
--- a/keymaps.h
+++ b/keymaps.h
@@ -30,17 +30,11 @@ extern "C" {
#if defined (READLINE_LIBRARY)
# include "rlstdc.h"
# include "chardefs.h"
+# include "rltypedefs.h"
#else
# include <readline/rlstdc.h>
# include <readline/chardefs.h>
-#endif
-
-#if !defined (_FUNCTION_DEF)
-# define _FUNCTION_DEF
-typedef int Function ();
-typedef void VFunction ();
-typedef char *CPFunction ();
-typedef char **CPPFunction ();
+# include <readline/rltypedefs.h>
#endif
/* A keymap contains one entry for each key in the ASCII set.
@@ -50,7 +44,7 @@ typedef char **CPPFunction ();
TYPE says which kind of thing FUNCTION is. */
typedef struct _keymap_entry {
char type;
- Function *function;
+ rl_command_func_t *function;
} KEYMAP_ENTRY;
/* This must be large enough to hold bindings for all of the characters
@@ -59,7 +53,7 @@ typedef struct _keymap_entry {
#define KEYMAP_SIZE 256
/* I wanted to make the above structure contain a union of:
- union { Function *function; struct _keymap_entry *keymap; } value;
+ union { rl_command_func_t *function; struct _keymap_entry *keymap; } value;
but this made it impossible for me to create a static array.
Maybe I need C lessons. */
@@ -93,7 +87,7 @@ extern void rl_discard_keymap __P((Keymap));
/* Return the keymap corresponding to a given name. Names look like
`emacs' or `emacs-meta' or `vi-insert'. */
-extern Keymap rl_get_keymap_by_name __P((char *));
+extern Keymap rl_get_keymap_by_name __P((const char *));
/* Return the current keymap. */
extern Keymap rl_get_keymap __P((void));