summaryrefslogtreecommitdiffstats
path: root/lib/libedit/readline.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-01-30 14:22:15 +0000
committeremaste <emaste@FreeBSD.org>2015-01-30 14:22:15 +0000
commit2f8208fe7786625939fcd121b4e4289a8796786e (patch)
tree600dd99c25f840ddaeea654b05d28ab7e4c6c840 /lib/libedit/readline.c
parent0a6db6b09eaecbd84ff23691f42dc39563edb5d7 (diff)
downloadFreeBSD-src-2f8208fe7786625939fcd121b4e4289a8796786e.zip
FreeBSD-src-2f8208fe7786625939fcd121b4e4289a8796786e.tar.gz
Merge libedit fixes from NetBSD
Add trailing NULL's to the varargs functions as required. (John Spencer) readline.c r1.106 Bounds search for reallocated index, from OpenBSD via Andreas Fett map.c 1.34 map.h 1.10 parse.c 1.27 read.c 1.71 This is a direct commit to stable/10 as these changes are included in a broader sync with NetBSD committed by bapt@ in r276881. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1728
Diffstat (limited to 'lib/libedit/readline.c')
-rw-r--r--lib/libedit/readline.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c
index 20a0f056..b6bf6fc 100644
--- a/lib/libedit/readline.c
+++ b/lib/libedit/readline.c
@@ -1906,7 +1906,7 @@ rl_add_defun(const char *name, Function *fun, int c)
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 @@ rl_variable_bind(const char *var, const char *value)
* 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 @@ void
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 @@ rl_set_screen_size(int rows, int cols)
{
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 **
OpenPOWER on IntegriCloud