+++ /dev/null
-Submitted By: William Harrington (kb0iic at cross-lfs dot org)
-Date: 2012-11-01
-Initial Package Version: 6.2
-Origin: Upstream
-Upstream Status: Applied
-Description: Contains all upstream patches up to 6.2-004
-
-diff -Naur readline-6.2.orig/callback.c readline-6.2/callback.c
---- readline-6.2.orig/callback.c 2010-06-06 16:18:58.000000000 +0000
-+++ readline-6.2/callback.c 2012-11-01 20:14:01.000000000 +0000
-@@ -148,6 +148,9 @@
- eof = _rl_vi_domove_callback (_rl_vimvcxt);
- /* Should handle everything, including cleanup, numeric arguments,
- and turning off RL_STATE_VIMOTION */
-+ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
-+ _rl_internal_char_cleanup ();
-+
- return;
- }
- #endif
-diff -Naur readline-6.2.orig/input.c readline-6.2/input.c
---- readline-6.2.orig/input.c 2010-05-30 22:33:01.000000000 +0000
-+++ readline-6.2/input.c 2012-11-01 20:14:01.000000000 +0000
-@@ -409,7 +409,7 @@
- int
- rl_read_key ()
- {
-- int c;
-+ int c, r;
-
- rl_key_sequence_length++;
-
-@@ -429,14 +429,18 @@
- {
- while (rl_event_hook)
- {
-- if (rl_gather_tyi () < 0) /* XXX - EIO */
-+ if (rl_get_char (&c) != 0)
-+ break;
-+
-+ if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */
- {
- rl_done = 1;
- return ('\n');
- }
-+ else if (r == 1) /* read something */
-+ continue;
-+
- RL_CHECK_SIGNALS ();
-- if (rl_get_char (&c) != 0)
-- break;
- if (rl_done) /* XXX - experimental */
- return ('\n');
- (*rl_event_hook) ();
-diff -Naur readline-6.2.orig/patchlevel readline-6.2/patchlevel
---- readline-6.2.orig/patchlevel 2010-01-14 15:15:52.000000000 +0000
-+++ readline-6.2/patchlevel 2012-11-01 20:14:01.000000000 +0000
-@@ -1,3 +1,3 @@
- # Do not edit -- exists only for use by patch
-
--1
-+4
-diff -Naur readline-6.2.orig/support/shobj-conf readline-6.2/support/shobj-conf
---- readline-6.2.orig/support/shobj-conf 2009-10-28 13:20:21.000000000 +0000
-+++ readline-6.2/support/shobj-conf 2012-11-01 20:14:01.000000000 +0000
-@@ -157,7 +157,7 @@
- ;;
-
- # Darwin/MacOS X
--darwin[89]*|darwin10*)
-+darwin[89]*|darwin1[012]*)
- SHOBJ_STATUS=supported
- SHLIB_STATUS=supported
-
-@@ -186,7 +186,7 @@
- SHLIB_LIBSUFF='dylib'
-
- case "${host_os}" in
-- darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
-+ darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS=''
- SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
- ;;
- *) SHOBJ_LDFLAGS='-dynamic'
-diff -Naur readline-6.2.orig/vi_mode.c readline-6.2/vi_mode.c
---- readline-6.2.orig/vi_mode.c 2010-11-21 00:51:39.000000000 +0000
-+++ readline-6.2/vi_mode.c 2012-11-01 20:14:01.000000000 +0000
-@@ -1114,7 +1114,7 @@
- rl_beg_of_line (1, c);
- _rl_vi_last_motion = c;
- RL_UNSETSTATE (RL_STATE_VIMOTION);
-- return (0);
-+ return (vidomove_dispatch (m));
- }
- #if defined (READLINE_CALLBACKS)
- /* XXX - these need to handle rl_universal_argument bindings */
-@@ -1234,11 +1234,19 @@
- _rl_vimvcxt->motion = '$';
- r = rl_domove_motion_callback (_rl_vimvcxt);
- }
-- else if (vi_redoing)
-+ else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
- {
- _rl_vimvcxt->motion = _rl_vi_last_motion;
- r = rl_domove_motion_callback (_rl_vimvcxt);
- }
-+ else if (vi_redoing) /* handle redoing `dd' here */
-+ {
-+ _rl_vimvcxt->motion = _rl_vi_last_motion;
-+ rl_mark = rl_end;
-+ rl_beg_of_line (1, key);
-+ RL_UNSETSTATE (RL_STATE_VIMOTION);
-+ r = vidomove_dispatch (_rl_vimvcxt);
-+ }
- #if defined (READLINE_CALLBACKS)
- else if (RL_ISSTATE (RL_STATE_CALLBACK))
- {
-@@ -1316,11 +1324,19 @@
- _rl_vimvcxt->motion = '$';
- r = rl_domove_motion_callback (_rl_vimvcxt);
- }
-- else if (vi_redoing)
-+ else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
- {
- _rl_vimvcxt->motion = _rl_vi_last_motion;
- r = rl_domove_motion_callback (_rl_vimvcxt);
- }
-+ else if (vi_redoing) /* handle redoing `cc' here */
-+ {
-+ _rl_vimvcxt->motion = _rl_vi_last_motion;
-+ rl_mark = rl_end;
-+ rl_beg_of_line (1, key);
-+ RL_UNSETSTATE (RL_STATE_VIMOTION);
-+ r = vidomove_dispatch (_rl_vimvcxt);
-+ }
- #if defined (READLINE_CALLBACKS)
- else if (RL_ISSTATE (RL_STATE_CALLBACK))
- {
-@@ -1377,6 +1393,19 @@
- _rl_vimvcxt->motion = '$';
- r = rl_domove_motion_callback (_rl_vimvcxt);
- }
-+ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
-+ {
-+ _rl_vimvcxt->motion = _rl_vi_last_motion;
-+ r = rl_domove_motion_callback (_rl_vimvcxt);
-+ }
-+ else if (vi_redoing) /* handle redoing `yy' here */
-+ {
-+ _rl_vimvcxt->motion = _rl_vi_last_motion;
-+ rl_mark = rl_end;
-+ rl_beg_of_line (1, key);
-+ RL_UNSETSTATE (RL_STATE_VIMOTION);
-+ r = vidomove_dispatch (_rl_vimvcxt);
-+ }
- #if defined (READLINE_CALLBACKS)
- else if (RL_ISSTATE (RL_STATE_CALLBACK))
- {
--- /dev/null
+Submitted By: Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
+Updated By: Armin K. <krejzi at email dot com>
+Date: 2014-10-04
+Initial Package Version: 6.3
+Upstream Status: Already in upstream patch repo
+Origin: Upstream
+Description: This patch contains upstream patch numbers 001 through 008.
+
+--- a/display.c 2013-12-27 19:10:56.000000000 +0100
++++ b/display.c 2014-10-04 21:30:27.039621661 +0200
+@@ -1637,7 +1637,7 @@
+ /* If we are changing the number of invisible characters in a line, and
+ the spot of first difference is before the end of the invisible chars,
+ lendiff needs to be adjusted. */
+- if (current_line == 0 && !_rl_horizontal_scroll_mode &&
++ if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */
+ current_invis_chars != visible_wrap_offset)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+@@ -1825,8 +1825,13 @@
+ else
+ _rl_last_c_pos += bytes_to_insert;
+
++ /* XXX - we only want to do this if we are at the end of the line
++ so we move there with _rl_move_cursor_relative */
+ if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new)))
+- goto clear_rest_of_line;
++ {
++ _rl_move_cursor_relative (ne-new, new);
++ goto clear_rest_of_line;
++ }
+ }
+ }
+ /* Otherwise, print over the existing material. */
+@@ -2677,7 +2682,8 @@
+ {
+ if (_rl_echoing_p)
+ {
+- _rl_move_vert (_rl_vis_botlin);
++ if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */
++ _rl_move_vert (_rl_vis_botlin);
+ _rl_vis_botlin = 0;
+ fflush (rl_outstream);
+ rl_restart_output (1, 0);
+--- a/input.c 2014-01-10 21:07:08.000000000 +0100
++++ b/input.c 2014-10-04 21:30:27.347630462 +0200
+@@ -534,8 +534,16 @@
+ return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
+ else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
+ return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
++ /* keyboard-generated signals of interest */
+ else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
+ RL_CHECK_SIGNALS ();
++ /* non-keyboard-generated signals of interest */
++ else if (_rl_caught_signal == SIGALRM
++#if defined (SIGVTALRM)
++ || _rl_caught_signal == SIGVTALRM
++#endif
++ )
++ RL_CHECK_SIGNALS ();
+
+ if (rl_signal_event_hook)
+ (*rl_signal_event_hook) ();
+--- a/misc.c 2012-09-02 00:03:11.000000000 +0200
++++ b/misc.c 2014-10-04 21:30:27.625638402 +0200
+@@ -461,6 +461,7 @@
+ saved_undo_list = 0;
+ /* Set up rl_line_buffer and other variables from history entry */
+ rl_replace_from_history (entry, 0); /* entry->line is now current */
++ entry->data = 0; /* entry->data is now current undo list */
+ /* Undo all changes to this history entry */
+ while (rl_undo_list)
+ rl_do_undo ();
+@@ -468,7 +469,6 @@
+ the timestamp. */
+ FREE (entry->line);
+ entry->line = savestring (rl_line_buffer);
+- entry->data = 0;
+ }
+ entry = previous_history ();
+ }
+--- a/patchlevel 2013-11-15 14:11:11.000000000 +0100
++++ b/patchlevel 2014-10-04 21:30:27.625638402 +0200
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+
+-5
++8
+--- a/readline.c 2013-10-28 19:58:06.000000000 +0100
++++ b/readline.c 2014-10-04 21:30:25.951590557 +0200
+@@ -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
+--- a/rltypedefs.h 2011-03-26 19:53:31.000000000 +0100
++++ b/rltypedefs.h 2014-10-04 21:30:26.747613312 +0200
+@@ -26,6 +26,25 @@
+ extern "C" {
+ #endif
+
++/* Old-style, attempt to mark as deprecated in some way people will notice. */
++
++#if !defined (_FUNCTION_DEF)
++# define _FUNCTION_DEF
++
++#if defined(__GNUC__) || defined(__clang__)
++typedef int Function () __attribute__ ((deprecated));
++typedef void VFunction () __attribute__ ((deprecated));
++typedef char *CPFunction () __attribute__ ((deprecated));
++typedef char **CPPFunction () __attribute__ ((deprecated));
++#else
++typedef int Function ();
++typedef void VFunction ();
++typedef char *CPFunction ();
++typedef char **CPPFunction ();
++#endif
++
++#endif /* _FUNCTION_DEF */
++
+ /* New style. */
+
+ #if !defined (_RL_FUNCTION_TYPEDEF)
+--- a/util.c 2013-09-02 19:36:12.000000000 +0200
++++ b/util.c 2014-10-04 21:30:26.206597848 +0200
+@@ -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)