forked from Imagelibrary/binutils-gdb
Imported readline 6.2, and upstream patch 001.
[patch 0/3] readline-6.2 rebase http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html [patch 1/3] readline-6.2: Merge of already posted patches http://sourceware.org/ml/gdb-patches/2011-05/msg00004.html = [Bug-readline] [RFC/readline] bind.c, rl_function_dumper, Free allocated http://lists.gnu.org/archive/html/bug-readline/2011-03/msg00000.html [Bug-readline] [patch] Fix underquotation in readline/examples/rlfe/conf http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00001.html [Bug-readline] [patch] Makefile.in htm<->html http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00002.html Re: [Bug-readline] [patch] Makefile.in dependency: callback.o: xmalloc.h http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00004.html [Bug-readline] [patch] Remove . from the VPATH directive http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00005.html Eli Zaretskii's __MSDOS__ / __GO32__ / __MINGW32__ / __DJGPP__ stuff: http://sourceware.org/ml/gdb/2011-04/msg00002.html Jan Kratochvil's patch for FSF GDB tree local-specific changes: http://sourceware.org/ml/gdb/2011-04/msg00006.html Preservation of existing ChangeLog.gdb files, their updates. [patch 2/3] readline-6.2: Workaround "ask" regression http://sourceware.org/ml/gdb-patches/2011-05/msg00005.html [patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat. http://sourceware.org/ml/gdb-patches/2011-05/msg00006.html [patch 4/3] readline-6.2: Substitute inc-hist.texinfo http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html readline/ Workaround gdb.base/completion.exp regression on readline-6.2. * complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK. Imported readline 6.2, and upstream patch 001. * configure: Regenerate. readline/doc/ * hsuser.texi (Using History Interactively): Disable !BashFeatures @defcodeindex. Make the `Programming with GNU History' reference external. * inc-hist.texinfo: Remove. Imported readline 6.2, and upstream patch 001. readline/examples/ Imported readline 6.2, and upstream patch 001. readline/examples/rlfe/ Imported readline 6.2, and upstream patch 001. gdb/ * config.in: Regenerate. * configure: Regenerate. * configure.ac <--with-system-readline> (for readline_echoing_p): Remove the test. * tui/tui-io.c (tui_old_readline_echoing_p): Rename to ... (tui_old_rl_echoing_p): ... here. (tui_setup_io): Rename extern declaration readline_echoing_p to _rl_echoing_p. Adjust assignments for the both renames. gdb/doc/ * Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to hsuser.texi. * gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and comment to hsuser.texi. Change rluser.texi name in the comment.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Imported readline 6.2, and upstream patch 001.
|
||||
|
||||
2006-04-24 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
Imported readline 5.1, and upstream patches 001-004.
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
# on which program is running, or what terminal is active.
|
||||
#
|
||||
|
||||
# Copyright (C) 1989-2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1989-2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
# In all programs, all terminals, make sure this is bound.
|
||||
"\C-x\C-r": re-read-init-file
|
||||
|
||||
@@ -1,30 +1,46 @@
|
||||
#
|
||||
# This is the Makefile for the readline examples subdirectory.
|
||||
#
|
||||
# Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994,2008,2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
RL_LIBRARY_VERSION = @LIBVERSION@
|
||||
|
||||
SHELL = @MAKE_SHELL@
|
||||
RM = rm -f
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
bindir = @bindir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = .:@srcdir@
|
||||
datadir = @datadir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
BUILD_DIR = .
|
||||
#BUILD_DIR = .
|
||||
BUILD_DIR = @BUILD_DIR@
|
||||
installdir = $(datadir)/readline
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
|
||||
# Support an alternate destination root directory for package building
|
||||
DESTDIR =
|
||||
@@ -51,31 +67,56 @@ TERMCAP_LIB = @TERMCAP_LIB@
|
||||
${RM} $@
|
||||
$(CC) $(CCFLAGS) -c $<
|
||||
|
||||
EXECUTABLES = fileman rltest rl rlcat rlversion histexamp
|
||||
OBJECTS = fileman.o rltest.o rl.o rlcat.o rlversion.o histexamp.o
|
||||
SOURCES = excallback.c fileman.c histexamp.c manexamp.c rl-fgets.c rl.c \
|
||||
rlcat.c rlevent.c rlptytest.c rltest.c rlversion.c
|
||||
|
||||
EXECUTABLES = fileman$(EXEEXT) rltest$(EXEEXT) rl$(EXEEXT) rlcat$(EXEEXT) \
|
||||
rlevent$(EXEEXT) rlversion$(EXEEXT) histexamp$(EXEEXT)
|
||||
OBJECTS = fileman.o rltest.o rl.o rlevent.o rlcat.o rlversion.o histexamp.o
|
||||
|
||||
all: $(EXECUTABLES)
|
||||
everything: all
|
||||
|
||||
rl: rl.o $(READLINE_LIB)
|
||||
check: rlversion$(EXEEXT)
|
||||
@echo Readline version: `rlversion$(EXEEXT)`
|
||||
|
||||
installdirs:
|
||||
-$(SHELL) $(top_srcdir)/support/mkdirs $(DESTDIR)$(installdir)
|
||||
|
||||
install: installdirs
|
||||
@for f in $(SOURCES); do \
|
||||
$(RM) $(DESTDIR)$(installdir)/$$f ; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(installdir) ; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
@for f in $(SOURCES); do \
|
||||
$(RM) $(DESTDIR)$(installdir)/$$f ; \
|
||||
done
|
||||
-rmdir $(DESTDIR)$(installdir)
|
||||
|
||||
rl$(EXEEXT): rl.o $(READLINE_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
rlcat: rlcat.o $(READLINE_LIB)
|
||||
rlcat$(EXEEXT): rlcat.o $(READLINE_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
fileman: fileman.o $(READLINE_LIB)
|
||||
rlevent$(EXEEXT): rlevent.o $(READLINE_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
fileman$(EXEEXT): fileman.o $(READLINE_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
rltest: rltest.o $(READLINE_LIB)
|
||||
rltest$(EXEEXT): rltest.o $(READLINE_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
rlptytest: rlptytest.o $(READLINE_LIB)
|
||||
rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
rlversion: rlversion.o $(READLINE_LIB)
|
||||
rlversion$(EXEEXT): rlversion.o $(READLINE_LIB)
|
||||
$(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
|
||||
|
||||
histexamp: histexamp.o $(HISTORY_LIB)
|
||||
histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB)
|
||||
$(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
|
||||
|
||||
clean mostlyclean:
|
||||
|
||||
40
readline/examples/autoconf/BASH_CHECK_LIB_TERMCAP
Normal file
40
readline/examples/autoconf/BASH_CHECK_LIB_TERMCAP
Normal file
@@ -0,0 +1,40 @@
|
||||
AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
|
||||
[
|
||||
if test "X$bash_cv_termcap_lib" = "X"; then
|
||||
_bash_needmsg=yes
|
||||
else
|
||||
AC_MSG_CHECKING(which library has the termcap functions)
|
||||
_bash_needmsg=
|
||||
fi
|
||||
AC_CACHE_VAL(bash_cv_termcap_lib,
|
||||
[AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
|
||||
[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
|
||||
[AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
|
||||
[AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
|
||||
[AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
|
||||
bash_cv_termcap_lib=gnutermcap)])])])])])
|
||||
if test "X$_bash_needmsg" = "Xyes"; then
|
||||
AC_MSG_CHECKING(which library has the termcap functions)
|
||||
fi
|
||||
AC_MSG_RESULT(using $bash_cv_termcap_lib)
|
||||
if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
|
||||
LDFLAGS="$LDFLAGS -L./lib/termcap"
|
||||
TERMCAP_LIB="./lib/termcap/libtermcap.a"
|
||||
TERMCAP_DEP="./lib/termcap/libtermcap.a"
|
||||
elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
|
||||
TERMCAP_LIB=-ltermcap
|
||||
TERMCAP_DEP=
|
||||
elif test $bash_cv_termcap_lib = libtinfo; then
|
||||
TERMCAP_LIB=-ltinfo
|
||||
TERMCAP_DEP=
|
||||
elif test $bash_cv_termcap_lib = libncurses; then
|
||||
TERMCAP_LIB=-lncurses
|
||||
TERMCAP_DEP=
|
||||
elif test $bash_cv_termcap_lib = libc; then
|
||||
TERMCAP_LIB=
|
||||
TERMCAP_DEP=
|
||||
else
|
||||
TERMCAP_LIB=-lcurses
|
||||
TERMCAP_DEP=
|
||||
fi
|
||||
])
|
||||
118
readline/examples/autoconf/RL_LIB_READLINE_VERSION
Normal file
118
readline/examples/autoconf/RL_LIB_READLINE_VERSION
Normal file
@@ -0,0 +1,118 @@
|
||||
dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
|
||||
dnl require:
|
||||
dnl AC_PROG_CC
|
||||
dnl BASH_CHECK_LIB_TERMCAP
|
||||
|
||||
AC_DEFUN([RL_LIB_READLINE_VERSION],
|
||||
[
|
||||
AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
|
||||
|
||||
AC_MSG_CHECKING([version of installed readline library])
|
||||
|
||||
# What a pain in the ass this is.
|
||||
|
||||
# save cpp and ld options
|
||||
_save_CFLAGS="$CFLAGS"
|
||||
_save_LDFLAGS="$LDFLAGS"
|
||||
_save_LIBS="$LIBS"
|
||||
|
||||
# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
|
||||
# allows the caller to do something like $_rl_prefix=$withval if the user
|
||||
# specifies --with-installed-readline=PREFIX as an argument to configure
|
||||
|
||||
if test -z "$ac_cv_rl_prefix"; then
|
||||
test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
|
||||
fi
|
||||
|
||||
eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
|
||||
eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
|
||||
|
||||
LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
|
||||
CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
|
||||
LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
|
||||
|
||||
AC_CACHE_VAL(ac_cv_rl_version,
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>
|
||||
|
||||
extern int rl_gnu_readline_p;
|
||||
|
||||
main()
|
||||
{
|
||||
FILE *fp;
|
||||
fp = fopen("conftest.rlv", "w");
|
||||
if (fp == 0)
|
||||
exit(1);
|
||||
if (rl_gnu_readline_p != 1)
|
||||
fprintf(fp, "0.0\n");
|
||||
else
|
||||
fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
|
||||
fclose(fp);
|
||||
exit(0);
|
||||
}
|
||||
],
|
||||
ac_cv_rl_version=`cat conftest.rlv`,
|
||||
ac_cv_rl_version='0.0',
|
||||
ac_cv_rl_version='4.2')])
|
||||
|
||||
CFLAGS="$_save_CFLAGS"
|
||||
LDFLAGS="$_save_LDFLAGS"
|
||||
LIBS="$_save_LIBS"
|
||||
|
||||
RL_MAJOR=0
|
||||
RL_MINOR=0
|
||||
|
||||
# (
|
||||
case "$ac_cv_rl_version" in
|
||||
2*|3*|4*|5*|6*|7*|8*|9*)
|
||||
RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
|
||||
RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# (((
|
||||
case $RL_MAJOR in
|
||||
[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
|
||||
[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
|
||||
*) _RL_MAJOR=00 ;;
|
||||
esac
|
||||
|
||||
# (((
|
||||
case $RL_MINOR in
|
||||
[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
|
||||
[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
|
||||
*) _RL_MINOR=00 ;;
|
||||
esac
|
||||
|
||||
RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
|
||||
|
||||
# Readline versions greater than 4.2 have these defines in readline.h
|
||||
|
||||
if test $ac_cv_rl_version = '0.0' ; then
|
||||
AC_MSG_WARN([Could not test version of installed readline library.])
|
||||
elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
|
||||
# set these for use by the caller
|
||||
RL_PREFIX=$ac_cv_rl_prefix
|
||||
RL_LIBDIR=$ac_cv_rl_libdir
|
||||
RL_INCLUDEDIR=$ac_cv_rl_includedir
|
||||
AC_MSG_RESULT($ac_cv_rl_version)
|
||||
else
|
||||
|
||||
AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
|
||||
AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
|
||||
AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
|
||||
|
||||
AC_SUBST(RL_VERSION)
|
||||
AC_SUBST(RL_MAJOR)
|
||||
AC_SUBST(RL_MINOR)
|
||||
|
||||
# set these for use by the caller
|
||||
RL_PREFIX=$ac_cv_rl_prefix
|
||||
RL_LIBDIR=$ac_cv_rl_libdir
|
||||
RL_INCLUDEDIR=$ac_cv_rl_includedir
|
||||
|
||||
AC_MSG_RESULT($ac_cv_rl_version)
|
||||
|
||||
fi
|
||||
])
|
||||
76
readline/examples/autoconf/wi_LIB_READLINE
Normal file
76
readline/examples/autoconf/wi_LIB_READLINE
Normal file
@@ -0,0 +1,76 @@
|
||||
dnl Borut Razem
|
||||
dnl
|
||||
dnl This macro checks for the presence of the readline library.
|
||||
dnl It works also in cross-compilation environment.
|
||||
dnl
|
||||
dnl To get it into the aclocal.m4 dnl file, do this:
|
||||
dnl aclocal -I . --verbose
|
||||
dnl
|
||||
dnl The --verbose will show all of the files that are searched
|
||||
dnl for .m4 macros.
|
||||
|
||||
AC_DEFUN([wi_LIB_READLINE], [
|
||||
dnl check for the readline.h header file
|
||||
|
||||
AC_CHECK_HEADER(readline/readline.h)
|
||||
|
||||
if test "$ac_cv_header_readline_readline_h" = yes; then
|
||||
dnl check the readline version
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>
|
||||
wi_LIB_READLINE_VERSION RL_VERSION_MAJOR RL_VERSION_MINOR
|
||||
EOF
|
||||
|
||||
wi_READLINE_VERSION=$($CPP $CPPFLAGS conftest.$ac_ext | sed -n -e "s/^wi_LIB_READLINE_VERSION *\([[0-9\]][[0-9\]]*\) *\([[0-9\]][[0-9\]]*\)$/\1.\2/p")
|
||||
rm -rf conftest*
|
||||
|
||||
if test -n "$wi_READLINE_VERSION"; then
|
||||
wi_MAJOR=$(expr $wi_READLINE_VERSION : '\([[0-9]][[0-9]]*\)\.')
|
||||
wi_MINOR=$(expr $wi_READLINE_VERSION : '[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*$\)')
|
||||
if test $wi_MINOR -lt 10; then
|
||||
wi_MINOR=$(expr $wi_MINOR \* 10)
|
||||
fi
|
||||
wi_READLINE_VERSION=$(expr $wi_MAJOR \* 100 + $wi_MINOR)
|
||||
else
|
||||
wi_READLINE_VERSION=-1
|
||||
fi
|
||||
|
||||
dnl check for the readline library
|
||||
|
||||
ac_save_LIBS="$LIBS"
|
||||
# Note: $LIBCURSES is permitted to be empty.
|
||||
|
||||
for LIBREADLINE in "-lreadline.dll" "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses"
|
||||
do
|
||||
AC_MSG_CHECKING([for GNU Readline library $LIBREADLINE])
|
||||
|
||||
LIBS="$ac_save_LIBS $LIBREADLINE"
|
||||
|
||||
AC_TRY_LINK([
|
||||
/* includes */
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>
|
||||
],[
|
||||
/* function-body */
|
||||
int dummy = rl_completion_append_character; /* rl_completion_append_character appeared in version 2.1 */
|
||||
readline(NULL);
|
||||
],[
|
||||
wi_cv_lib_readline=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
wi_cv_lib_readline=no
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
if test "$wi_cv_lib_readline" = yes; then
|
||||
AC_SUBST(LIBREADLINE)
|
||||
AC_DEFINE_UNQUOTED(HAVE_LIBREADLINE, $wi_READLINE_VERSION, [Readline])
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
])
|
||||
@@ -32,6 +32,9 @@ Let me know what you think.
|
||||
|
||||
Jeff
|
||||
*/
|
||||
/*
|
||||
Copyright (C) 1999 Jeff Solomon
|
||||
*/
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* fileman.c - file manager example for readline library. */
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* fileman.c -- A tiny application which demonstrates how to use the
|
||||
GNU Readline library. This application interactively allows users
|
||||
@@ -50,6 +51,8 @@
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef READLINE_LIBRARY
|
||||
# include "readline.h"
|
||||
# include "history.h"
|
||||
@@ -58,7 +61,7 @@
|
||||
# include <readline/history.h>
|
||||
#endif
|
||||
|
||||
extern char *xmalloc ();
|
||||
extern char *xmalloc PARAMS((size_t));
|
||||
|
||||
/* The names of functions that actually do the manipulation. */
|
||||
int com_list PARAMS((char *));
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* histexamp.c - history library example program. */
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
/* manexamp.c -- The examples which appear in the documentation are here. */
|
||||
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -5,25 +5,24 @@
|
||||
* usage: rl [-p prompt] [-u unit] [-d default] [-n nchars]
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
|
||||
@@ -4,25 +4,24 @@
|
||||
* usage: rlcat
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
|
||||
166
readline/examples/rlevent.c
Normal file
166
readline/examples/rlevent.c
Normal file
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
* rl - command-line interface to read a line from the standard input
|
||||
* (or another fd) using readline.
|
||||
*
|
||||
* usage: rl [-p prompt] [-u unit] [-d default] [-n nchars]
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#if defined (READLINE_LIBRARY)
|
||||
# include "posixstat.h"
|
||||
# include "readline.h"
|
||||
# include "history.h"
|
||||
#else
|
||||
# include <sys/stat.h>
|
||||
# include <readline/readline.h>
|
||||
# include <readline/history.h>
|
||||
#endif
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
#if !defined (strchr) && !defined (__STDC__)
|
||||
extern char *strrchr();
|
||||
#endif
|
||||
|
||||
static char *progname;
|
||||
static char *deftext;
|
||||
|
||||
static int
|
||||
event_hook ()
|
||||
{
|
||||
fprintf (stderr, "ding!\n");
|
||||
sleep (1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
set_deftext ()
|
||||
{
|
||||
if (deftext)
|
||||
{
|
||||
rl_insert_text (deftext);
|
||||
deftext = (char *)NULL;
|
||||
rl_startup_hook = (rl_hook_func_t *)NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
fprintf (stderr, "%s: usage: %s [-p prompt] [-u unit] [-d default] [-n nchars]\n",
|
||||
progname, progname);
|
||||
}
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
char *temp, *prompt;
|
||||
struct stat sb;
|
||||
int opt, fd, nch;
|
||||
FILE *ifp;
|
||||
|
||||
progname = strrchr(argv[0], '/');
|
||||
if (progname == 0)
|
||||
progname = argv[0];
|
||||
else
|
||||
progname++;
|
||||
|
||||
/* defaults */
|
||||
prompt = "readline$ ";
|
||||
fd = nch = 0;
|
||||
deftext = (char *)0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "p:u:d:n:")) != EOF)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'p':
|
||||
prompt = optarg;
|
||||
break;
|
||||
case 'u':
|
||||
fd = atoi(optarg);
|
||||
if (fd < 0)
|
||||
{
|
||||
fprintf (stderr, "%s: bad file descriptor `%s'\n", progname, optarg);
|
||||
exit (2);
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
deftext = optarg;
|
||||
break;
|
||||
case 'n':
|
||||
nch = atoi(optarg);
|
||||
if (nch < 0)
|
||||
{
|
||||
fprintf (stderr, "%s: bad value for -n: `%s'\n", progname, optarg);
|
||||
exit (2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
}
|
||||
|
||||
if (fd != 0)
|
||||
{
|
||||
if (fstat (fd, &sb) < 0)
|
||||
{
|
||||
fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd);
|
||||
exit (1);
|
||||
}
|
||||
ifp = fdopen (fd, "r");
|
||||
rl_instream = ifp;
|
||||
}
|
||||
|
||||
if (deftext && *deftext)
|
||||
rl_startup_hook = set_deftext;
|
||||
|
||||
if (nch > 0)
|
||||
rl_num_chars_to_read = nch;
|
||||
|
||||
rl_event_hook = event_hook;
|
||||
temp = readline (prompt);
|
||||
|
||||
/* Test for EOF. */
|
||||
if (temp == 0)
|
||||
exit (1);
|
||||
|
||||
printf ("%s\n", temp);
|
||||
exit (0);
|
||||
}
|
||||
@@ -1,14 +1,3 @@
|
||||
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
* configure.in: m4_include toplevel config/override.m4.
|
||||
* configure: Regenerate.
|
||||
|
||||
2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure.in: Correctly quote AC_PROGRAM_SOURCE definition.
|
||||
|
||||
2004-11-04 Per Bothner <per@bothner.com>
|
||||
|
||||
* pty.c: Import from screen-4.0.2.
|
||||
|
||||
14
readline/examples/rlfe/ChangeLog.gdb
Normal file
14
readline/examples/rlfe/ChangeLog.gdb
Normal file
@@ -0,0 +1,14 @@
|
||||
2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Imported readline 6.2, and upstream patch 001.
|
||||
|
||||
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
* configure.in: m4_include toplevel config/override.m4.
|
||||
* configure: Regenerate.
|
||||
|
||||
2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure.in: Correctly quote AC_PROGRAM_SOURCE definition.
|
||||
@@ -25,7 +25,7 @@ CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
#LDFLAGS = -L$(READLINE_DIR)
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = -lreadline -lhistory -lncurses
|
||||
LIBS = -lreadline -lhistory @LIBS@
|
||||
|
||||
CPP=@CPP@
|
||||
CPP_DEPEND=$(CC) -MM
|
||||
@@ -55,7 +55,7 @@ rlfe-$(VERSION).tar.gz:
|
||||
tar czf $@ $(CFILES) $(HFILES) $(EXTRA_DIST)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
|
||||
$(CC) -c -I. -I$(srcdir) $(CPPFLAGS) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
|
||||
|
||||
install_bin: .version screen
|
||||
-if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
|
||||
@@ -68,7 +68,6 @@ install_bin: .version screen
|
||||
(cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen)
|
||||
cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
|
||||
|
||||
|
||||
uninstall: .version
|
||||
rm -f $(DESTDIR)$(bindir)/$(SCREEN)
|
||||
rm -f $(DESTDIR)$(bindir)/screen
|
||||
@@ -170,6 +169,15 @@ depend.in: $(CFILES) term.h
|
||||
for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done
|
||||
mv tmp_make Makefile.in
|
||||
|
||||
Makefile makefile: config.status $(srcdir)/Makefile.in
|
||||
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
config.status: $(srcdir)/configure
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(srcdir)/configure: $(srcdir)/configure.in
|
||||
cd $(srcdir) && autoconf
|
||||
|
||||
###############################################################################
|
||||
|
||||
### Dependencies:
|
||||
|
||||
@@ -373,3 +373,7 @@
|
||||
#undef PTYRANGE1
|
||||
|
||||
#define USEVARARGS
|
||||
|
||||
#undef HAVE_SYS_STROPTS_H
|
||||
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
3873
readline/examples/rlfe/configure
vendored
3873
readline/examples/rlfe/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -437,4 +437,6 @@ main()
|
||||
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(sys/stropts.h sys/wait.h)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
@@ -27,7 +27,14 @@
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#if !defined (__P)
|
||||
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
|
||||
# define __P(protos) protos
|
||||
# else
|
||||
# define __P(protos) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* pty.c */
|
||||
extern int OpenPTY __P((char **));
|
||||
extern void InitPTY __P((int));
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ extern int errno;
|
||||
* terminal handling
|
||||
*/
|
||||
|
||||
#ifdef POSIX
|
||||
#if defined (POSIX) || defined (__FreeBSD__)
|
||||
# include <termios.h>
|
||||
# ifdef hpux
|
||||
# include <bsdtty.h>
|
||||
@@ -527,4 +527,3 @@ typedef struct fd_set { int fds_bits[1]; } fd_set;
|
||||
* how many characters your pty's can buffer.
|
||||
*/
|
||||
#define IOSIZE 4096
|
||||
|
||||
|
||||
@@ -20,13 +20,15 @@
|
||||
*
|
||||
****************************************************************
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef sun
|
||||
@@ -34,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
/* for solaris 2.1, Unixware (SVR4.2) and possibly others */
|
||||
#ifdef HAVE_SVR4_PTYS
|
||||
#if defined (HAVE_SVR4_PTYS) && defined (HAVE_SYS_STROPTS_H)
|
||||
# include <sys/stropts.h>
|
||||
#endif
|
||||
|
||||
@@ -384,4 +386,3 @@ char **ttyn;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -73,6 +73,11 @@
|
||||
#include <termios.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "extern.h"
|
||||
|
||||
#if defined (HAVE_SYS_WAIT_H)
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifdef READLINE_LIBRARY
|
||||
# include "readline.h"
|
||||
@@ -588,7 +593,7 @@ main(int argc, char** argv)
|
||||
}
|
||||
if (FD_ISSET (in_from_tty_fd, &in_set))
|
||||
{
|
||||
extern int readline_echoing_p;
|
||||
extern int _rl_echoing_p;
|
||||
struct termios term_master;
|
||||
int do_canon = 1;
|
||||
int do_icrnl = 1;
|
||||
@@ -605,9 +610,9 @@ main(int argc, char** argv)
|
||||
{
|
||||
do_canon = (term_master.c_lflag & ICANON) != 0;
|
||||
do_icrnl = (term_master.c_lflag & ICRNL) != 0;
|
||||
readline_echoing_p = (term_master.c_lflag & ECHO) != 0;
|
||||
_rl_echoing_p = (term_master.c_lflag & ECHO) != 0;
|
||||
DPRINT1 ("echo,canon,crnl:%03d\n",
|
||||
100 * readline_echoing_p
|
||||
100 * _rl_echoing_p
|
||||
+ 10 * do_canon
|
||||
+ 1 * do_icrnl);
|
||||
}
|
||||
@@ -757,7 +762,7 @@ static void set_edit_mode ()
|
||||
vi = 1;
|
||||
break;
|
||||
}
|
||||
shellopts = index (shellopts + 1, ':');
|
||||
shellopts = strchr (shellopts + 1, ':');
|
||||
}
|
||||
|
||||
if (!vi)
|
||||
|
||||
@@ -4,25 +4,24 @@
|
||||
/* */
|
||||
/* **************************************************************** */
|
||||
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
|
||||
@@ -2,25 +2,24 @@
|
||||
* rlversion -- print out readline's version number
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
This file is part of the GNU Readline Library (Readline), a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2, or
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
|
||||
Reference in New Issue
Block a user