diff options
-rw-r--r-- | include/histedit.h | 6 | ||||
-rw-r--r-- | lib/libedit/el.c | 43 |
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 |