30 Commits

Author SHA1 Message Date
Joachim Nilsson
119db55bf2 Bump version for v1.15.3 bug fix release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:26:31 +02:00
Joachim Nilsson
2542f21ff1 Add support for building .deb packages
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:25:47 +02:00
Joachim Nilsson
36663d6acf Run distcheck in release target, verifies distribution files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:25:25 +02:00
Joachim Nilsson
866f25ce10 Update ChangeLog(s) for v1.15.3 bug fix release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:25:01 +02:00
Joachim Nilsson
01f684ea19 debian/changelog: Add missing releases
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:24:38 +02:00
Joachim Nilsson
dd0c1dc2a4 debian/: Simplify rules file, greatly, add multi-arch support
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:22:46 +02:00
Joachim Nilsson
30e33b74fb Remove old compat symlinks, keep new Markdown versions
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-07 01:22:31 +02:00
Joachim Nilsson
b8c6a5b1e2 configure: Refactor other enable/disable checks like --enable-termcap
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-03-30 00:36:21 +02:00
Joachim Nilsson
ee70c8339c Followup to #7: Check also for terminfo, requested by @rofl0r
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-03-30 00:35:13 +02:00
Joachim Nilsson
16c96eda10 Fix #7: Fix configure --enable-termcap
Improper handling of AC_ARG_ENABLE() causes the configure script to
always enable CONFIG_USE_TERMCAP.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-03-29 22:06:56 +02:00
Joachim Nilsson
0d76f006b5 TODO: Ideas for how to use editline in an event loop
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-03-02 23:36:40 +01:00
Joachim Nilsson
4d93e85af7 debian/.gitignore: New file, ignore built files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-01-21 19:37:13 +01:00
Joachim Nilsson
387a8b31ba .gitignore: Update, add *.pc file
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-01-21 19:36:44 +01:00
Joachim Nilsson
2a3575495a Add make release target for simplified maintenance
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-06 20:09:47 +02:00
Joachim Nilsson
8aa36184e6 Update ChangeLog and bump version for v1.15.2 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-06 20:04:35 +02:00
Joachim Nilsson
0a8f2ef420 Add pkg-config libeditline.pc file
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-06 19:56:48 +02:00
Joachim Nilsson
8078ff69cc Add ABI version info for libtool, start with 0.0.0
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-06 19:56:08 +02:00
Joachim Nilsson
6db7c7d440 Minor cleanup and simplification of build system
- 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>
2016-06-01 07:26:16 +02:00
Joachim Nilsson
e02339c3ae Do not assume -ltermcap, check for tgetent() instead
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>
2016-06-01 07:26:09 +02:00
Joachim Nilsson
f66e8cc151 Merge pull request #10 from rofl0r/patch-1
README.md: libedit depends on libtermcap
2016-05-31 23:27:53 +02:00
rofl0r
782ce4a7a9 README.md: libedit depends on libtermcap
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.
2016-05-31 13:42:10 +01:00
Joachim Nilsson
059d97d7a9 Remove Emacs version-control handling
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-05-07 22:42:24 +02:00
Jakub Pawlowski
edc38768ff Add tty_flush() to rl_forced_update_display()
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>
2016-01-28 19:46:53 +01:00
Joachim Nilsson
59a2db7217 Test build with both GCC and Clang (LLVM)
- Test build with both GCC and Clang (LLVM)
- Only run Coverity Scan on dev branch, not master

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-01-27 10:12:25 +01:00
Joachim Nilsson
ba005dc0d0 Update ChangeLog, give Jakub proper credit with correct last name
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-01-27 09:49:33 +01:00
Joachim Nilsson
a1002f6984 Update .gitignore with generated files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-01-27 09:32:19 +01:00
Joachim Nilsson
7a0c292a82 Bump version for v1.15.2 release cycle
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-01-27 09:24:23 +01:00
Jakub Pawlo
91398ceb34 Prevent mangling of symbols when linking with C++
Signed-off-by: Jakub Pawlo <jakubpawlo@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-01-27 09:23:14 +01:00
Joachim Nilsson
3dbeaa0637 Fix link to version
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-11-16 21:21:44 +01:00
Joachim Nilsson
2f08585884 Fix heading
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-11-16 21:21:00 +01:00
30 changed files with 252 additions and 150 deletions

46
.gitignore vendored
View File

@@ -1,25 +1,25 @@
Makefile
archive
autom4te.cache
config.h
config.log
config.status
libtool
examples/.deps
examples/Makefile
examples/cli
examples/cli.o
examples/testit
examples/testit.o
include/Makefile
man/Makefile
man/Makefile
src/.deps
src/Makefile
src/*.o
src/*.lo
src/libeditline.a
src/libeditline.la
stamp-h1
*~
*/.libs/
*.lo
*.o
*.pc
.deps
Makefile
Makefile.in
aclocal.m4
archive
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
stamp-h1

View File

@@ -5,6 +5,11 @@ language: c
# We don't need to install packages, use dockerized build, quicker
sudo: false
# Test build with both GCC and Clang (LLVM)
compiler:
- gcc
- clang
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
@@ -19,7 +24,7 @@ addons:
notification_email: troglobit@gmail.com
build_command_prepend: "./autogen.sh && ./configure --enable-sigstop --enable-terminal-bell"
build_command: "make -j5"
branch_pattern: master
branch_pattern: dev
# We don't store generated files (configure and Makefile) in GIT,
# so we must customize the default build script to run ./autogen.sh

View File

@@ -1 +0,0 @@
ChangeLog.md

View File

@@ -3,6 +3,39 @@ 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
-----------------------
Bug fixes and minor feature creep in `pkg-config` support.
### Changes
- Prevent mangling of symbols when linking with C++. Patch courtesy of
Jakub Pawlowski
- Add `libeditline.pc` for `pkg-config`
### Fixes
- Do not assume a termcap library exists, check for `tgetent()` in
curses, ncurses, tinfo and termcap libraries
- Call `tty_flush()` when user calls `rl_forced_update_display()`
to prevent screen becoming garbled. Patch by Jakub Pawlowski
[1.15.1][] - 2015-11-16
-----------------------
@@ -11,7 +44,7 @@ Bug fixes only.
### Changes
- Update README with origin of this version of editline
##¤ Fixes
### Fixes
- Fix build system, don't force automake v1.11, require at least v1.11
- Fix build problem with examples using `--enable-termcap`
@@ -136,8 +169,9 @@ Adaptations to Debian editline package.
- First version, forked from Minix current 2008-06-06
[UNRELEASED]: https://github.com/troglobit/finit/compare/1.15.0...HEAD
[1.15.0]: https://github.com/troglobit/finit/compare/1.15.0...1.15.1
[UNRELEASED]: https://github.com/troglobit/finit/compare/1.15.1...HEAD
[1.15.2]: https://github.com/troglobit/finit/compare/1.15.1...1.15.2
[1.15.1]: https://github.com/troglobit/finit/compare/1.15.0...1.15.1
[1.15.0]: https://github.com/troglobit/finit/compare/1.14.2...1.15.0
[1.14.2]: https://github.com/troglobit/finit/compare/1.14.1...1.14.2
[1.14.1]: https://github.com/troglobit/finit/compare/1.14.0...1.14.1

View File

View File

@@ -1,4 +1,42 @@
AUTOMAKE_OPTIONS = foreign
doc_DATA = README LICENSE CHANGELOG
EXTRA_DIST = LICENSE CHANGELOG INSTALL
SUBDIRS = src include man examples
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libeditline.pc
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:
@for file in $(DIST_ARCHIVES); do \
$(MD5) $$file > $$file.md5; \
done
## Check if tagged in git
release-hook:
if [ ! `git tag | grep $(PACKAGE_VERSION)` ]; then \
echo; \
printf "\e[1m\e[41mCannot find release tag $(PACKAGE_VERSION)\e[0m\n"; \
printf "\e[1m\e[5mDo release anyway?\e[0m "; read yorn; \
if [ "$$yorn" != "y" -a "$$yorn" != "Y" ]; then \
printf "OK, aborting release.\n"; \
exit 1; \
fi; \
echo; \
else \
echo; \
printf "\e[1m\e[42mFound GIT release tag $(PACKAGE_VERSION)\e[0m\n"; \
printf "\e[1m\e[44m>>Remember to push tags!\e[0m\n"; \
echo; \
fi
## Target to run when building a release
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' '; \
mv $$file* ../; \
done

1
README
View File

@@ -1 +0,0 @@
README.md

View File

@@ -147,8 +147,8 @@ This version of the editline library was forked from the [Minix 3][]
source tree and is *not* related to the similarily named NetBSD version
that [Jess Thrysøe][jess] disitributes to the world outside BSD. The
libraries have much in common, but the latter is heavily refactored and
also relies on ncurses, whereas this library only uses termios from the
standard C library.
also relies on libtermcap (usually supplied by ncurses), whereas this
library only uses termios from the standard C library.
Patches and bug fixes from the following forks, all based on the
original comp.sources.unix posting, have been merged:

1
TODO
View File

@@ -1 +0,0 @@
TODO.md

21
TODO.md
View File

@@ -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/

View File

@@ -1,26 +1,11 @@
# Minix libeditline -*- Autoconf -*-
#
# Copyright (c) 2008-2013 Joachim Nilsson <troglobit()gmail!com>
#
# Process this file with autoconf to produce a configure script.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_PREREQ(2.61)
AC_INIT(editline, 1.15.1, https://github.com/troglobit/editline/issues)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz])
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])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/editline.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile src/Makefile include/Makefile man/Makefile examples/Makefile])
AC_CONFIG_FILES([Makefile libeditline.pc src/Makefile include/Makefile man/Makefile examples/Makefile])
# Checks for programs.
AC_PROG_CC
@@ -50,41 +35,71 @@ 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.]))
AM_CONDITIONAL([USE_LIBTERMCAP], [test "$enable_termcap" != no])
AM_CFLAGS="-std=gnu99 $inline_cflags -W -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags -Wshadow -Wcast-qual"
AC_SUBST(AM_CFLAGS)
#
# 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 "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, , [
AC_CHECK_LIB(ncurses, tgetent, , [
AC_MSG_ERROR([Cannot find a termcap capable library, try installing Ncurses.])])
])
])
])
]))
# Generate all files
AC_OUTPUT

5
debian/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
*.log
*.debhelper
*.substvars
files
tmp/*

24
debian/changelog vendored
View File

@@ -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
View File

@@ -1 +1 @@
5
9

2
debian/docs vendored
View File

@@ -1 +1 @@
README
README.md

View File

@@ -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/*

View File

@@ -1 +1 @@
usr/lib/libeditline*.so.*
usr/lib/*/libeditline*.so*

57
debian/rules vendored
View File

@@ -1,59 +1,8 @@
#!/usr/bin/make -f
# debian/rules for libeditline
# GNU copyright 1997 to 1999 by Joey Hess.
#!/usr/bin/make -f
# 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

3
examples/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.o
cli
testit

View File

@@ -1,11 +1,4 @@
AUTOMAKE_OPTIONS = foreign
noinst_PROGRAMS = testit cli
LDADD = $(top_builddir)/src/libeditline.la
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include
AM_LDFLAGS = -static
if USE_LIBTERMCAP
LDADD += -ltermcap
endif

View File

@@ -1,4 +1,2 @@
AUTOMAKE_OPTIONS = foreign
library_includedir=$(includedir)
library_includedir = $(includedir)
library_include_HEADERS = editline.h

View File

@@ -29,6 +29,10 @@
#define ISMETA(x) ((x) & 0x80)
#define UNMETA(x) ((x) & 0x7F)
#ifdef __cplusplus
extern "C" {
#endif
/* Command status codes. */
typedef enum {
CSdone = 0, /* OK */
@@ -100,4 +104,8 @@ void rl_deprep_terminal(void);
int rl_getc(void);
#ifdef __cplusplus
}
#endif
#endif /* __EDITLINE_H__ */

12
libeditline.pc.in Normal file
View File

@@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: @PACKAGE@
Description: A small line editing library without termcap/curses
Version: @VERSION@
Requires:
Libs: -L${libdir} -leditline
Cflags: -I${includedir}

1
m4/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.m4

2
src/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
libeditline.a
libeditline.la

View File

@@ -1,3 +1,6 @@
AUTOMAKE_OPTIONS = foreign
lib_LTLIBRARIES = libeditline.la
libeditline_la_SOURCES = editline.c editline.h complete.c sysunix.c unix.h
libeditline_la_CFLAGS = -std=gnu99
libeditline_la_CFLAGS += -W -Wall -Wundef -Wunused -Wstrict-prototypes
libeditline_la_CFLAGS += -Werror-implicit-function-declaration -Wshadow -Wcast-qual
libeditline_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:0:0

View File

@@ -277,7 +277,6 @@ int rl_list_possib(char *token, char ***av)
/**
* Local Variables:
* version-control: t
* indent-tabs-mode: t
* c-file-style: "ellemtel"
* c-basic-offset: 4

View File

@@ -1170,6 +1170,7 @@ void rl_clear_message(void)
void rl_forced_update_display()
{
redisplay();
tty_flush();
}
char *readline(const char *prompt)
@@ -1734,7 +1735,6 @@ el_status_t el_bind_key_in_metamap(int key, el_keymap_func_t function)
/**
* Local Variables:
* version-control: t
* indent-tabs-mode: t
* c-file-style: "ellemtel"
* c-basic-offset: 4

View File

@@ -57,7 +57,6 @@ void rl_add_slash(char *path, char *p)
/**
* Local Variables:
* version-control: t
* indent-tabs-mode: t
* c-file-style: "ellemtel"
* c-basic-offset: 4

View File

@@ -232,7 +232,6 @@ void rl_add_slash(char *path, char *p)
/**
* Local Variables:
* version-control: t
* indent-tabs-mode: t
* c-file-style: "ellemtel"
* c-basic-offset: 4