From 90300f853673b3879ab4d6a60683ff69b564c58b Mon Sep 17 00:00:00 2001 From: obrien Date: Mon, 1 Oct 2001 08:41:27 +0000 Subject: + Sync with NetBSD, bringing in feature enhancements. + Convert to ANSI-C function definitions + style(9) Submitted by: kris --- lib/libedit/map.h | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'lib/libedit/map.h') diff --git a/lib/libedit/map.h b/lib/libedit/map.h index c0f16f1..5ca7f52 100644 --- a/lib/libedit/map.h +++ b/lib/libedit/map.h @@ -34,44 +34,46 @@ * SUCH DAMAGE. * * @(#)map.h 8.1 (Berkeley) 6/4/93 + * $NetBSD: map.h,v 1.5 2000/09/04 22:06:31 lukem Exp $ + * $FreeBSD$ */ /* * el.map.h: Editor maps */ #ifndef _h_el_map -#define _h_el_map +#define _h_el_map typedef struct el_bindings_t { /* for the "bind" shell command */ - const char *name; /* function name for bind command */ - int func; /* function numeric value */ - const char *description; /* description of function */ + const char *name; /* function name for bind command */ + int func; /* function numeric value */ + const char *description; /* description of function */ } el_bindings_t; typedef struct el_map_t { - el_action_t *alt; /* The current alternate key map */ - el_action_t *key; /* The current normal key map */ - el_action_t *current; /* The keymap we are using */ - el_action_t *emacs; /* The default emacs key map */ - el_action_t *vic; /* The vi command mode key map */ - el_action_t *vii; /* The vi insert mode key map */ - int type; /* Emacs or vi */ - el_bindings_t *help; /* The help for the editor functions */ - el_func_t *func; /* List of available functions */ - int nfunc; /* The number of functions/help items */ + el_action_t *alt; /* The current alternate key map */ + el_action_t *key; /* The current normal key map */ + el_action_t *current; /* The keymap we are using */ + const el_action_t *emacs; /* The default emacs key map */ + const el_action_t *vic; /* The vi command mode key map */ + const el_action_t *vii; /* The vi insert mode key map */ + int type; /* Emacs or vi */ + el_bindings_t *help; /* The help for the editor functions */ + el_func_t *func; /* List of available functions */ + int nfunc; /* The number of functions/help items */ } el_map_t; -#define MAP_EMACS 0 -#define MAP_VI 1 +#define MAP_EMACS 0 +#define MAP_VI 1 -protected int map_bind __P((EditLine *, int, char **)); -protected int map_init __P((EditLine *)); -protected void map_end __P((EditLine *)); -protected void map_init_vi __P((EditLine *)); -protected void map_init_emacs __P((EditLine *)); -protected int map_set_editor __P((EditLine *, char *)); -protected int map_addfunc __P((EditLine *, const char *, - const char *, el_func_t)); +protected int map_bind(EditLine *, int, char **); +protected int map_init(EditLine *); +protected void map_end(EditLine *); +protected void map_init_vi(EditLine *); +protected void map_init_emacs(EditLine *); +protected int map_set_editor(EditLine *, char *); +protected int map_get_editor(EditLine *, const char **); +protected int map_addfunc(EditLine *, const char *, const char *, el_func_t); #endif /* _h_el_map */ -- cgit v1.1