Updated libedit to NetBSD upstream
Note: This unconditionally assumes wchar_t support. May need revision if some platforms prove problematic.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: map.h,v 1.9 2009/12/30 22:37:40 christos Exp $ */
|
||||
/* $NetBSD: map.h,v 1.13 2016/05/09 21:46:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -40,12 +40,13 @@
|
||||
#ifndef _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 */
|
||||
} el_bindings_t;
|
||||
typedef el_action_t (*el_func_t)(EditLine *, wint_t);
|
||||
|
||||
typedef struct el_bindings_t { /* for the "bind" shell command */
|
||||
const wchar_t *name; /* function name for bind command */
|
||||
int func; /* function numeric value */
|
||||
const wchar_t *description; /* description of function */
|
||||
} el_bindings_t;
|
||||
|
||||
typedef struct el_map_t {
|
||||
el_action_t *alt; /* The current alternate key map */
|
||||
@@ -57,7 +58,7 @@ typedef struct el_map_t {
|
||||
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 */
|
||||
size_t nfunc; /* The number of functions/help items */
|
||||
} el_map_t;
|
||||
|
||||
#define MAP_EMACS 0
|
||||
@@ -65,13 +66,14 @@ typedef struct el_map_t {
|
||||
|
||||
#define N_KEYS 256
|
||||
|
||||
protected int map_bind(EditLine *, int, const 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);
|
||||
libedit_private int map_bind(EditLine *, int, const wchar_t **);
|
||||
libedit_private int map_init(EditLine *);
|
||||
libedit_private void map_end(EditLine *);
|
||||
libedit_private void map_init_vi(EditLine *);
|
||||
libedit_private void map_init_emacs(EditLine *);
|
||||
libedit_private int map_set_editor(EditLine *, wchar_t *);
|
||||
libedit_private int map_get_editor(EditLine *, const wchar_t **);
|
||||
libedit_private int map_addfunc(EditLine *, const wchar_t *, const wchar_t *,
|
||||
el_func_t);
|
||||
|
||||
#endif /* _h_el_map */
|
||||
|
Reference in New Issue
Block a user