svn commit: r238810 - head/lib/libedit
Pedro F. Giffuni
pfg at FreeBSD.org
Thu Jul 26 15:48:08 UTC 2012
Author: pfg
Date: Thu Jul 26 15:48:07 2012
New Revision: 238810
URL: http://svn.freebsd.org/changeset/base/238810
Log:
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
Modified:
head/lib/libedit/el.c
head/lib/libedit/histedit.h
head/lib/libedit/term.c
Modified: head/lib/libedit/el.c
==============================================================================
--- head/lib/libedit/el.c Thu Jul 26 15:29:08 2012 (r238809)
+++ head/lib/libedit/el.c Thu Jul 26 15:48:07 2012 (r238810)
@@ -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
Modified: head/lib/libedit/histedit.h
==============================================================================
--- head/lib/libedit/histedit.h Thu Jul 26 15:29:08 2012 (r238809)
+++ head/lib/libedit/histedit.h Thu Jul 26 15:48:07 2012 (r238810)
@@ -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.
*/
Modified: head/lib/libedit/term.c
==============================================================================
--- head/lib/libedit/term.c Thu Jul 26 15:29:08 2012 (r238809)
+++ head/lib/libedit/term.c Thu Jul 26 15:48:07 2012 (r238810)
@@ -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);
}
More information about the svn-src-head
mailing list