Submitted By: William Harrington (kb0iic at cross-lfs dot org)
Date: 03-30-2014
Initial Package Version: 6.3
Origin: Upstream
Upstream Status: Applied
Description: Contains all upstream patches up to 6.3-003

diff -Naur readline-6.3.orig/patchlevel readline-6.3/patchlevel
--- readline-6.3.orig/patchlevel	2013-11-15 07:11:11.000000000 -0600
+++ readline-6.3/patchlevel	2014-03-30 08:39:43.456378551 -0500
@@ -1,3 +1,3 @@
 # Do not edit -- exists only for use by patch
 
-5
+3
diff -Naur readline-6.3.orig/readline.c readline-6.3/readline.c
--- readline-6.3.orig/readline.c	2013-10-28 13:58:06.000000000 -0500
+++ readline-6.3/readline.c	2014-03-30 08:39:41.509650434 -0500
@@ -744,7 +744,8 @@
     r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
 
   RL_CHECK_SIGNALS ();
-  if (r == 0)			/* success! */
+  /* We only treat values < 0 specially to simulate recursion. */
+  if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0))	/* success! or failure! */
     {
       _rl_keyseq_chain_dispose ();
       RL_UNSETSTATE (RL_STATE_MULTIKEY);
@@ -964,7 +965,7 @@
 #if defined (VI_MODE)
   if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
       key != ANYOTHERKEY &&
-      rl_key_sequence_length == 1 &&	/* XXX */
+      _rl_dispatching_keymap == vi_movement_keymap &&
       _rl_vi_textmod_command (key))
     _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
 #endif
diff -Naur readline-6.3.orig/util.c readline-6.3/util.c
--- readline-6.3.orig/util.c	2013-09-02 12:36:12.000000000 -0500
+++ readline-6.3/util.c	2014-03-30 08:39:43.456378551 -0500
@@ -476,6 +476,7 @@
   return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s)));
 }
 
+#if defined (DEBUG)
 #if defined (USE_VARARGS)
 static FILE *_rl_tracefp;
 
@@ -538,6 +539,7 @@
   _rl_tracefp = fp;
 }
 #endif
+#endif /* DEBUG */
 
 
 #if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)
