1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00

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
This commit is contained in:
Pedro F. Giffuni 2012-07-26 15:48:07 +00:00
parent a18f885152
commit 8064706450
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238810
3 changed files with 1 additions and 32 deletions

View File

@ -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

View File

@ -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.
*/

View File

@ -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);
}