Improper handling of AC_ARG_ENABLE() causes the configure script to
always enable CONFIG_USE_TERMCAP.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
- Move 'foreign' declaration from Makefile.am's to configure script
- Move CFLAGS from configure script to src/Makefile.am
- Remove faltering license blurb at top of configure script, no need
for this since we a) do not care, b) falls under project license
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This is a followup patch for issue #8. When the user elects
to enable Termcap checks for window resizing we need to check
what library on the system provides this functionality. Do
not assume -ltermcap, but instead check for tgetent() in all
possible libraries.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
netbsd's libedit only relies on functions offered by the traditional
libtermcap (such as tgetent()), which are *usually* (i.e. on the
majority of modern UNIX systems) supplied by ncurses, but there
exist standalone versions as well which can be used instead.
Forcing update should flush, otherwise weird stuff happen when writing
to console asynchronously (cursor is moved, text is not displayed).
Signed-off-by: Jakub Pawlowski <jakubpawlo@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
After removal of autoconf & automake generated friends we must run
./autogen.sh before configre.
Also, use docker to speed up builds (we don't need root).
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
At least when building with Clang on OS X, there is an error on
[line 1120 of editline.c][err] caused by using the `ioctl()` function
without first declaring it by including its header `<sys/ioctl.h>`.
Adding this line makes the build complete without error.
[err]: https://github.com/troglobit/editline/blob/master/src/editline.c#L1120
Signed-off-by: C0deH4cker <c0deh4cker@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds support for `--disable-eof` and `--disable-sigint` to
the Editline configure script. With either of these two switches the
`tty_special()` function bypasses the special TTY checks making it
possible to bind Ctrl-C and Ctrl-D to custom callbacks. This can be
useful if you want to emulate a Cisco style CLI rather than traditional
UNIX.
The user can of course also redefine the VINTR and VEOF special terminal
control characters, but these configure script switches may be easier to
use for some.
Also, the CLI example has been updated to bind Ctrl-D, Ctrl-C and Ctrl-Z
for testing purposes.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit reverts parts of 111fc5e, which originally was intended to
add support for custom key bindings at pos 0, or more specifically, to
be able to change the behavior of Ctrl-D. However this completely broke
compatibility with the original EOF behavior.
Signed-off-by: Toby Goodwin <toby@paccrat.org>
Signed-off-by: Joachim Nilsson <joachim.nilsson@westermo.se>