Commit Graph

196 Commits

Author SHA1 Message Date
Joachim Nilsson
b00453554f Update to keepachangelog.com format and add to install+dist
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-28 23:33:50 +01:00
Joachim Nilsson
98583f8d0f Rename NEWS --> CHANGELOG
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-28 23:14:53 +01:00
Joachim Nilsson
01537e3bc0 Cleanup and improve Markdown syntax, inspired by libuEv
Still need to add an API overview and a useful but still simple example.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-28 23:13:20 +01:00
Joachim Nilsson
8fbc87707e Fix out-of-bounds access in user key binding routines.
Coverity CID #56737, #56738

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-11-04 23:50:48 +01:00
Joachim Nilsson
394c4f82a9 Fix suspicious use of sizeof(char **), same as sizeof(char *) but not portable.
Coverity CID #56740, #56741, #56742

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-11-04 23:42:39 +01:00
Joachim Nilsson
e53ccf61f2 Refactor: replace variables named 'new' with non-reserved word.
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>
2014-11-04 23:19:48 +01:00
Joachim Nilsson
cd50714e29 Fix memory leak in completion handler.
Coverty CID #56739

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-11-04 23:03:32 +01:00
Mattias Walström
7cd7fc4b61 Add support for el_no_hist to disable access to and auto-save of history.
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>
2014-11-04 22:47:55 +01:00
Joachim Nilsson
f7432fbfbd Add missing security token to Coverity Scan.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-09-17 05:57:41 +02:00
Joachim Nilsson
9fd8e0b4d3 Add support for Coverity Scan of editline and add neat gfx to README
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-09-17 05:56:10 +02:00
Joachim Nilsson
26bc0716b7 Travis CI integration
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-09-17 05:51:45 +02:00
Joachim Nilsson
bd9c8ddda6 Add some GNU readline compat functions for prompt handling and redisplay
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-09-17 05:49:06 +02:00
Joachim Nilsson
85e606d093 Bump version for release, v1.14.2
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-09-14 04:27:38 +02:00
Joachim Nilsson
9cc0cc1ccd Create Markdown versions of README and NEWS and update for release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-09-14 04:24:18 +02:00
Joachim Nilsson
08b7f57c98 src/sysunix.c: Restart syscalls on spurious EINTR
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>
2014-09-14 03:44:24 +02:00
Joachim Nilsson
29b7f91165 Fix el_no_echo bug leaking secrets to screen and history
This patch makes el_no_echo actually work:

- Don't echo to screen
- Don't save to history

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-06-25 03:06:07 +02:00
Joachim Nilsson
7330f21c28 Bump version for release
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>
2013-07-08 21:23:16 +02:00
Joachim Nilsson
33ffb150f2 Cleanup configure.ac and regenerate default configure files. 2013-07-08 16:47:03 +02:00
Joachim Nilsson
4bc12834fe Only clear ScreenCount if write() succeeded. 2013-07-08 16:34:32 +02:00
Joachim Nilsson
c7a6ff9317 Return el_status_t from el_bind_key() and el_bind_key_in_metamap()
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>
2013-07-08 16:27:57 +02:00
Joachim Nilsson
897a98be55 Export el_del_char() 2013-07-08 16:21:54 +02:00
Joachim Nilsson
111fc5e1fb readline(): Check custom key bindings as well.
Make sure to also check custom key bindings.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2013-07-08 16:21:29 +02:00
Joachim Nilsson
8e81add050 readline(): Check common signals first.
Make sure to check common signals first to prevent other interpretations.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2013-07-08 16:20:01 +02:00
Joachim Nilsson
088dc1d1b2 Move handy macros to global header file, useful when binding keys. 2011-01-06 10:41:07 +01:00
Joachim Nilsson
c59c62951f Update Debian rules file with configure and stamps 2011-01-06 10:40:29 +01:00
Joachim Nilsson
0646b511ab Update README and bump version to 1.14.0 for release. 2010-08-12 16:58:36 +02:00
Joachim Nilsson
4f134f1025 Reduce tgetent() buffer size from 2048 to 1024. 2010-08-12 16:27:10 +02:00
Joachim Nilsson
850e36f9db Fix SIGFPE regression in tty_info() introduced in rl_reset_terminal() commit.
When adding support for rl_reset_termial() the tty_info() code was also
refactored.  This however led to the introduction of a bug that caused
tty_cols to be set to zero.  This in turn caused c_possible() to fail
with SIGFPE in el_print_columns().

Regression was introduced in 1c89c9886c
2010-08-12 16:20:29 +02:00
Joachim Nilsson
d72069144e Minor cleanup of unnecessary explicit casts. 2010-08-11 21:19:41 +02:00
Joachim Nilsson
fc08d47bce Update debian build script for configure based build and simplify rules. 2010-08-11 19:23:24 +02:00
Joachim Nilsson
87e69be38b Add support for inhibiting completion: rl_inhibit_completion 2010-08-11 13:14:32 +02:00
Joachim Nilsson
f984a48dae Update TODO and change to use org-mode. 2010-08-11 12:48:36 +02:00
Joachim Nilsson
d4d0c002dc Update build instructions with info on --prefix 2010-08-08 17:20:36 +02:00
Joachim Nilsson
2b747467f0 Add the customary INSTALL file with some basic help on the build process. 2010-08-08 17:17:12 +02:00
Joachim Nilsson
56478685d6 Remember to check custom completion handlers before release. 2010-08-07 12:24:05 +02:00
Joachim Nilsson
916fac7cad Line scroll branch todo. 2010-08-06 23:56:51 +02:00
Joachim Nilsson
1c89c9886c Refactor tty_info() to make rl_reset_terminal() useful. 2010-08-05 15:14:06 +02:00
Joachim Nilsson
de6ff117bb Implement compat. support for rl_instream and rl_outstream 2010-08-05 13:20:35 +02:00
Joachim Nilsson
5e9177fd18 Add support for el_bind_key() and example usage binding '?' in examples/cli.c
This changeset refactors el_bind_key_in_metamap() into two functions,
adding el_bind_key(), to provide the ability for the user to bind keys
in both the regular and the meta-key maps.

Several useful, but previously internal, functions have been made global to
facilitate the example code mentioned above. These are likely useful to the
user of this library as well:

  el_print_columns() - Display words in columns across a tty_cols wide screen.
  el_ring_bell()     - Can be used as default key binding function.
  el_find_word()     - Returns a copy of the word at rl_point.
2010-08-05 12:48:51 +02:00
Joachim Nilsson
27fcc878a1 Make sure rl_instream defaults to NULL and add rl_outstream. 2010-08-05 02:00:35 +02:00
Joachim Nilsson
5de90af58f Fix new GNU Readline compat function pointers. 2010-08-05 01:56:09 +02:00
Joachim Nilsson
0a75b182b1 Improve GNU readline compat, patch by Steve Tell in 1997 and 1998
This changeset adds support for:
   * rl_prep_terminal(),
   * rl_deprep_terminal(), both of which are only wrappers to rl_ttyset().
   * rl_getc()

and:
   * (*rl_getc_function), defaults to rl_getc()
   * (*rl_event_hook)
   * (*rl_prep_term_function), defaults to rl_prep_terminal()
   * (*rl_deprep_term_function), defaults to rl_deprep_terminal()

For further details, see http://www.cs.unc.edu/~tell/dist/magic-readline.README

Differences from Steve's commit include: signal safety in rl_getc(), restart
read() on EINTR, and make sure to support "int meta_flag" to rl_prep_terminal()
which is the GNU syntax.  To that end I reused the inverse of rl_meta_chars.
2010-08-05 01:08:30 +02:00
Joachim Nilsson
6a8ecd7e2e Remove unused constant 'HIDE' 2010-08-04 03:08:38 +02:00
Joachim Nilsson
bdf5384c5b Build examples (tests) as static, for easy debugging. 2010-08-04 02:44:20 +02:00
Joachim Nilsson
ff404e2088 Move to use AS_HELP_STRING() and make default-complete enabled by default. 2010-08-04 02:39:57 +02:00
Joachim Nilsson
d04bdaf38f Add support for read_history(char *filename) and write_history(char *filename) 2010-08-04 02:23:05 +02:00
Joachim Nilsson
aea0d60478 Remove copyright, not big enough contribution - also, was not even in patch from Mr. Black. 2010-08-04 02:18:44 +02:00
Joachim Nilsson
04a0cbd902 Allocate history scrollback buffer at runtime instead of at configure.
Also make sure "unique history" is enabled by default in configure.
2010-08-04 02:12:19 +02:00
Joachim Nilsson
55aaddbc54 Restore add_history(), for compat and simplify code. 2010-08-03 21:01:01 +02:00
Joachim Nilsson
dde4471eda Merge branch 'master' of ssh://vmlinux.org/pub/git/editline 2010-08-03 00:34:39 +02:00