From 1b17e766659d93d1e7bd6633bf78132e1abb3568 Mon Sep 17 00:00:00 2001
From: Elena Zannoni
Date: Sun, 9 Jul 2000 17:20:00 +0000
Subject: [PATCH] readline: 2000-07-09 Elena Zannoni
* Import of readline 4.1.
Locally modified files: Makefile.in, configure.in, configure
(regenerated), config.h.in (regenerated), readline.h, rltty.c,
shell.c signals.c.
Locally added files: acconfig.h, config/*, config.h.bot,
cross-build/*, doc/inc-hit.texinfo.
New files: USAGE, rlprivate.h, rlshell.h, xmalloc.h.
examples:
2000-07-09 Elena Zannoni
* Import of readline 4.1.
New files: excallback.c, rlfe.c.
doc:
2000-07-09 Elena Zannoni
* Import of readline 4.1.
Regenerated inc-hist.texinfo as copy of hsuser.texinfo, for
inclusion in the gdb manual.
New file: rluserman.texinfo
---
readline/CHANGELOG | 123 +
readline/CHANGES | 108 +
readline/COPYING | 4 +-
readline/ChangeLog.Cygnus | 13 +
readline/MANIFEST | 12 +-
readline/Makefile.in | 98 +-
readline/README | 2 +-
readline/aclocal.m4 | 172 +-
readline/ansi_stdlib.h | 2 +-
readline/bind.c | 472 +--
readline/callback.c | 14 +-
readline/chardefs.h | 4 +-
readline/complete.c | 139 +-
readline/config.h.in | 3 +
readline/configure | 277 +-
readline/configure.in | 23 +-
readline/display.c | 351 ++-
readline/doc/ChangeLog | 9 +
readline/doc/Makefile.in | 87 +-
readline/doc/hist.texinfo | 4 +-
readline/doc/history.dvi | Bin 49240 -> 0 bytes
readline/doc/history.html | 1195 -------
readline/doc/history.info | 811 -----
readline/doc/history.ps | 1636 ----------
readline/doc/hstech.texinfo | 9 +-
readline/doc/hsuser.texinfo | 113 +-
readline/doc/inc-hist.texinfo | 117 +-
readline/doc/manvers.texinfo | 10 +-
readline/doc/readline.3 | 11 +-
readline/doc/readline.dvi | Bin 207200 -> 0 bytes
readline/doc/readline.html | 4327 -------------------------
readline/doc/readline.info | 3107 ------------------
readline/doc/readline.ps | 4570 ---------------------------
readline/doc/rlman.texinfo | 4 +-
readline/doc/rltech.texinfo | 51 +-
readline/doc/rluser.texinfo | 448 ++-
readline/doc/rluserman.dvi | Bin 61412 -> 0 bytes
readline/doc/rluserman.html | 1566 ----------
readline/doc/rluserman.info | 1189 -------
readline/doc/rluserman.ps | 1897 -----------
readline/doc/texinfo.tex | 4692 ----------------------------
readline/emacs_keymap.c | 16 +-
readline/examples/ChangeLog.Cygnus | 6 +
readline/examples/Makefile.in | 38 +-
readline/examples/fileman.c | 26 +-
readline/examples/rl.c | 39 +-
readline/examples/rltest.c | 16 +-
readline/examples/rlversion.c | 8 +-
readline/funmap.c | 16 +-
readline/histexpand.c | 18 +-
readline/histfile.c | 89 +-
readline/histlib.h | 12 +-
readline/history.c | 6 +-
readline/history.h | 10 +-
readline/histsearch.c | 7 +-
readline/input.c | 92 +-
readline/isearch.c | 21 +-
readline/keymaps.c | 14 +-
readline/keymaps.h | 12 +-
readline/kill.c | 39 +-
readline/macro.c | 19 +-
readline/nls.c | 21 +-
readline/parens.c | 41 +-
readline/posixdir.h | 4 +-
readline/posixjmp.h | 18 +
readline/posixstat.h | 4 +-
readline/readline.c | 207 +-
readline/readline.h | 25 +-
readline/rlconf.h | 8 +-
readline/rldefs.h | 7 +-
readline/rlstdc.h | 52 +-
readline/rltty.c | 208 +-
readline/rltty.h | 25 +-
readline/rlwinsize.h | 5 +-
readline/savestring.c | 4 +-
readline/search.c | 182 +-
readline/shell.c | 50 +-
readline/shlib/Makefile.in | 61 +-
readline/signals.c | 54 +-
readline/support/config.guess | 382 ++-
readline/support/config.sub | 397 ++-
readline/support/shlib-install | 47 +-
readline/support/shobj-conf | 46 +-
readline/tcap.h | 4 +-
readline/terminal.c | 235 +-
readline/tilde.c | 55 +-
readline/tilde.h | 28 +-
readline/undo.c | 6 +-
readline/util.c | 24 +-
readline/vi_keymap.c | 4 +-
readline/vi_mode.c | 33 +-
readline/xmalloc.c | 27 +-
92 files changed, 3648 insertions(+), 26790 deletions(-)
delete mode 100644 readline/doc/history.dvi
delete mode 100644 readline/doc/history.html
delete mode 100644 readline/doc/history.info
delete mode 100644 readline/doc/history.ps
delete mode 100644 readline/doc/readline.dvi
delete mode 100644 readline/doc/readline.html
delete mode 100644 readline/doc/readline.info
delete mode 100644 readline/doc/readline.ps
delete mode 100644 readline/doc/rluserman.dvi
delete mode 100644 readline/doc/rluserman.html
delete mode 100644 readline/doc/rluserman.info
delete mode 100644 readline/doc/rluserman.ps
delete mode 100644 readline/doc/texinfo.tex
create mode 100644 readline/examples/ChangeLog.Cygnus
diff --git a/readline/CHANGELOG b/readline/CHANGELOG
index 479e6c042a..9024bdfdad 100644
--- a/readline/CHANGELOG
+++ b/readline/CHANGELOG
@@ -214,3 +214,126 @@ Makefile.in,{doc,examples,shlib}/Makefile.in
- set SHELL from @MAKE_SHELL@
[readline-4.0 released]
+
+ 3/11
+ ----
+doc/Makefile.in
+ - removed references to HTMLTOC, since separate HTML table-of-contents
+ files are no longer created
+
+examples/Makefile.in
+ - remove `*.exe' in clean target for MS-DOS
+
+Makefile.in
+ - make `readline' target depend on ./libreadline.a
+ - configure now substitutes TERMCAP_LIB into Makefile.in
+ - use ${TERMCAP_LIB} instead of -ltermcap in recipe for `readline'
+ - clean target now removes readline and readline.exe in case they
+ get built
+
+configure.in
+ - use `pwd.exe' to set BUILD_DIR on MS-DOS DJGPP
+
+ 3/15
+ ----
+support/shlib-install
+ - Irix 5.x and Irix 6.x should install shared libraries like Solaris 2
+ - changes for installing on hp-ux 1[01].x
+
+ 3/23
+ ----
+configure.in
+ - make sure that the $CC argument to shobj-conf is quoted
+
+ 4/8
+ ---
+
+xmalloc.h, rlprivate.h, rlshell.h
+ - new files
+
+Makefile.in,shlib/Makefile.in
+ - add dependencies on xmalloc.h, rlshell.h
+ - add xmalloc.h, rlprivate.h, rlshell.h to list of header files
+
+MANIFEST
+ - add xmalloc.h, rlprivate.h, rlshell.h
+
+ 4/9
+ ---
+Makefile.in,shlib/Makefile.in
+ - add dependencies on rlprivate.h
+
+ 4/13
+ ----
+doc/Makefile.in
+ - add variable, PSDVI, which is the desired resolution of the
+ generated postscript files. Set to 300 because I don't have
+ any 600-dpi printers
+ - set LANGUAGE= before calling makeinfo, so messages are in English
+ - add rluserman.{info,dvi,ps,html} to appropriate variables
+ - add rules to create rluserman.{info,dvi,ps,html}
+ - install and uninstall rluserman.info, but don't update the directory
+ file in $(infodir) yet
+
+MANIFEST
+ - add doc/rluserman.{texinfo,info,dvi,ps,html}
+
+ 4/30
+ ----
+configure.in
+ - updated library version to 4.1
+
+ 5/3
+ ---
+configure.in
+ - SHLIB_MAJOR and SHLIB_MINOR shared library version numbers are
+ constructed from $LIBRARY_VERSION and substituted into Makefiles
+
+ 5/5
+ ---
+support/shlib-install
+ - OSF/1 installs shared libraries like Solaris
+
+Makefile.in
+ - broke the header file install and uninstall into two new targets:
+ install-headers and uninstall-headers
+ - install and uninstall depend on install-headers and uninstall-headers
+ respectively
+ - changed install-shared and uninstall-shared targets to depend on
+ install-headers and uninstall-headers, respectively, so users may
+ choose to install only the shared libraries. I'm not sure about
+ the uninstall one yet -- maybe it should check whether or not
+ the static libraries are installed and not remove the header files
+ if they are
+
+ 9/3
+ ---
+configure.in, config.h.in
+ - added test for memmove (for later use)
+ - changed version to 4.1-beta1
+
+ 9/13
+ ----
+examples/rlfe.c
+ - Per Bothner's `rlfe' readline front-end program
+
+examples/Makefile.in
+ - added rules to build rlfe
+
+ 9/21
+ ----
+support/shlib-install
+ - changes to handle FreeBSD-3.x elf or a.out shared libraries, which
+ have different semantics and need different naming conventions
+
+ 1/24/2000
+ ---------
+doc/Makefile.in
+ - remove *.bt and *.bts on `make clean'
+
+ 2/4
+ ---
+
+
+configure.in
+ - changed LIBVERSION to 4.1-beta5
diff --git a/readline/CHANGES b/readline/CHANGES
index 65339c2e03..d2929ab6fd 100644
--- a/readline/CHANGES
+++ b/readline/CHANGES
@@ -1,3 +1,111 @@
+This document details the changes between this version, readline-4.1,
+and the previous version, readline-4.0.
+
+1. Changes to Readline
+
+a. Changed the HTML documents so that the table-of-contents is no longer
+ a separate file.
+
+b. Changes to the shared object configuration for: Irix 5.x, Irix 6.x,
+ OSF/1.
+
+c. The shared library major and minor versions are now constructed
+ automatically by configure and substituted into the makefiles.
+
+d. It's now possible to install the shared libraries separately from the
+ static libraries.
+
+e. The history library tries to truncate the history file only if it is a
+ regular file.
+
+f. A bug that caused _rl_dispatch to address negative array indices on
+ systems with signed chars was fixed.
+
+g. rl-yank-nth-arg now leaves the history position the same as when it was
+ called.
+
+h. Changes to the completion code to handle MS-DOS drive-letter:pathname
+ filenames.
+
+i. Completion is now case-insensitive by default on MS-DOS.
+
+j. Fixes to the history file manipulation code for MS-DOS.
+
+k. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
+
+l. Some fixes were made to the redisplay code for better operation on MS-DOS.
+
+m. The quoted-insert code will now insert tty special chars like ^C.
+
+n. A bug was fixed that caused the display code to reference memory before
+ the start of the prompt string.
+
+o. More support for __EMX__ (OS/2).
+
+p. A bug was fixed in readline's signal handling that could cause infinite
+ recursion in signal handlers.
+
+q. A bug was fixed that caused the point to be less than zero when rl_forward
+ was given a very large numeric argument.
+
+r. The vi-mode code now gets characters via the application-settable value
+ of rl_getc_function rather than calling rl_getc directly.
+
+s. The history file code now uses O_BINARY mode when reading and writing
+ the history file on cygwin32.
+
+t. Fixed a bug in the redisplay code for lines with more than 256 line
+ breaks.
+
+u. A bug was fixed which caused invisible character markers to not be
+ stripped from the prompt string if the terminal was in no-echo mode.
+
+v. Readline no longer tries to get the variables it needs for redisplay
+ from the termcap entry if the calling application has specified its
+ own redisplay function. Readline treats the terminal as `dumb' in
+ this case.
+
+w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
+ sequences is redrawn correctly.
+
+x. Changes to the install and install-shared targets so that the libraries
+ and header files are installed separately.
+
+2. New Features in Readline
+
+a. A new Readline `user manual' is in doc/rluserman.texinfo.
+
+b. Parentheses matching is now always compiled into readline, and enabled
+ or disabled when the value of the `blink-matching-paren' variable is
+ changed.
+
+c. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
+
+d. MS-DOS systems now use ~/_history as the default history file.
+
+e. history-search-{forward,backward} now leave the point at the end of the
+ line when the string to search for is empty, like
+ {reverse,forward}-search-history.
+
+f. history-search-{forward,backward} now leave the last history line found
+ in the readline buffer if the second or subsequent search fails.
+
+g. New function for use by applications: rl_on_new_line_with_prompt, used
+ when an application displays the prompt itself before calling readline().
+
+h. New variable for use by applications: rl_already_prompted. An application
+ that displays the prompt itself before calling readline() must set this to
+ a non-zero value.
+
+i. A new variable, rl_gnu_readline_p, always 1. The intent is that an
+ application can verify whether or not it is linked with the `real'
+ readline library or some substitute.
+
+j. Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program
+ is included in the examples subdirectory, though it is not built
+ by default.
+
+-------------------------------------------------------------------------------
This document details the changes between this version, readline-4.0,
and the previous version, readline-2.2.
diff --git a/readline/COPYING b/readline/COPYING
index a43ea2126f..1bf1526387 100644
--- a/readline/COPYING
+++ b/readline/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
diff --git a/readline/ChangeLog.Cygnus b/readline/ChangeLog.Cygnus
index bc53a327fe..40baa984a2 100644
--- a/readline/ChangeLog.Cygnus
+++ b/readline/ChangeLog.Cygnus
@@ -1,3 +1,16 @@
+2000-07-09 Elena Zannoni
+
+ * Import of readline 4.1.
+
+ Locally modified files: Makefile.in, configure.in, configure
+ (regenerated), config.h.in (regenerated), readline.h, rltty.c,
+ shell.c signals.c.
+
+ Locally added files: acconfig.h, config/*, config.h.bot,
+ cross-build/*, doc/inc-hit.texinfo.
+
+ New files: USAGE, rlprivate.h, rlshell.h, xmalloc.h.
+
2000-03-16 Eli Zaretskii
* support/shobj-conf: Shared libs are unsupported on MSDOS.
diff --git a/readline/MANIFEST b/readline/MANIFEST
index f23ff41aff..a51ca0525a 100644
--- a/readline/MANIFEST
+++ b/readline/MANIFEST
@@ -11,8 +11,8 @@ MANIFEST f
INSTALL f
CHANGELOG f
CHANGES f
+USAGE f
aclocal.m4 f
-acconfig.h f
config.h.in f
configure f
configure.in f
@@ -28,11 +28,14 @@ posixstat.h f
readline.h f
rlconf.h f
rldefs.h f
+rlprivate.h f
+rlshell.h f
rlstdc.h f
rltty.h f
rlwinsize.h f
tcap.h f
tilde.h f
+xmalloc.h f
bind.c f
complete.c f
display.c f
@@ -77,6 +80,7 @@ doc/manvers.texinfo f
doc/rlman.texinfo f
doc/rltech.texinfo f
doc/rluser.texinfo f
+doc/rluserman.texinfo f
doc/hist.texinfo f
doc/hstech.texinfo f
doc/hsuser.texinfo f
@@ -84,8 +88,10 @@ doc/readline.3 f
doc/texi2dvi f
doc/texi2html f
examples/Makefile.in f
+examples/excallback.c f
examples/fileman.c f
examples/manexamp.c f
+examples/rlfe.c f
examples/rltest.c f
examples/rl.c f
examples/rlversion.c f
@@ -94,10 +100,14 @@ examples/Inputrc f
# formatted documentation, from MANIFEST.doc
doc/readline.ps f
doc/history.ps f
+doc/rluserman.ps f
doc/readline.dvi f
doc/history.dvi f
+doc/rluserman.dvi f
doc/readline.info f
doc/history.info f
+doc/rluserman.info f
doc/readline.html f
doc/history.html f
+doc/rluserman.html f
doc/readline.0 f
diff --git a/readline/Makefile.in b/readline/Makefile.in
index 5c667ed69f..3069ff7885 100644
--- a/readline/Makefile.in
+++ b/readline/Makefile.in
@@ -14,7 +14,7 @@
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
@@ -60,6 +60,8 @@ CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
+TERMCAP_LIB = @TERMCAP_LIB@
+
# For libraries which include headers from other libraries.
INCLUDES = -I. -I$(srcdir) -I$(includedir)
@@ -88,7 +90,7 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
- ansi_stdlib.h tcap.h rlstdc.h
+ ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h
HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o
TILDEOBJ = tilde.o
@@ -115,6 +117,8 @@ INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
all: static
+everything: static shared examples
+
static: $(STATIC_LIBS)
libreadline.a: $(OBJECTS)
@@ -127,8 +131,8 @@ libhistory.a: $(HISTOBJ) xmalloc.o
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
-test -n "$(RANLIB)" && $(RANLIB) $@
-readline: $(OBJECTS) readline.h rldefs.h chardefs.h
- $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a -ltermcap
+readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
+ $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB}
Makefile makefile: config.status $(srcdir)/Makefile.in
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
@@ -147,9 +151,8 @@ stamp-h: config.status $(srcdir)/config.h.in
CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
echo > $@
-# CYGNUS LOCAL: Never run autoconf.
-#$(srcdir)/configure: $(srcdir)/configure.in Comment-me-out in distribution
-# cd $(srcdir) && autoconf Comment-me-out in distribution
+#$(srcdir)/configure: $(srcdir)/configure.in ## Comment-me-out in distribution
+# cd $(srcdir) && autoconf ## Comment-me-out in distribution
shared: force
-test -d shlib || mkdir shlib
@@ -165,6 +168,17 @@ examples: force
force:
+install-headers: installdirs ${INSTALLED_HEADERS}
+ for f in ${INSTALLED_HEADERS}; do \
+ $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
+ done
+
+uninstall-headers:
+ -test -n "$(includedir)" && cd $(includedir)/readline && \
+ ${RM} ${INSTALLED_HEADERS}
+
+maybe-uninstall-headers: uninstall-headers
+
## CYGNUS LOCAL
## Don't mess with people's installed readline's.
## This tries to install this version of readline over whatever
@@ -175,14 +189,11 @@ force:
install:
-#install: installdirs $(STATIC_LIBS)
-# for f in ${INSTALLED_HEADERS}; do \
-# $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
-# done
-# -( if test -f $(libdir)/libreadline.a ; then $(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old; fi )
+#install: installdirs $(STATIC_LIBS) install-headers
+# -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old
# $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
# -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
-# -( if test -f $(libdir)/libhistory.a; then $(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old; fi )
+# -$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old
# $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
# -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
# -( if test -d doc ; then \
@@ -194,16 +205,14 @@ installdirs: $(srcdir)/support/mkdirs
-$(SHELL) $(srcdir)/support/mkdirs $(includedir) \
$(includedir)/readline $(libdir) $(infodir) $(man3dir)
-uninstall:
- -test -n "$(includedir)" && cd $(includedir)/readline && \
- ${RM} ${INSTALLED_HEADERS}
+uninstall: uninstall-headers
-test -n "$(libdir)" && cd $(libdir) && \
${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
-install-shared: installdirs shared
+install-shared: installdirs install-headers shared
-( cd shlib ; ${MAKE} ${MFLAGS} install )
-uninstall-shared:
+uninstall-shared: maybe-uninstall-headers
-( cd shlib; ${MAKE} ${MFLAGS} uninstall )
TAGS: force
@@ -214,6 +223,7 @@ tags: force
clean: force
$(RM) $(OBJECTS) $(STATIC_LIBS)
+ $(RM) readline readline.exe
-( cd shlib && $(MAKE) $(MFLAGS) $@ )
-( cd doc && $(MAKE) $(MFLAGS) $@ )
-( cd examples && $(MAKE) $(MFLAGS) $@ )
@@ -241,7 +251,7 @@ installcheck:
dist: force
@echo Readline distributions are created using $(srcdir)/support/mkdist.
@echo Here is a sample of the necessary commands:
- @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION)
+ @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION)
@echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
@echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
@@ -300,6 +310,8 @@ macro.o: readline.h keymaps.h chardefs.h tilde.h
macro.o: history.h rlstdc.h
nls.o: ansi_stdlib.h
nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+nls.o: readline.h keymaps.h chardefs.h tilde.h
+nls.o: history.h rlstdc.h
parens.o: rlconf.h
parens.o: ${BUILD_DIR}/config.h
parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
@@ -338,6 +350,54 @@ vi_mode.o: history.h ansi_stdlib.h rlstdc.h
xmalloc.o: ${BUILD_DIR}/config.h
xmalloc.o: ansi_stdlib.h
+bind.o: rlshell.h
+histfile.o: rlshell.h
+nls.o: rlshell.h
+readline.o: rlshell.h
+shell.o: rlshell.h
+terminal.o: rlshell.h
+histexpand.o: rlshell.h
+
+bind.o: rlprivate.h
+callback.o: rlprivate.h
+complete.o: rlprivate.h
+display.o: rlprivate.h
+input.o: rlprivate.h
+isearch.o: rlprivate.h
+kill.o: rlprivate.h
+macro.o: rlprivate.h
+nls.o: rlprivate.h
+parens.o: rlprivate.h
+readline.o: rlprivate.h
+rltty.o: rlprivate.h
+search.o: rlprivate.h
+signals.o: rlprivate.h
+terminal.o: rlprivate.h
+undo.o: rlprivate.h
+util.o: rlprivate.h
+vi_mode.o: rlprivate.h
+
+bind.o: xmalloc.h
+complete.o: xmalloc.h
+display.o: xmalloc.h
+funmap.o: xmalloc.h
+histexpand.o: xmalloc.h
+histfile.o: xmalloc.h
+history.o: xmalloc.h
+input.o: xmalloc.h
+isearch.o: xmalloc.h
+keymaps.o: xmalloc.h
+kill.o: xmalloc.h
+macro.o: xmalloc.h
+readline.o: xmalloc.h
+savestring.o: xmalloc.h
+search.o: xmalloc.h
+shell.o: xmalloc.h
+tilde.o: xmalloc.h
+tilde.o: xmalloc.h
+util.o: xmalloc.h
+vi_mode.o: xmalloc.h
+
readline.o: $(srcdir)/readline.c
vi_mode.o: $(srcdir)/vi_mode.c
funmap.o: $(srcdir)/funmap.c
diff --git a/readline/README b/readline/README
index 56565b2fb8..41a5d0c82d 100644
--- a/readline/README
+++ b/readline/README
@@ -1,7 +1,7 @@
Introduction
============
-This is the Gnu Readline library, version 4.0.
+This is the Gnu Readline library, version 4.1.
The Readline library provides a set of functions for use by applications
that allow users to edit command lines as they are typed in. Both
diff --git a/readline/aclocal.m4 b/readline/aclocal.m4
index c277a0c610..f8f5b74b72 100644
--- a/readline/aclocal.m4
+++ b/readline/aclocal.m4
@@ -316,13 +316,19 @@ AC_CACHE_VAL(bash_cv_opendir_not_robust,
main()
{
DIR *dir;
-int fd;
-unlink("/tmp/not_a_directory");
-fd = open("/tmp/not_a_directory", O_WRONLY|O_CREAT, 0666);
+int fd, err;
+err = mkdir("/tmp/bash-aclocal", 0700);
+if (err < 0) {
+ perror("mkdir");
+ exit(1);
+}
+unlink("/tmp/bash-aclocal/not_a_directory");
+fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
write(fd, "\n", 1);
close(fd);
-dir = opendir("/tmp/not_a_directory");
-unlink("/tmp/not_a_directory");
+dir = opendir("/tmp/bash-aclocal/not_a_directory");
+unlink("/tmp/bash-aclocal/not_a_directory");
+rmdir("/tmp/bash-aclocal");
exit (dir == 0);
}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
[AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
@@ -354,25 +360,59 @@ AC_DEFINE(VOID_SIGHANDLER)
fi
])
-AC_DEFUN(BASH_TYPE_INT32_T,
+dnl
+dnl A signed 16-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS16_T,
+[
+if test "$ac_cv_sizeof_short" = 2; then
+ AC_CHECK_TYPE(bits16_t, short)
+elif test "$ac_cv_sizeof_char" = 2; then
+ AC_CHECK_TYPE(bits16_t, char)
+else
+ AC_CHECK_TYPE(bits16_t, short)
+fi
+])
+
+dnl
+dnl An unsigned 16-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_U_BITS16_T,
+[
+if test "$ac_cv_sizeof_short" = 2; then
+ AC_CHECK_TYPE(u_bits16_t, unsigned short)
+elif test "$ac_cv_sizeof_char" = 2; then
+ AC_CHECK_TYPE(u_bits16_t, unsigned char)
+else
+ AC_CHECK_TYPE(u_bits16_t, unsigned short)
+fi
+])
+
+dnl
+dnl A signed 32-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS32_T,
[
if test "$ac_cv_sizeof_int" = 4; then
- AC_CHECK_TYPE(int32_t, int)
+ AC_CHECK_TYPE(bits32_t, int)
elif test "$ac_cv_sizeof_long" = 4; then
- AC_CHECK_TYPE(int32_t, long)
+ AC_CHECK_TYPE(bits32_t, long)
else
- AC_CHECK_TYPE(int32_t, int)
+ AC_CHECK_TYPE(bits32_t, int)
fi
])
-AC_DEFUN(BASH_TYPE_U_INT32_T,
+dnl
+dnl An unsigned 32-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_U_BITS32_T,
[
if test "$ac_cv_sizeof_int" = 4; then
- AC_CHECK_TYPE(u_int32_t, unsigned int)
+ AC_CHECK_TYPE(u_bits32_t, unsigned int)
elif test "$ac_cv_sizeof_long" = 4; then
- AC_CHECK_TYPE(u_int32_t, unsigned long)
+ AC_CHECK_TYPE(u_bits32_t, unsigned long)
else
- AC_CHECK_TYPE(u_int32_t, unsigned int)
+ AC_CHECK_TYPE(u_bits32_t, unsigned int)
fi
])
@@ -387,6 +427,9 @@ else
fi
])
+dnl
+dnl A signed 64-bit quantity
+dnl
AC_DEFUN(BASH_TYPE_BITS64_T,
[
if test "$ac_sv_sizeof_char_p" = 8; then
@@ -427,6 +470,20 @@ if test $bash_cv_func_lstat = yes; then
fi
])
+AC_DEFUN(BASH_FUNC_INET_ATON,
+[
+AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
+[AC_TRY_LINK([
+#include
+#include
+#include
+struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
+bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
+if test $bash_cv_func_inet_aton = yes; then
+ AC_DEFINE(HAVE_INET_ATON)
+fi
+])
+
AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC,
[AC_MSG_CHECKING([for a c_line member of struct termios])
AC_CACHE_VAL(bash_cv_termios_ldisc,
@@ -845,7 +902,7 @@ AC_CACHE_VAL(bash_cv_sys_named_pipes,
/* Add more tests in here as appropriate. */
main()
{
-int fd;
+int fd, err;
#if defined (HAVE_MKFIFO)
exit (0);
@@ -858,12 +915,19 @@ exit (1);
#if defined (NeXT)
exit (1);
#endif
-
-fd = mknod ("/tmp/sh-np-autoconf", 0666 | S_IFIFO, 0);
-if (fd == -1)
+err = mkdir("/tmp/bash-aclocal", 0700);
+if (err < 0) {
+ perror ("mkdir");
+ exit(1);
+}
+fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
+if (fd == -1) {
+ rmdir ("/tmp/bash-aclocal");
exit (1);
+}
close(fd);
-unlink ("/tmp/sh-np-autoconf");
+unlink ("/tmp/bash-aclocal/sh-np-autoconf");
+rmdir ("/tmp/bash-aclocal");
exit(0);
}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
[AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
@@ -1037,12 +1101,32 @@ elif test $bash_cv_dev_fd = "whacky"; then
fi
])
+AC_DEFUN(BASH_CHECK_DEV_STDIN,
+[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
+AC_CACHE_VAL(bash_cv_dev_stdin,
+[if test -d /dev/fd && test -r /dev/stdin; then
+ bash_cv_dev_stdin=present
+ elif test -d /proc/self/fd && test -r /dev/stdin; then
+ bash_cv_dev_stdin=present
+ else
+ bash_cv_dev_stdin=absent
+ fi
+])
+AC_MSG_RESULT($bash_cv_dev_stdin)
+if test $bash_cv_dev_stdin = "present"; then
+ AC_DEFINE(HAVE_DEV_STDIN)
+fi
+])
+
+dnl
+dnl Check for the presence of getpeername in libsocket.
+dnl If libsocket is present, check for libnsl and add it to LIBS if
+dnl it's there, since most systems with libsocket require linking
+dnl with libnsl as well. This should only be called if getpeername
+dnl was not found in libc.
dnl
-dnl Check for the presence of getpeername (the only networking function
-dnl bash currently requires) in libsocket. If libsocket is present,
-dnl check for libnsl and add it to LIBS if it's there, since most
-dnl systems with libsocket require linking with libnsl as well.
-dnl This should only be called if getpeername was not found in libc.
+dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
+dnl AS WELL
dnl
AC_DEFUN(BASH_CHECK_SOCKLIB,
[
@@ -1084,6 +1168,32 @@ if test $bash_cv_have_socklib = yes; then
fi
])
+dnl
+dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
+dnl system, we can't use AC_PREREQ
+dnl
+AC_DEFUN(BASH_FUNC_GETHOSTBYNAME,
+[if test "X$bash_cv_have_gethostbyname" = "X"; then
+_bash_needmsg=yes
+else
+AC_MSG_CHECKING(for gethostbyname in socket library)
+_bash_needmsg=
+fi
+AC_CACHE_VAL(bash_cv_have_gethostbyname,
+[AC_TRY_LINK([#include ],
+[ struct hostent *hp;
+ hp = gethostbyname("localhost");
+], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
+)
+if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_CHECKING(for gethostbyname in socket library)
+fi
+AC_MSG_RESULT($bash_cv_have_gethostbyname)
+if test "$bash_cv_have_gethostbyname" = yes; then
+AC_DEFINE(HAVE_GETHOSTBYNAME)
+fi
+])
+
AC_DEFUN(BASH_DEFAULT_MAIL_DIR,
[AC_MSG_CHECKING(for default mail directory)
AC_CACHE_VAL(bash_cv_mail_dir,
@@ -1299,3 +1409,19 @@ switch (0) case 0: case (sizeof (off_t) <= 4):;
if test $bash_cv_off_t_64 = yes; then
AC_DEFINE(HAVE_OFF_T_64)
fi])
+
+AC_DEFUN(BASH_STRUCT_TIMEVAL,
+[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
+AC_CACHE_VAL(bash_cv_struct_timeval,
+[
+AC_EGREP_HEADER(struct timeval, sys/time.h,
+ bash_cv_struct_timeval=yes,
+ AC_EGREP_HEADER(struct timeval, time.h,
+ bash_cv_struct_timeval=yes,
+ bash_cv_struct_timeval=no))
+])
+AC_MSG_RESULT($bash_cv_struct_timeval)
+if test $bash_cv_struct_timeval = yes; then
+ AC_DEFINE(HAVE_TIMEVAL)
+fi
+])
diff --git a/readline/ansi_stdlib.h b/readline/ansi_stdlib.h
index 52339da5d3..a720cb9bcb 100644
--- a/readline/ansi_stdlib.h
+++ b/readline/ansi_stdlib.h
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#if !defined (_STDLIB_H_)
#define _STDLIB_H_ 1
diff --git a/readline/bind.c b/readline/bind.c
index 73cd827357..6a6424e9e0 100644
--- a/readline/bind.c
+++ b/readline/bind.c
@@ -7,7 +7,7 @@
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 1, or
+ as published by the Free Software Foundation; either version 2, or
(at your option) any later version.
The GNU Readline Library is distributed in the hope that it will be
@@ -18,7 +18,7 @@
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,
- 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
#if defined (HAVE_CONFIG_H)
@@ -42,7 +42,6 @@
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
-#include
#include
#if !defined (errno)
@@ -58,65 +57,25 @@ extern int errno;
#include "readline.h"
#include "history.h"
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
#if !defined (strchr) && !defined (__STDC__)
extern char *strchr (), *strrchr ();
#endif /* !strchr && !__STDC__ */
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-
-extern int _rl_horizontal_scroll_mode;
-extern int _rl_mark_modified_lines;
-extern int _rl_bell_preference;
-extern int _rl_meta_flag;
-extern int _rl_convert_meta_chars_to_ascii;
-extern int _rl_output_meta_chars;
-extern int _rl_complete_show_all;
-extern int _rl_complete_mark_directories;
-extern int _rl_print_completions_horizontally;
-extern int _rl_completion_case_fold;
-extern int _rl_enable_keypad;
-#if defined (PAREN_MATCHING)
-extern int rl_blink_matching_paren;
-#endif /* PAREN_MATCHING */
-#if defined (VISIBLE_STATS)
-extern int rl_visible_stats;
-#endif /* VISIBLE_STATS */
-extern int rl_complete_with_tilde_expansion;
-extern int rl_completion_query_items;
-extern int rl_inhibit_completion;
-extern char *_rl_comment_begin;
-extern unsigned char *_rl_isearch_terminators;
-
-extern int rl_explicit_arg;
-extern int rl_editing_mode;
-extern unsigned char _rl_parsing_conditionalized_out;
-extern Keymap _rl_keymap;
-
-extern char *possible_control_prefixes[], *possible_meta_prefixes[];
-
-/* Functions imported from funmap.c */
-extern char **rl_funmap_names ();
-extern int rl_add_funmap_entry ();
-
-/* Functions imported from util.c */
-extern char *_rl_strindex ();
-
-/* Functions imported from shell.c */
-extern char *get_env_value ();
-
/* Variables exported by this file. */
Keymap rl_binding_keymap;
-/* Forward declarations */
-void rl_set_keymap_from_edit_mode ();
+static int _rl_read_init_file __P((char *, int));
+static int glean_key_from_name __P((char *));
+static int substring_member_of_array __P((char *, char **));
-static int _rl_read_init_file ();
-static int glean_key_from_name ();
-static int substring_member_of_array ();
+static int currently_reading_init_file;
-extern char *xmalloc (), *xrealloc ();
+/* used only in this file */
+static int _rl_prefer_visible_bell = 1;
/* **************************************************************** */
/* */
@@ -650,7 +609,7 @@ _rl_read_file (filename, sizep)
char *buffer;
int i, file;
- if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY | O_BINARY, 0666)) < 0)
+ if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0)
return ((char *)NULL);
file_size = (size_t)finfo.st_size;
@@ -671,7 +630,7 @@ _rl_read_file (filename, sizep)
i = read (file, buffer, file_size);
close (file);
-#if 1
+#if 0
if (i < file_size)
#else
if (i < 0)
@@ -681,33 +640,16 @@ _rl_read_file (filename, sizep)
return ((char *)NULL);
}
+#if 0
buffer[file_size] = '\0';
-
-#if O_BINARY
- {
- /* Systems which distinguish between text and binary files need
- to strip the CR characters before each Newline, otherwise the
- parsing functions won't work. */
- char *s, *d;
- size_t removed = 0;
-
- for (s = buffer, d = buffer; s < buffer + file_size; s++)
- {
- if (removed)
- *d = *s;
- if (*s != '\r' || s[1] != '\n')
- d++;
- else
- removed++;
- }
-
- file_size -= removed;
- buffer[file_size] = '\0';
- }
-#endif
-
if (sizep)
*sizep = file_size;
+#else
+ buffer[i] = '\0';
+ if (sizep)
+ *sizep = i;
+#endif
+
return (buffer);
}
@@ -727,7 +669,6 @@ rl_re_read_init_file (count, ignore)
1. the filename used for the previous call
2. the value of the shell variable `INPUTRC'
3. ~/.inputrc
- 4. (for __MSDOS__ only) ~/_inputrc
If the file existed and could be opened and read, 0 is returned,
otherwise errno is returned. */
int
@@ -747,20 +688,11 @@ rl_read_init_file (filename)
if (*filename == 0)
filename = DEFAULT_INPUTRC;
-#ifdef __MSDOS__
- {
- /* DOS doesn't allow leading dots in file names. If the original
- name fails (it could work if we are on Windows), fall back to
- ~/_inputrc. */
- int retval = _rl_read_init_file (filename, 0);
-
- if (retval == 0)
- return retval;
- else if (strcmp (filename, "~/.inputrc") == 0)
- filename = "~/_inputrc";
- }
+#if defined (__MSDOS__)
+ if (_rl_read_init_file (filename, 0) == 0)
+ return 0;
+ filename = "~/_inputrc";
#endif
-
return (_rl_read_init_file (filename, 0));
}
@@ -789,6 +721,8 @@ _rl_read_init_file (filename, include_level)
last_readline_init_file = savestring (filename);
}
+ currently_reading_init_file = 1;
+
/* Loop over the lines in the file. Lines that start with `#' are
comments; all other lines are commands for readline initialization. */
current_readline_init_lineno = 1;
@@ -799,6 +733,12 @@ _rl_read_init_file (filename, include_level)
/* Find the end of this line. */
for (i = 0; line + i != end && line[i] != '\n'; i++);
+#if defined (__CYGWIN32__)
+ /* ``Be liberal in what you accept.'' */
+ if (line[i] == '\n' && line[i-1] == '\r')
+ line[i - 1] = '\0';
+#endif
+
/* Mark end of line. */
line[i] = '\0';
@@ -819,6 +759,7 @@ _rl_read_init_file (filename, include_level)
}
free (buffer);
+ currently_reading_init_file = 0;
return (0);
}
@@ -826,9 +767,11 @@ static void
_rl_init_file_error (msg)
char *msg;
{
- fprintf (stderr, "readline: %s: line %d: %s\n", current_readline_init_file,
- current_readline_init_lineno,
- msg);
+ if (currently_reading_init_file)
+ fprintf (stderr, "readline: %s: line %d: %s\n", current_readline_init_file,
+ current_readline_init_lineno, msg);
+ else
+ fprintf (stderr, "readline: %s\n", msg);
}
/* **************************************************************** */
@@ -1275,154 +1218,273 @@ rl_parse_and_bind (string)
have one of two values; either "On" or 1 for truth, or "Off" or 0 for
false. */
+#define V_SPECIAL 0x1
+
static struct {
char *name;
int *value;
+ int flags;
} boolean_varlist [] = {
-#if defined (PAREN_MATCHING)
- { "blink-matching-paren", &rl_blink_matching_paren },
-#endif
- { "completion-ignore-case", &_rl_completion_case_fold },
- { "convert-meta", &_rl_convert_meta_chars_to_ascii },
- { "disable-completion", &rl_inhibit_completion },
- { "enable-keypad", &_rl_enable_keypad },
- { "expand-tilde", &rl_complete_with_tilde_expansion },
- { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode },
- { "input-meta", &_rl_meta_flag },
- { "mark-directories", &_rl_complete_mark_directories },
- { "mark-modified-lines", &_rl_mark_modified_lines },
- { "meta-flag", &_rl_meta_flag },
- { "output-meta", &_rl_output_meta_chars },
- { "print-completions-horizontally", &_rl_print_completions_horizontally },
- { "show-all-if-ambiguous", &_rl_complete_show_all },
+ { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL },
+ { "completion-ignore-case", &_rl_completion_case_fold, 0 },
+ { "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 },
+ { "disable-completion", &rl_inhibit_completion, 0 },
+ { "enable-keypad", &_rl_enable_keypad, 0 },
+ { "expand-tilde", &rl_complete_with_tilde_expansion, 0 },
+ { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 },
+ { "input-meta", &_rl_meta_flag, 0 },
+ { "mark-directories", &_rl_complete_mark_directories, 0 },
+ { "mark-modified-lines", &_rl_mark_modified_lines, 0 },
+ { "meta-flag", &_rl_meta_flag, 0 },
+ { "output-meta", &_rl_output_meta_chars, 0 },
+ { "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL },
+ { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 },
+ { "show-all-if-ambiguous", &_rl_complete_show_all, 0 },
#if defined (VISIBLE_STATS)
- { "visible-stats", &rl_visible_stats },
+ { "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */
{ (char *)NULL, (int *)NULL }
};
+static int
+find_boolean_var (name)
+ char *name;
+{
+ register int i;
+
+ for (i = 0; boolean_varlist[i].name; i++)
+ if (_rl_stricmp (name, boolean_varlist[i].name) == 0)
+ return i;
+ return -1;
+}
+
+/* Hooks for handling special boolean variables, where a
+ function needs to be called or another variable needs
+ to be changed when they're changed. */
+static void
+hack_special_boolean_var (i)
+ int i;
+{
+ char *name;
+
+ name = boolean_varlist[i].name;
+
+ if (_rl_stricmp (name, "blink-matching-paren") == 0)
+ _rl_enable_paren_matching (rl_blink_matching_paren);
+ else if (_rl_stricmp (name, "prefer-visible-bell") == 0)
+ {
+ if (_rl_prefer_visible_bell)
+ _rl_bell_preference = VISIBLE_BELL;
+ else
+ _rl_bell_preference = AUDIBLE_BELL;
+ }
+}
+
+/* These *must* correspond to the array indices for the appropriate
+ string variable. (Though they're not used right now.) */
+#define V_BELLSTYLE 0
+#define V_COMBEGIN 1
+#define V_EDITMODE 2
+#define V_ISRCHTERM 3
+#define V_KEYMAP 4
+
+#define V_STRING 1
+#define V_INT 2
+
+/* Forward declarations */
+static int sv_bell_style __P((char *));
+static int sv_combegin __P((char *));
+static int sv_compquery __P((char *));
+static int sv_editmode __P((char *));
+static int sv_isrchterm __P((char *));
+static int sv_keymap __P((char *));
+
+static struct {
+ char *name;
+ int flags;
+ Function *set_func;
+} string_varlist[] = {
+ { "bell-style", V_STRING, sv_bell_style },
+ { "comment-begin", V_STRING, sv_combegin },
+ { "completion-query-items", V_INT, sv_compquery },
+ { "editing-mode", V_STRING, sv_editmode },
+ { "isearch-terminators", V_STRING, sv_isrchterm },
+ { "keymap", V_STRING, sv_keymap },
+ { (char *)NULL, 0 }
+};
+
+static int
+find_string_var (name)
+ char *name;
+{
+ register int i;
+
+ for (i = 0; string_varlist[i].name; i++)
+ if (_rl_stricmp (name, string_varlist[i].name) == 0)
+ return i;
+ return -1;
+}
+
+/* A boolean value that can appear in a `set variable' command is true if
+ the value is null or empty, `on' (case-insenstive), or "1". Any other
+ values result in 0 (false). */
+static int
+bool_to_int (value)
+ char *value;
+{
+ return (value == 0 || *value == '\0' ||
+ (_rl_stricmp (value, "on") == 0) ||
+ (value[0] == '1' && value[1] == '\0'));
+}
+
int
rl_variable_bind (name, value)
char *name, *value;
{
register int i;
+ int v;
/* Check for simple variables first. */
- for (i = 0; boolean_varlist[i].name; i++)
+ i = find_boolean_var (name);
+ if (i >= 0)
{
- if (_rl_stricmp (name, boolean_varlist[i].name) == 0)
- {
- /* A variable is TRUE if the "value" is "on", "1" or "". */
- *boolean_varlist[i].value = *value == 0 ||
- _rl_stricmp (value, "on") == 0 ||
- (value[0] == '1' && value[1] == '\0');
- return 0;
- }
+ *boolean_varlist[i].value = bool_to_int (value);
+ if (boolean_varlist[i].flags & V_SPECIAL)
+ hack_special_boolean_var (i);
+ return 0;
}
- /* Not a boolean variable, so check for specials. */
+ i = find_string_var (name);
+
+ /* For the time being, unknown variable names or string names without a
+ handler function are simply ignored. */
+ if (i < 0 || string_varlist[i].set_func == 0)
+ return 0;
+
+ v = (*string_varlist[i].set_func) (value);
+ return v;
+}
- /* Editing mode change? */
- if (_rl_stricmp (name, "editing-mode") == 0)
+static int
+sv_editmode (value)
+ char *value;
+{
+ if (_rl_strnicmp (value, "vi", 2) == 0)
{
- if (_rl_strnicmp (value, "vi", 2) == 0)
- {
#if defined (VI_MODE)
- _rl_keymap = vi_insertion_keymap;
- rl_editing_mode = vi_mode;
+ _rl_keymap = vi_insertion_keymap;
+ rl_editing_mode = vi_mode;
#endif /* VI_MODE */
- }
- else if (_rl_strnicmp (value, "emacs", 5) == 0)
- {
- _rl_keymap = emacs_standard_keymap;
- rl_editing_mode = emacs_mode;
- }
+ return 0;
}
-
- /* Comment string change? */
- else if (_rl_stricmp (name, "comment-begin") == 0)
+ else if (_rl_strnicmp (value, "emacs", 5) == 0)
{
- if (*value)
- {
- if (_rl_comment_begin)
- free (_rl_comment_begin);
-
- _rl_comment_begin = savestring (value);
- }
+ _rl_keymap = emacs_standard_keymap;
+ rl_editing_mode = emacs_mode;
+ return 0;
}
- else if (_rl_stricmp (name, "completion-query-items") == 0)
+ return 1;
+}
+
+static int
+sv_combegin (value)
+ char *value;
+{
+ if (value && *value)
{
- int nval = 100;
- if (*value)
- {
- nval = atoi (value);
- if (nval < 0)
- nval = 0;
- }
- rl_completion_query_items = nval;
+ FREE (_rl_comment_begin);
+ _rl_comment_begin = savestring (value);
+ return 0;
}
- else if (_rl_stricmp (name, "keymap") == 0)
+ return 1;
+}
+
+static int
+sv_compquery (value)
+ char *value;
+{
+ int nval = 100;
+
+ if (value && *value)
{
- Keymap kmap;
- kmap = rl_get_keymap_by_name (value);
- if (kmap)
- rl_set_keymap (kmap);
+ nval = atoi (value);
+ if (nval < 0)
+ nval = 0;
}
- else if (_rl_stricmp (name, "bell-style") == 0)
+ rl_completion_query_items = nval;
+ return 0;
+}
+
+static int
+sv_keymap (value)
+ char *value;
+{
+ Keymap kmap;
+
+ kmap = rl_get_keymap_by_name (value);
+ if (kmap)
{
- if (!*value)
- _rl_bell_preference = AUDIBLE_BELL;
- else
- {
- if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0)
- _rl_bell_preference = NO_BELL;
- else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0)
- _rl_bell_preference = AUDIBLE_BELL;
- else if (_rl_stricmp (value, "visible") == 0)
- _rl_bell_preference = VISIBLE_BELL;
- }
+ rl_set_keymap (kmap);
+ return 0;
}
- else if (_rl_stricmp (name, "prefer-visible-bell") == 0)
+ return 1;
+}
+
+#define _SET_BELL(v) do { _rl_bell_preference = v; return 0; } while (0)
+
+static int
+sv_bell_style (value)
+ char *value;
+{
+ if (value == 0 || *value == '\0')
+ _SET_BELL (AUDIBLE_BELL);
+ else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0)
+ _SET_BELL (NO_BELL);
+ else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0)
+ _SET_BELL (AUDIBLE_BELL);
+ else if (_rl_stricmp (value, "visible") == 0)
+ _SET_BELL (VISIBLE_BELL);
+ else
+ return 1;
+}
+#undef _SET_BELL
+
+static int
+sv_isrchterm (value)
+ char *value;
+{
+ int beg, end, delim;
+ char *v;
+
+ if (value == 0)
+ return 1;
+
+ /* Isolate the value and translate it into a character string. */
+ v = savestring (value);
+ FREE (_rl_isearch_terminators);
+ if (v[0] == '"' || v[0] == '\'')
{
- /* Backwards compatibility. */
- if (*value && (_rl_stricmp (value, "on") == 0 ||
- (*value == '1' && !value[1])))
- _rl_bell_preference = VISIBLE_BELL;
- else
- _rl_bell_preference = AUDIBLE_BELL;
+ delim = v[0];
+ for (beg = end = 1; v[end] && v[end] != delim; end++)
+ ;
}
- else if (_rl_stricmp (name, "isearch-terminators") == 0)
+ else
{
- /* Isolate the value and translate it into a character string. */
- int beg, end;
- char *v;
+ for (beg = end = 0; whitespace (v[end]) == 0; end++)
+ ;
+ }
- v = savestring (value);
- FREE (_rl_isearch_terminators);
- if (v[0] == '"' || v[0] == '\'')
- {
- int delim = v[0];
- for (beg = end = 1; v[end] && v[end] != delim; end++)
- ;
- }
- else
- {
- for (beg = end = 0; whitespace (v[end]) == 0; end++)
- ;
- }
+ v[end] = '\0';
- v[end] = '\0';
- /* The value starts at v + beg. Translate it into a character string. */
- _rl_isearch_terminators = (unsigned char *)xmalloc (2 * strlen (v) + 1);
- rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end);
- _rl_isearch_terminators[end] = '\0';
- free (v);
- }
-
- /* For the time being, unknown variable names are simply ignored. */
+ /* The value starts at v + beg. Translate it into a character string. */
+ _rl_isearch_terminators = (unsigned char *)xmalloc (2 * strlen (v) + 1);
+ rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end);
+ _rl_isearch_terminators[end] = '\0';
+
+ free (v);
return 0;
}
-
+
/* Return the character which matches NAME.
For example, `Space' returns ' '. */
diff --git a/readline/callback.c b/readline/callback.c
index 6915be483a..117235697e 100644
--- a/readline/callback.c
+++ b/readline/callback.c
@@ -7,7 +7,7 @@
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 1, or
+ as published by the Free Software Foundation; either version 2, or
(at your option) any later version.
The GNU Readline Library is distributed in the hope that it will be
@@ -18,7 +18,7 @@
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,
- 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
#if defined (HAVE_CONFIG_H)
@@ -35,15 +35,7 @@
/* System-specific feature definitions and include files. */
#include "rldefs.h"
#include "readline.h"
-
-extern void readline_internal_setup ();
-extern char *readline_internal_teardown ();
-extern int readline_internal_char ();
-extern void _rl_init_line_state ();
-
-extern int _rl_meta_flag;
-extern char *rl_prompt;
-extern int rl_visible_prompt_length;
+#include "rlprivate.h"
/* **************************************************************** */
/* */
diff --git a/readline/chardefs.h b/readline/chardefs.h
index 3e9e273770..664c1e4336 100644
--- a/readline/chardefs.h
+++ b/readline/chardefs.h
@@ -7,7 +7,7 @@
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 1, or
+ as published by the Free Software Foundation; either version 2, or
(at your option) any later version.
The GNU Readline Library is distributed in the hope that it will be
@@ -18,7 +18,7 @@
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,
- 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#ifndef _CHARDEFS_H_
#define _CHARDEFS_H_
diff --git a/readline/complete.c b/readline/complete.c
index 1188120f0a..fb48712a4e 100644
--- a/readline/complete.c
+++ b/readline/complete.c
@@ -7,7 +7,7 @@
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 1, or
+ as published by the Free Software Foundation; either version 2, or
(at your option) any later version.
The GNU Readline Library is distributed in the hope that it will be
@@ -18,7 +18,7 @@
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,
- 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
#if defined (HAVE_CONFIG_H)
@@ -70,20 +70,14 @@ extern struct passwd *getpwent ();
/* Some standard library routines. */
#include "readline.h"
+#include "xmalloc.h"
+#include "rlprivate.h"
-extern char *tilde_expand ();
-extern char *rl_copy_text ();
-extern void _rl_abort_internal ();
-extern int _rl_qsort_string_compare ();
-extern void _rl_replace_text ();
-
-extern Function *rl_last_func;
-extern int rl_editing_mode;
-extern int screenwidth;
-
-extern void _rl_move_vert ();
-extern int _rl_vis_botlin;
-extern int rl_display_fixed;
+#ifdef __STDC__
+typedef int QSFUNC (const void *, const void *);
+#else
+typedef int QSFUNC ();
+#endif
/* If non-zero, then this is the address of a function to call when
completing a word would normally display the list of possible matches.
@@ -95,27 +89,25 @@ extern int rl_display_fixed;
VFunction *rl_completion_display_matches_hook = (VFunction *)NULL;
/* Forward declarations for functions defined and used in this file. */
-char *filename_completion_function ();
-char **completion_matches ();
+char *filename_completion_function __P((char *, int));
+char **completion_matches __P((char *, CPFunction *));
#if defined (VISIBLE_STATS)
# if !defined (X_OK)
# define X_OK 1
# endif
-static int stat_char ();
+static int stat_char __P((char *));
#endif
-static char *rl_quote_filename ();
-static char *rl_strpbrk ();
-
-static char **remove_duplicate_matches ();
-static void insert_match ();
-static int append_to_match ();
-static void insert_all_matches ();
-static void display_matches ();
-static int compute_lcd_of_matches ();
+static char *rl_quote_filename __P((char *, int, char *));
+static char *rl_strpbrk __P((char *, char *));
-extern char *xmalloc (), *xrealloc ();
+static char **remove_duplicate_matches __P((char **));
+static void insert_match __P((char *, int, int, char *));
+static int append_to_match __P((char *, int, int));
+static void insert_all_matches __P((char **, int, char *));
+static void display_matches __P((char **));
+static int compute_lcd_of_matches __P((char **, int, char *));
/* **************************************************************** */
/* */
@@ -136,7 +128,11 @@ int _rl_complete_mark_directories = 1;
int _rl_print_completions_horizontally;
/* Non-zero means that case is not significant in filename completion. */
+#if defined (__MSDOS__) && !defined (__DJGPP__)
+int _rl_completion_case_fold = 1;
+#else
int _rl_completion_case_fold;
+#endif
/* Global variables available to applications using readline. */
@@ -417,6 +413,10 @@ printable_part (pathname)
char *temp;
temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL;
+#if defined (__MSDOS__)
+ if (rl_filename_completion_desired && temp == 0 && isalpha (pathname[0]) && pathname[1] == ':')
+ temp = pathname + 1;
+#endif
return (temp ? ++temp : pathname);
}
@@ -477,7 +477,12 @@ print_filename (to_print, full_pathname)
c = to_print[-1];
to_print[-1] = '\0';
- s = tilde_expand (full_pathname);
+ /* If setting the last slash in full_pathname to a NUL results in
+ full_pathname being the empty string, we are trying to complete
+ files in the root directory. If we pass a null string to the
+ bash directory completion hook, for example, it will expand it
+ to the current directory. We just want the `/'. */
+ s = tilde_expand (full_pathname && *full_pathname ? full_pathname : "/");
if (rl_directory_completion_hook)
(*rl_directory_completion_hook) (&s);
@@ -627,25 +632,31 @@ find_completion_word (fp, dp)
/* If there is an application-specific function to say whether or not
a character is quoted and we found a quote character, let that
function decide whether or not a character is a word break, even
- if it is found in rl_completer_word_break_characters. */
- if (rl_char_is_quoted_p)
- isbrk = (found_quote == 0 ||
- (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) &&
- strchr (rl_completer_word_break_characters, scan) != 0;
- else
- isbrk = strchr (rl_completer_word_break_characters, scan) != 0;
-
- if (isbrk)
+ if it is found in rl_completer_word_break_characters. Don't bother
+ if we're at the end of the line, though. */
+ if (scan)
{
- /* If the character that caused the word break was a quoting
- character, then remember it as the delimiter. */
- if (rl_basic_quote_characters && strchr (rl_basic_quote_characters, scan) && (end - rl_point) > 1)
- delimiter = scan;
-
- /* If the character isn't needed to determine something special
- about what kind of completion to perform, then advance past it. */
- if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0)
- rl_point++;
+ if (rl_char_is_quoted_p)
+ isbrk = (found_quote == 0 ||
+ (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) &&
+ strchr (rl_completer_word_break_characters, scan) != 0;
+ else
+ isbrk = strchr (rl_completer_word_break_characters, scan) != 0;
+
+ if (isbrk)
+ {
+ /* If the character that caused the word break was a quoting
+ character, then remember it as the delimiter. */
+ if (rl_basic_quote_characters &&
+ strchr (rl_basic_quote_characters, scan) &&
+ (end - rl_point) > 1)
+ delimiter = scan;
+
+ /* If the character isn't needed to determine something special
+ about what kind of completion to perform, then advance past it. */
+ if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0)
+ rl_point++;
+ }
}
if (fp)
@@ -715,7 +726,7 @@ remove_duplicate_matches (matches)
/* Sort the array without matches[0], since we need it to
stay in place no matter what. */
if (i)
- qsort (matches+1, i-1, sizeof (char *), _rl_qsort_string_compare);
+ qsort (matches+1, i-1, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
/* Remember the lowest common denominator for it may be unique. */
lowest_common = savestring (matches[0]);
@@ -908,7 +919,7 @@ rl_display_match_list (matches, len, max)
/* Sort the items if they are not already sorted. */
if (rl_ignore_completion_duplicates == 0)
- qsort (matches + 1, len, sizeof (char *), _rl_qsort_string_compare);
+ qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
crlf ();
@@ -1409,7 +1420,7 @@ username_completion_function (text, state)
{
#if defined (__WIN32__) || defined (__OPENNT)
return (char *)NULL;
-#else /* !__WIN32__ && !__OPENNT */
+#else /* !__WIN32__ && !__OPENNT) */
static char *username = (char *)NULL;
static struct passwd *entry;
static int namelen, first_char, first_char_loc;
@@ -1452,7 +1463,7 @@ username_completion_function (text, state)
return (value);
}
-#endif /* !__GO32__ */
+#endif /* !__WIN32__ && !__OPENNT */
}
/* Okay, now we write the entry_function for filename completion. In the
@@ -1494,18 +1505,24 @@ filename_completion_function (text, state)
temp = strrchr (dirname, '/');
+#if defined (__MSDOS__)
+ /* special hack for //X/... */
+ if (dirname[0] == '/' && dirname[1] == '/' && isalpha (dirname[2]) && dirname[3] == '/')
+ temp = strrchr (dirname + 3, '/');
+#endif
+
if (temp)
{
strcpy (filename, ++temp);
*temp = '\0';
}
-#if defined (__WIN32__) || defined (__OPENNT) || defined (__MSDOS__)
- /* Handle the drive-relative names "d:foo/bar". */
- else if (dirname[1] == ':')
- {
- strcpy (filename, dirname + 2);
- dirname[2] = '\0';
- }
+#if defined (__MSDOS__)
+ /* searches from current directory on the drive */
+ else if (isalpha (dirname[0]) && dirname[1] == ':')
+ {
+ strcpy (filename, dirname + 2);
+ dirname[2] = '\0';
+ }
#endif
else
{
@@ -1668,11 +1685,7 @@ rl_menu_complete (count, ignore)
/* Clean up from previous call, if any. */
FREE (orig_text);
if (matches)
- {
- for (match_list_index = 0; matches[match_list_index]; match_list_index++)
- free (matches[match_list_index]);
- free (matches);
- }
+ free_match_list (matches);
match_list_index = match_list_size = 0;
matches = (char **)NULL;
diff --git a/readline/config.h.in b/readline/config.h.in
index 87f807fa6e..569e53d271 100644
--- a/readline/config.h.in
+++ b/readline/config.h.in
@@ -57,6 +57,9 @@
/* Define if you have the lstat function. */
#undef HAVE_LSTAT
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
diff --git a/readline/configure b/readline/configure
index cdcdf88bae..ae9bf942bc 100755
--- a/readline/configure
+++ b/readline/configure
@@ -1,7 +1,19 @@
#! /bin/sh
-# From configure.in for Readline 4.0, version 2.14, from autoconf version 2.13
-LIBVERSION=4.0
+# From configure.in for Readline 4.1, version 2.22, from autoconf version 2.13
+LIBVERSION=4.1
+
+
+
+
+
+
+
+
+
+
+
+
@@ -121,7 +133,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -236,7 +247,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -407,11 +417,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -577,16 +582,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -656,7 +657,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:660: checking host system type" >&5
+echo "configure:661: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -697,7 +698,7 @@ test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:701: checking for $ac_word" >&5
+echo "configure:702: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -727,7 +728,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:731: checking for $ac_word" >&5
+echo "configure:732: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -778,7 +779,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:782: checking for $ac_word" >&5
+echo "configure:783: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -810,7 +811,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:815: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -821,12 +822,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 825 "configure"
+#line 826 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -852,12 +853,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:861: checking whether we are using GNU C" >&5
+echo "configure:862: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -866,7 +867,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -885,7 +886,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:889: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:890: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -917,7 +918,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:921: checking how to run the C preprocessor" >&5
+echo "configure:922: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -932,13 +933,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -949,13 +950,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -966,13 +967,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -998,17 +999,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1002: checking for minix/config.h" >&5
+echo "configure:1003: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1085,13 +1086,13 @@ test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1089: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1090: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <
Autoconf TIOCGETP
@@ -1109,7 +1110,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <
Autoconf TCGETA
@@ -1142,7 +1143,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1146: checking for a BSD compatible install" >&5
+echo "configure:1147: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1197,7 +1198,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1201: checking for $ac_word" >&5
+echo "configure:1202: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1227,7 +1228,7 @@ test -n "$ARFLAGS" || ARFLAGS="cr"
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1231: checking for $ac_word" >&5
+echo "configure:1232: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1259,12 +1260,12 @@ MAKE_SHELL=/bin/sh
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1263: checking return type of signal handlers" >&5
+echo "configure:1264: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -1281,7 +1282,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1301,12 +1302,12 @@ EOF
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:1305: checking whether stat file-mode macros are broken" >&5
+echo "configure:1306: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -1361,12 +1362,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1365: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1366: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
@@ -1374,7 +1375,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1399,7 +1400,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1403: checking for opendir in -ldir" >&5
+echo "configure:1404: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1407,7 +1408,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1440,7 +1441,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1444: checking for opendir in -lx" >&5
+echo "configure:1445: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1448,7 +1449,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1482,15 +1483,16 @@ fi
fi
-for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat
+for ac_func in lstat memmove putenv select setenv setlocale \
+ strcasecmp tcgetattr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1489: checking for $ac_func" >&5
+echo "configure:1491: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1539,7 +1541,7 @@ done
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:1543: checking for working strcoll" >&5
+echo "configure:1545: checking for working strcoll" >&5
if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1547,7 +1549,7 @@ else
ac_cv_func_strcoll_works=no
else
cat > conftest.$ac_ext <
main ()
@@ -1557,7 +1559,7 @@ main ()
strcoll ("123", "456") >= 0);
}
EOF
-if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strcoll_works=yes
else
@@ -1586,17 +1588,17 @@ for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1590: checking for $ac_hdr" >&5
+echo "configure:1592: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1625,13 +1627,13 @@ done
echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
-echo "configure:1629: checking for type of signal functions" >&5
+echo "configure:1631: checking for type of signal functions" >&5
if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
@@ -1644,7 +1646,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
bash_cv_signal_vintage=posix
else
@@ -1653,7 +1655,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <
int main() {
@@ -1663,7 +1665,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
bash_cv_signal_vintage=4.2bsd
else
@@ -1672,7 +1674,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <
@@ -1685,7 +1687,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
bash_cv_signal_vintage=svr3
else
@@ -1726,7 +1728,7 @@ fi
echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
-echo "configure:1730: checking if signal handlers must be reinstalled when invoked" >&5
+echo "configure:1732: checking if signal handlers must be reinstalled when invoked" >&5
if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1736,7 +1738,7 @@ else
else
cat > conftest.$ac_ext <
@@ -1783,7 +1785,7 @@ main()
}
EOF
-if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
bash_cv_must_reinstall_sighandlers=no
else
@@ -1808,7 +1810,7 @@ fi
echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
-echo "configure:1812: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
+echo "configure:1814: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1818,7 +1820,7 @@ else
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
bash_cv_func_sigsetjmp=present
else
@@ -1882,12 +1884,12 @@ EOF
fi
echo $ac_n "checking for lstat""... $ac_c" 1>&6
-echo "configure:1886: checking for lstat" >&5
+echo "configure:1888: checking for lstat" >&5
if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -1897,7 +1899,7 @@ int main() {
lstat(".",(struct stat *)0);
; return 0; }
EOF
-if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
bash_cv_func_lstat=yes
else
@@ -1918,12 +1920,12 @@ EOF
fi
echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
-echo "configure:1922: checking whether programs are able to redeclare getpw functions" >&5
+echo "configure:1924: checking whether programs are able to redeclare getpw functions" >&5
if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -1934,7 +1936,7 @@ int main() {
struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
; return 0; }
EOF
-if { (eval echo configure:1938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_can_redecl_getpw=yes
else
@@ -1956,7 +1958,7 @@ fi
echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
-echo "configure:1960: checking whether or not strcoll and strcmp differ" >&5
+echo "configure:1962: checking whether or not strcoll and strcmp differ" >&5
if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1966,7 +1968,7 @@ else
else
cat > conftest.$ac_ext <
@@ -2005,7 +2007,7 @@ char *v[];
}
EOF
-if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
bash_cv_func_strcoll_broken=yes
else
@@ -2029,12 +2031,12 @@ fi
echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
-echo "configure:2033: checking whether signal handlers are of type void" >&5
+echo "configure:2035: checking whether signal handlers are of type void" >&5
if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2049,7 +2051,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_void_sighandler=yes
else
@@ -2069,12 +2071,12 @@ EOF
fi
echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:2073: checking for TIOCGWINSZ in sys/ioctl.h" >&5
+echo "configure:2075: checking for TIOCGWINSZ in sys/ioctl.h" >&5
if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2082,7 +2084,7 @@ int main() {
int x = TIOCGWINSZ;
; return 0; }
EOF
-if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_tiocgwinsz_in_ioctl=yes
else
@@ -2103,12 +2105,12 @@ EOF
fi
echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:2107: checking for TIOCSTAT in sys/ioctl.h" >&5
+echo "configure:2109: checking for TIOCSTAT in sys/ioctl.h" >&5
if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2116,7 +2118,7 @@ int main() {
int x = TIOCSTAT;
; return 0; }
EOF
-if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_tiocstat_in_ioctl=yes
else
@@ -2137,12 +2139,12 @@ EOF
fi
echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:2141: checking for FIONREAD in sys/ioctl.h" >&5
+echo "configure:2143: checking for FIONREAD in sys/ioctl.h" >&5
if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2150,7 +2152,7 @@ int main() {
int x = FIONREAD;
; return 0; }
EOF
-if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_fionread_in_ioctl=yes
else
@@ -2171,19 +2173,19 @@ EOF
fi
echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2175: checking for speed_t in sys/types.h" >&5
+echo "configure:2177: checking for speed_t in sys/types.h" >&5
if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
speed_t x;
; return 0; }
EOF
-if { (eval echo configure:2187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_speed_t_in_sys_types=yes
else
@@ -2204,12 +2206,12 @@ EOF
fi
echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
-echo "configure:2208: checking for struct winsize in sys/ioctl.h and termios.h" >&5
+echo "configure:2210: checking for struct winsize in sys/ioctl.h and termios.h" >&5
if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2217,7 +2219,7 @@ int main() {
struct winsize x;
; return 0; }
EOF
-if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_struct_winsize_header=ioctl_h
else
@@ -2225,7 +2227,7 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <
#include
@@ -2233,7 +2235,7 @@ int main() {
struct winsize x;
; return 0; }
EOF
-if { (eval echo configure:2237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_struct_winsize_header=termios_h
else
@@ -2266,12 +2268,12 @@ fi
echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
-echo "configure:2270: checking if struct dirent has a d_ino member" >&5
+echo "configure:2272: checking if struct dirent has a d_ino member" >&5
if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -2300,7 +2302,7 @@ struct dirent d; int z; z = d.d_ino;
; return 0; }
EOF
-if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_dirent_has_dino=yes
else
@@ -2322,12 +2324,12 @@ fi
echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
-echo "configure:2326: checking if struct dirent has a d_fileno member" >&5
+echo "configure:2328: checking if struct dirent has a d_fileno member" >&5
if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -2356,7 +2358,7 @@ struct dirent d; int z; z = d.d_fileno;
; return 0; }
EOF
-if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bash_cv_dirent_has_d_fileno=yes
else
@@ -2385,14 +2387,14 @@ if test "X$bash_cv_termcap_lib" = "X"; then
_bash_needmsg=yes
else
echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
-echo "configure:2389: checking which library has the termcap functions" >&5
+echo "configure:2391: checking which library has the termcap functions" >&5
_bash_needmsg=
fi
if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:2396: checking for tgetent in -ltermcap" >&5
+echo "configure:2398: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2400,7 +2402,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2430,7 +2432,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:2434: checking for tgetent in -lcurses" >&5
+echo "configure:2436: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2438,7 +2440,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2468,7 +2470,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:2472: checking for tgetent in -lncurses" >&5
+echo "configure:2474: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2476,7 +2478,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2516,7 +2518,7 @@ fi
if test "X$_bash_needmsg" = "Xyes"; then
echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
-echo "configure:2520: checking which library has the termcap functions" >&5
+echo "configure:2522: checking which library has the termcap functions" >&5
fi
echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
@@ -2553,8 +2555,8 @@ esac
#
if test -f ${srcdir}/support/shobj-conf; then
echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6
-echo "configure:2557: checking configuration for building shared libraries" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+echo "configure:2559: checking configuration for building shared libraries" >&5
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
@@ -2568,9 +2570,20 @@ echo "configure:2557: checking configuration for building shared libraries" >&5
echo "$ac_t""$SHLIB_STATUS" 1>&6
+
+ # shared library versioning
+ # quoted for m4 so I can use character classes
+ SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'`
+ SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`
+
+
fi
-BUILD_DIR=`pwd`
+case "$host_os" in
+msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
+*) BUILD_DIR=`pwd` ;;
+esac
+
@@ -2748,6 +2761,8 @@ s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g
s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g
s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g
s%@SHLIB_LIBS@%$SHLIB_LIBS%g
+s%@SHLIB_MAJOR@%$SHLIB_MAJOR%g
+s%@SHLIB_MINOR@%$SHLIB_MINOR%g
s%@BUILD_DIR@%$BUILD_DIR%g
s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
diff --git a/readline/configure.in b/readline/configure.in
index 9afdaa70fc..780b4df628 100644
--- a/readline/configure.in
+++ b/readline/configure.in
@@ -4,8 +4,8 @@ dnl
dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([for Readline 4.0, version 2.14, from autoconf version] AC_ACVERSION)
-LIBVERSION=4.0
+AC_REVISION([for Readline 4.1, version 2.22, from autoconf version] AC_ACVERSION)
+LIBVERSION=4.1
AC_INIT(readline.h)
AC_CONFIG_HEADER(config.h)
@@ -32,6 +32,7 @@ fi
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
AC_PROG_CC
+dnl AC_AIX
AC_MINIX
dnl BEGIN changes for CYGNUS cross-building for Cygwin
@@ -91,7 +92,8 @@ AC_RETSIGTYPE
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
+AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \
+ strcasecmp tcgetattr)
AC_FUNC_STRCOLL
@@ -140,7 +142,7 @@ esac
#
if test -f ${srcdir}/support/shobj-conf; then
AC_MSG_CHECKING(configuration for building shared libraries)
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
AC_SUBST(SHOBJ_CC)
AC_SUBST(SHOBJ_CFLAGS)
AC_SUBST(SHOBJ_LD)
@@ -154,9 +156,20 @@ if test -f ${srcdir}/support/shobj-conf; then
AC_SUBST(SHLIB_LIBVERSION)
AC_SUBST(SHLIB_LIBS)
AC_MSG_RESULT($SHLIB_STATUS)
+
+ # shared library versioning
+ # quoted for m4 so I can use character classes
+ SHLIB_MAJOR=[`expr "$LIBVERSION" : '\([0-9]\)\..*'`]
+ SHLIB_MINOR=[`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`]
+ AC_SUBST(SHLIB_MAJOR)
+ AC_SUBST(SHLIB_MINOR)
fi
-BUILD_DIR=`pwd`
+case "$host_os" in
+msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
+*) BUILD_DIR=`pwd` ;;
+esac
+
AC_SUBST(BUILD_DIR)
AC_SUBST(CFLAGS)
diff --git a/readline/display.c b/readline/display.c
index 3215a94cd1..4487004a02 100644
--- a/readline/display.c
+++ b/readline/display.c
@@ -7,7 +7,7 @@
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 1, or
+ as published by the Free Software Foundation; either version 2, or
(at your option) any later version.
The GNU Readline Library is distributed in the hope that it will be
@@ -18,7 +18,7 @@
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,
- 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
#if defined (HAVE_CONFIG_H)
@@ -41,11 +41,6 @@
#include
-#if defined (__GO32__)
-# include
-# include
-#endif /* __GO32__ */
-
/* System-specific feature definitions and include files. */
#include "rldefs.h"
@@ -56,48 +51,25 @@
#include "readline.h"
#include "history.h"
+#include "rlprivate.h"
+#include "xmalloc.h"
+
#if !defined (strchr) && !defined (__STDC__)
extern char *strchr (), *strrchr ();
#endif /* !strchr && !__STDC__ */
-/* Global and pseudo-global variables and functions
- imported from readline.c. */
-extern char *rl_prompt;
-extern int readline_echoing_p;
-
-extern int _rl_output_meta_chars;
-extern int _rl_horizontal_scroll_mode;
-extern int _rl_mark_modified_lines;
-extern int _rl_prefer_visible_bell;
-
-/* Variables and functions imported from terminal.c */
-extern void _rl_output_some_chars ();
-#ifdef _MINIX
-extern void _rl_output_character_function ();
-#else
-extern int _rl_output_character_function ();
+#if defined (HACK_TERMCAP_MOTION)
+extern char *term_forward_char;
#endif
-extern int _rl_backspace ();
-
-extern char *term_clreol, *term_clrpag;
-extern char *term_im, *term_ic, *term_ei, *term_DC;
-extern char *term_up, *term_dc, *term_cr, *term_IC;
-extern int screenheight, screenwidth, screenchars;
-extern int terminal_can_insert, _rl_term_autowrap;
-/* Pseudo-global functions (local to the readline library) exported
- by this file. */
-void _rl_move_cursor_relative (), _rl_output_some_chars ();
-void _rl_move_vert ();
-void _rl_clear_to_eol (), _rl_clear_screen ();
-
-static void update_line (), space_to_eol ();
-static void delete_chars (), insert_some_chars ();
-static void cr ();
+static void update_line __P((char *, char *, int, int, int, int));
+static void space_to_eol __P((int));
+static void delete_chars __P((int));
+static void insert_some_chars __P((char *, int));
+static void cr __P((void));
static int *inv_lbreaks, *vis_lbreaks;
-
-extern char *xmalloc (), *xrealloc ();
+static int inv_lbsize, vis_lbsize;
/* Heuristic used to decide whether it is faster to move from CUR to NEW
by backing up or outputting a carriage return and moving forward. */
@@ -190,7 +162,7 @@ static int visible_first_line_len;
/* Expand the prompt string S and return the number of visible
characters in *LP, if LP is not null. This is currently more-or-less
a placeholder for expansion. LIP, if non-null is a place to store the
- index of the last invisible character in ther eturned string. */
+ index of the last invisible character in the returned string. */
/* Current implementation:
\001 (^A) start non-visible characters
@@ -250,6 +222,18 @@ expand_prompt (pmt, lp, lip)
return ret;
}
+/* Just strip out RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE from
+ PMT and return the rest of PMT. */
+char *
+_rl_strip_prompt (pmt)
+ char *pmt;
+{
+ char *ret;
+
+ ret = expand_prompt (pmt, (int *)NULL, (int *)NULL);
+ return ret;
+}
+
/*
* Expand the prompt string into the various display components, if
* necessary.
@@ -307,6 +291,49 @@ rl_expand_prompt (prompt)
}
}
+/* Initialize the VISIBLE_LINE and INVISIBLE_LINE arrays, and their associated
+ arrays of line break markers. MINSIZE is the minimum size of VISIBLE_LINE
+ and INVISIBLE_LINE; if it is greater than LINE_SIZE, LINE_SIZE is
+ increased. If the lines have already been allocated, this ensures that
+ they can hold at least MINSIZE characters. */
+static void
+init_line_structures (minsize)
+ int minsize;
+{
+ register int n;
+
+ if (invisible_line == 0) /* initialize it */
+ {
+ if (line_size < minsize)
+ line_size = minsize;
+ visible_line = xmalloc (line_size);
+ invisible_line = xmalloc (line_size);
+ }
+ else if (line_size < minsize) /* ensure it can hold MINSIZE chars */
+ {
+ line_size *= 2;
+ if (line_size < minsize)
+ line_size = minsize;
+ visible_line = xrealloc (visible_line, line_size);
+ invisible_line = xrealloc (invisible_line, line_size);
+ }
+
+ for (n = minsize; n < line_size; n++)
+ {
+ visible_line[n] = 0;
+ invisible_line[n] = 1;
+ }
+
+ if (vis_lbreaks == 0)
+ {
+ /* should be enough. */
+ inv_lbsize = vis_lbsize = 256;
+ inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int));
+ vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int));
+ inv_lbreaks[0] = vis_lbreaks[0] = 0;
+ }
+}
+
/* Basic redisplay algorithm. */
void
rl_redisplay ()
@@ -325,19 +352,7 @@ rl_redisplay ()
if (invisible_line == 0)
{
- visible_line = xmalloc (line_size);
- invisible_line = xmalloc (line_size);
- for (in = 0; in < line_size; in++)
- {
- visible_line[in] = 0;
- invisible_line[in] = 1;
- }
-
- /* should be enough, but then again, this is just for testing. */
- inv_lbreaks = (int *)malloc (256 * sizeof (int));
- vis_lbreaks = (int *)malloc (256 * sizeof (int));
- inv_lbreaks[0] = vis_lbreaks[0] = 0;
-
+ init_line_structures (0);
rl_on_new_line ();
}
@@ -395,12 +410,13 @@ rl_redisplay ()
else
{
prompt_this_line++;
+ pmtlen = prompt_this_line - rl_display_prompt; /* temp var */
if (forced_display)
{
- _rl_output_some_chars (rl_display_prompt, prompt_this_line - rl_display_prompt);
+ _rl_output_some_chars (rl_display_prompt, pmtlen);
/* Make sure we are at column zero even after a newline,
regardless of the state of terminal output processing. */
- if (prompt_this_line[-2] != '\r')
+ if (pmtlen < 2 || prompt_this_line[-2] != '\r')
cr ();
}
}
@@ -419,11 +435,25 @@ rl_redisplay ()
wrap_offset = 0;
}
+#define CHECK_INV_LBREAKS() \
+ do { \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
+ } while (0)
+
#define CHECK_LPOS() \
do { \
lpos++; \
if (lpos >= screenwidth) \
{ \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
inv_lbreaks[++newlines] = out; \
lpos = 0; \
} \
@@ -437,14 +467,13 @@ rl_redisplay ()
contents of the command line? */
while (lpos >= screenwidth)
{
-#if 0
- temp = ((newlines + 1) * screenwidth) - ((newlines == 0) ? wrap_offset : 0);
-#else
/* XXX - possible fix from Darin Johnson for prompt
string with invisible characters that is longer than the screen
- width. */
+ width. XXX - this doesn't work right if invisible characters have
+ to be put on the second screen line -- it adds too much (the number
+ of invisible chars after the screenwidth). */
temp = ((newlines + 1) * screenwidth) + ((newlines == 0) ? wrap_offset : 0);
-#endif
+
inv_lbreaks[++newlines] = temp;
lpos -= screenwidth;
}
@@ -477,6 +506,7 @@ rl_redisplay ()
if (lpos + 4 >= screenwidth)
{
temp = screenwidth - lpos;
+ CHECK_INV_LBREAKS ();
inv_lbreaks[++newlines] = out + temp;
lpos = 4 - temp;
}
@@ -506,6 +536,7 @@ rl_redisplay ()
{
register int temp2;
temp2 = screenwidth - lpos;
+ CHECK_INV_LBREAKS ();
inv_lbreaks[++newlines] = out + temp2;
lpos = temp - temp2;
while (out < newout)
@@ -522,6 +553,7 @@ rl_redisplay ()
else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && term_up && *term_up)
{
line[out++] = '\0'; /* XXX - sentinel */
+ CHECK_INV_LBREAKS ();
inv_lbreaks[++newlines] = out;
lpos = 0;
}
@@ -546,6 +578,7 @@ rl_redisplay ()
}
inv_botlin = lb_botlin = newlines;
+ CHECK_INV_LBREAKS ();
inv_lbreaks[newlines+1] = out;
cursor_linenum = lb_linenum;
@@ -776,11 +809,17 @@ rl_redisplay ()
/* Swap visible and non-visible lines. */
{
char *temp = visible_line;
- int *itemp = vis_lbreaks;
+ int *itemp = vis_lbreaks, ntemp = vis_lbsize;
+
visible_line = invisible_line;
invisible_line = temp;
+
vis_lbreaks = inv_lbreaks;
inv_lbreaks = itemp;
+
+ vis_lbsize = inv_lbsize;
+ inv_lbsize = ntemp;
+
rl_display_fixed = 0;
/* If we are displaying on a single line, and last_lmargin is > 0, we
are not displaying any invisible characters, so set visible_wrap_offset
@@ -907,7 +946,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
putc ('\r', rl_outstream);
#else
tputs (term_cr, 1, _rl_output_character_function);
-#endif /* !__MSDOS__ */
+#endif
_rl_output_some_chars (local_prompt, lendiff);
_rl_last_c_pos = lendiff;
}
@@ -1037,6 +1076,58 @@ rl_on_new_line ()
return 0;
}
+/* Tell the update routines that we have moved onto a new line with the
+ prompt already displayed. Code originally from the version of readline
+ distributed with CLISP. */
+int
+rl_on_new_line_with_prompt ()
+{
+ int prompt_size, i, l, real_screenwidth, newlines;
+ char *prompt_last_line;
+
+ /* Initialize visible_line and invisible_line to ensure that they can hold
+ the already-displayed prompt. */
+ prompt_size = strlen (rl_prompt) + 1;
+ init_line_structures (prompt_size);
+
+ /* Make sure the line structures hold the already-displayed prompt for
+ redisplay. */
+ strcpy (visible_line, rl_prompt);
+ strcpy (invisible_line, rl_prompt);
+
+ /* If the prompt contains newlines, take the last tail. */
+ prompt_last_line = strrchr (rl_prompt, '\n');
+ if (!prompt_last_line)
+ prompt_last_line = rl_prompt;
+
+ l = strlen (prompt_last_line);
+ _rl_last_c_pos = l;
+
+ /* Dissect prompt_last_line into screen lines. Note that here we have
+ to use the real screenwidth. Readline's notion of screenwidth might be
+ one less, see terminal.c. */
+ real_screenwidth = screenwidth + (_rl_term_autowrap ? 0 : 1);
+ _rl_last_v_pos = l / real_screenwidth;
+ /* If the prompt length is a multiple of real_screenwidth, we don't know
+ whether the cursor is at the end of the last line, or already at the
+ beginning of the next line. Output a newline just to be safe. */
+ if (l > 0 && (l % real_screenwidth) == 0)
+ _rl_output_some_chars ("\n", 1);
+ last_lmargin = 0;
+
+ newlines = 0; i = 0;
+ while (i <= l)
+ {
+ _rl_vis_botlin = newlines;
+ vis_lbreaks[newlines++] = i;
+ i += real_screenwidth;
+ }
+ vis_lbreaks[newlines] = l;
+ visible_wrap_offset = 0;
+
+ return 0;
+}
+
/* Actually update the display, period. */
int
rl_forced_update_display ()
@@ -1094,8 +1185,6 @@ _rl_move_cursor_relative (new, data)
That kind of control is for people who don't know what the
data is underneath the cursor. */
#if defined (HACK_TERMCAP_MOTION)
- extern char *term_forward_char;
-
if (term_forward_char)
for (i = _rl_last_c_pos; i < new; i++)
tputs (term_forward_char, 1, _rl_output_character_function);
@@ -1122,22 +1211,15 @@ _rl_move_vert (to)
if (_rl_last_v_pos == to || to > screenheight)
return;
-#if defined (__GO32__)
- {
- int row, col;
-
- i = fflush (rl_outstream); /* make sure the cursor pos is current! */
- ScreenGetCursor (&row, &col);
- ScreenSetCursor ((row + to - _rl_last_v_pos), col);
- delta = i;
- }
-#else /* !__GO32__ */
-
if ((delta = to - _rl_last_v_pos) > 0)
{
for (i = 0; i < delta; i++)
putc ('\n', rl_outstream);
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
tputs (term_cr, 1, _rl_output_character_function);
+#endif
_rl_last_c_pos = 0;
}
else
@@ -1146,7 +1228,7 @@ _rl_move_vert (to)
for (i = 0; i < -delta; i++)
tputs (term_up, 1, _rl_output_character_function);
}
-#endif /* !__GO32__ */
+
_rl_last_v_pos = to; /* Now TO is here */
}
@@ -1354,11 +1436,9 @@ void
_rl_clear_to_eol (count)
int count;
{
-#if !defined (__GO32__)
if (term_clreol)
tputs (term_clreol, 1, _rl_output_character_function);
else if (count)
-#endif /* !__GO32__ */
space_to_eol (count);
}
@@ -1379,14 +1459,9 @@ space_to_eol (count)
void
_rl_clear_screen ()
{
-#if defined (__GO32__)
- ScreenClear (); /* FIXME: only works in text modes */
- ScreenSetCursor (0, 0); /* term_clrpag is "cl" which homes the cursor */
-#else
if (term_clrpag)
tputs (term_clrpag, 1, _rl_output_character_function);
else
-#endif /* !__GO32__ */
crlf ();
}
@@ -1396,21 +1471,6 @@ insert_some_chars (string, count)
char *string;
int count;
{
-#if defined (__GO32__)
-#ifndef __DJGPP__
- int row, col, width;
- char *row_start;
-
- ScreenGetCursor (&row, &col);
- width = ScreenCols ();
- row_start = ScreenPrimary + (row * width);
-
- memcpy (row_start + col + count, row_start + col, width - col - count);
-#endif /* !__DJGPP__ */
- /* Place the text on the screen. */
- _rl_output_some_chars (string, count);
-#else /* !_GO32 */
-
/* If IC is defined, then we do not have to "enter" insert mode. */
if (term_IC)
{
@@ -1443,7 +1503,6 @@ insert_some_chars (string, count)
if (term_ei && *term_ei)
tputs (term_ei, 1, _rl_output_character_function);
}
-#endif /* !__GO32__ */
}
/* Delete COUNT characters from the display line. */
@@ -1451,19 +1510,6 @@ static void
delete_chars (count)
int count;
{
-#if !defined (__DJGPP__)
-#if defined (__GO32__)
- int row, col, width;
- char *row_start;
-
- ScreenGetCursor (&row, &col);
- width = ScreenCols ();
- row_start = ScreenPrimary + (row * width);
-
- memcpy (row_start + col, row_start + col + count, width - col - count);
- memset (row_start + width - count, 0, count * 2);
-#else /* !_GO32 */
-
if (count > screenwidth) /* XXX */
return;
@@ -1479,8 +1525,6 @@ delete_chars (count)
while (count--)
tputs (term_dc, 1, _rl_output_character_function);
}
-#endif /* !__GO32__ */
-#endif /* !__DJGPP__ */
}
void
@@ -1502,7 +1546,11 @@ _rl_update_final ()
if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == screenwidth))
{
char *last_line;
+#if 0
last_line = &visible_line[inv_lbreaks[_rl_vis_botlin]];
+#else
+ last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]];
+#endif
_rl_move_cursor_relative (screenwidth - 1, last_line);
_rl_clear_to_eol (0);
putc (last_line[screenwidth - 1], rl_outstream);
@@ -1523,16 +1571,47 @@ cr ()
putc ('\r', rl_outstream);
#else
tputs (term_cr, 1, _rl_output_character_function);
-#endif /* !__MSDOS__ */
+#endif
_rl_last_c_pos = 0;
}
}
+/* Redraw the last line of a multi-line prompt that may possibly contain
+ terminal escape sequences. Called with the cursor at column 0 of the
+ line to draw the prompt on. */
+static void
+redraw_prompt (t)
+ char *t;
+{
+ char *oldp, *oldl, *oldlprefix;
+ int oldlen, oldlast, oldplen;
+
+ /* Geez, I should make this a struct. */
+ oldp = rl_display_prompt;
+ oldl = local_prompt;
+ oldlprefix = local_prompt_prefix;
+ oldlen = visible_length;
+ oldplen = prefix_length;
+ oldlast = last_invisible;
+
+ rl_display_prompt = t;
+ local_prompt = expand_prompt (t, &visible_length, &last_invisible);
+ local_prompt_prefix = (char *)NULL;
+ rl_forced_update_display ();
+
+ rl_display_prompt = oldp;
+ local_prompt = oldl;
+ local_prompt_prefix = oldlprefix;
+ visible_length = oldlen;
+ prefix_length = oldplen;
+ last_invisible = oldlast;
+}
+
/* Redisplay the current line after a SIGWINCH is received. */
void
_rl_redisplay_after_sigwinch ()
{
- char *t, *oldp, *oldl, *oldlprefix;
+ char *t;
/* Clear the current line and put the cursor at column 0. Make sure
the right thing happens if we have wrapped to a new screen line. */
@@ -1542,7 +1621,7 @@ _rl_redisplay_after_sigwinch ()
putc ('\r', rl_outstream);
#else
tputs (term_cr, 1, _rl_output_character_function);
-#endif /* !__MSDOS__ */
+#endif
_rl_last_c_pos = 0;
#if defined (__MSDOS__)
space_to_eol (screenwidth);
@@ -1565,17 +1644,7 @@ _rl_redisplay_after_sigwinch ()
/* Redraw only the last line of a multi-line prompt. */
t = strrchr (rl_display_prompt, '\n');
if (t)
- {
- oldp = rl_display_prompt;
- oldl = local_prompt;
- oldlprefix = local_prompt_prefix;
- rl_display_prompt = ++t;
- local_prompt = local_prompt_prefix = (char *)NULL;
- rl_forced_update_display ();
- rl_display_prompt = oldp;
- local_prompt = oldl;
- local_prompt_prefix = oldlprefix;
- }
+ redraw_prompt (++t);
else
rl_forced_update_display ();
}
@@ -1600,3 +1669,25 @@ _rl_erase_entire_line ()
cr ();
fflush (rl_outstream);
}
+
+/* return the `current display line' of the cursor -- the number of lines to
+ move up to get to the first screen line of the current readline line. */
+int
+_rl_current_display_line ()
+{
+ int ret, nleft;
+
+ /* Find out whether or not there might be invisible characters in the
+ editing buffer. */
+ if (rl_display_prompt == rl_prompt)
+ nleft = _rl_last_c_pos - screenwidth - rl_visible_prompt_length;
+ else
+ nleft = _rl_last_c_pos - screenwidth;
+
+ if (nleft > 0)
+ ret = 1 + nleft / screenwidth;
+ else
+ ret = 0;
+
+ return ret;
+}
diff --git a/readline/doc/ChangeLog b/readline/doc/ChangeLog
index 3c26ae543f..995c43a18e 100644
--- a/readline/doc/ChangeLog
+++ b/readline/doc/ChangeLog
@@ -1,3 +1,12 @@
+2000-07-09 Elena Zannoni
+
+ * Import of readline 4.1.
+
+ Regenerated inc-hist.texinfo as copy of hsuser.texinfo, for
+ inclusion in the gdb manual.
+
+ New file: rluserman.texinfo
+
Tue Apr 18 15:43:52 2000 Andrew Cagney
* readline.0: Delete. Generated by Makefile, deleted by distclean
diff --git a/readline/doc/Makefile.in b/readline/doc/Makefile.in
index 103147292d..4a38563e46 100644
--- a/readline/doc/Makefile.in
+++ b/readline/doc/Makefile.in
@@ -1,6 +1,23 @@
# This makefile for Readline library documentation is in -*- text -*- mode.
# Emacs likes it that way.
-top_srcdir = @top_srcdir@
+
+# Copyright (C) 1996 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 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+topdir = @top_srcdir@
srcdir = @srcdir@
VPATH = .:@srcdir@
@@ -8,25 +25,33 @@ prefix = @prefix@
infodir = @infodir@
mandir = @mandir@
-man3dir = $(mandir)/man3
+manpfx = man
+
+man1ext = 1
+man1dir = $(mandir)/$(manpfx)$(man1ext)
+man3ext = 3
+man3dir = $(mandir)/$(manpfx)$(man3ext)
SHELL = @MAKE_SHELL@
RM = rm -f
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+BUILD_DIR = @BUILD_DIR@
TEXINPUTDIR = $(srcdir)
-MAKEINFO = makeinfo
+MAKEINFO = LANGUAGE= makeinfo
TEXI2DVI = $(srcdir)/texi2dvi
TEXI2HTML = $(srcdir)/texi2html
QUIETPS = #set this to -q to shut up dvips
-DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
+PAPERSIZE = letter
+PSDPI = 300 # I don't have any 600-dpi printers
+DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
- $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo
+ $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \
+ $(srcdir)/rluserman.texinfo
HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \
$(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo
@@ -36,16 +61,15 @@ NROFF = groff -Tascii
# This should be a program that converts troff to postscript
GROFF = groff
-DVIOBJ = readline.dvi history.dvi
-INFOOBJ = readline.info history.info
-PSOBJ = readline.ps history.ps
-HTMLOBJ = readline.html history.html
-HTMLTOC = readline_toc.html history_toc.html
+DVIOBJ = readline.dvi history.dvi rluserman.dvi
+INFOOBJ = readline.info history.info rluserman.info
+PSOBJ = readline.ps history.ps rluserman.ps
+HTMLOBJ = readline.html history.html rluserman.html
TEXTOBJ = readline.0
-INTERMEDIATE_OBJ = rlman.dvi hist.dvi
+INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi
-CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(HTMLTOC) $(TEXTOBJ)
+CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(TEXTOBJ)
.SUFFIXES: .0 .3 .ps .txt .dvi
@@ -63,6 +87,12 @@ readline.dvi: $(RLSRC)
readline.info: $(RLSRC)
$(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo
+rluserman.dvi: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo
+
+rluserman.info: $(RLSRC)
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo
+
history.dvi: ${HISTSRC}
TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo
mv hist.dvi history.dvi
@@ -74,18 +104,25 @@ readline.ps: readline.dvi
$(RM) $@
$(DVIPS) readline.dvi
+rluserman.ps: rluserman.dvi
+ $(RM) $@
+ $(DVIPS) rluserman.dvi
+
history.ps: history.dvi
$(RM) $@
$(DVIPS) history.dvi
readline.html: ${RLSRC}
$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
- sed -e 's:rlman.html:readline.html:' rlman.html > readline.html
+ sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html
$(RM) rlman.html
+rluserman.html: ${RLSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo
+
history.html: ${HISTSRC}
$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
- sed -e 's:hist.html:history.html:' hist.html > history.html
+ sed -e 's:hist.html:history.html:g' hist.html > history.html
$(RM) hist.html
info: $(INFOOBJ)
@@ -98,7 +135,7 @@ readline.0: readline.3
clean:
$(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
- *.fns *.kys *.tps *.vrs *.o core
+ *.fns *.kys *.tps *.vrs *.bt *.bts *.o core
distclean: clean
$(RM) $(CREATED_DOCS)
@@ -112,8 +149,8 @@ maintainer-clean: clean
$(RM) $(INTERMEDIATE_OBJ)
$(RM) Makefile
-installdirs: $(top_srcdir)/support/mkdirs
- -$(SHELL) $(top_srcdir)/support/mkdirs $(infodir) $(man3dir)
+installdirs: $(topdir)/support/mkdirs
+ -$(SHELL) $(topdir)/support/mkdirs $(infodir) $(man3dir)
install: installdirs
if test -f readline.info; then \
@@ -121,12 +158,17 @@ install: installdirs
else \
${INSTALL_DATA} $(srcdir)/readline.info $(infodir)/readline.info; \
fi
+ if test -f rluserman.info; then \
+ ${INSTALL_DATA} rluserman.info $(infodir)/rluserman.info; \
+ else \
+ ${INSTALL_DATA} $(srcdir)/rluserman.info $(infodir)/rluserman.info; \
+ fi
if test -f history.info; then \
${INSTALL_DATA} history.info $(infodir)/history.info; \
else \
${INSTALL_DATA} $(srcdir)/history.info $(infodir)/history.info; \
fi
- if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+ -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --dir-file=$(infodir)/dir $(infodir)/readline.info ; \
install-info --dir-file=$(infodir)/dir $(infodir)/history.info ; \
else true; fi
@@ -134,5 +176,6 @@ install: installdirs
uninstall:
$(RM) $(infodir)/readline.info
+ $(RM) $(infodir)/rluserman.info
$(RM) $(infodir)/history.info
$(RM) $(man3dir)/readline.3
diff --git a/readline/doc/hist.texinfo b/readline/doc/hist.texinfo
index 31a0ba0ae7..8a9c9413bc 100644
--- a/readline/doc/hist.texinfo
+++ b/readline/doc/hist.texinfo
@@ -55,8 +55,8 @@ provides a consistent user interface for recalling lines of previously
typed input.
Published by the Free Software Foundation @*
-675 Massachusetts Avenue, @*
-Cambridge, MA 02139 USA
+59 Temple Place, Suite 330, @*
+Boston, MA 02111 USA
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
diff --git a/readline/doc/history.dvi b/readline/doc/history.dvi
deleted file mode 100644
index a8b30bf92be890744a7d2156dc520c2b65b13bce..0000000000000000000000000000000000000000
GI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z#TIaM^{rWdlXeXQx>8yf#=^O{ek8vIj0eIvR}Y
z^!5FwASzq@F%tRw#)ccV-T&$(+$j23d=OWW0uNb}TfghZIXXF+4y&-~%
zd1M-EnH`;@7s;mw9rMGQPsgcyj&{q_tcM2II88o1gm}R2R{WA?W0R(&2GIdSd+8|@##s~V?MXK=2IJ=F6{qs`#CkAX7Fj
-
-
-
-GNU History Library
-
-
-GNU History Library
-Edition 4.1, for History Library
Version 4.1.
-January 2000
-Brian Fox, Free Software Foundation
-Chet Ramey, Case Western Reserve University
-
-
-
Table of Contents
-
-
-
-
-This document describes the GNU History library, a programming tool that
-provides a consistent user interface for recalling lines of previously
-typed input.
-
-
-
-Published by the Free Software Foundation
-59 Temple Place, Suite 330,
-Boston, MA 02111 USA
-
-
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-
-
-
-Copyright (C) 1988-1999 Free Software Foundation, Inc.
-
-
-
-
-
-
-
-
-This chapter describes how to use the GNU History Library interactively,
-from a user's standpoint. It should be considered a user's guide. For
-information on using the GNU History Library in your own programs,
-see section Programming with GNU History.
-
-
-
-
-
-
-
-
-
-
-
-
-
-The History library provides a history expansion feature that is similar
-to the history expansion provided by csh
. This section
-describes the syntax used to manipulate the history information.
-
-
-
-History expansions introduce words from the history list into
-the input stream, making it easy to repeat commands, insert the
-arguments to a previous command into the current input line, or
-fix errors in previous commands quickly.
-
-
-
-History expansion takes place in two parts. The first is to determine
-which line from the history list should be used during substitution.
-The second is to select portions of that line for inclusion into the
-current one. The line selected from the history is called the
-event, and the portions of that line that are acted upon are
-called words. Various modifiers are available to manipulate
-the selected words. The line is broken into words in the same fashion
-that Bash does, so that several words
-surrounded by quotes are considered one word.
-History expansions are introduced by the appearance of the
-history expansion character, which is `!' by default.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-An event designator is a reference to a command line entry in the
-history list.
-
-
-
-
-
-!
--
-Start a history substitution, except when followed by a space, tab,
-the end of the line, `=' or `('.
-
-
!n
--
-Refer to command line n.
-
-
!-n
--
-Refer to the command n lines back.
-
-
!!
--
-Refer to the previous command. This is a synonym for `!-1'.
-
-
!string
--
-Refer to the most recent command starting with string.
-
-
!?string[?]
--
-Refer to the most recent command containing string. The trailing
-`?' may be omitted if the string is followed immediately by
-a newline.
-
-
^string1^string2^
--
-Quick Substitution. Repeat the last command, replacing string1
-with string2. Equivalent to
-
!!:s/string1/string2/
.
-
- !#
--
-The entire command line typed so far.
-
-
-
-
-
-
-
-
-Word designators are used to select desired words from the event.
-A `:' separates the event specification from the word designator. It
-may be omitted if the word designator begins with a `^', `$',
-`*', `-', or `%'. Words are numbered from the beginning
-of the line, with the first word being denoted by 0 (zero). Words are
-inserted into the current line separated by single spaces.
-
-
-
-For example,
-
-
-
-
-!!
--
-designates the preceding command. When you type this, the preceding
-command is repeated in toto.
-
-
!!:$
--
-designates the last argument of the preceding command. This may be
-shortened to
!$
.
-
- !fi:2
--
-designates the second argument of the most recent command starting with
-the letters
fi
.
-
-
-
-Here are the word designators:
-
-
-
-0 (zero)
--
-The
0
th word. For many applications, this is the command word.
-
- n
--
-The nth word.
-
-
^
--
-The first argument; that is, word 1.
-
-
$
--
-The last argument.
-
-
%
--
-The word matched by the most recent `?string?' search.
-
-
x-y
--
-A range of words; `-y' abbreviates `0-y'.
-
-
*
--
-All of the words, except the
0
th. This is a synonym for `1-$'.
-It is not an error to use `*' if there is just one word in the event;
-the empty string is returned in that case.
-
- x*
--
-Abbreviates `x-$'
-
-
x-
--
-Abbreviates `x-$' like `x*', but omits the last word.
-
-
-
-
-If a word designator is supplied without an event specification, the
-previous command is used as the event.
-
-
-
-
-
-
-
-After the optional word designator, you can add a sequence of one or more
-of the following modifiers, each preceded by a `:'.
-
-
-
-
-h
--
-Remove a trailing pathname component, leaving only the head.
-
-
t
--
-Remove all leading pathname components, leaving the tail.
-
-
r
--
-Remove a trailing suffix of the form `.suffix', leaving
-the basename.
-
-
e
--
-Remove all but the trailing suffix.
-
-
p
--
-Print the new command but do not execute it.
-
-
s/old/new/
--
-Substitute new for the first occurrence of old in the
-event line. Any delimiter may be used in place of `/'.
-The delimiter may be quoted in old and new
-with a single backslash. If `&' appears in new,
-it is replaced by old. A single backslash will quote
-the `&'. The final delimiter is optional if it is the last
-character on the input line.
-
-
&
--
-Repeat the previous substitution.
-
-
g
--
-Cause changes to be applied over the entire event line. Used in
-conjunction with `s', as in
gs/old/new/
,
-or with `&'.
-
-
-
-
-
-
-
-
-This chapter describes how to interface programs that you write
-with the GNU History Library.
-It should be considered a technical guide.
-For information on the interactive use of GNU History, see section Using History Interactively.
-
-
-
-
-
-
-
-
-
-
-Many programs read input from the user a line at a time. The GNU History
-library is able to keep track of those lines, associate arbitrary data with
-each line, and utilize information from previous lines in composing new
-ones.
-
-
-
-The programmer using the History library has available functions
-for remembering lines on a history list, associating arbitrary data
-with a line, removing lines from the list, searching through the list
-for a line containing an arbitrary text string, and referencing any line
-in the list directly. In addition, a history expansion function
-is available which provides for a consistent user interface across
-different programs.
-
-
-
-The user using programs written with the History library has the
-benefit of a consistent user interface with a set of well-known
-commands for manipulating the text of previous lines and using that text
-in new commands. The basic history manipulation commands are similar to
-the history substitution provided by csh
.
-
-
-
-If the programmer desires, he can use the Readline library, which
-includes some history manipulation by default, and has the added
-advantage of command line editing.
-
-
-
-Before declaring any functions using any functionality the History
-library provides in other code, an application writer should include
-the file <readline/history.h>
in any file that uses the
-History library's features. It supplies extern declarations for all
-of the library's public functions and variables, and declares all of
-the public data structures.
-
-
-
-
-
-
-
-The history list is an array of history entries. A history entry is
-declared as follows:
-
-
-
-
-typedef struct _hist_entry {
- char *line;
- char *data;
-} HIST_ENTRY;
-
-
-
-The history list itself might therefore be declared as
-
-
-
-
-HIST_ENTRY **the_history_list;
-
-
-
-The state of the History library is encapsulated into a single structure:
-
-
-
-
-/* A structure used to pass the current state of the history stuff around. */
-typedef struct _hist_state {
- HIST_ENTRY **entries; /* Pointer to the entries themselves. */
- int offset; /* The location pointer within this array. */
- int length; /* Number of elements within this array. */
- int size; /* Number of slots allocated to this array. */
- int flags;
-} HISTORY_STATE;
-
-
-
-If the flags member includes HS_STIFLED
, the history has been
-stifled.
-
-
-
-
-
-
-
-This section describes the calling sequence for the various functions
-present in GNU History.
-
-
-
-
-
-
-
-
-
-
-This section describes functions used to initialize and manage
-the state of the History library when you want to use the history
-functions in your program.
-
-
-
-
-- Function: void using_history ()
-
-
-Begin a session in which the history functions might be used. This
-initializes the interactive variables.
-
-
-
-
-
-- Function: HISTORY_STATE * history_get_history_state ()
-
-
-Return a structure describing the current state of the input history.
-
-
-
-
-
-- Function: void history_set_history_state (HISTORY_STATE *state)
-
-
-Set the state of the history list according to state.
-
-
-
-
-
-
-
-
-These functions manage individual entries on the history list, or set
-parameters managing the list itself.
-
-
-
-
-- Function: void add_history (char *string)
-
-
-Place string at the end of the history list. The associated data
-field (if any) is set to
NULL
.
-
-
-
-
-
-- Function: HIST_ENTRY * remove_history (int which)
-
-
-Remove history entry at offset which from the history. The
-removed element is returned so you can free the line, data,
-and containing structure.
-
-
-
-
-
-- Function: HIST_ENTRY * replace_history_entry (int which, char *line, char *data)
-
-
-Make the history entry at offset which have line and data.
-This returns the old entry so you can dispose of the data. In the case
-of an invalid which, a
NULL
pointer is returned.
-
-
-
-
-
-- Function: void clear_history ()
-
-
-Clear the history list by deleting all the entries.
-
-
-
-
-
-- Function: void stifle_history (int max)
-
-
-Stifle the history list, remembering only the last max entries.
-
-
-
-
-
-- Function: int unstifle_history ()
-
-
-Stop stifling the history. This returns the previous amount the
-history was stifled. The value is positive if the history was
-stifled, negative if it wasn't.
-
-
-
-
-
-- Function: int history_is_stifled ()
-
-
-Returns non-zero if the history is stifled, zero if it is not.
-
-
-
-
-
-
-
-
-These functions return information about the entire history list or
-individual list entries.
-
-
-
-
-- Function: HIST_ENTRY ** history_list ()
-
-
-Return a
NULL
terminated array of HIST_ENTRY
which is the
-current input history. Element 0 of this list is the beginning of time.
-If there is no history, return NULL
.
-
-
-
-
-
-- Function: int where_history ()
-
-
-Returns the offset of the current history element.
-
-
-
-
-
-- Function: HIST_ENTRY * current_history ()
-
-
-Return the history entry at the current position, as determined by
-
where_history ()
. If there is no entry there, return a NULL
-pointer.
-
-
-
-
-
-- Function: HIST_ENTRY * history_get (int offset)
-
-
-Return the history entry at position offset, starting from
-
history_base
. If there is no entry there, or if offset
-is greater than the history length, return a NULL
pointer.
-
-
-
-
-
-- Function: int history_total_bytes ()
-
-
-Return the number of bytes that the primary history entries are using.
-This function returns the sum of the lengths of all the lines in the
-history.
-
-
-
-
-
-
-
-
-These functions allow the current index into the history list to be
-set or changed.
-
-
-
-
-- Function: int history_set_pos (int pos)
-
-
-Set the position in the history list to pos, an absolute index
-into the list.
-
-
-
-
-
-- Function: HIST_ENTRY * previous_history ()
-
-
-Back up the current history offset to the previous history entry, and
-return a pointer to that entry. If there is no previous entry, return
-a
NULL
pointer.
-
-
-
-
-
-- Function: HIST_ENTRY * next_history ()
-
-
-Move the current history offset forward to the next history entry, and
-return the a pointer to that entry. If there is no next entry, return
-a
NULL
pointer.
-
-
-
-
-
-
-
-
-
-
-
-These functions allow searching of the history list for entries containing
-a specific string. Searching may be performed both forward and backward
-from the current history position. The search may be anchored,
-meaning that the string must match at the beginning of the history entry.
-
-
-
-
-
-- Function: int history_search (char *string, int direction)
-
-
-Search the history for string, starting at the current history
-offset. If direction < 0, then the search is through previous entries,
-else through subsequent. If string is found, then
-the current history index is set to that history entry, and the value
-returned is the offset in the line of the entry where
-string was found. Otherwise, nothing is changed, and a -1 is
-returned.
-
-
-
-
-
-- Function: int history_search_prefix (char *string, int direction)
-
-
-Search the history for string, starting at the current history
-offset. The search is anchored: matching lines must begin with
-string. If direction < 0, then the search is through previous
-entries, else through subsequent. If string is found, then the
-current history index is set to that entry, and the return value is 0.
-Otherwise, nothing is changed, and a -1 is returned.
-
-
-
-
-
-- Function: int history_search_pos (char *string, int direction, int pos)
-
-
-Search for string in the history list, starting at pos, an
-absolute index into the list. If direction is negative, the search
-proceeds backward from pos, otherwise forward. Returns the absolute
-index of the history element where string was found, or -1 otherwise.
-
-
-
-
-
-
-
-
-The History library can read the history from and write it to a file.
-This section documents the functions for managing a history file.
-
-
-
-
-- Function: int read_history (char *filename)
-
-
-Add the contents of filename to the history list, a line at a
-time. If filename is
NULL
, then read from
-`~/.history'. Returns 0 if successful, or errno if not.
-
-
-
-
-
-- Function: int read_history_range (char *filename, int from, int to)
-
-
-Read a range of lines from filename, adding them to the history list.
-Start reading at line from and end at to. If
-from is zero, start at the beginning. If to is less than
-from, then read until the end of the file. If filename is
-
NULL
, then read from `~/.history'. Returns 0 if successful,
-or errno
if not.
-
-
-
-
-
-- Function: int write_history (char *filename)
-
-
-Write the current history to filename, overwriting filename
-if necessary. If filename is
-
NULL
, then write the history list to `~/.history'. Values
-returned are as in read_history ()
.
-
-
-
-
-
-- Function: int append_history (int nelements, char *filename)
-
-
-Append the last nelements of the history list to filename.
-
-
-
-
-
-- Function: int history_truncate_file (char *filename, int nlines)
-
-
-Truncate the history file filename, leaving only the last
-nlines lines.
-
-
-
-
-
-
-
-
-These functions implement csh
-like history expansion.
-
-
-
-
-- Function: int history_expand (char *string, char **output)
-
-
-Expand string, placing the result into output, a pointer
-to a string (see section History Expansion). Returns:
-
-
-0
--
-If no expansions took place (or, if the only change in
-the text was the de-slashifying of the history expansion
-character);
-
1
--
-if expansions did take place;
-
-1
--
-if there was an error in expansion;
-
2
--
-if the returned line should be displayed, but not executed,
-as with the
:p
modifier (see section Modifiers).
-
-
-
-If an error ocurred in expansion, then output contains a descriptive
-error message.
-
-
-
-
-
-- Function: char * history_arg_extract (int first, int last, char *string)
-
-
-Extract a string segment consisting of the first through last
-arguments present in string. Arguments are broken up as in Bash.
-
-
-
-
-
-- Function: char * get_history_event (char *string, int *cindex, int qchar)
-
-
-Returns the text of the history event beginning at string +
-*cindex. *cindex is modified to point to after the event
-specifier. At function entry, cindex points to the index into
-string where the history event specification begins. qchar
-is a character that is allowed to end the event specification in addition
-to the "normal" terminating characters.
-
-
-
-
-
-- Function: char ** history_tokenize (char *string)
-
-
-Return an array of tokens parsed out of string, much as the
-shell might. The tokens are split on white space and on the
-characters
()<>;&|$
, and shell quoting conventions are
-obeyed.
-
-
-
-
-
-
-
-
-This section describes the externally visible variables exported by
-the GNU History Library.
-
-
-
-
-- Variable: int history_base
-
-
-The logical offset of the first entry in the history list.
-
-
-
-
-
-- Variable: int history_length
-
-
-The number of entries currently stored in the history list.
-
-
-
-
-
-- Variable: int max_input_history
-
-
-The maximum number of history entries. This must be changed using
-
stifle_history ()
.
-
-
-
-
-
-- Variable: char history_expansion_char
-
-
-The character that starts a history event. The default is `!'.
-
-
-
-
-
-- Variable: char history_subst_char
-
-
-The character that invokes word substitution if found at the start of
-a line. The default is `^'.
-
-
-
-
-
-- Variable: char history_comment_char
-
-
-During tokenization, if this character is seen as the first character
-of a word, then it and all subsequent characters up to a newline are
-ignored, suppressing history expansion for the remainder of the line.
-This is disabled by default.
-
-
-
-
-
-- Variable: char * history_no_expand_chars
-
-
-The list of characters which inhibit history expansion if found immediately
-following history_expansion_char. The default is whitespace and
-`='.
-
-
-
-
-
-- Variable: char * history_search_delimiter_chars
-
-
-The list of additional characters which can delimit a history search
-string, in addition to whitespace, `:' and `?' in the case of
-a substring search. The default is empty.
-
-
-
-
-
-- Variable: int history_quotes_inhibit_expansion
-
-
-If non-zero, single-quoted words are not scanned for the history expansion
-character. The default value is 0.
-
-
-
-
-
-- Variable: Function * history_inhibit_expansion_function
-
-
-This should be set to the address of a function that takes two arguments:
-a
char *
(string) and an integer index into that string (i).
-It should return a non-zero value if the history expansion starting at
-string[i] should not be performed; zero if the expansion should
-be done.
-It is intended for use by applications like Bash that use the history
-expansion character for additional purposes.
-By default, this variable is set to NULL.
-
-
-
-
-
-
-
-
-The following program demonstrates simple use of the GNU History Library.
-
-
-
-
-main ()
-{
- char line[1024], *t;
- int len, done = 0;
-
- line[0] = 0;
-
- using_history ();
- while (!done)
- {
- printf ("history$ ");
- fflush (stdout);
- t = fgets (line, sizeof (line) - 1, stdin);
- if (t && *t)
- {
- len = strlen (t);
- if (t[len - 1] == '\n')
- t[len - 1] = '\0';
- }
-
- if (!t)
- strcpy (line, "quit");
-
- if (line[0])
- {
- char *expansion;
- int result;
-
- result = history_expand (line, &expansion);
- if (result)
- fprintf (stderr, "%s\n", expansion);
-
- if (result < 0 || result == 2)
- {
- free (expansion);
- continue;
- }
-
- add_history (expansion);
- strncpy (line, expansion, sizeof (line) - 1);
- free (expansion);
- }
-
- if (strcmp (line, "quit") == 0)
- done = 1;
- else if (strcmp (line, "save") == 0)
- write_history ("history_file");
- else if (strcmp (line, "read") == 0)
- read_history ("history_file");
- else if (strcmp (line, "list") == 0)
- {
- register HIST_ENTRY **the_list;
- register int i;
-
- the_list = history_list ();
- if (the_list)
- for (i = 0; the_list[i]; i++)
- printf ("%d: %s\n", i + history_base, the_list[i]->line);
- }
- else if (strncmp (line, "delete", 6) == 0)
- {
- int which;
- if ((sscanf (line + 6, "%d", &which)) == 1)
- {
- HIST_ENTRY *entry = remove_history (which);
- if (!entry)
- fprintf (stderr, "No such entry %d\n", which);
- else
- {
- free (entry->line);
- free (entry);
- }
- }
- else
- {
- fprintf (stderr, "non-numeric arg given to `delete'\n");
- }
- }
- }
-}
-
-
-
-
-
-
-Jump to:
-a
--
-e
--
-h
-
-
-
-anchored search
-
-
-
-event designators
-
-
-
-history events
-history expansion
-History Searching
-
-
-
-
-
-
-
-Jump to:
-a
--
-c
--
-g
--
-h
--
-m
--
-n
--
-p
--
-r
--
-s
--
-u
--
-w
-
-
-
-add_history
-append_history
-
-
-
-clear_history
-current_history
-
-
-
-get_history_event
-
-
-
-history_arg_extract
-history_base
-history_comment_char
-history_expand
-history_expansion_char
-history_get
-history_get_history_state
-history_inhibit_expansion_function
-history_is_stifled
-history_length
-history_list
-history_no_expand_chars
-history_quotes_inhibit_expansion
-history_search
-history_search_delimiter_chars
-history_search_pos
-history_search_prefix
-history_set_history_state
-history_set_pos
-history_subst_char
-history_tokenize
-history_total_bytes
-history_truncate_file
-
-
-
-max_input_history
-
-
-
-next_history
-
-
-
-previous_history
-
-
-
-read_history
-read_history_range
-remove_history
-replace_history_entry
-
-
-
-stifle_history
-
-
-
-unstifle_history
-using_history
-
-
-
-where_history
-write_history
-
-
-
-
-This document was generated on 19 January 2000 using the
-texi2html
-translator version 1.52.
-
-