mirror of
https://github.com/troglobit/editline.git
synced 2025-09-18 02:08:08 +08:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
119db55bf2 | ||
![]() |
2542f21ff1 | ||
![]() |
36663d6acf | ||
![]() |
866f25ce10 | ||
![]() |
01f684ea19 | ||
![]() |
dd0c1dc2a4 | ||
![]() |
30e33b74fb | ||
![]() |
b8c6a5b1e2 | ||
![]() |
ee70c8339c | ||
![]() |
16c96eda10 | ||
![]() |
0d76f006b5 | ||
![]() |
4d93e85af7 | ||
![]() |
387a8b31ba |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
*/.libs/
|
||||
*.lo
|
||||
*.o
|
||||
*.pc
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
15
ChangeLog.md
15
ChangeLog.md
@@ -4,6 +4,21 @@ Change Log
|
||||
All notable changes to the project are documented in this file.
|
||||
|
||||
|
||||
[1.15.3][] - 2017-09-07
|
||||
-----------------------
|
||||
|
||||
Bug fix release.
|
||||
|
||||
### Changes
|
||||
- Refactor all enable/disable configure options, same problem as in #7
|
||||
|
||||
### Fixes
|
||||
- Fix #7: `--enable-termcap` configure option does not work, wrongly
|
||||
enables termcap by default.
|
||||
|
||||
Also, check for termino as well, when `--enable-termcap` is selected.
|
||||
|
||||
|
||||
[1.15.2][] - 2016-06-06
|
||||
-----------------------
|
||||
|
||||
|
10
Makefile.am
10
Makefile.am
@@ -1,9 +1,13 @@
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libeditline.pc
|
||||
doc_DATA = README LICENSE CHANGELOG
|
||||
EXTRA_DIST = LICENSE CHANGELOG INSTALL
|
||||
doc_DATA = README.md LICENSE
|
||||
EXTRA_DIST = README.md LICENSE ChangeLog.md INSTALL.md
|
||||
SUBDIRS = src include man examples
|
||||
|
||||
## Generate .deb package
|
||||
package build-deb:
|
||||
@dpkg-buildpackage -uc -us -B
|
||||
|
||||
## Generate MD5 checksum file
|
||||
MD5 = md5sum
|
||||
md5-dist:
|
||||
@@ -30,7 +34,7 @@ release-hook:
|
||||
fi
|
||||
|
||||
## Target to run when building a release
|
||||
release: dist release-hook md5-dist
|
||||
release: distcheck release-hook md5-dist
|
||||
@for file in $(DIST_ARCHIVES); do \
|
||||
printf "$$file \tDistribution tarball\n"; \
|
||||
printf "$$file.md5\t"; cat $$file.md5 | cut -f1 -d' '; \
|
||||
|
21
TODO.md
21
TODO.md
@@ -2,12 +2,29 @@ TODO
|
||||
====
|
||||
|
||||
Issues in need of work. Mostly compatibility with GNU readline, BSD
|
||||
[libedit], and usability improvements.
|
||||
[libedit][], and usability improvements.
|
||||
|
||||
Remember, the general idea is to keep this library editline small with
|
||||
no external dependencies, except a C library.
|
||||
|
||||
|
||||
Add support for running in an event loop
|
||||
----------------------------------------
|
||||
|
||||
To be able to use libeditline from within an event loop like [libuEv][]
|
||||
there are few things to do:
|
||||
|
||||
- Refactor `editinput()` and `readline()`. Break out the active code
|
||||
used for set up and teardown, and the character input logic
|
||||
- Add bare necessities for external callbacks so that an event loop
|
||||
that monitors `el_infd` has something to call on events
|
||||
- GNU Readline has its [alternate interface][gnu] which we should
|
||||
probably implement
|
||||
|
||||
Example usecase of the GNU alternate interface can be found here:
|
||||
http://www.mcld.co.uk/blog/blog.php?274
|
||||
|
||||
|
||||
Verify custom completion handlers
|
||||
---------------------------------
|
||||
|
||||
@@ -46,4 +63,6 @@ Other minor TODO's
|
||||
http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
|
||||
|
||||
[gnu]: http://www.delorie.com/gnu/docs/readline/rlman_41.html#IDX288
|
||||
[libuEv]: https://github.com/troglobit/libuev/
|
||||
[libedit]: http://www.thrysoee.dk/editline/
|
||||
|
59
configure.ac
59
configure.ac
@@ -1,4 +1,4 @@
|
||||
AC_INIT(editline, 1.15.2, https://github.com/troglobit/editline/issues)
|
||||
AC_INIT(editline, 1.15.3, https://github.com/troglobit/editline/issues)
|
||||
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
@@ -35,41 +35,62 @@ AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_STAT
|
||||
AC_CHECK_FUNCS([strchr strdup strrchr tcgetattr perror])
|
||||
|
||||
#
|
||||
# Available features
|
||||
#
|
||||
AC_ARG_ENABLE(unique-history,
|
||||
[AS_HELP_STRING([--disable-unique-history],
|
||||
[Disable uniqify of scrollback. Default: duplicate entries are ignored. Use this to save dupes.])],
|
||||
, AC_DEFINE(CONFIG_UNIQUE_HISTORY, 1, [Define to skip duplicate lines in the scrollback history.]))
|
||||
[Disable uniqify of scrollback. Default: duplicate entries are ignored. Use this to save dupes.])])
|
||||
|
||||
AC_ARG_ENABLE(default-complete,
|
||||
[AS_HELP_STRING([--disable-default-complete], [Disable default (filename) completion handler.])],
|
||||
, AC_DEFINE(CONFIG_DEFAULT_COMPLETE, 1, [Define to enable the default completion handler.]))
|
||||
[AS_HELP_STRING([--disable-default-complete], [Disable default (filename) completion handler.])])
|
||||
|
||||
AC_ARG_ENABLE(arrow-keys,
|
||||
[AS_HELP_STRING([--disable-arrow-keys], [Disable ANSI arrow keys.])],
|
||||
, AC_DEFINE(CONFIG_ANSI_ARROWS, 1, [Define to include ANSI arrow keys support.]))
|
||||
[AS_HELP_STRING([--disable-arrow-keys], [Disable ANSI arrow keys.])])
|
||||
|
||||
AC_ARG_ENABLE(eof,
|
||||
[AS_HELP_STRING([--disable-eof], [Disable default EOF (Ctrl-D) behavior.])],
|
||||
, AC_DEFINE([CONFIG_EOF], 1, [Define to enable EOF (Ctrl-C) key.]))
|
||||
[AS_HELP_STRING([--disable-eof], [Disable default EOF (Ctrl-D) behavior.])])
|
||||
|
||||
AC_ARG_ENABLE(sigint,
|
||||
[AS_HELP_STRING([--disable-sigint], [Disable default SIGINT (Ctrl-C) behavior.])],
|
||||
, AC_DEFINE([CONFIG_SIGINT], 1, [Define to enable SIGINT (Ctrl-C) key.]))
|
||||
[AS_HELP_STRING([--disable-sigint], [Disable default SIGINT (Ctrl-C) behavior.])])
|
||||
|
||||
AC_ARG_ENABLE(sigstop,
|
||||
[AS_HELP_STRING([--enable-sigstop], [Enable SIGSTOP (Ctrl-Z) behavior.])],
|
||||
AC_DEFINE([CONFIG_SIGSTOP], 1, [Define to enable SIGSTOP (Ctrl-Z) key.]))
|
||||
[AS_HELP_STRING([--enable-sigstop], [Enable SIGSTOP (Ctrl-Z) behavior.])])
|
||||
|
||||
AC_ARG_ENABLE(terminal-bell,
|
||||
[AS_HELP_STRING([--enable-terminal-bell], [Enable terminal bell on completion.])],
|
||||
AC_DEFINE([CONFIG_TERMINAL_BELL], 1, [Define to enable terminal bell on completion.]))
|
||||
[AS_HELP_STRING([--enable-terminal-bell], [Enable terminal bell on completion.])])
|
||||
|
||||
AC_ARG_ENABLE(termcap,
|
||||
[AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.])],
|
||||
AC_DEFINE([CONFIG_USE_TERMCAP], 1, [Define to use the termcap library for terminal size.]))
|
||||
AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.]))
|
||||
|
||||
#
|
||||
# Check what features have been enabled
|
||||
#
|
||||
AS_IF([test "x$enable_unique_history" != "xno"],
|
||||
AC_DEFINE(CONFIG_UNIQUE_HISTORY, 1, [Define to skip duplicate lines in the scrollback history.]))
|
||||
|
||||
AS_IF([test "x$enable_default_complete" != "xno"],
|
||||
AC_DEFINE(CONFIG_DEFAULT_COMPLETE, 1, [Define to enable the default completion handler.]))
|
||||
|
||||
AS_IF([test "x$enable_terminal_bell" != "xno"],
|
||||
AC_DEFINE(CONFIG_ANSI_ARROWS, 1, [Define to include ANSI arrow keys support.]))
|
||||
|
||||
AS_IF([test "x$enable_terminal_bell" != "xno"],
|
||||
AC_DEFINE(CONFIG_EOF, 1, [Define to enable EOF (Ctrl-C) key.]))
|
||||
|
||||
AS_IF([test "x$enable_sigint" != "xno"],
|
||||
AC_DEFINE(CONFIG_SIGINT, 1, [Define to enable SIGINT (Ctrl-C) key.]))
|
||||
|
||||
AS_IF([test "x$enable_sigstop" = "xyes"],
|
||||
AC_DEFINE(CONFIG_SIGSTOP, 1, [Define to enable SIGSTOP (Ctrl-Z) key.]))
|
||||
|
||||
AS_IF([test "x$enable_terminal_bell" = "xyes"],
|
||||
AC_DEFINE(CONFIG_TERMINAL_BELL, 1, [Define to enable terminal bell on completion.]))
|
||||
|
||||
# Check for a termcap compatible library if enabled
|
||||
AS_IF([test "$enable_termcap" != no],
|
||||
AS_IF([test "x$enable_termcap" = "xyes"],
|
||||
AC_DEFINE(CONFIG_USE_TERMCAP, 1, [Define to use the termcap library for terminal size.])
|
||||
AC_CHECK_LIB(terminfo, tgetent, , [
|
||||
AC_CHECK_LIB(termcap, tgetent, , [
|
||||
AC_CHECK_LIB(tinfo, tgetent, , [
|
||||
AC_CHECK_LIB(curses, tgetent, , [
|
||||
@@ -77,6 +98,8 @@ AS_IF([test "$enable_termcap" != no],
|
||||
AC_MSG_ERROR([Cannot find a termcap capable library, try installing Ncurses.])])
|
||||
])
|
||||
])
|
||||
])
|
||||
]))
|
||||
|
||||
# Generate all files
|
||||
AC_OUTPUT
|
||||
|
5
debian/.gitignore
vendored
Normal file
5
debian/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
*.log
|
||||
*.debhelper
|
||||
*.substvars
|
||||
files
|
||||
tmp/*
|
24
debian/changelog
vendored
24
debian/changelog
vendored
@@ -1,3 +1,27 @@
|
||||
editline (1.15.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bug fix release, v1.15.3
|
||||
|
||||
-- Joachim Nilsson <troglobit@gmail.com> Thu, 07 Sep 2017 01:24:19 +0200
|
||||
|
||||
editline (1.15.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bug fix release, v1.15.2
|
||||
|
||||
-- Joachim Nilsson <troglobit@gmail.com> Wed, 06 Jun 2016 20:04:35 +0200
|
||||
|
||||
editline (1.15.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bug fix release, v1.15.1
|
||||
|
||||
-- Joachim Nilsson <troglobit@gmail.com> Wed, 16 Nov 2015 21:17:17 +0200
|
||||
|
||||
editline (1.15.0-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release, v1.15.0
|
||||
|
||||
-- Joachim Nilsson <troglobit@gmail.com> Wed, 10 Sep 2015 13:26:03 +0200
|
||||
|
||||
editline (1.14.2-1) unstable; urgency=low
|
||||
|
||||
* Minor bugfix release:
|
||||
|
2
debian/compat
vendored
2
debian/compat
vendored
@@ -1 +1 @@
|
||||
5
|
||||
9
|
||||
|
2
debian/docs
vendored
2
debian/docs
vendored
@@ -1 +1 @@
|
||||
README
|
||||
README.md
|
||||
|
7
debian/libeditline-dev.install
vendored
7
debian/libeditline-dev.install
vendored
@@ -1,4 +1,3 @@
|
||||
usr/include
|
||||
usr/lib/libeditline*.*a
|
||||
usr/lib/libeditline*.so
|
||||
usr/share/man/man3
|
||||
usr/include/*.h
|
||||
usr/lib/*/libeditline*.*a
|
||||
usr/share/man/man3/*
|
||||
|
2
debian/libeditline0.install
vendored
2
debian/libeditline0.install
vendored
@@ -1 +1 @@
|
||||
usr/lib/libeditline*.so.*
|
||||
usr/lib/*/libeditline*.so*
|
||||
|
55
debian/rules
vendored
55
debian/rules
vendored
@@ -1,59 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
# debian/rules for libeditline
|
||||
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# shared library versions, option 1
|
||||
version=0.0.0
|
||||
major=0
|
||||
%:
|
||||
dh $@ --with autoreconf
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
dh_auto_configure
|
||||
touch configure-stamp
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
dh_auto_configure
|
||||
dh_auto_build
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_auto_clean
|
||||
dh_clean
|
||||
@rm -f build-stamp configure-stamp
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
dh_auto_install
|
||||
|
||||
binary-indep: install
|
||||
|
||||
# build libeditline${major} package by moving files from editline-dev
|
||||
binary-arch: install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_auto_install
|
||||
dh_install --sourcedir=debian/tmp
|
||||
dh_installdocs
|
||||
dh_installchangelogs
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
|
Reference in New Issue
Block a user