diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2012-07-26 15:48:07 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2012-07-26 15:48:07 +0000 |
commit | 8064706450d54ca4807ec199d7edc34f2a7270c3 (patch) | |
tree | 86dfddfd6c669ad246b3c1eb40d061abf5cc36d7 | |
parent | a18f8851521f279e5efb2dd350b2f3c921574187 (diff) | |
download | src-8064706450d54ca4807ec199d7edc34f2a7270c3.tar.gz src-8064706450d54ca4807ec199d7edc34f2a7270c3.zip |
Drop non-portable libedit's el_data_set() and el_data_get() for
private data.
We can set/get private data with the documented el_get() and
el_set() so there's no need for our local extensions, which
never received much use anyway.
While here, also re-arrange the call to term_init_arrow. This
was left over from r89735 but is not required anymore.
This changes reduce differences against NetBSD's libedit.
MFC after: 2 months
Notes
Notes:
svn path=/head/; revision=238810
-rw-r--r-- | lib/libedit/el.c | 24 | ||||
-rw-r--r-- | lib/libedit/histedit.h | 7 | ||||
-rw-r--r-- | lib/libedit/term.c | 2 |
3 files changed, 1 insertions, 32 deletions
diff --git a/lib/libedit/el.c b/lib/libedit/el.c index 8dcd6985752b..d6cfb2df8012 100644 --- a/lib/libedit/el.c +++ b/lib/libedit/el.c @@ -473,30 +473,6 @@ el_get(EditLine *el, int op, ...) return (rv); } -/* el_data_get(): - * Set user private data. - */ -public void -el_data_set (el, data) - EditLine *el; - void *data; -{ - el->el_data = data; - - return; -} - -/* el_data_get(): - * Return user private data. - */ -public void * -el_data_get (el) - EditLine *el; -{ - if (el->el_data) - return (el->el_data); - return (NULL); -} /* el_line(): * Return editing info diff --git a/lib/libedit/histedit.h b/lib/libedit/histedit.h index 24af1d5e9127..8a6caf96c035 100644 --- a/lib/libedit/histedit.h +++ b/lib/libedit/histedit.h @@ -154,13 +154,6 @@ int el_source(EditLine *, const char *); */ void el_resize(EditLine *); - -/* - * Set user private data. - */ -void el_data_set(EditLine *, void *); -void * el_data_get(EditLine *); - /* * User-defined function interface. */ diff --git a/lib/libedit/term.c b/lib/libedit/term.c index 4899193a863a..e5264848b809 100644 --- a/lib/libedit/term.c +++ b/lib/libedit/term.c @@ -340,8 +340,8 @@ term_init(EditLine *el) if (el->el_term.t_val == NULL) return (-1); (void) memset(el->el_term.t_val, 0, T_val * sizeof(int)); - term_init_arrow(el); (void) term_set(el, NULL); + term_init_arrow(el); return (0); } |