summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2002-06-16 08:29:35 +0000
committermdodd <mdodd@FreeBSD.org>2002-06-16 08:29:35 +0000
commit2f995a06656a4a1504e1e0037450c56e313d846b (patch)
tree9a6db83108560c5d3d0f97830ca2c0d45be7ff71
parente8bb840a6d114723498e92ebffa91d89bb977928 (diff)
downloadFreeBSD-src-2f995a06656a4a1504e1e0037450c56e313d846b.zip
FreeBSD-src-2f995a06656a4a1504e1e0037450c56e313d846b.tar.gz
Restore local bits lost in recent merge from NetBSD.
-rw-r--r--include/histedit.h6
-rw-r--r--lib/libedit/el.c43
2 files changed, 30 insertions, 19 deletions
diff --git a/include/histedit.h b/include/histedit.h
index 925ccb5..6098207 100644
--- a/include/histedit.h
+++ b/include/histedit.h
@@ -141,6 +141,12 @@ void el_resize(EditLine *);
/*
+ * Set user private data.
+ */
+void el_data_set __P((EditLine *, void *));
+void * el_data_get __P((EditLine *));
+
+/*
* User-defined function interface.
*/
const LineInfo *el_line(EditLine *);
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
index 0d28e03..4491b30 100644
--- a/lib/libedit/el.c
+++ b/lib/libedit/el.c
@@ -333,25 +333,6 @@ el_get(EditLine *el, int op, void *ret)
break;
}
break;
-}
-
-public void
-el_data_set (el, data)
- EditLine *el;
- void *data;
-{
- el->data = data;
-
- return;
-}
-
-public void *
-el_data_get (el)
- EditLine *el;
-{
- if (el->data)
- return (el->data);
- return (NULL);
}
case EL_ADDFN:
@@ -380,6 +361,30 @@ el_data_get (el)
return (rv);
}
+/* el_data_get():
+ * Set user private data.
+ */
+public void
+el_data_set (el, data)
+ EditLine *el;
+ void *data;
+{
+ el->data = data;
+
+ return;
+}
+
+/* el_data_get():
+ * Return user private data.
+ */
+public void *
+el_data_get (el)
+ EditLine *el;
+{
+ if (el->data)
+ return (el->data);
+ return (NULL);
+}
/* el_line():
* Return editing info
OpenPOWER on IntegriCloud