diff --git a/CHANGELOG.md b/CHANGELOG.md index f34dc8f..96ccb45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ All notable changes to the project are documented in this file. ------------ ### Changes +- Add support for `--disable-eof` and `--disable-sigint` to disable + default Ctrl-D and Ctrl-C behavior. - Add support for `el_no_hist` to disable access to and auto-save of history. - GNU readline compat functions for prompt handling and redisplay. - Refactor: replace variables named 'new' with non-reserved word. @@ -15,10 +17,12 @@ All notable changes to the project are documented in this file. integrated with [Travis-CI] -- scan runs for each push to master - Rename NEWS.md --> CHANGELOG.md, with symlinks for `make install` - Attempt to align with http://keepachangelog.com/ for this file. -- Cleanup and improve Markdown syntax in [README.md], inspired by libuEv. +- Cleanup and improve Markdown syntax in [README.md], inspired by [libuEv]. - Add API and example to [README.md] ### Fixes +- Fix issue #2, regression in Ctrl-D (EOF) behavior. Regression + introduced in [1.14.1]. Fixed by @TobyGoodwin - Fix memory leak in completion handler. Found by [Coverity Scan]. - Fix suspicious use of `sizeof(char **)`, same as `sizeof(char *)` but non-portable. Found by [Coverity Scan]. @@ -124,6 +128,13 @@ Adaptations to Debian editline package. [0.3.0]: https://github.com/troglobit/finit/compare/0.2.3...0.3.0 [0.2.3]: https://github.com/troglobit/finit/compare/0.1.0...0.2.3 [0.1.0]: https://github.com/troglobit/finit/compare/0.0.0...0.1.0 +[libuEv]: http://github.com/troglobit/libuev [Travis-CI]: https://travis-ci.org/troglobit/uftpd [Coverity Scan]: https://scan.coverity.com/projects/2947 [README.md]: https://github.com/troglobit/editline/blob/master/README.md + + diff --git a/README.md b/README.md index 4584dbd..732dd3f 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ to [FSF readline], which may not be entirely up-to-date. ```C /* Editline specific global variables. */ - int el_no_echo; /* E.g under emacs, don't echo except prompt */ + int el_no_echo; /* Do not echo input characters */ int el_no_hist; /* Disable auto-save of and access to history, * e.g. for password prompts or wizards */ - int el_hist_size; /* size of history scrollback buffer, default: 15 */ + int el_hist_size; /* Size of history scrollback buffer, default: 15 */ /* Editline specific functions. */ char * el_find_word(void); @@ -53,12 +53,13 @@ to [FSF readline], which may not be entirely up-to-date. el_status_t el_ring_bell(void); el_status_t el_del_char(void); + /* Callback function for key binding */ + typedef el_status_t el_keymap_func_t(void); + + /* Bind key to a callback, use CTL('f') to change Ctrl-F, for example */ el_status_t el_bind_key(int key, el_keymap_func_t function); el_status_t el_bind_key_in_metamap(int key, el_keymap_func_t function); - char *rl_complete(char *token, int *match); - int rl_list_possib(char *token, char ***av); - /* For compatibility with FSF readline. */ int rl_point; int rl_mark; @@ -97,7 +98,7 @@ Example ------- Here is a very brief example to illustrate how one can use Editline to -create a simple CLI. +create a simple CLI. More examples are availble in the source tree. ```C #include @@ -173,3 +174,9 @@ Outstanding issues are listed in the [TODO.md] file. [Travis Status]: https://travis-ci.org/troglobit/editline.png?branch=master [Coverity Scan]: https://scan.coverity.com/projects/2982 [Coverity Status]: https://scan.coverity.com/projects/2982/badge.svg + + diff --git a/configure b/configure index 69ecd66..bf0a83c 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for editline 1.14.2. +# Generated by GNU Autoconf 2.69 for editline 1.15.0-rc1. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,10 +275,10 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: troglobit@gmail.com about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." +$0: https://github.com/troglobit/editline/issues about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi exit 1 fi @@ -590,9 +590,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='editline' PACKAGE_TARNAME='editline' -PACKAGE_VERSION='1.14.2' -PACKAGE_STRING='editline 1.14.2' -PACKAGE_BUGREPORT='troglobit@gmail.com' +PACKAGE_VERSION='1.15.0-rc1' +PACKAGE_STRING='editline 1.15.0-rc1' +PACKAGE_BUGREPORT='https://github.com/troglobit/editline/issues' PACKAGE_URL='' ac_unique_file="src/editline.c" @@ -1319,7 +1319,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures editline 1.14.2 to adapt to many kinds of systems. +\`configure' configures editline 1.15.0-rc1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,7 +1389,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of editline 1.14.2:";; + short | recursive ) echo "Configuration of editline 1.15.0-rc1:";; esac cat <<\_ACEOF @@ -1440,7 +1440,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1503,7 +1503,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -editline configure 1.14.2 +editline configure 1.15.0-rc1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1848,9 +1848,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------------- ## -## Report this to troglobit@gmail.com ## -## ---------------------------------- ##" +( $as_echo "## ----------------------------------------------------------- ## +## Report this to https://github.com/troglobit/editline/issues ## +## ----------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1926,7 +1926,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by editline $as_me 1.14.2, which was +It was created by editline $as_me 1.15.0-rc1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2747,7 +2747,7 @@ fi # Define the identity of the package. PACKAGE='editline' - VERSION='1.14.2' + VERSION='1.15.0-rc1' cat >>confdefs.h <<_ACEOF @@ -12618,7 +12618,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by editline $as_me 1.14.2, which was +This file was extended by editline $as_me 1.15.0-rc1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12678,13 +12678,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -editline config.status 1.14.2 +editline config.status 1.15.0-rc1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f1e8a70..dcf9a50 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AC_PREREQ(2.61) -AC_INIT(editline, 1.14.2, troglobit@gmail.com) +AC_INIT(editline, 1.15.0-rc1, https://github.com/troglobit/editline/issues) AC_CONFIG_SRCDIR([src/editline.c]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4])