Index: stable/10/lib/libedit/map.h =================================================================== --- stable/10/lib/libedit/map.h +++ stable/10/lib/libedit/map.h @@ -57,7 +57,7 @@ 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 Index: stable/10/lib/libedit/map.c =================================================================== --- stable/10/lib/libedit/map.c +++ stable/10/lib/libedit/map.c @@ -1395,7 +1395,7 @@ map_addfunc(EditLine *el, const char *name, const char *help, el_func_t func) { void *p; - int nf = el->el_map.nfunc + 1; + size_t nf = el->el_map.nfunc + 1; if (name == NULL || help == NULL || func == NULL) return (-1); Index: stable/10/lib/libedit/parse.c =================================================================== --- stable/10/lib/libedit/parse.c +++ stable/10/lib/libedit/parse.c @@ -252,10 +252,11 @@ protected int parse_cmd(EditLine *el, const char *cmd) { - el_bindings_t *b; + el_bindings_t *b = el->el_map.help; + size_t i; - for (b = el->el_map.help; b->name != NULL; b++) - if (strcmp(b->name, cmd) == 0) - return (b->func); + for (i = 0; i < el->el_map.nfunc; i++) + if (strcmp(b[i].name, cmd) == 0) + return (b[i].func); return (-1); } Index: stable/10/lib/libedit/read.c =================================================================== --- stable/10/lib/libedit/read.c +++ stable/10/lib/libedit/read.c @@ -517,7 +517,7 @@ #endif /* DEBUG_READ */ break; } - if ((unsigned int)cmdnum >= (unsigned int)el->el_map.nfunc) { /* BUG CHECK command */ + if ((size_t)cmdnum >= el->el_map.nfunc) { /* BUG CHECK command */ #ifdef DEBUG_EDIT (void) fprintf(el->el_errfile, "ERROR: illegal command from key 0%o\r\n", ch); Index: stable/10/lib/libedit/readline.c =================================================================== --- stable/10/lib/libedit/readline.c +++ stable/10/lib/libedit/readline.c @@ -1906,7 +1906,7 @@ map[(unsigned char)c] = fun; el_set(e, EL_ADDFN, name, name, rl_bind_wrapper); vis(dest, c, VIS_WHITE|VIS_NOSLASH, 0); - el_set(e, EL_BIND, dest, name); + el_set(e, EL_BIND, dest, name, NULL); return 0; } @@ -2014,7 +2014,7 @@ * The proper return value is undocument, but this is what the * readline source seems to do. */ - return ((el_set(e, EL_BIND, "", var, value) == -1) ? 1 : 0); + return ((el_set(e, EL_BIND, "", var, value, NULL) == -1) ? 1 : 0); } void @@ -2083,9 +2083,9 @@ rl_get_screen_size(int *rows, int *cols) { if (rows) - el_get(e, EL_GETTC, "li", rows); + el_get(e, EL_GETTC, "li", rows, NULL); if (cols) - el_get(e, EL_GETTC, "co", cols); + el_get(e, EL_GETTC, "co", cols, NULL); } void @@ -2093,9 +2093,9 @@ { char buf[64]; (void)snprintf(buf, sizeof(buf), "%d", rows); - el_set(e, EL_SETTC, "li", buf); + el_set(e, EL_SETTC, "li", buf, NULL); (void)snprintf(buf, sizeof(buf), "%d", cols); - el_set(e, EL_SETTC, "co", buf); + el_set(e, EL_SETTC, "co", buf, NULL); } char **