summaryrefslogtreecommitdiff
path: root/lib/libedit/histedit.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-05-20 15:30:18 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-05-20 15:30:18 +0000
commitad4992059beb6316e375eb481e84d2ac9718874d (patch)
treeb4418348ce8775fca7ebbdbac9afefe85c228d76 /lib/libedit/histedit.h
parente0d26c0401fcc02001347d8996fc01d17e5d5291 (diff)
Move the declaration of the function pointer type el_rfunc_t
from the private header "read.h" to the public header <histedit.h>. That's not an interface change, it was already used and documented publicly, merely not properly declared. Improve encapsulation: Make el_read a pointer to an opaque struct in struct editline, such that "read.h" no longer needs to be included from "el.h" but only from the two files using it, read.c and el.c. Only pass the required el_read_t to el_read_{s,g}etfn(), do not pass the full struct editline. OK czarkoff@, also proofread by Christian Heckendorf <mbie at ulmus dot me>.
Diffstat (limited to 'lib/libedit/histedit.h')
-rw-r--r--lib/libedit/histedit.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libedit/histedit.h b/lib/libedit/histedit.h
index cb65ba7fb05..092aa893f4f 100644
--- a/lib/libedit/histedit.h
+++ b/lib/libedit/histedit.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: histedit.h,v 1.14 2016/03/20 23:48:27 schwarze Exp $ */
+/* $OpenBSD: histedit.h,v 1.15 2016/05/20 15:30:17 schwarze Exp $ */
/* $NetBSD: histedit.h,v 1.46 2010/04/15 00:50:03 christos Exp $ */
/*-
@@ -261,6 +261,8 @@ typedef struct lineinfow {
const wchar_t *lastchar;
} LineInfoW;
+typedef int (*el_rfunc_t)(EditLine *, wchar_t *);
+
const wchar_t *el_wgets(EditLine *, int *);
int el_wgetc(EditLine *, wchar_t *);
void el_wpush(EditLine *, const wchar_t *);