This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Revert "Sync readline/ to version 7.0 alpha"


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5836a818eccb180d75c92ce4c861abb6fe8dec23

commit 5836a818eccb180d75c92ce4c861abb6fe8dec23
Author: Patrick Palka <patrick@parcs.ath.cx>
Date:   Sat Jul 25 15:41:05 2015 -0400

    Revert "Sync readline/ to version 7.0 alpha"
    
    This reverts commit b558ff043d41ba8d17a82f5f9ae5f9dade66160e.
    This reverts commit 4a11f2065906976675808364ddbd1c0f77eea41f.
    
    The initial import commit failed to retain local changes made to
    readline's configure.in (and the commit message erroneously stated that
    there were no local changes that needed to be reapplied).  Also the
    import caused a couple of build errors and a scattering of testsuite
    regressions throughout many arches.  It's probably better to start over
    with this import, hopefully more carefully next time.

Diff:
---
 gdb/ChangeLog                           |    5 -
 gdb/completer.c                         |    2 +-
 gdb/testsuite/ChangeLog                 |    6 -
 gdb/testsuite/gdb.gdb/selftest.exp      |   23 +-
 readline/CHANGELOG                      |  206 --
 readline/CHANGES                        |  231 --
 readline/ChangeLog.gdb                  |   11 -
 readline/INSTALL                        |    2 +-
 readline/MANIFEST                       |   11 +-
 readline/Makefile.in                    |   74 +-
 readline/NEWS                           |  291 +--
 readline/README                         |   11 +-
 readline/aclocal.m4                     |   38 +-
 readline/bind.c                         |  342 +--
 readline/callback.c                     |   70 +-
 readline/chardefs.h                     |   18 +-
 readline/colors.c                       |  279 ---
 readline/colors.h                       |  126 -
 readline/complete.c                     |  487 +---
 readline/config.h.in                    |   54 +-
 readline/configure                      |  340 +--
 readline/{configure.ac => configure.in} |   36 +-
 readline/display.c                      |  503 ++--
 readline/doc/Makefile.in                |   21 +-
 readline/doc/history.3                  |   33 +-
 readline/doc/history.texi               |   26 +-
 readline/doc/hstech.texi                |   16 +-
 readline/doc/hsuser.texi                |   40 +-
 readline/doc/readline.3                 |  166 +-
 readline/doc/rlman.texi                 |   27 +-
 readline/doc/rltech.texi                |  239 +-
 readline/doc/rluser.texi                |  317 +--
 readline/doc/rluserman.texi             |   27 +-
 readline/doc/texi2dvi                   | 2338 +++++-------------
 readline/doc/texi2html                  |    6 +-
 readline/doc/version.texi               |   12 +-
 readline/emacs_keymap.c                 |    6 +
 readline/examples/Makefile.in           |   40 +-
 readline/examples/excallback.c          |    7 +-
 readline/examples/hist_erasedups.c      |  121 -
 readline/examples/hist_purgecmd.c       |  151 --
 readline/examples/readlinebuf.h         |    6 +-
 readline/examples/rl-callbacktest.c     |   90 -
 readline/examples/rlbasic.c             |   28 -
 readline/examples/rlfe/config.h.in      |    6 +-
 readline/examples/rlfe/configure        | 3908 ++++++++++++++++++++-----------
 readline/examples/rlfe/configure.in     |    6 +-
 readline/examples/rlfe/extern.h         |    2 +-
 readline/examples/rlfe/os.h             |    8 +-
 readline/examples/rlfe/rlfe.c           |    9 +-
 readline/examples/rlptytest.c           |    6 +-
 readline/funmap.c                       |   11 +-
 readline/histexpand.c                   |   83 +-
 readline/histfile.c                     |  274 +--
 readline/history.c                      |   23 +-
 readline/history.h                      |    6 +-
 readline/input.c                        |  110 +-
 readline/isearch.c                      |  141 +-
 readline/kill.c                         |  102 +-
 readline/macro.c                        |   42 +-
 readline/mbutil.c                       |   11 +-
 readline/misc.c                         |   41 +-
 readline/nls.c                          |   35 +-
 readline/parens.c                       |   26 +-
 readline/parse-colors.c                 |  440 ----
 readline/parse-colors.h                 |   46 -
 readline/patchlevel                     |    2 +-
 readline/posixdir.h                     |   14 +-
 readline/posixjmp.h                     |   20 +-
 readline/readline.c                     |  236 +-
 readline/readline.h                     |   54 +-
 readline/readline.pc.in                 |   12 -
 readline/rlconf.h                       |   22 +-
 readline/rldefs.h                       |   10 +-
 readline/rlmbutil.h                     |   49 -
 readline/rlprivate.h                    |   61 +-
 readline/rlstdc.h                       |   12 -
 readline/rltty.c                        |   47 +-
 readline/rltypedefs.h                   |   11 +-
 readline/search.c                       |   98 +-
 readline/shell.c                        |   48 +-
 readline/shlib/Makefile.in              |   87 +-
 readline/signals.c                      |  144 +-
 readline/support/config.guess           |  587 +++--
 readline/support/config.sub             |  332 +--
 readline/support/mkdist                 |   15 +-
 readline/support/shlib-install          |    9 +-
 readline/support/shobj-conf             |   71 +-
 readline/tcap.h                         |    2 -
 readline/terminal.c                     |   64 +-
 readline/text.c                         |   77 +-
 readline/tilde.c                        |    4 -
 readline/undo.c                         |   39 +-
 readline/util.c                         |   94 +-
 readline/vi_keymap.c                    |    1 +
 readline/vi_mode.c                      |  164 +-
 readline/xfree.c                        |    7 +
 readline/xmalloc.h                      |    3 +
 98 files changed, 4534 insertions(+), 10081 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 732e026..0061bff 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,8 +1,3 @@
-2015-07-25  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* completer.c (gdb_printable_part): Sync with readline function
-	it is based off of.
-
 2015-07-24  Pedro Alves  <palves@redhat.com>
 
 	* s390-linux-nat.c (fetch_regs, store_regs, fetch_fpregs)
diff --git a/gdb/completer.c b/gdb/completer.c
index b245017..d1ebf67 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -1318,7 +1318,7 @@ gdb_printable_part (char *pathname)
     return (pathname);
 
   temp = strrchr (pathname, '/');
-#if defined (__MSDOS__) || defined (_WIN32)
+#if defined (__MSDOS__)
   if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':')
     temp = pathname + 1;
 #endif
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 128023c..1faf1ab 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -14,12 +14,6 @@
 	(GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs
 	of $GDB_PARALLEL.
 
-2015-07-25  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* gdb.gdb/selftest.exp (test_with_self): Update test to now
-	expect the GDB inferior to no longer immediately stop after
-	being resumed with "signal SIGINT".
-
 2015-07-24  Doug Evans  <dje@google.com>
 
 	* gdb.perf/README: New file.
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 706fca9..9f25a48 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -444,26 +444,9 @@ proc test_with_self { executable } {
     }
     
     set description "send SIGINT signal to child process"
-    gdb_test_multiple "signal SIGINT" "$description" {
-	-re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n.* $" {
-	    pass "$description"
-	}
-    }
-
-    set description "send ^C to child process again"
-    send_gdb "\003"
-    gdb_expect {
-	-re "Program received signal SIGINT.*$gdb_prompt $" {
-	    pass "$description"
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "$description"
-	}
-	timeout {
-	    fail "$description (timeout)"
-	}
-    }
-
+    gdb_test "signal SIGINT" \
+	"Continuing with signal SIGINT.*" \
+	"$description"
     
     # get a stack trace
     #
diff --git a/readline/CHANGELOG b/readline/CHANGELOG
index 9d03dca..5513f12 100644
--- a/readline/CHANGELOG
+++ b/readline/CHANGELOG
@@ -1093,209 +1093,3 @@ xfree.c
 				   -----
 {examples,shlib}/Makefile.in
 	- Cygwin-based changes from Eric Blake <eblake@redhat.com>
-
-				 3/26/2011
-				 ---------
-Makefile.in
-	- don't ignore failures when building, installing, or cleaning in
-	  the shlib subdirectory.  Sample patch from Mike Frysinger
-	  <vapier@gentoo.org>
-
-shlib/Makefile.in
-	- split the install and uninstall targets into install-supported and
-	  install-unsupported targets that depend on the value of
-	  SHLIB_STATUS
-
-				    4/2
-				    ---
-{,shlib}/Makefile.in
-	- add dependency for callback.o/callback.so on xmalloc.h.  From
-	  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-{,doc,examples,shlib}/Makefile.in
-	- fix typo: htm target should be html.  From Jan Kratochvil
-	  <jan.kratochvil@redhat.com>
-	- remove `.' from VPATH.  From Jan Kratochvil
-	   <jan.kratochvil@redhat.com>
-
-examples/rlfe/configure.in
-	- quote AC_PROGRAM_SOURCE.  From Jan Kratochvil
-	   <jan.kratochvil@redhat.com>
-
-				   5/17
-				   ----
-config.h.in
-	- WCWIDTH_BROKEN: new define, picked up from bash, defined on systems
-	  where wcwidth returns 1 for Unicode combining characters
-
-				   11/28
-				   -----
-support/shlib-install
-	- make sure solaris2 systems make the installed shared library
-	  executable.  ldd warns about it otherwise.  Bug and fix from
-	  Tim Mooney <tim.mooney@ndsu.edu>
-
-examples/hist_erasedups.c
-	- new example program, shows how to erase duplicates from the history
-	  list
-
-examples/hist_purgecmd.c
-	- new example program, shows how to remove all entries matching a
-	  string or pattern from the history list
-
-				 1/12/2012
-				 ---------
-colors.[ch],parse-colors.[ch]}
-	- new files, part of color infrastructure support
-
-Makefile.in,shlib/Makefile.in
-	- arrange to have colors.o and parse-colors.o added to library
-	  (static and shared versions)
-
-{configure,config.h}.in
-	- check for stdbool.h, define HAVE_STDBOOL_H if found
-
-rldefs.h
-	- COLOR_SUPPORT: if defined, compile in colors.c and parse-colors.c
-	  for color support
-
-				   1/18
-				   ----
-
-{configure,config.h}.in
-        - new check: check for AUDIT_USER_TTY defined in <linux/audit.h>,
-          define HAVE_DECL_AUDIT_USER_TTY if both are found
-
-				    8/7
-				    ---
-configure.in
-	- AC_CANONICAL_BUILD: call to set the build_xxx variables
-	- use $build_os instead of $host_os to decide when DJGPP should run
-	  `pwd.exe' to figure out the build directory.  Report and fix from
-	  Yao Qi <yao@codesourcery.com>
-
-				   8/29
-				   ----
-configure.ac
-	- new name for configure.in
-
-MANIFEST,Makefile.in
-	- configure.in -> configure.ac
-
-				 1/5/2013
-				 --------
-configure.ac
-	- move version number up to 6.3
-
-				   1/31
-				   ----
-configure.ac
-	- use AC_CHECK_TOOL instead of AC_CHECK_PROG to check for ar, since it
-	  will find $host-prefixed versions of utilities.  Report and fix from
-	  Mike Frysinger <vapier@gentoo.org>
-
-				    3/4
-				    ---
-Makefile.in
-        - PACKAGE_TARNAME, docdir: new variables substituted by autoconf
-        - OTHER_DOCS,OTHER_INSTALLED_DOCS: new variables with auxiliary
-	  documentation files to be installed into $(docdir)
-        - install: add new rule to install $(OTHER_DOCS)
-        - uninstall: add new rule to uninstall $(docdir)/$(OTHER_INSTALLED_DOCS)
-
-				   4/29
-				   ----
-Makefile.in
-	- installdirs: make sure to create $(DESTDIR)$(docdir).  Report from
-	  <hiroo.hayashi@computer.org>
-
-				 1/27/2014
-				 ---------
-Makefile.in
-	- install-examples: should not depend on `shared', since the examples
-	  themselves are not built using shared libraries.  Report from
-	  <hiroo.hayashi@computer.org>
-
-support/shobj-conf
-	- [from bash] darwin: changed the install_name embedded into the
-	  shared library to contain only the major version number, not the
-	  minor one. The idea is that the minor versions should all be API/ABI
-	  compatible, and it is better to link automatically with the latest
-	  one.  Idea from Max Horn <max@quendi.de>
-
-				 2/26/2014
-				 ---------
-[readline-6.3 released]
-
-				   3/14
-				   ----
-shlib/Makefile.in
-	- fix typo in dependency list for vi_mode.so: it should not depend on
-	  just $(topdir). Report and fix from Natanael Copa
-	  <ncopa@alpinelinux.org>
-
-				   4/15
-				   ----
-{.,shlib,examples}/Makefile.in
-	- make sure $(INCLUDES) appears before $(CPPFLAGS) in the various
-	  CFLAGS assignments so readline looks in its own source and build
-	  directories (INCLUDES) before some directories specified by the
-	  user or builder (CPPFLAGS).  Report and fix from Max Horn
-	  <max@quendi.de>
-
-				    6/2
-				    ---
-config.h.in
-	- use correct symbols: HAVE_STRUCT_DIRENT_D_INO, HAVE_STRUCT_DIRENT_D_FILENO
-	  HAVE_STRUCT_DIRENT_D_NAMLEN.  They don't really matter, but they are
-	  what posixdir.h looks for.  Report from Ross Burton <ross.burton@intel.com>
-
-				   6/11
-				   ----
-readline.pc.in
-	- new file, config file for pkgconfig. Patch to add from Jirka Klimes
-	  <jklimes@redhat.com>
-
-{MANIFEST,configure.ac,Makefile.in}
-	- readline.pc: changes to create file for pkgconfig
-
-				   10/13
-				   -----
-doc/Makefile.in
-	- readline.pdf, history.pdf, rluserman.pdf: use texi2dvi --pdf to generate
-	  these.  Suggestion from Siep Kroonenberg <siepo@cybercomm.nl>
-
-				   11/29
-				   -----
-config.h.in
-        - HAVE_PSELECT: define if pselect(2) available
-
-configure.ac
-        - check for pselect(2), define HAVE_PSELECT if found
-
-				   12/29
-				   -----
-configure.ac
-	- bump version number up to 6.4
-
-				 1/6/2015
-				 --------
-configure.ac,config.h.in
-	- look for ncurses/termcap.h, define HAVE_NCURSES_TERMCAP_H
-
-				   4/20
-				   ----
-configure.ac
-	- add template definitions set by AC_USE_SYSTEM_EXTENSIONS from a report
-	  from Andreas Schwab <schwab@linux-m68k.org>
-
-				   4/24
-				   ----
-configure.ac,config.h.in
-	- add check for sys/ioctl.h to AC_CHECK_HEADERS, define HAVE_SYS_IOCTL_H
-	  if found
-
-				   5/29
-				   ----
-configure.ac
-	- bump library version to 7.0 because of addition of rl_callback_sigcleanup
diff --git a/readline/CHANGES b/readline/CHANGES
index 8436701..9d58988 100644
--- a/readline/CHANGES
+++ b/readline/CHANGES
@@ -1,234 +1,3 @@
-This document details the changes between this version, readline-7.0, and the
-previous version, readline-6.3.
-
-1.  Changes to Readline
-
-a.  A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
-    commands with modifiers was fixed.
-
-b.  Fixed a bug that caused callback mode to dump core when reading a
-    multiple-key sequence (e.g., arrow keys).
-
-c.  Fixed a bug that caused the redisplay code to erase some of the line when
-    using horizontal scrolling with incremental search.
-
-d.  Readline's input handler now performs signal processing if read(2) is
-    interrupted by SIGALRM or SIGVTALRM.
-
-e.  Fixed a problem with revert-all-at-newline freeing freed memory.
-
-f.  Clarified the documentation for the history_quotes_inhibit_expansion
-    variable to note that it inhibits scanning for the history comment
-    character and that it only affects double-quoted strings.
-
-g.  Fixed an off-by-one error in the prompt printed when performing searches.
-
-h.  Use pselect(2), if available, to wait for input before calling read(2), so
-    a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
-
-i.  Some memory leaks caused by signals interrupting filename completion have
-    been fixed.
-
-j.  Reading EOF twice on a non-empty line causes EOF to be returned, rather
-    than the partial line.  This can cause partial lines to be executed on
-    SIGHUP, for example.
-
-k.  Fixed a bug concerning deleting multibyte characters from the search
-    string while performing an incremental search.
-
-l.  Fixed a bug with tilde expanding directory names in filename completion.
-
-m.  Fixed a bug that did not allow binding sequences beginning with a `\'.
-
-n.  Fixed a redisplay bug involving incorrect line wrapping when the prompt
-    contains a multibyte character in the last screen column.
-
-o.  Fixed a bug that caused history expansion to disregard characters that are
-    documented to delimit a history event specifier without requiring `:'.
-
-p.  Fixed a bug that could cause reading past the end of a string when reading
-    the value when binding the set of isearch terminators.
-
-q.  Fixed a bug that caused readline commands that depend on knowing which  
-    key invoked them to misbehave when dispatching key sequences that are
-    prefixes of other key bindings. 
-
-r.  Paren matching now works in vi insert mode.
-
-2.  New Features in Readline
-
-a.  The history truncation code now uses the same error recovery mechansim as
-    the history writing code, and restores the old version of the history file
-    on error.  The error recovery mechanism handles symlinked history files.
-
-b.  There is a new bindable variable, `enable-bracketed-paste', which enables
-    support for a terminal's bracketed paste mode.
-
-c.  The editing mode indicators can now be strings and are user-settable
-    (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
-    variables).  Mode strings can contain invisible character sequences.
-    Setting mode strings to null strings restores the defaults.
-
-d.  Prompt expansion adds the mode string to the last line of a multi-line
-    prompt (one with embedded newlines).
-
-e.  There is a new bindable variable, `colored-completion-prefix', which, if
-    set, causes the common prefix of a set of possible completions to be
-    displayed in color.
-
-f.  There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
-    mode yank-pop.
-
-g.  The redisplay code underwent several efficiency improvements for multibyte
-    locales.
-
-h.  The insert-char function attempts to batch-insert all pending typeahead
-    that maps to self-insert, as long as it is coming from the terminal.
-
-i.  rl_callback_sigcleanup: a new application function that can clean up and
-    unset any state set by readline's callback mode.  Intended to be used
-    after a signal.
-
--------------------------------------------------------------------------------
-This document details the changes between this version, readline-6.3, and the
-previous version, readline-6.2.
-
-1.  Changes to Readline
-
-a.  Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
-    commands to work on the entire line.
-
-b.  Fixed a bug that caused redisplay problems with prompts longer than 128
-    characters and history searches.
-
-c.  Fixed a bug that caused readline to try and run code to modify its idea
-    of the screen size in a signal handler context upon receiving a SIGWINCH.
-
-d.  Fixed a bug that caused the `meta' key to be enabled beyond the duration
-    of an individual call top readline().
-    
-e.  Added a workaround for a wcwidth bug in Mac OS X that caused readline's
-    redisplay to mishandle zero-width combining characters.
-
-f.  Fixed a bug that caused readline to `forget' part of a key sequence when
-    a multiple-key sequence caused it to break out of an incremental search.
-
-g.  Fixed bugs that caused readline to execute code in a signal handler
-    context if interrupted while reading from the file system during completion.
-
-h.  Fixed a bug that caused readline to `forget' part of a key sequence when
-    reading an unbound multi-character key sequence.
-
-i.  Fixed a bug that caused Readline's signal handlers to be installed beyond
-    the bounds of a single call to readline().
-
-j.  Fixed a bug that caused the `.' command to not redo the most recent `R'
-    command in vi mode.
-
-k.  Fixed a bug that caused ignoring case in completion matches to result in
-    readline using the wrong match.
-
-l.  Paren matching now works in vi insert mode.
-
-m.  Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
-    work together.
-
-n.  Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
-    in vi editing mode.
-
-o.  Fixed a bug that caused the filename comparison code to not compare
-    multibyte characters correctly when using case-sensitive or case-mapping
-    comparisons.
-
-p.  Fixed the input reading loop to call the input hook function only when there
-    is no terminal input available.
-
-q.  Fixed a bug that caused binding a macro to a multi-character key sequence
-    where the sequence and macro value share a common prefix to not perform
-    the macro replacement.
-
-r.  Fixed several redisplay errors with multibyte characters and prompts
-    containing invisible characters when using horizontal scrolling.
-
-s.  Fixed a bug that caused redisplay errors when trying to overwrite
-    existing characters using multibyte characters.
-
-t.  Fixed a bug in vi mode that caused the arrow keys to set the saved last
-    vi-mode command to the wrong value.
-
-u.  Fixed a bug that caused double-quoted strings to be scanned incorrectly
-    when being used as the value of a readline variable assignment.
-
-v.  Fixed a bug with vi mode that prevented `.' from repeating a command
-    entered on a previous line (command).
-
-w.  Fixed a bug that could cause completion to core dump if it was interrupted
-    by a signal.
-
-x. Fixed a bug that could cause readline to crash and seg fault attempting to
-   expand an empty history entry.
-
-y. Fixed a bug that caused display problems with multi-line prompts containing
-   invisible characters on multiple lines.
-   
-z. Fixed a bug that caused effects made by undoing changes to a history line to
-   be discarded.
-
-2.  New Features in Readline
-
-a.  Readline is now more responsive to SIGHUP and other fatal signals when
-    reading input from the terminal or performing word completion but no
-    longer attempts to run any not-allowable functions from a signal handler
-    context.
-
-b.  There are new bindable commands to search the history for the string of
-    characters between the beginning of the line and the point
-    (history-substring-search-forward, history-substring-search-backward)
-
-c.  Readline allows quoted strings as the values of variables when setting
-    them with `set'.  As a side effect, trailing spaces and tabs are ignored
-    when setting a string variable's value.
-
-d.  The history library creates a backup of the history file when writing it
-    and restores the backup on a write error.
-
-e.  New application-settable variable: rl_filename_stat_hook: a function called
-    with a filename before using it in a call to stat(2).  Bash uses it to
-    expand shell variables so things like $HOME/Downloads have a slash
-    appended.
-
-f.  New bindable function `print-last-kbd-macro', prints the most-recently-
-    defined keyboard macro in a reusable format.
-
-g.  New user-settable variable `colored-stats', enables use of colored text
-    to denote file types when displaying possible completions (colored analog
-    of visible-stats).
-
-h.  New user-settable variable `keyseq-timout', acts as an inter-character
-    timeout when reading input or incremental search strings.
-
-i.  New application-callable function: rl_clear_history. Clears the history list
-    and frees all readline-associated private data.
-
-j.  New user-settable variable, show-mode-in-prompt, adds a characters to the
-    beginning of the prompt indicating the current editing mode.
-
-k.  New application-settable variable: rl_input_available_hook; function to be
-    called when readline needs to check whether there is data available on its
-    input source.  The default hook checks rl_instream.
-
-l.  Readline calls an application-set event hook (rl_signal_event_hook) after
-    it gets a signal while reading input (read returns -1/EINTR but readline    
-    does not handle the signal immediately) to allow the application to handle
-    or otherwise note it.  Not currently called for SIGHUP or SIGTERM.
-    
-m.  If the user-settable variable `history-size' is set to a value less than
-    0, the history list size is unlimited.
-
-n.  When creating shared libraries on Mac OS X, the pathname written into the
-    library (install_name) no longer includes the minor version number.
-
--------------------------------------------------------------------------------
 This document details the changes between this version, readline-6.2,
 and the previous version, readline-6.1.
 
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 013727d..43abd19 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,14 +1,3 @@
-2015-07-25  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* configure.ac: Default opt_shared_libs to no.
-	* configure: Regenerate.
-
-2015-07-25  Patrick Palka  <patrick@parcs.ath.cx>
-
-	Import readline 7.0 alpha
-	* configure: Regenerate.
-	* examples/rlfe/configure: Regenerate.
-
 2014-12-30  Eli Zaretskii  <eliz@gnu.org>
 
 	* complete.c (stat_char) [_WIN32]: Don't use 'access' and X_OK on
diff --git a/readline/INSTALL b/readline/INSTALL
index e1a92d3..a0b0976 100644
--- a/readline/INSTALL
+++ b/readline/INSTALL
@@ -1,7 +1,7 @@
 Basic Installation
 ==================
 
-These are installation instructions for Readline-7.0.
+These are installation instructions for Readline-6.2.
 
 The simplest way to compile readline is:
 
diff --git a/readline/MANIFEST b/readline/MANIFEST
index bfd0547..8972bdd 100644
--- a/readline/MANIFEST
+++ b/readline/MANIFEST
@@ -18,16 +18,13 @@ USAGE		f
 aclocal.m4	f
 config.h.in	f
 configure	f
-configure.ac	f
+configure.in	f
 Makefile.in	f
-readline.pc.in	f
 ansi_stdlib.h	f
 chardefs.h	f
-colors.h	f
 history.h	f
 histlib.h	f
 keymaps.h	f
-parse-colors.h	f
 posixdir.h	f
 posixjmp.h	f
 posixselect.h	f
@@ -47,7 +44,6 @@ tilde.h		f
 xmalloc.h	f
 bind.c		f
 callback.c	f
-colors.c	f
 compat.c	f
 complete.c	f
 display.c	f
@@ -62,7 +58,6 @@ mbutil.c	f
 misc.c		f
 nls.c		f
 parens.c	f
-parse-colors.c	f
 readline.c	f
 rltty.c		f
 savestring.c	f
@@ -115,17 +110,13 @@ examples/fileman.c	f
 examples/manexamp.c	f
 examples/readlinebuf.h	f
 examples/rl-fgets.c	f
-examples/rlbasic.c	f
 examples/rlcat.c	f
 examples/rlevent.c	f
 examples/rltest.c	f
-examples/rl-callbacktest.c	f
 examples/rl.c		f
 examples/rlptytest.c	f
 examples/rlversion.c	f
 examples/histexamp.c	f
-examples/hist_erasedups.c	f
-examples/hist_purgecmd.c	f
 examples/Inputrc	f
 examples/autoconf/BASH_CHECK_LIB_TERMCAP	f
 examples/autoconf/RL_LIB_READLINE_VERSION	f
diff --git a/readline/Makefile.in b/readline/Makefile.in
index ecaf06d..f4ed811 100644
--- a/readline/Makefile.in
+++ b/readline/Makefile.in
@@ -26,8 +26,6 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-
 srcdir = @srcdir@
 VPATH = @srcdir@
 top_srcdir = @top_srcdir@
@@ -64,8 +62,6 @@ localedir = @localedir@
 
 infodir = @infodir@
 
-docdir = @docdir@
-
 man3dir = $(mandir)/man3
 
 # Support an alternate destination root directory for package building
@@ -87,7 +83,7 @@ TERMCAP_LIB = @TERMCAP_LIB@
 # For libraries which include headers from other libraries.
 INCLUDES = -I. -I$(srcdir)
 
-XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
+XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES)
 CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
 
 # could add -Werror here
@@ -116,7 +112,7 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
 	   $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
 	   $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \
 	   $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
-	   $(srcdir)/mbutil.c $(srcdir)/xfree.c
+	   $(srcdir)/mbutil.c
 
 # The header files for this library.
 HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \
@@ -125,17 +121,14 @@ HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \
 	   $(srcdir)/tilde.h $(srcdir)/rlconf.h $(srcdir)/rltty.h \
 	   $(srcdir)/ansi_stdlib.h $(srcdir)/tcap.h $(srcdir)/rlstdc.h \
 	   $(srcdir)/xmalloc.h $(srcdir)/rlprivate.h $(srcdir)/rlshell.h \
-	   $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h \
-	   $(srcdir)/colors.h $(srcdir)/parse-colors.h
+	   $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h
 
 HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o
 TILDEOBJ = tilde.o
-COLORSOBJ = colors.o parse-colors.o
 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
 	  rltty.o complete.o bind.o isearch.o display.o signals.o \
 	  util.o kill.o undo.o macro.o input.o callback.o terminal.o \
-	  text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \
-	  xmalloc.o xfree.o compat.o
+	  text.o nls.o misc.o compat.o xfree.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
 
 # The texinfo files which document this library.
 DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
@@ -145,15 +138,12 @@ DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
 
 CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
 CREATED_CONFIGURE = config.status config.h config.cache config.log \
-		    stamp-config stamp-h readline.pc
+		    stamp-config stamp-h
 CREATED_TAGS = TAGS tags
 
 INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
 		    rlstdc.h rlconf.h rltypedefs.h
 
-OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README
-OTHER_INSTALLED_DOCS = CHANGES INSTALL README
-
 ##########################################################################
 TARGETS = @STATIC_TARGET@ @SHARED_TARGET@
 INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@
@@ -203,13 +193,13 @@ stamp-h: config.status $(srcdir)/config.h.in
 	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
 	echo > $@
 
-#$(srcdir)/configure: $(srcdir)/configure.ac	## 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
-	( cd shlib ; ${MAKE} ${MFLAGS} all )
+	-( cd shlib ; ${MAKE} ${MFLAGS} all )
 
 documentation: force
 	-test -d doc || mkdir doc
@@ -221,7 +211,17 @@ examples: force
 
 force:
 
-install:	$(INSTALL_TARGETS)
+## GDB LOCAL
+## Don't mess with people's installed readline's.
+## This tries to install this version of readline over whatever
+## version is already installed on the system (which could be a
+## newer version). There is no real reason for us to install
+## readline along with GDB. GDB links statically against readline,
+## so it doesn't depend on us installing it on the system.
+
+install:
+
+#install:	$(INSTALL_TARGETS)
 
 install-headers: installdirs ${INSTALLED_HEADERS}
 	for f in ${INSTALLED_HEADERS}; do \
@@ -245,7 +245,7 @@ install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-e
 installdirs: $(srcdir)/support/mkinstalldirs
 	-$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
 		$(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
-		$(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir)
+		$(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
 
 uninstall: uninstall-headers uninstall-doc uninstall-examples
 	-test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
@@ -253,26 +253,24 @@ uninstall: uninstall-headers uninstall-doc uninstall-examples
 	-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
 install-shared: installdirs install-headers shared install-doc
-	( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
+	-( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
 	
 uninstall-shared: maybe-uninstall-headers
 	-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
-install-examples: installdirs install-headers
+install-examples: installdirs install-headers shared
 	-( cd examples ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
 	
 uninstall-examples: maybe-uninstall-headers
 	-( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
 install-doc:	installdirs
-	$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
 	-( if test -d doc ; then \
 		cd doc && \
 		${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
 	  fi )
 
 uninstall-doc:
-	-( cd $(DESTDIR)$(docdir) && ${RM} ${OTHER_INSTALLED_DOCS} )
 	-( if test -d doc ; then \
 		cd doc && \
 		${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \
@@ -287,26 +285,23 @@ tags:	force
 clean:	force
 	$(RM) $(OBJECTS) $(STATIC_LIBS)
 	$(RM) readline readline.exe
-	( cd shlib && $(MAKE) $(MFLAGS) $@ )
+	-( cd shlib && $(MAKE) $(MFLAGS) $@ )
 	-( cd doc && $(MAKE) $(MFLAGS) $@ )
 	-( cd examples && $(MAKE) $(MFLAGS) $@ )
 
 mostlyclean: clean
-	( cd shlib && $(MAKE) $(MFLAGS) $@ )
+	-( cd shlib && $(MAKE) $(MFLAGS) $@ )
 	-( cd doc && $(MAKE) $(MFLAGS) $@ )
 	-( cd examples && $(MAKE) $(MFLAGS) $@ )
 
 distclean maintainer-clean: clean
-	( cd shlib && $(MAKE) $(MFLAGS) $@ )
+	-( cd shlib && $(MAKE) $(MFLAGS) $@ )
 	-( cd doc && $(MAKE) $(MFLAGS) $@ )
 	-( cd examples && $(MAKE) $(MFLAGS) $@ )
 	$(RM) Makefile
 	$(RM) $(CREATED_CONFIGURE)
 	$(RM) $(CREATED_TAGS)
 
-readline.pc:	config.status $(srcdir)/readline.pc.in
-	$(SHELL) config.status
-
 info dvi html pdf ps:
 	-( cd doc && $(MAKE) $(MFLAGS) $@ )
 
@@ -337,8 +332,7 @@ bind.o: history.h
 callback.o: rlconf.h
 callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-compat.o: ${BUILD_DIR}/config.h
-compat.o: rlstdc.h rltypedefs.h
+compat.o: rlstdc.h
 complete.o: ansi_stdlib.h posixdir.h posixstat.h
 complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
@@ -399,7 +393,6 @@ readline.o: posixstat.h ansi_stdlib.h posixjmp.h
 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 rltty.o: rltty.h
 rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-savestring.o: ${BUILD_DIR}/config.h
 search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
 search.o: ansi_stdlib.h history.h rlstdc.h
@@ -429,18 +422,10 @@ vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
 xfree.o: ${BUILD_DIR}/config.h
-xfree.o: ansi_stdlib.h
+xfree.o: ansi_stdlib.h readline.h
 xmalloc.o: ${BUILD_DIR}/config.h
 xmalloc.o: ansi_stdlib.h
 
-colors.o: ${BUILD_DIR}/config.h colors.h
-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-colors.o: rlconf.h  
-colors.o: ansi_stdlib.h posixstat.h
-parse-colors.o: ${BUILD_DIR}/config.h colors.h parse-colors.h
-parse-colors.o: rldefs.h rlconf.h
-parse-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-
 bind.o: rlshell.h
 histfile.o: rlshell.h
 nls.o: rlshell.h
@@ -470,8 +455,6 @@ text.o: rlprivate.h
 undo.o: rlprivate.h
 util.o: rlprivate.h
 vi_mode.o: rlprivate.h
-colors.o: rlprivate.h
-parse-colors.o: rlprivate.h
 
 bind.o: xmalloc.h
 callback.o: xmalloc.h
@@ -500,8 +483,6 @@ util.o: xmalloc.h
 vi_mode.o: xmalloc.h
 xfree.o: xmalloc.h
 xmalloc.o: xmalloc.h
-colors.o: xmalloc.h
-parse-colors.o: xmalloc.h
 
 complete.o: rlmbutil.h
 display.o: rlmbutil.h
@@ -545,9 +526,6 @@ vi_mode.o: $(srcdir)/vi_mode.c
 xfree.o: $(srcdir)/xfree.c
 xmalloc.o: $(srcdir)/xmalloc.c
 
-colors.o: $(srcdir)/parse-colors.c
-parse-colors.o: $(srcdir)/parse-colors.c
-
 histexpand.o: $(srcdir)/histexpand.c
 histfile.o: $(srcdir)/histfile.c
 history.o: $(srcdir)/history.c
diff --git a/readline/NEWS b/readline/NEWS
index 11ac0e3..0ec6e09 100644
--- a/readline/NEWS
+++ b/readline/NEWS
@@ -1,282 +1,19 @@
-This is a terse description of the new features added to readline-7.0 since
-the release of readline-6.3.
+This is a terse description of the new features added to readline-6.2 since
+the release of readline-6.1.
 
-New Features in Readline
+a.  The history library does not try to write the history filename in the
+    current directory if $HOME is unset.  This closes a potential security
+    problem if the application does not specify a history filename.
 
-a.  The history truncation code now uses the same error recovery mechansim as
-    the history writing code, and restores the old version of the history file
-    on error.  The error recovery mechanism handles symlinked history files.
+b.  New bindable variable `completion-display-width' to set the number of
+    columns used when displaying completions.
 
-b.  There is a new bindable variable, `enable-bracketed-paste', which enables
-    support for a terminal's bracketed paste mode.
+c.  New bindable variable `completion-case-map' to cause case-insensitive
+    completion to treat `-' and `_' as identical.
 
-c.  The editing mode indicators can now be strings and are user-settable
-    (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
-    variables).  Mode strings can contain invisible character sequences.
-    Setting mode strings to null strings restores the defaults.
+d.  There are new bindable vi-mode command names to avoid readline's case-
+    insensitive matching not allowing them to be bound separately.
 
-d.  Prompt expansion adds the mode string to the last line of a multi-line
-    prompt (one with embedded newlines).
-
-e.  There is a new bindable variable, `colored-completion-prefix', which, if
-    set, causes the common prefix of a set of possible completions to be
-    displayed in color.
-
-f.  There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
-    mode yank-pop.
-
-g.  The redisplay code underwent several efficiency improvements for multibyte
-    locales.
-
-h.  The insert-char function attempts to batch-insert all pending typeahead
-    that maps to self-insert, as long as it is coming from the terminal.
-
-i.  rl_callback_sigcleanup: a new application function that can clean up and
-    unset any state set by readline's callback mode.  Intended to be used
-    after a signal.
-
--------------------------------------------------------------------------------
-This is a terse description of the new features added to readline-6.3 since
-the release of readline-6.2.
-
-New Features in Readline
-
-a.  Readline is now more responsive to SIGHUP and other fatal signals when
-    reading input from the terminal or performing word completion but no
-    longer attempts to run any not-allowable functions from a signal handler
-    context.
-
-b.  There are new bindable commands to search the history for the string of
-    characters between the beginning of the line and the point
-    (history-substring-search-forward, history-substring-search-backward)
-
-c.  Readline allows quoted strings as the values of variables when setting
-    them with `set'.  As a side effect, trailing spaces and tabs are ignored
-    when setting a string variable's value.
-
-d.  The history library creates a backup of the history file when writing it
-    and restores the backup on a write error.
-
-e.  New application-settable variable: rl_filename_stat_hook: a function called
-    with a filename before using it in a call to stat(2).  Bash uses it to
-    expand shell variables so things like $HOME/Downloads have a slash
-    appended.
-
-f.  New bindable function `print-last-kbd-macro', prints the most-recently-
-    defined keyboard macro in a reusable format.
-
-g.  New user-settable variable `colored-stats', enables use of colored text
-    to denote file types when displaying possible completions (colored analog
-    of visible-stats).
-
-h.  New user-settable variable `keyseq-timout', acts as an inter-character
-    timeout when reading input or incremental search strings.
-
-i.  New application-callable function: rl_clear_history. Clears the history list
-    and frees all readline-associated private data.
-
-j.  New user-settable variable, show-mode-in-prompt, adds a characters to the
-    beginning of the prompt indicating the current editing mode.
-
-k.  New application-settable variable: rl_input_available_hook; function to be
-    called when readline detects there is data available on its input file
-    descriptor.
-
-l.  Readline calls an application-set event hook (rl_event_hook) after it gets
-    a signal while reading input (read returns -1/EINTR but readline does not
-    handle the signal immediately) to allow the application to handle or
-    otherwise note it.
-
-m.  If the user-settable variable `history-size' is set to a value less than
-    0, the history list size is unlimited.
-
-n.  New application-settable variable: rl_signal_event_hook; function that is
-    called when readline is reading terminal input and read(2) is interrupted
-    by a signal.  Currently not called for SIGHUP or SIGTERM.
-
--------------------------------------------------------------------------------
-This is a terse description of the new features added to readline-6.1 since
-the release of readline-6.0.
-
-New Features in Readline
-
-a.  New bindable function: menu-complete-backward.
-
-b.  In the vi insertion keymap, C-n is now bound to menu-complete by default,
-    and C-p to menu-complete-backward.
-
-c.  When in vi command mode, repeatedly hitting ESC now does nothing, even
-    when ESC introduces a bound key sequence.  This is closer to how
-    historical vi behaves.
-
-d.  New bindable function: skip-csi-sequence.  Can be used as a default to
-    consume key sequences generated by keys like Home and End without having
-    to bind all keys.
-
-e.  New application-settable function: rl_filename_rewrite_hook.  Can be used
-    to rewite or modify filenames read from the file system before they are
-    compared to the word to be completed.
-
-f.  New bindable variable: skip-completed-text, active when completing in the
-    middle of a word.  If enabled, it means that characters in the completion
-    that match characters in the remainder of the word are "skipped" rather
-    than inserted into the line.
-
-g.  The pre-readline-6.0 version of menu completion is available as
-    "old-menu-complete" for users who do not like the readline-6.0 version.
-
-h.  New bindable variable: echo-control-characters.  If enabled, and the
-    tty ECHOCTL bit is set, controls the echoing of characters corresponding
-    to keyboard-generated signals.
-
-i.  New bindable variable: enable-meta-key.  Controls whether or not readline
-    sends the smm/rmm sequences if the terminal indicates it has a meta key
-    that enables eight-bit characters.
-
--------------------------------------------------------------------------------
-This is a terse description of the new features added to readline-6.0 since
-the release of readline-5.2.
-
-New Features in Readline
-
-a.  A new variable, rl_sort_completion_matches; allows applications to inhibit
-    match list sorting (but beware: some things don't work right if
-    applications do this).
-
-b.  A new variable, rl_completion_invoking_key; allows applications to discover
-    the key that invoked rl_complete or rl_menu_complete.
-
-c.  The functions rl_block_sigint and rl_release_sigint are now public and
-    available to calling applications who want to protect critical sections
-    (like redisplay).
-
-d.  The functions rl_save_state and rl_restore_state are now public and
-    available to calling applications; documented rest of readline's state
-    flag values.
-
-e.  A new user-settable variable, `history-size', allows setting the maximum
-    number of entries in the history list.
-
-f.  There is a new implementation of menu completion, with several improvements
-    over the old; the most notable improvement is a better `completions
-    browsing' mode.
-
-g.  The menu completion code now uses the rl_menu_completion_entry_function
-    variable, allowing applications to provide their own menu completion
-    generators.
-
-h.  There is support for replacing a prefix  of a pathname with a `...' when
-    displaying possible completions.  This is controllable by setting the
-    `completion-prefix-display-length' variable.  Matches with a common prefix
-    longer than this value have the common prefix replaced with `...'.
-
-i.  There is a new `revert-all-at-newline' variable.  If enabled, readline will
-    undo all outstanding changes to all history lines when `accept-line' is
-    executed.
-
--------------------------------------------------------------------------------
-This is a terse description of the new features added to readline-5.2 since
-the release of readline-5.1.
-
-New Features in Readline
-
-a.  Calling applications can now set the keyboard timeout to 0, allowing
-    poll-like behavior.
-
-b.  The value of SYS_INPUTRC (configurable at compilation time) is now used as
-    the default last-ditch startup file.
-
-c.  The history file reading functions now allow windows-like \r\n line
-    terminators.
-
--------------------------------------------------------------------------------
-This is a terse description of the new features added to readline-5.1 since
-the release of readline-5.0.
-
-New Features in Readline
-
-a.  The key sequence sent by the keypad `delete' key is now automatically   
-    bound to delete-char.
-
-b.  A negative argument to menu-complete now cycles backward through the
-    completion list.
-
-c.  A new bindable readline variable:  bind-tty-special-chars.  If non-zero,
-    readline will bind the terminal special characters to their readline
-    equivalents when it's called (on by default).
-
-d.  New bindable command: vi-rubout.  Saves deleted text for possible  
-    reinsertion, as with any vi-mode `text modification' command; `X' is bound
-    to this in vi command mode.
-
-e.  If the rl_completion_query_items is set to a value < 0, readline never
-    asks the user whether or not to view the possible completions.
-
-f.  New application-callable auxiliary function, rl_variable_value, returns
-    a string corresponding to a readline variable's value.
-
-g.  When parsing inputrc files and variable binding commands, the parser
-    strips trailing whitespace from values assigned to boolean variables
-    before checking them.
-
-h.  A new external application-controllable variable that allows the LINES
-    and COLUMNS environment variables to set the window size regardless of
-    what the kernel returns.
-
-
--------------------------------------------------------------------------------
-This is a terse description of the new features added to readline-5.0 since
-the release of readline-4.3.
-
-New Features in Readline
-
-a.  History expansion has a new `a' modifier equivalent to the `g' modifier
-    for compatibility with the BSD csh.
-
-b.  History expansion has a new `G' modifier equivalent to the BSD csh `g'
-    modifier, which performs a substitution once per word.
-
-c.  All non-incremental search operations may now undo the operation of
-    replacing the current line with the history line.
-
-d.  The text inserted by an `a' command in vi mode can be reinserted with
-    `.'.
-
-e.  New bindable variable, `show-all-if-unmodified'.  If set, the readline
-    completer will list possible completions immediately if there is more
-    than one completion and partial completion cannot be performed.
-
-f.  There is a new application-callable `free_history_entry()' function.
-
-g.  History list entries now contain timestamp information; the history file
-    functions know how to read and write timestamp information associated
-    with each entry.
-
-h.  Four new key binding functions have been added:
-
-	rl_bind_key_if_unbound()
-	rl_bind_key_if_unbound_in_map()
-	rl_bind_keyseq_if_unbound()
-	rl_bind_keyseq_if_unbound_in_map()
-
-i.  New application variable, rl_completion_quote_character, set to any
-    quote character readline finds before it calls the application completion
-    function.
-
-j.  New application variable, rl_completion_suppress_quote, settable by an   
-    application completion function.  If set to non-zero, readline does not
-    attempt to append a closing quote to a completed word.
-    
-k.  New application variable, rl_completion_found_quote, set to a non-zero
-    value if readline determines that the word to be completed is quoted.
-    Set before readline calls any application completion function.
-
-l.  New function hook, rl_completion_word_break_hook, called when readline
-    needs to break a line into words when completion is attempted.  Allows
-    the word break characters to vary based on position in the line.
-
-m.  New bindable command: unix-filename-rubout.  Does the same thing as
-    unix-word-rubout, but adds `/' to the set of word delimiters.
-
-n.  When listing completions, directories have a `/' appended if the
-    `mark-directories' option has been enabled.
+e.  New bindable variable `menu-complete-display-prefix' causes the menu
+    completion code to display the common prefix of the possible completions
+    before cycling through the list, instead of after.
diff --git a/readline/README b/readline/README
index 6a9c2b9..bc89f46 100644
--- a/readline/README
+++ b/readline/README
@@ -1,7 +1,7 @@
 Introduction
 ============
 
-This is the Gnu Readline library, version 7.0.
+This is the Gnu Readline library, version 6.2.
 
 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
@@ -159,15 +159,6 @@ Readline library.  The texinfo files include both user and
 programmer's manuals.  HTML versions of the manuals appear in the
 `doc' subdirectory as well. 
 
-Usage
-=====
-
-Our position on the use of Readline through a shared-library linking
-mechanism is that there is no legal difference between shared-library
-linking and static linking--either kind of linking combines various
-modules into a single larger work.  The conditions for using Readline
-in a larger work are stated in section 3 of the GNU GPL.
-
 Reporting Bugs
 ==============
 
diff --git a/readline/aclocal.m4 b/readline/aclocal.m4
index 7730d2d..716a043 100644
--- a/readline/aclocal.m4
+++ b/readline/aclocal.m4
@@ -1692,14 +1692,13 @@ AC_CHECK_HEADERS(wctype.h)
 AC_CHECK_HEADERS(wchar.h)
 AC_CHECK_HEADERS(langinfo.h)
 
-AC_CHECK_HEADERS(mbstr.h)
-
 AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
 AC_CHECK_FUNC(mbscasecmp, AC_DEFINE(HAVE_MBSCMP))
 AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP))
 AC_CHECK_FUNC(mbsnrtowcs, AC_DEFINE(HAVE_MBSNRTOWCS))
 AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
 
+
 AC_REPLACE_FUNCS(mbschr)
 
 AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB))
@@ -1764,36 +1763,9 @@ if test $bash_cv_type_wint_t = yes; then
         AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
 fi
 
-dnl check for broken wcwidth
-AC_CACHE_CHECK([for wcwidth broken with unicode combining characters],
-bash_cv_wcwidth_broken,
-[AC_TRY_RUN([
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <locale.h>
-#include <wchar.h>
-
-main(c, v)
-int     c;
-char    **v;
-{
-        int     w;
-
-        setlocale(LC_ALL, "en_US.UTF-8");
-        w = wcwidth (0x0301);
-        exit (w == 0);  /* exit 0 if wcwidth broken */
-}
-],
-bash_cv_wcwidth_broken=yes, bash_cv_wcwidth_broken=no, bash_cv_wcwidth_broken=no)])
-if test "$bash_cv_wcwidth_broken" = yes; then
-        AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken])
-fi
-
 if test "$am_cv_func_iconv" = yes; then
 	OLDLIBS="$LIBS"
-	LIBS="$LIBS $LIBINTL $LIBICONV"
+	LIBS="$LIBS $LIBICONV"
 	AC_CHECK_FUNCS(locale_charset)
 	LIBS="$OLDLIBS"
 fi
@@ -3126,7 +3098,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
           found_so=
           found_a=
           if test $use_additional = yes; then
-            if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
               found_dir="$additional_libdir"
               found_so="$additional_libdir/lib$name.$shlibext"
               if test -f "$additional_libdir/lib$name.la"; then
@@ -3148,7 +3120,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
                     found_dir="$dir"
                     found_so="$dir/lib$name.$shlibext"
                     if test -f "$dir/lib$name.la"; then
@@ -4151,7 +4123,7 @@ main()
 AC_DEFUN(BASH_STRUCT_WEXITSTATUS_OFFSET,
 [AC_MSG_CHECKING(for offset of exit status in return status from wait)
 AC_CACHE_VAL(bash_cv_wexitstatus_offset,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([
 #include <stdlib.h>
 #include <unistd.h>
 
diff --git a/readline/bind.c b/readline/bind.c
index f88e5aa..a939528 100644
--- a/readline/bind.c
+++ b/readline/bind.c
@@ -1,6 +1,6 @@
 /* bind.c -- key binding and startup file support for the readline library. */
 
-/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2010 Free Software Foundation, Inc.
 
    This file is part of the GNU Readline Library (Readline), a library
    for reading lines of text with interactive input and history editing.
@@ -72,15 +72,11 @@ extern char *strchr (), *strrchr ();
 /* Variables exported by this file. */
 Keymap rl_binding_keymap;
 
-static int _rl_skip_to_delim PARAMS((char *, int, int));
-
 static char *_rl_read_file PARAMS((char *, size_t *));
 static void _rl_init_file_error PARAMS((const char *));
 static int _rl_read_init_file PARAMS((const char *, int));
 static int glean_key_from_name PARAMS((char *));
-
 static int find_boolean_var PARAMS((const char *));
-static int find_string_var PARAMS((const char *));
 
 static char *_rl_get_string_variable_value PARAMS((const char *));
 static int substring_member_of_array PARAMS((const char *, const char * const *));
@@ -117,9 +113,6 @@ rl_bind_key (key, function)
      int key;
      rl_command_func_t *function;
 {
-  char keyseq[3];
-  int l;
-
   if (key < 0)
     return (key);
 
@@ -138,24 +131,8 @@ rl_bind_key (key, function)
       return (key);
     }
 
-  /* If it's bound to a function or macro, just overwrite.  Otherwise we have
-     to treat it as a key sequence so rl_generic_bind handles shadow keymaps
-     for us.  If we are binding '\' make sure to escape it so it makes it
-     through the call to rl_translate_keyseq. */
-  if (_rl_keymap[key].type != ISKMAP)
-    {
-      _rl_keymap[key].type = ISFUNC;
-      _rl_keymap[key].function = function;
-    }
-  else
-    {
-      l = 0;
-      if (key == '\\')
-	keyseq[l++] = '\\';
-      keyseq[l++] = key;
-      keyseq[l] = '\0';
-      rl_bind_keyseq (keyseq, function);
-    }
+  _rl_keymap[key].type = ISFUNC;
+  _rl_keymap[key].function = function;
   rl_binding_keymap = _rl_keymap;
   return (0);
 }
@@ -561,7 +538,7 @@ rl_translate_keyseq (seq, array, len)
 	    case '0': case '1': case '2': case '3':
 	    case '4': case '5': case '6': case '7':
 	      i++;
-	      for (temp = 2, c -= '0'; ISOCTAL ((unsigned char)seq[i]) && temp--; i++)
+	      for (temp = 2, c -= '0'; ISOCTAL (seq[i]) && temp--; i++)
 	        c = (c * 8) + OCTVALUE (seq[i]);
 	      i--;	/* auto-increment in for loop */
 	      array[l++] = c & largest_char;
@@ -590,40 +567,6 @@ rl_translate_keyseq (seq, array, len)
   return (0);
 }
 
-static int
-_rl_isescape (c)
-     int c;
-{
-  switch (c)
-    {
-    case '\007':
-    case '\b':
-    case '\f':
-    case '\n':
-    case '\r':
-    case TAB:
-    case 0x0b:  return (1);
-    default: return (0);
-    }
-}
-
-static int
-_rl_escchar (c)
-     int c;
-{
-  switch (c)
-    {
-    case '\007':  return ('a');
-    case '\b':  return ('b');
-    case '\f':  return ('f');
-    case '\n':  return ('n');
-    case '\r':  return ('r');
-    case TAB:  return ('t');
-    case 0x0b:  return ('v');
-    default: return (c);
-    }
-}
-
 char *
 rl_untranslate_keyseq (seq)
      int seq;
@@ -675,10 +618,9 @@ rl_untranslate_keyseq (seq)
   return kseq;
 }
 
-char *
-_rl_untranslate_macro_value (seq, use_escapes)
+static char *
+_rl_untranslate_macro_value (seq)
      char *seq;
-     int use_escapes;
 {
   char *ret, *r, *s;
   int c;
@@ -702,14 +644,9 @@ _rl_untranslate_macro_value (seq, use_escapes)
       else if (CTRL_CHAR (c))
 	{
 	  *r++ = '\\';
-	  if (use_escapes && _rl_isescape (c))
-	    c = _rl_escchar (c);
-	  else
-	    {
-	      *r++ = 'C';
-	      *r++ = '-';
-	      c = _rl_to_lower (UNCTRL (c));
-	    }
+	  *r++ = 'C';
+	  *r++ = '-';
+	  c = _rl_to_lower (UNCTRL (c));
 	}
       else if (c == RUBOUT)
  	{
@@ -1220,38 +1157,6 @@ handle_parser_directive (statement)
   return (1);
 }
 
-/* Start at STRING[START] and look for DELIM.  Return I where STRING[I] ==
-   DELIM or STRING[I] == 0.  DELIM is usually a double quote. */
-static int
-_rl_skip_to_delim (string, start, delim)
-     char *string;
-     int start, delim;
-{
-  int i, c, passc;
-
-  for (i = start,passc = 0; c = string[i]; i++)
-    {
-      if (passc)
-	{
-	  passc = 0;
-	  if (c == 0)
-	    break;
-	  continue;
-	}
-
-      if (c == '\\')
-	{
-	  passc = 1;
-	  continue;
-	}
-
-      if (c == delim)
-	break;
-    }
-
-  return i;
-}
-
 /* Read the binding command from STRING and perform it.
    A key binding command looks like: Keyname: function-name\0,
    a variable binding command looks like: set variable value.
@@ -1267,7 +1172,7 @@ rl_parse_and_bind (string)
   while (string && whitespace (*string))
     string++;
 
-  if (string == 0 || *string == 0 || *string == '#')
+  if (!string || !*string || *string == '#')
     return 0;
 
   /* If this is a parser directive, act on it. */
@@ -1287,16 +1192,31 @@ rl_parse_and_bind (string)
      backslash to quote characters in the key expression. */
   if (*string == '"')
     {
-      i = _rl_skip_to_delim (string, 1, '"');
+      int passc = 0;
 
+      for (i = 1; c = string[i]; i++)
+	{
+	  if (passc)
+	    {
+	      passc = 0;
+	      continue;
+	    }
+
+	  if (c == '\\')
+	    {
+	      passc++;
+	      continue;
+	    }
+
+	  if (c == '"')
+	    break;
+	}
       /* If we didn't find a closing quote, abort the line. */
       if (string[i] == '\0')
         {
           _rl_init_file_error ("no closing `\"' in key binding");
           return 1;
         }
-      else
-        i++;	/* skip past closing double quote */
     }
 
   /* Advance to the colon (:) or whitespace which separates the two objects. */
@@ -1316,7 +1236,6 @@ rl_parse_and_bind (string)
   if (_rl_stricmp (string, "set") == 0)
     {
       char *var, *value, *e;
-      int s;
 
       var = string + i;
       /* Make VAR point to start of variable name. */
@@ -1324,37 +1243,25 @@ rl_parse_and_bind (string)
 
       /* Make VALUE point to start of value string. */
       value = var;
-      while (*value && whitespace (*value) == 0) value++;
+      while (*value && !whitespace (*value)) value++;
       if (*value)
 	*value++ = '\0';
       while (*value && whitespace (*value)) value++;
 
-      /* Strip trailing whitespace from values of boolean variables. */
-      if (find_boolean_var (var) >= 0)
+      /* Strip trailing whitespace from values to boolean variables.  Temp
+	 fix until I get a real quoted-string parser here. */
+      i = find_boolean_var (var);
+      if (i >= 0)
 	{
 	  /* remove trailing whitespace */
-remove_trailing:
 	  e = value + strlen (value) - 1;
 	  while (e >= value && whitespace (*e))
 	    e--;
 	  e++;		/* skip back to whitespace or EOS */
-	  
 	  if (*e && e >= value)
 	    *e = '\0';
 	}
-      else if ((i = find_string_var (var)) >= 0)
-	{
-	  /* Allow quoted strings in variable values */
-	  if (*value == '"')
-	    {
-	      i = _rl_skip_to_delim (value, 1, *value);
-	      value[i] = '\0';
-	      value++;	/* skip past the quote */
-	    }
-	  else
-	    goto remove_trailing;
-	}
-	
+
       rl_variable_bind (var, value);
       return 0;
     }
@@ -1375,13 +1282,32 @@ remove_trailing:
      the quoted string delimiter, like the shell. */
   if (*funname == '\'' || *funname == '"')
     {
-      i = _rl_skip_to_delim (string, i+1, *funname);
-      if (string[i])
+      int delimiter, passc;
+
+      delimiter = string[i++];
+      for (passc = 0; c = string[i]; i++)
+	{
+	  if (passc)
+	    {
+	      passc = 0;
+	      continue;
+	    }
+
+	  if (c == '\\')
+	    {
+	      passc = 1;
+	      continue;
+	    }
+
+	  if (c == delimiter)
+	    break;
+	}
+      if (c)
 	i++;
     }
 
   /* Advance to the end of the string.  */
-  for (; string[i] && whitespace (string[i]) == 0; i++);
+  for (; string[i] && !whitespace (string[i]); i++);
 
   /* No extra whitespace at the end of the string. */
   string[i] = '\0';
@@ -1441,7 +1367,7 @@ remove_trailing:
 
   /* Get the actual character we want to deal with. */
   kname = strrchr (string, '-');
-  if (kname == 0)
+  if (!kname)
     kname = string;
   else
     kname++;
@@ -1497,16 +1423,11 @@ static const struct {
   { "bind-tty-special-chars",	&_rl_bind_stty_chars,		0 },
   { "blink-matching-paren",	&rl_blink_matching_paren,	V_SPECIAL },
   { "byte-oriented",		&rl_byte_oriented,		0 },
-#if defined (COLOR_SUPPORT)
-  { "colored-completion-prefix",&_rl_colored_completion_prefix,	0 },
-  { "colored-stats",		&_rl_colored_stats,		0 },
-#endif
   { "completion-ignore-case",	&_rl_completion_case_fold,	0 },
   { "completion-map-case",	&_rl_completion_case_map,	0 },
   { "convert-meta",		&_rl_convert_meta_chars_to_ascii, 0 },
   { "disable-completion",	&rl_inhibit_completion,		0 },
   { "echo-control-characters",	&_rl_echo_control_chars,	0 },
-  { "enable-bracketed-paste",	&_rl_enable_bracketed_paste,	0 },
   { "enable-keypad",		&_rl_enable_keypad,		0 },
   { "enable-meta-key",		&_rl_enable_meta,		0 },
   { "expand-tilde",		&rl_complete_with_tilde_expansion, 0 },
@@ -1526,7 +1447,6 @@ static const struct {
   { "revert-all-at-newline",	&_rl_revert_all_at_newline,	0 },
   { "show-all-if-ambiguous",	&_rl_complete_show_all,		0 },
   { "show-all-if-unmodified",	&_rl_complete_show_unmodified,	0 },
-  { "show-mode-in-prompt",	&_rl_show_mode_in_prompt,	0 },
   { "skip-completed-text",	&_rl_skip_completed_text,	0 },
 #if defined (VISIBLE_STATS)
   { "visible-stats",		&rl_visible_stats,		0 },
@@ -1566,8 +1486,6 @@ hack_special_boolean_var (i)
       else
 	_rl_bell_preference = AUDIBLE_BELL;
     }
-  else if (_rl_stricmp (name, "show-mode-in-prompt") == 0)
-    _rl_reset_prompt ();
 }
 
 typedef int _rl_sv_func_t PARAMS((const char *));
@@ -1590,13 +1508,9 @@ static int sv_dispprefix PARAMS((const char *));
 static int sv_compquery PARAMS((const char *));
 static int sv_compwidth PARAMS((const char *));
 static int sv_editmode PARAMS((const char *));
-static int sv_emacs_modestr PARAMS((const char *));
 static int sv_histsize PARAMS((const char *));
 static int sv_isrchterm PARAMS((const char *));
 static int sv_keymap PARAMS((const char *));
-static int sv_seqtimeout PARAMS((const char *));
-static int sv_viins_modestr PARAMS((const char *));
-static int sv_vicmd_modestr PARAMS((const char *));
 
 static const struct {
   const char * const name;
@@ -1609,13 +1523,9 @@ static const struct {
   { "completion-prefix-display-length", V_INT,	sv_dispprefix },
   { "completion-query-items", V_INT,	sv_compquery },
   { "editing-mode",	V_STRING,	sv_editmode },
-  { "emacs-mode-string", V_STRING,	sv_emacs_modestr },  
   { "history-size",	V_INT,		sv_histsize },
   { "isearch-terminators", V_STRING,	sv_isrchterm },
   { "keymap",		V_STRING,	sv_keymap },
-  { "keyseq-timeout",	V_INT,		sv_seqtimeout },
-  { "vi-cmd-mode-string", V_STRING,	sv_vicmd_modestr }, 
-  { "vi-ins-mode-string", V_STRING,	sv_viins_modestr }, 
   { (char *)NULL,	0, (_rl_sv_func_t *)0 }
 };
 
@@ -1632,7 +1542,7 @@ find_string_var (name)
 }
 
 /* A boolean value that can appear in a `set variable' command is true if
-   the value is null or empty, `on' (case-insensitive), or "1".  Any other
+   the value is null or empty, `on' (case-insenstive), or "1".  Any other
    values result in 0 (false). */
 static int
 bool_to_int (value)
@@ -1773,17 +1683,13 @@ static int
 sv_histsize (value)
      const char *value;
 {
-  int nval;
+  int nval = 500;
 
-  nval = 500;
   if (value && *value)
     {
       nval = atoi (value);
       if (nval < 0)
-	{
-	  unstifle_history ();
-	  return 0;
-	}
+	return 1;
     }
   stifle_history (nval);
   return 0;
@@ -1805,23 +1711,6 @@ sv_keymap (value)
 }
 
 static int
-sv_seqtimeout (value)
-     const char *value;
-{
-  int nval;
-
-  nval = 0;
-  if (value && *value)
-    {
-      nval = atoi (value);
-      if (nval < 0)
-	nval = 0;
-    }
-  _rl_keyseq_timeout = nval;
-  return 0;
-}
-
-static int
 sv_bell_style (value)
      const char *value;
 {
@@ -1859,7 +1748,7 @@ sv_isrchterm (value)
     }
   else
     {
-      for (beg = end = 0; v[end] && whitespace (v[end]) == 0; end++)
+      for (beg = end = 0; whitespace (v[end]) == 0; end++)
 	;
     }
 
@@ -1873,96 +1762,7 @@ sv_isrchterm (value)
   xfree (v);
   return 0;
 }
-
-extern char *_rl_emacs_mode_str;
-
-static int
-sv_emacs_modestr (value)
-     const char *value;
-{
-  if (value && *value)
-    {
-      FREE (_rl_emacs_mode_str);
-      _rl_emacs_mode_str = (char *)xmalloc (2 * strlen (value) + 1);
-      rl_translate_keyseq (value, _rl_emacs_mode_str, &_rl_emacs_modestr_len);
-      _rl_emacs_mode_str[_rl_emacs_modestr_len] = '\0';
-      return 0;
-    }
-  else if (value)
-    {
-      FREE (_rl_emacs_mode_str);
-      _rl_emacs_mode_str = (char *)xmalloc (1);
-      _rl_emacs_mode_str[_rl_emacs_modestr_len = 0] = '\0';
-      return 0;
-    }
-  else if (value == 0)
-    {
-      FREE (_rl_emacs_mode_str);
-      _rl_emacs_mode_str = 0;	/* prompt_modestr does the right thing */
-      _rl_emacs_modestr_len = 0;
-      return 0;
-    }
-  return 1;
-}
-
-static int
-sv_viins_modestr (value)
-     const char *value;
-{
-  if (value && *value)
-    {
-      FREE (_rl_vi_ins_mode_str);
-      _rl_vi_ins_mode_str = (char *)xmalloc (2 * strlen (value) + 1);
-      rl_translate_keyseq (value, _rl_vi_ins_mode_str, &_rl_vi_ins_modestr_len);
-      _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len] = '\0';
-      return 0;
-    }
-  else if (value)
-    {
-      FREE (_rl_vi_ins_mode_str);
-      _rl_vi_ins_mode_str = (char *)xmalloc (1);
-      _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len = 0] = '\0';
-      return 0;
-    }
-  else if (value == 0)
-    {
-      FREE (_rl_vi_ins_mode_str);
-      _rl_vi_ins_mode_str = 0;	/* prompt_modestr does the right thing */
-      _rl_vi_ins_modestr_len = 0;
-      return 0;
-    }
-  return 1;
-}
-
-static int
-sv_vicmd_modestr (value)
-     const char *value;
-{
-  if (value && *value)
-    {
-      FREE (_rl_vi_cmd_mode_str);
-      _rl_vi_cmd_mode_str = (char *)xmalloc (2 * strlen (value) + 1);
-      rl_translate_keyseq (value, _rl_vi_cmd_mode_str, &_rl_vi_cmd_modestr_len);
-      _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';
-      return 0;
-    }
-  else if (value)
-    {
-      FREE (_rl_vi_cmd_mode_str);
-      _rl_vi_cmd_mode_str = (char *)xmalloc (1);
-      _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len = 0] = '\0';
-      return 0;
-    }
-  else if (value == 0)
-    {
-      FREE (_rl_vi_cmd_mode_str);
-      _rl_vi_cmd_mode_str = 0;	/* prompt_modestr does the right thing */
-      _rl_vi_cmd_modestr_len = 0;
-      return 0;
-    }
-  return 1;
-}
-
+      
 /* Return the character which matches NAME.
    For example, `Space' returns ' '. */
 
@@ -2367,8 +2167,7 @@ rl_function_dumper (print_readably)
 	    }
 	}
     }
-
-  xfree (names);
+  free (names);
 }
 
 /* Print all of the current functions and their bindings to
@@ -2401,7 +2200,7 @@ _rl_macro_dumper_internal (print_readably, map, prefix)
 	{
 	case ISMACR:
 	  keyname = _rl_get_keyname (key);
-	  out = _rl_untranslate_macro_value ((char *)map[key].function, 0);
+	  out = _rl_untranslate_macro_value ((char *)map[key].function);
 
 	  if (print_readably)
 	    fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "",
@@ -2513,7 +2312,7 @@ _rl_get_string_variable_value (name)
     {
       if (_rl_isearch_terminators == 0)
 	return 0;
-      ret = _rl_untranslate_macro_value (_rl_isearch_terminators, 0);
+      ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
       if (ret)
 	{
 	  strncpy (numbuf, ret, sizeof (numbuf) - 1);
@@ -2531,17 +2330,6 @@ _rl_get_string_variable_value (name)
 	ret = rl_get_keymap_name_from_edit_mode ();
       return (ret ? ret : "none");
     }
-  else if (_rl_stricmp (name, "keyseq-timeout") == 0)
-    {
-      sprintf (numbuf, "%d", _rl_keyseq_timeout);    
-      return (numbuf);
-    }
-  else if (_rl_stricmp (name, "emacs-mode-string") == 0)
-    return (_rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT);
-  else if (_rl_stricmp (name, "vi-cmd-mode-string") == 0)
-    return (_rl_emacs_mode_str ? _rl_emacs_mode_str : RL_VI_CMD_MODESTR_DEFAULT);
-  else if (_rl_stricmp (name, "vi-ins-mode-string") == 0)
-    return (_rl_emacs_mode_str ? _rl_emacs_mode_str : RL_VI_INS_MODESTR_DEFAULT);
   else
     return (0);
 }
diff --git a/readline/callback.c b/readline/callback.c
index 0fc3f90..7682cd0 100644
--- a/readline/callback.c
+++ b/readline/callback.c
@@ -62,10 +62,8 @@ _rl_callback_generic_arg *_rl_callback_data = 0;
    whenever a complete line of input is ready.  The user must then
    call rl_callback_read_char() every time some input is available, and 
    rl_callback_read_char() will call the user's function with the complete
-   text read in at each end of line.  The terminal is kept prepped
-   all the time, except during calls to the user's function.  Signal
-   handlers are only installed when the application calls back into
-   readline, so readline doesn't `steal' signals from the application.  */
+   text read in at each end of line.  The terminal is kept prepped and
+   signals handled all the time, except during calls to the user's function. */
 
 rl_vcpfunc_t *rl_linefunc;		/* user callback function */
 static int in_handler;		/* terminal_prepped and signals set? */
@@ -82,6 +80,10 @@ _rl_callback_newline ()
 
       if (rl_prep_term_function)
 	(*rl_prep_term_function) (_rl_meta_flag);
+
+#if defined (HANDLE_SIGNALS)
+      rl_set_signals ();
+#endif
     }
 
   readline_internal_setup ();
@@ -100,16 +102,6 @@ rl_callback_handler_install (prompt, linefunc)
   _rl_callback_newline ();
 }
 
-#if defined (HANDLE_SIGNALS)
-#define CALLBACK_READ_RETURN() \
-  do { \
-    rl_clear_signals (); \
-    return; \
-  } while (0)
-#else
-#define CALLBACK_READ_RETURN() return
-#endif
-
 /* Read one character, and dispatch to the handler if it ends the line. */
 void
 rl_callback_read_char ()
@@ -125,24 +117,15 @@ rl_callback_read_char ()
     }
 
   memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t));
-#if defined (HAVE_POSIX_SIGSETJMP)
-  jcode = sigsetjmp (_rl_top_level, 0);
-#else
   jcode = setjmp (_rl_top_level);
-#endif
   if (jcode)
     {
       (*rl_redisplay_function) ();
       _rl_want_redisplay = 0;
       memcpy ((void *)_rl_top_level, (void *)olevel, sizeof (procenv_t));
-      CALLBACK_READ_RETURN ();
+      return;
     }
 
-#if defined (HANDLE_SIGNALS)
-  /* Install signal handlers only when readline has control. */
-  rl_set_signals ();
-#endif
-
   do
     {
       RL_CHECK_SIGNALS ();
@@ -152,13 +135,12 @@ rl_callback_read_char ()
 	  if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
 	    rl_callback_read_char ();
 
-	  CALLBACK_READ_RETURN ();
+	  return;
 	}
       else if  (RL_ISSTATE (RL_STATE_NSEARCH))
 	{
 	  eof = _rl_nsearch_callback (_rl_nscxt);
-
-	  CALLBACK_READ_RETURN ();
+	  return;
 	}
 #if defined (VI_MODE)
       else if (RL_ISSTATE (RL_STATE_VIMOTION))
@@ -169,7 +151,7 @@ rl_callback_read_char ()
 	  if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
 	    _rl_internal_char_cleanup ();
 
-	  CALLBACK_READ_RETURN ();
+	  return;
 	}
 #endif
       else if (RL_ISSTATE (RL_STATE_NUMERICARG))
@@ -181,7 +163,7 @@ rl_callback_read_char ()
 	  else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
 	    _rl_internal_char_cleanup ();
 
-	  CALLBACK_READ_RETURN ();
+	  return;
 	}
       else if (RL_ISSTATE (RL_STATE_MULTIKEY))
 	{
@@ -198,7 +180,7 @@ rl_callback_read_char ()
 	{
 	  /* This allows functions that simply need to read an additional
 	     character (like quoted-insert) to register a function to be
-	     called when input is available.  _rl_callback_data is a
+	     called when input is available.  _rl_callback_data is simply a
 	     pointer to a struct that has the argument count originally
 	     passed to the registering function and space for any additional
 	     parameters.  */
@@ -248,8 +230,6 @@ rl_callback_read_char ()
 	}
     }
   while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT));
-
-  CALLBACK_READ_RETURN ();
 }
 
 /* Remove the handler, and make sure the terminal is in its normal state. */
@@ -284,34 +264,10 @@ _rl_callback_data_alloc (count)
   return arg;
 }
 
-void
-_rl_callback_data_dispose (arg)
+void _rl_callback_data_dispose (arg)
      _rl_callback_generic_arg *arg;
 {
   xfree (arg);
 }
 
-/* Make sure that this agrees with cases in rl_callback_read_char */
-void
-rl_callback_sigcleanup ()
-{
-  if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
-    return;
-
-  if (RL_ISSTATE (RL_STATE_ISEARCH))
-    _rl_isearch_cleanup (_rl_iscxt, 0);
-  else if (RL_ISSTATE (RL_STATE_NSEARCH))
-    _rl_nsearch_cleanup (_rl_nscxt, 0);
-  else if (RL_ISSTATE (RL_STATE_VIMOTION))
-    RL_UNSETSTATE (RL_STATE_VIMOTION);
-  else if (RL_ISSTATE (RL_STATE_NUMERICARG))
-    {
-      _rl_argcxt = 0;
-      RL_UNSETSTATE (RL_STATE_NUMERICARG);
-    }
-  else if (RL_ISSTATE (RL_STATE_MULTIKEY))
-    RL_UNSETSTATE (RL_STATE_MULTIKEY);
-
-  _rl_callback_func = 0;
-}
 #endif
diff --git a/readline/chardefs.h b/readline/chardefs.h
index 43aab7a..e76c34b 100644
--- a/readline/chardefs.h
+++ b/readline/chardefs.h
@@ -72,8 +72,8 @@
 #  define IN_CTYPE_DOMAIN(c) isascii(c)
 #endif
 
-#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus)
-#  define isxdigit(c)   (isdigit((unsigned char)(c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT)
+#  define isxdigit(c)   (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
 #endif
 
 #if defined (CTYPE_NON_ASCII)
@@ -87,13 +87,13 @@
 
 /* Beware:  these only work with single-byte ASCII characters. */
 
-#define ISALNUM(c)	(IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c))
-#define ISALPHA(c)	(IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c))
-#define ISDIGIT(c)	(IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c))
-#define ISLOWER(c)	(IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c))
-#define ISPRINT(c)	(IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c))
-#define ISUPPER(c)	(IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c))
-#define ISXDIGIT(c)	(IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)c))
+#define ISALNUM(c)	(IN_CTYPE_DOMAIN (c) && isalnum (c))
+#define ISALPHA(c)	(IN_CTYPE_DOMAIN (c) && isalpha (c))
+#define ISDIGIT(c)	(IN_CTYPE_DOMAIN (c) && isdigit (c))
+#define ISLOWER(c)	(IN_CTYPE_DOMAIN (c) && islower (c))
+#define ISPRINT(c)	(IN_CTYPE_DOMAIN (c) && isprint (c))
+#define ISUPPER(c)	(IN_CTYPE_DOMAIN (c) && isupper (c))
+#define ISXDIGIT(c)	(IN_CTYPE_DOMAIN (c) && isxdigit (c))
 
 #define _rl_lowercase_p(c)	(NON_NEGATIVE(c) && ISLOWER(c))
 #define _rl_uppercase_p(c)	(NON_NEGATIVE(c) && ISUPPER(c))
diff --git a/readline/colors.c b/readline/colors.c
deleted file mode 100644
index 963dc12..0000000
--- a/readline/colors.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* `dir', `vdir' and `ls' directory listing programs for GNU.
-
-   Modified by Chet Ramey for Readline.
-
-   Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 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 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Written by Richard Stallman and David MacKenzie.  */
-
-/* Color support by Peter Anvin <Peter.Anvin@linux.org> and Dennis
-   Flaherty <dennisf@denix.elk.miles.com> based on original patches by
-   Greg Lee <lee@uhunix.uhcc.hawaii.edu>.  */
-
-#define READLINE_LIBRARY
-
-#if defined (HAVE_CONFIG_H)
-#  include <config.h>
-#endif
-
-#include "rlconf.h"
-
-#include <stdio.h>
-
-#include "posixstat.h" // stat related macros (S_ISREG, ...)
-#include <fcntl.h> // S_ISUID
-
-// strlen()
-#if defined (HAVE_STRING_H)
-#  include <string.h>
-#else /* !HAVE_STRING_H */
-#  include <strings.h>
-#endif /* !HAVE_STRING_H */
-
-// abort()
-#if defined (HAVE_STDLIB_H)
-#  include <stdlib.h>
-#else
-#  include "ansi_stdlib.h"
-#endif /* HAVE_STDLIB_H */
-
-#include "readline.h"
-#include "rldefs.h"
-
-#ifdef COLOR_SUPPORT
-
-#include "xmalloc.h"
-#include "colors.h"
-
-static bool is_colored (enum indicator_no type);
-static void restore_default_color (void);
-
-COLOR_EXT_TYPE *_rl_color_ext_list = 0;
-
-/* Output a color indicator (which may contain nulls).  */
-void
-_rl_put_indicator (const struct bin_str *ind) {
-  fwrite (ind->string, ind->len, 1, rl_outstream);
-}
-
-static bool
-is_colored (enum indicator_no colored_filetype)
-{
-  size_t len = _rl_color_indicator[colored_filetype].len;
-  char const *s = _rl_color_indicator[colored_filetype].string;
-  return ! (len == 0
-            || (len == 1 && strncmp (s, "0", 1) == 0)
-            || (len == 2 && strncmp (s, "00", 2) == 0));
-}
-
-static void
-restore_default_color (void)
-{
-  _rl_put_indicator (&_rl_color_indicator[C_LEFT]);
-  _rl_put_indicator (&_rl_color_indicator[C_RIGHT]);
-}
-
-void
-_rl_set_normal_color (void)
-{
-  if (is_colored (C_NORM))
-    {
-      _rl_put_indicator (&_rl_color_indicator[C_LEFT]);
-      _rl_put_indicator (&_rl_color_indicator[C_NORM]);
-      _rl_put_indicator (&_rl_color_indicator[C_RIGHT]);
-    }
-}
-
-bool
-_rl_print_prefix_color (void)
-{
-  struct bin_str *s;
-
-  /* What do we want to use for the prefix? Let's try cyan first, see colors.h */
-  s = &_rl_color_indicator[C_PREFIX];
-  if (s->string != NULL)
-    {
-      if (is_colored (C_NORM))
-	restore_default_color ();
-      _rl_put_indicator (&_rl_color_indicator[C_LEFT]);
-      _rl_put_indicator (s);
-      _rl_put_indicator (&_rl_color_indicator[C_RIGHT]);
-      return 0;
-    }
-  else
-    return 1;
-}
-  
-/* Returns whether any color sequence was printed. */
-bool
-_rl_print_color_indicator (char *f)
-{
-  enum indicator_no colored_filetype;
-  COLOR_EXT_TYPE *ext;	/* Color extension */
-  size_t len;		/* Length of name */
-
-  const char* name;
-  char *filename;
-  struct stat astat, linkstat;
-  mode_t mode;
-  int linkok;	/* 1 == ok, 0 == dangling symlink, -1 == missing */
-  int stat_ok;
-
-  name = f;
-
-  /* This should already have undergone tilde expansion */
-  filename = 0;
-  if (rl_filename_stat_hook)
-    {
-      filename = savestring (f);
-      (*rl_filename_stat_hook) (&filename);
-      name = filename;
-    }
-
-#if defined (HAVE_LSTAT)
-  stat_ok = lstat(name, &astat);
-#else
-  stat_ok = stat(name, &astat);
-#endif
-  if (stat_ok == 0)
-    {
-      mode = astat.st_mode;
-#if defined (HAVE_LSTAT)
-      if (S_ISLNK (mode))
-	{
-	  linkok = stat (name, &linkstat) == 0;
-	  if (linkok && strncmp (_rl_color_indicator[C_LINK].string, "target", 6) == 0)
-	    mode = linkstat.st_mode;
-	}
-      else
-#endif
-	linkok = 1;
-    }
-  else
-    linkok = -1;
-
-  /* Is this a nonexistent file?  If so, linkok == -1.  */
-
-  if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL)
-    colored_filetype = C_MISSING;
-  else if (linkok == 0 && S_ISLNK(mode) && _rl_color_indicator[C_ORPHAN].string != NULL)
-    colored_filetype = C_ORPHAN;	/* dangling symlink */
-  else if(stat_ok != 0)
-    {
-      static enum indicator_no filetype_indicator[] = FILETYPE_INDICATORS;
-      colored_filetype = filetype_indicator[normal]; //f->filetype];
-    }
-  else
-    {
-      if (S_ISREG (mode))
-        {
-          colored_filetype = C_FILE;
-
-          if ((mode & S_ISUID) != 0 && is_colored (C_SETUID))
-            colored_filetype = C_SETUID;
-          else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
-            colored_filetype = C_SETGID;
-          else if (is_colored (C_CAP) && 0) //f->has_capability)
-            colored_filetype = C_CAP;
-          else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC))
-            colored_filetype = C_EXEC;
-          else if ((1 < astat.st_nlink) && is_colored (C_MULTIHARDLINK))
-            colored_filetype = C_MULTIHARDLINK;
-        }
-      else if (S_ISDIR (mode))
-        {
-          colored_filetype = C_DIR;
-
-#if defined (S_ISVTX)
-          if ((mode & S_ISVTX) && (mode & S_IWOTH)
-              && is_colored (C_STICKY_OTHER_WRITABLE))
-            colored_filetype = C_STICKY_OTHER_WRITABLE;
-          else
-#endif
-          if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE))
-            colored_filetype = C_OTHER_WRITABLE;
-#if defined (S_ISVTX)
-          else if ((mode & S_ISVTX) != 0 && is_colored (C_STICKY))
-            colored_filetype = C_STICKY;
-#endif
-        }
-      else if (S_ISLNK (mode))
-        colored_filetype = C_LINK;
-      else if (S_ISFIFO (mode))
-        colored_filetype = C_FIFO;
-      else if (S_ISSOCK (mode))
-        colored_filetype = C_SOCK;
-      else if (S_ISBLK (mode))
-        colored_filetype = C_BLK;
-      else if (S_ISCHR (mode))
-        colored_filetype = C_CHR;
-      else
-        {
-          /* Classify a file of some other type as C_ORPHAN.  */
-          colored_filetype = C_ORPHAN;
-        }
-    }
-
-  /* Check the file's suffix only if still classified as C_FILE.  */
-  ext = NULL;
-  if (colored_filetype == C_FILE)
-    {
-      /* Test if NAME has a recognized suffix.  */
-      len = strlen (name);
-      name += len;		/* Pointer to final \0.  */
-      for (ext = _rl_color_ext_list; ext != NULL; ext = ext->next)
-        {
-          if (ext->ext.len <= len
-              && strncmp (name - ext->ext.len, ext->ext.string,
-                          ext->ext.len) == 0)
-            break;
-        }
-    }
-
-  free (filename);	/* NULL or savestring return value */
-
-  {
-    const struct bin_str *const s
-      = ext ? &(ext->seq) : &_rl_color_indicator[colored_filetype];
-    if (s->string != NULL)
-      {
-        /* Need to reset so not dealing with attribute combinations */
-        if (is_colored (C_NORM))
-	  restore_default_color ();
-        _rl_put_indicator (&_rl_color_indicator[C_LEFT]);
-        _rl_put_indicator (s);
-        _rl_put_indicator (&_rl_color_indicator[C_RIGHT]);
-        return 0;
-      }
-    else
-      return 1;
-  }
-}
-
-void
-_rl_prep_non_filename_text (void)
-{
-  if (_rl_color_indicator[C_END].string != NULL)
-    _rl_put_indicator (&_rl_color_indicator[C_END]);
-  else
-    {
-      _rl_put_indicator (&_rl_color_indicator[C_LEFT]);
-      _rl_put_indicator (&_rl_color_indicator[C_RESET]);
-      _rl_put_indicator (&_rl_color_indicator[C_RIGHT]);
-    }
-}
-#endif /* COLOR_SUPPORT */
diff --git a/readline/colors.h b/readline/colors.h
deleted file mode 100644
index 8627bd4..0000000
--- a/readline/colors.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* `dir', `vdir' and `ls' directory listing programs for GNU.
-
-   Modified by Chet Ramey for Readline.
-
-   Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 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 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Written by Richard Stallman and David MacKenzie.  */
-
-/* Color support by Peter Anvin <Peter.Anvin@linux.org> and Dennis
-   Flaherty <dennisf@denix.elk.miles.com> based on original patches by
-   Greg Lee <lee@uhunix.uhcc.hawaii.edu>.  */
-
-#ifndef _COLORS_H_
-#define _COLORS_H_
-
-#include <stdio.h> // size_t
-
-#if defined(__TANDEM) && defined(HAVE_STDBOOL_H) && (__STDC_VERSION__ < 199901L)
-typedef int _Bool;
-#endif
-
-#if defined (HAVE_STDBOOL_H)
-#  include <stdbool.h> // bool
-#else
-typedef int _rl_bool_t;
-
-#ifdef bool
-#  undef bool
-#endif
-#define bool _rl_bool_t
-
-#ifndef true
-#  define true 1
-#  define false 0
-#endif
-
-#endif /* !HAVE_STDBOOL_H */
-
-/* Null is a valid character in a color indicator (think about Epson
-   printers, for example) so we have to use a length/buffer string
-   type. */
-struct bin_str
-  {
-    size_t len;
-    const char *string;
-  };
-
-/* file type indicators (dir, sock, fifo, ...)
-   Default value is initialized in parse-colors.c.
-   It is then modified from the values of $LS_COLORS. */
-extern struct bin_str _rl_color_indicator[];
-
-/* The LS_COLORS variable is in a termcap-like format. */
-typedef struct _color_ext_type
-  {
-    struct bin_str ext;         	/* The extension we're looking for */
-    struct bin_str seq;         	/* The sequence to output when we do */
-    struct _color_ext_type *next;	/* Next in list */
-  } COLOR_EXT_TYPE;
-
-/* file extensions indicators (.txt, .log, .jpg, ...)
-   Values are taken from $LS_COLORS in rl_parse_colors(). */
-extern COLOR_EXT_TYPE *_rl_color_ext_list;
-
-#define FILETYPE_INDICATORS				\
-  {							\
-    C_ORPHAN, C_FIFO, C_CHR, C_DIR, C_BLK, C_FILE,	\
-    C_LINK, C_SOCK, C_FILE, C_DIR			\
-  }
-
-/* Whether we used any colors in the output so far.  If so, we will
-   need to restore the default color later.  If not, we will need to
-   call prep_non_filename_text before using color for the first time. */
-
-enum indicator_no
-  {
-    C_LEFT, C_RIGHT, C_END, C_RESET, C_NORM, C_FILE, C_DIR, C_LINK,
-    C_FIFO, C_SOCK,
-    C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR, C_SETUID, C_SETGID,
-    C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_MULTIHARDLINK,
-    C_CLR_TO_EOL
-  };
-
-
-#if !S_IXUGO
-# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
-#endif
-
-enum filetype
-  {
-    unknown,
-    fifo,
-    chardev,
-    directory,
-    blockdev,
-    normal,
-    symbolic_link,
-    sock,
-    whiteout,
-    arg_directory
-  };
-
-/* Prefix color, currently same as directory */
-#define C_PREFIX	C_DIR
-
-extern void _rl_put_indicator (const struct bin_str *ind);
-extern void _rl_set_normal_color (void);
-extern bool _rl_print_prefix_color (void);
-extern bool _rl_print_color_indicator (char *f);
-extern void _rl_prep_non_filename_text (void);
-
-#endif /* !_COLORS_H_ */
diff --git a/readline/complete.c b/readline/complete.c
index 302ea1d..a5ce803 100644
--- a/readline/complete.c
+++ b/readline/complete.c
@@ -1,6 +1,6 @@
 /* complete.c -- filename completion for readline. */
 
-/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2011 Free Software Foundation, Inc.
 
    This file is part of the GNU Readline Library (Readline), a library
    for reading lines of text with interactive input and history editing.
@@ -31,8 +31,6 @@
 #  include <sys/file.h>
 #endif
 
-#include <signal.h>
-
 #if defined (HAVE_UNISTD_H)
 #  include <unistd.h>
 #endif /* HAVE_UNISTD_H */
@@ -66,10 +64,6 @@ extern int errno;
 #include "xmalloc.h"
 #include "rlprivate.h"
 
-#if defined (COLOR_SUPPORT)
-#  include "colors.h"
-#endif
-
 #ifdef __STDC__
 typedef int QSFUNC (const void *, const void *);
 #else
@@ -100,29 +94,17 @@ extern struct passwd *getpwent PARAMS((void));
    longest string in that array. */
 rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)NULL;
 
-#if defined (VISIBLE_STATS) || defined (COLOR_SUPPORT)
+#if defined (VISIBLE_STATS)
 #  if !defined (X_OK)
 #    define X_OK 1
 #  endif
-#endif
-
-#if defined (VISIBLE_STATS)
 static int stat_char PARAMS((char *));
 #endif
 
-#if defined (COLOR_SUPPORT)
-static int colored_stat_start PARAMS((char *));
-static void colored_stat_end PARAMS((void));
-static int colored_prefix_start PARAMS((void));
-static void colored_prefix_end PARAMS((void));
-#endif
-
 static int path_isdir PARAMS((const char *));
 
 static char *rl_quote_filename PARAMS((char *, int, char *));
 
-static void _rl_complete_sigcleanup PARAMS((int, void *));
-
 static void set_completion_defaults PARAMS((int));
 static int get_y_or_n PARAMS((int));
 static int _rl_internal_pager PARAMS((int));
@@ -174,7 +156,7 @@ int _rl_complete_mark_symlink_dirs = 0;
 int _rl_print_completions_horizontally;
 
 /* Non-zero means that case is not significant in filename completion. */
-#if (defined (__MSDOS__) && !defined (__DJGPP__)) || (defined (_WIN32) && !defined (__CYGWIN__))
+#if defined (__MSDOS__) && !defined (__DJGPP__)
 int _rl_completion_case_fold = 1;
 #else
 int _rl_completion_case_fold = 0;
@@ -207,14 +189,6 @@ int _rl_completion_columns = -1;
 int rl_visible_stats = 0;
 #endif /* VISIBLE_STATS */
 
-#if defined (COLOR_SUPPORT)
-/* Non-zero means to use colors to indicate file type when listing possible
-   completions.  The colors used are taken from $LS_COLORS, if set. */
-int _rl_colored_stats = 0;
-
-int _rl_colored_completion_prefix = 1;
-#endif
-
 /* If non-zero, when completing in the middle of a word, don't insert
    characters from the match that match characters following point in
    the word.  This means, for instance, completing when the cursor is
@@ -232,8 +206,6 @@ rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL;
 
 rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL;
 
-rl_icppfunc_t *rl_filename_stat_hook = (rl_icppfunc_t *)NULL;
-
 /* If non-zero, this is the address of a function to call when reading
    directory entries from the filesystem for completion and comparing
    them to the partial word to be completed.  The function should
@@ -408,8 +380,6 @@ static int completion_changed_buffer;
 /* The result of the query to the user about displaying completion matches */
 static int completion_y_or_n;
 
-static int _rl_complete_display_matches_interrupt = 0;
-
 /*************************************/
 /*				     */
 /*    Bindable completion functions  */
@@ -487,18 +457,6 @@ _rl_reset_completion_state ()
   rl_completion_quote_character = 0;
 }
 
-static void
-_rl_complete_sigcleanup (sig, ptr)
-     int sig;
-     void *ptr;
-{
-  if (sig == SIGINT)	/* XXX - for now */
-    {
-      _rl_free_match_list ((char **)ptr);
-      _rl_complete_display_matches_interrupt = 1;
-    }
-}
-
 /* Set default values for readline word completion.  These are the variables
    that application completion functions can change or inspect. */
 static void
@@ -514,9 +472,6 @@ set_completion_defaults (what_to_do)
 
   /* The completion entry function may optionally change this. */
   rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs;
-
-  /* Reset private state. */
-  _rl_complete_display_matches_interrupt = 0;
 }
 
 /* The user must press "y" or "n". Non-zero return means "y" pressed. */
@@ -526,6 +481,10 @@ get_y_or_n (for_pager)
 {
   int c;
 
+/* Disabled for GDB due to the gdb.base/readline-ask.exp regression.
+   [patch] testsuite: Test readline-6.2 "ask" regression
+   http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html  */
+#if 0
   /* For now, disable pager in callback mode, until we later convert to state
      driven functions.  Have to wait until next major version to add new
      state definition, since it will change value of RL_STATE_DONE. */
@@ -533,6 +492,7 @@ get_y_or_n (for_pager)
   if (RL_ISSTATE (RL_STATE_CALLBACK))
     return 1;
 #endif
+#endif
 
   for (;;)
     {
@@ -596,8 +556,6 @@ stat_char (filename)
 {
   struct stat finfo;
   int character, r;
-  char *f;
-  const char *fn;
 
   /* Short-circuit a //server on cygwin, since that will always behave as
      a directory. */
@@ -606,20 +564,10 @@ stat_char (filename)
     return '/';
 #endif
 
-  f = 0;
-  if (rl_filename_stat_hook)
-    {
-      f = savestring (filename);
-      (*rl_filename_stat_hook) (&f);
-      fn = f;
-    }
-  else
-    fn = filename;
-    
 #if defined (HAVE_LSTAT) && defined (S_ISLNK)
-  r = lstat (fn, &finfo);
+  r = lstat (filename, &finfo);
 #else
-  r = stat (fn, &finfo);
+  r = stat (filename, &finfo);
 #endif
 
   if (r == -1)
@@ -651,56 +599,25 @@ stat_char (filename)
   else if (S_ISREG (finfo.st_mode))
     {
 #if defined (_WIN32) && !defined (__CYGWIN__)
-      char *ext;
-
-      /* Windows doesn't do access and X_OK; check file extension instead */
-      ext = strrchr (fn, '.');
-      if (ext && (_rl_stricmp (ext, ".exe") == 0 ||
-		  _rl_stricmp (ext, ".cmd") == 0 ||
-		  _rl_stricmp (ext, ".bat") == 0 ||
-		  _rl_stricmp (ext, ".com") == 0))
+      /* Windows 'access' doesn't support X_OK and on latest Windows
+	 versions even invokes an invalid parameter exception.  */
+      char *ext = strrchr (filename, '.');
+
+      if (ext
+	  && (_rl_stricmp (ext, ".exe") == 0
+	      || _rl_stricmp (ext, ".cmd") == 0
+	      || _rl_stricmp (ext, ".bat") == 0
+	      || _rl_stricmp (ext, ".com") == 0))
 	character = '*';
 #else
       if (access (filename, X_OK) == 0)
 	character = '*';
 #endif
     }
-
-  xfree (f);
   return (character);
 }
 #endif /* VISIBLE_STATS */
 
-#if defined (COLOR_SUPPORT)
-static int
-colored_stat_start (filename)
-     char *filename;
-{
-  _rl_set_normal_color ();
-  return (_rl_print_color_indicator (filename));
-}
-
-static void
-colored_stat_end ()
-{
-  _rl_prep_non_filename_text ();
-  _rl_put_indicator (&_rl_color_indicator[C_CLR_TO_EOL]);
-}
-
-static int
-colored_prefix_start ()
-{
-  _rl_set_normal_color ();
-  return (_rl_print_prefix_color ());
-}
-
-static void
-colored_prefix_end ()
-{
-  colored_stat_end ();		/* for now */
-}
-#endif
-
 /* Return the portion of PATHNAME that should be output when listing
    possible completions.  If we are hacking filename completion, we
    are only interested in the basename, the portion following the
@@ -719,7 +636,7 @@ printable_part (pathname)
     return (pathname);
 
   temp = strrchr (pathname, '/');
-#if defined (__MSDOS__) || defined (_WIN32)
+#if defined (__MSDOS__)
   if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':')
     temp = pathname + 1;
 #endif
@@ -780,7 +697,7 @@ fnwidth (string)
 	  else
 	    {
 	      pos += clen;
-	      w = WCWIDTH (wc);
+	      w = wcwidth (wc);
 	      width += (w >= 0) ? w : 1;
 	    }
 #else
@@ -802,7 +719,6 @@ fnprint (to_print, prefix_bytes)
 {
   int printed_len, w;
   const char *s;
-  int common_prefix_len;
 #if defined (HANDLE_MULTIBYTE)
   mbstate_t ps;
   const char *end;
@@ -814,14 +730,14 @@ fnprint (to_print, prefix_bytes)
   memset (&ps, 0, sizeof (mbstate_t));
 #endif
 
-  printed_len = common_prefix_len = 0;
+  printed_len = 0;
 
   /* Don't print only the ellipsis if the common prefix is one of the
      possible completions */
   if (to_print[prefix_bytes] == '\0')
     prefix_bytes = 0;
 
-  if (prefix_bytes && _rl_completion_prefix_display_length > 0)
+  if (prefix_bytes)
     {
       char ellipsis;
 
@@ -830,15 +746,6 @@ fnprint (to_print, prefix_bytes)
 	putc (ellipsis, rl_outstream);
       printed_len = ELLIPSIS_LEN;
     }
-#if defined (COLOR_SUPPORT)
-  else if (prefix_bytes && _rl_colored_completion_prefix > 0)
-    {
-      common_prefix_len = prefix_bytes;
-      prefix_bytes = 0;
-      /* XXX - print color indicator start here */
-      colored_prefix_start ();
-    }
-#endif
 
   s = to_print + prefix_bytes;
   while (*s)
@@ -877,7 +784,7 @@ fnprint (to_print, prefix_bytes)
 	    break;
 	  else
 	    {
-	      w = WCWIDTH (wc);
+	      w = wcwidth (wc);
 	      width = (w >= 0) ? w : 1;
 	    }
 	  fwrite (s, 1, tlen, rl_outstream);
@@ -889,13 +796,6 @@ fnprint (to_print, prefix_bytes)
 	  printed_len++;
 #endif
 	}
-      if (common_prefix_len > 0 && (s - to_print) >= common_prefix_len)
-	{
-	  /* printed bytes = s - to_print */
-	  /* printed bytes should never be > but check for paranoia's sake */
-	  colored_prefix_end ();
-	  common_prefix_len = 0;
-	}
     }
 
   return printed_len;
@@ -914,20 +814,13 @@ print_filename (to_print, full_pathname, prefix_bytes)
   char *s, c, *new_full_pathname, *dn;
 
   extension_char = 0;
-#if defined (COLOR_SUPPORT)
-  /* Defer printing if we want to prefix with a color indicator */
-  if (_rl_colored_stats == 0 || rl_filename_completion_desired == 0)
-#endif
-    printed_len = fnprint (to_print, prefix_bytes);
+  printed_len = fnprint (to_print, prefix_bytes);
 
-  if (rl_filename_completion_desired && (
 #if defined (VISIBLE_STATS)
-     rl_visible_stats ||
-#endif
-#if defined (COLOR_SUPPORT)
-     _rl_colored_stats ||
+ if (rl_filename_completion_desired && (rl_visible_stats || _rl_complete_mark_directories))
+#else
+ if (rl_filename_completion_desired && _rl_complete_mark_directories)
 #endif
-     _rl_complete_mark_directories))
     {
       /* If to_print != full_pathname, to_print is the basename of the
 	 path passed.  In this case, we try to expand the directory
@@ -973,28 +866,8 @@ print_filename (to_print, full_pathname, prefix_bytes)
 	    extension_char = stat_char (new_full_pathname);
 	  else
 #endif
-	  if (_rl_complete_mark_directories)
-	    {
-	      dn = 0;
-	      if (rl_directory_completion_hook == 0 && rl_filename_stat_hook)
-		{
-		  dn = savestring (new_full_pathname);
-		  (*rl_filename_stat_hook) (&dn);
-		  xfree (new_full_pathname);
-		  new_full_pathname = dn;
-		}
-	      if (path_isdir (new_full_pathname))
-		extension_char = '/';
-	    }
-
-#if defined (COLOR_SUPPORT)
-	  if (_rl_colored_stats)
-	    {
-	      colored_stat_start (new_full_pathname);
-	      printed_len = fnprint (to_print, prefix_bytes);
-	      colored_stat_end ();
-	    }
-#endif
+	  if (path_isdir (new_full_pathname))
+	    extension_char = '/';
 
 	  xfree (new_full_pathname);
 	  to_print[-1] = c;
@@ -1007,18 +880,8 @@ print_filename (to_print, full_pathname, prefix_bytes)
 	    extension_char = stat_char (s);
 	  else
 #endif
-	    if (_rl_complete_mark_directories && path_isdir (s))
+	    if (path_isdir (s))
 	      extension_char = '/';
-
-#if defined (COLOR_SUPPORT)
-	  if (_rl_colored_stats)
-	    {
-	      colored_stat_start (s);
-	      printed_len = fnprint (to_print, prefix_bytes);
-	      colored_stat_end ();
-	    }
-#endif
-
 	}
 
       xfree (s);
@@ -1213,13 +1076,10 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
      variable rl_attempted_completion_function. */
   if (rl_attempted_completion_function)
     {
+      _rl_interrupt_immediately++;
       matches = (*rl_attempted_completion_function) (text, start, end);
-      if (RL_SIG_RECEIVED())
-	{
-	  _rl_free_match_list (matches);
-	  matches = 0;
-	  RL_CHECK_SIGNALS ();
-	}
+      if (_rl_interrupt_immediately > 0)
+	_rl_interrupt_immediately--;
 
       if (matches || rl_attempted_completion_over)
 	{
@@ -1230,15 +1090,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_[...]

[diff truncated at 100000 bytes]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]