mirror of
https://github.com/troglobit/editline.git
synced 2025-09-15 15:58:11 +08:00
Return el_status_t from el_bind_key() and el_bind_key_in_metamap()
The two functions el_bind_key() and el_bind_key_in_metamap() should not print status message on stderr, but rather return the status of the key binding operation. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -31,7 +31,12 @@
|
||||
|
||||
/* Command status codes. */
|
||||
typedef enum {
|
||||
CSdone, CSeof, CSmove, CSdispatch, CSstay, CSsignal
|
||||
CSdone = 0, /* OK */
|
||||
CSeof, /* Error, or EOF */
|
||||
CSmove,
|
||||
CSdispatch,
|
||||
CSstay,
|
||||
CSsignal
|
||||
} el_status_t;
|
||||
|
||||
/* Editline specific types, despite rl_ prefix. From Heimdal project. */
|
||||
@@ -52,8 +57,8 @@ extern void el_print_columns(int ac, char **av);
|
||||
extern el_status_t el_ring_bell(void);
|
||||
extern el_status_t el_del_char(void);
|
||||
|
||||
extern void el_bind_key(int key, el_keymap_func_t function);
|
||||
extern void el_bind_key_in_metamap(int key, el_keymap_func_t function);
|
||||
extern el_status_t el_bind_key(int key, el_keymap_func_t function);
|
||||
extern el_status_t el_bind_key_in_metamap(int key, el_keymap_func_t function);
|
||||
|
||||
extern char *rl_complete(char *token, int *match);
|
||||
extern int rl_list_possib(char *token, char ***av);
|
||||
|
Reference in New Issue
Block a user