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>
The word 'new' is a reserved keyword in C++ and C#, replacing it
with something else is one step further to making it possible to
build editline with a C++ compiler.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit adds a new global variable 'el_no_hist' which can be used
to disable auto-save of history as well as access to history using prev
and next keybindings (up/down arrows).
Signed-off-by: Mattias Walström <lazzer@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Handle tcgetattr(), tcsetattr() and ioctl() by wrapping them in
a retry-loop and restarting them when receiving EINTR.
Should fix problem with sporadic error messages on the console
like this one:
'Failed tcsetattr: Interrupted system call'
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
o Bump minor version for release
o Update maintainer email address
o Change to tar.xz for archive distribution
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The two functions el_bind_key() and el_bind_key_in_metamap() should
not print status message on stderr, but rather return the status of
the key binding operation.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>