X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Freadline%2Fkeymaps.h;h=d8cba233c0a86a2abcd6c9b01c8e43055dfeb594;hb=28ef6c316f1aff914bb95ac09787a3c83c1815fd;hp=3a504fb014fb37cd5194ed40afee95018f29815c;hpb=bb70624e964126b7ac4ff085ba163a9c35ffa18f;p=platform%2Fupstream%2Fbash.git diff --git a/lib/readline/keymaps.h b/lib/readline/keymaps.h index 3a504fb..d8cba23 100644 --- a/lib/readline/keymaps.h +++ b/lib/readline/keymaps.h @@ -30,17 +30,11 @@ extern "C" { #if defined (READLINE_LIBRARY) # include "rlstdc.h" # include "chardefs.h" +# include "rltypedefs.h" #else # include # include -#endif - -#if !defined (_FUNCTION_DEF) -# define _FUNCTION_DEF -typedef int Function (); -typedef void VFunction (); -typedef char *CPFunction (); -typedef char **CPPFunction (); +# include #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));