summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2002-06-16 08:29:35 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2002-06-16 08:29:35 +0000
commit2b13992856d37b1bece77900f255d1341e2f26a6 (patch)
tree9a6db83108560c5d3d0f97830ca2c0d45be7ff71
parent46a23ac4ad841e9659ff811946ec87008fafab38 (diff)
Notes
-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 925ccb557d88..6098207d6ef0 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 0d28e03a733d..4491b30e45a8 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