Rebase to Readline-7.0

Resolves: #1376611
This commit is contained in:
Siteshwar Vashisht 2017-01-12 16:15:05 +01:00
parent e0375b7905
commit 83c701e5ef
6 changed files with 9 additions and 159 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/readline-6.3.tar.gz
/readline-7.0.tar.gz

View File

@ -1,24 +0,0 @@
diff -up ./complete.c.old ./complete.c
--- ./complete.c.old 2012-01-11 14:26:23.610354454 +0100
+++ ./complete.c 2012-01-11 14:31:44.073348115 +0100
@@ -485,7 +485,7 @@ get_y_or_n (for_pager)
driven functions. Have to wait until next major version to add new
state definition, since it will change value of RL_STATE_DONE. */
#if defined (READLINE_CALLBACKS)
- if (RL_ISSTATE (RL_STATE_CALLBACK))
+ if (RL_ISSTATE (RL_STATE_CALLBACK) && (! RL_ISSTATE (RL_STATE_FEDORA_GDB)))
return 1;
#endif
diff -up ./readline.h.old ./readline.h
--- ./readline.h.old 2012-01-11 14:25:55.049711510 +0100
+++ ./readline.h 2012-01-11 14:28:22.854863691 +0100
@@ -840,6 +840,8 @@ extern int rl_inhibit_completion;
#define RL_STATE_DONE 0x1000000 /* done; accepted line */
+#define RL_STATE_FEDORA_GDB 0x2000000 /* exception for fedora gdb */
+
#define RL_SETSTATE(x) (rl_readline_state |= (x))
#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
#define RL_ISSTATE(x) (rl_readline_state & (x))

View File

@ -1,18 +1,13 @@
Summary: A library for editing typed command lines
Name: readline
Version: 6.3
Release: 8%{?dist}
Version: 7.0
Release: 1%{?dist}
License: GPLv3+
URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz
Patch5: readline6.3-upstream-patches1-6.patch
# add workaround for problem in gdb
# in new version of readline needs to be deleted
# bz701131
Patch8: readline-6.2-gdb.patch
# fix file permissions, remove RPATH, use CFLAGS
Patch9: readline-6.2-shlib.patch
Patch1: readline-7.0-shlib.patch
Requires(post): info
Requires(preun): info
@ -106,6 +101,10 @@ fi
%{_libdir}/libhistory.a
%changelog
* Thu Jan 12 2017 Siteshwar Vashisht <svashisht@redhat.com> - 7.0-1
- Rebase to Readline-7.0
Resolves: #1376611
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1,126 +0,0 @@
From 549b257cc32325658360b2e349dfc9cadc33ff80 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Mon, 21 Jul 2014 14:40:03 +0200
Subject: [PATCH] upstream
---
display.c | 10 ++++++++--
readline.c | 6 ++++--
rltypedefs.h | 19 +++++++++++++++++++
util.c | 3 ++-
4 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/display.c b/display.c
index 913e0da..10a7b81 100644
--- a/display.c
+++ b/display.c
@@ -1637,7 +1637,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* 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 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
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,6 +2682,7 @@ _rl_clean_up_for_exit ()
{
if (_rl_echoing_p)
{
+ if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */
_rl_move_vert (_rl_vis_botlin);
_rl_vis_botlin = 0;
fflush (rl_outstream);
diff --git a/readline.c b/readline.c
index 03eefa6..684a589 100644
--- a/readline.c
+++ b/readline.c
@@ -744,7 +744,9 @@ _rl_dispatch_callback (cxt)
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 +966,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
#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 --git a/rltypedefs.h b/rltypedefs.h
index b113ee6..f9f5cd3 100644
--- a/rltypedefs.h
+++ b/rltypedefs.h
@@ -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)
diff --git a/util.c b/util.c
index fa3a667..a8ab81a 100644
--- a/util.c
+++ b/util.c
@@ -476,6 +476,7 @@ _rl_savestring (s)
return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s)));
}
+#if defined (DEBUG)
#if defined (USE_VARARGS)
static FILE *_rl_tracefp;
@@ -538,7 +539,7 @@ _rl_settracefp (fp)
_rl_tracefp = fp;
}
#endif
-
+#endif /* DEBUG */
#if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)
#include <sys/socket.h>
--
1.9.3

View File

@ -1 +1 @@
33c8fb279e981274f485fd91da77e94a readline-6.3.tar.gz
SHA512 (readline-7.0.tar.gz) = 18243189d39bf0d4c8a76cddcce75243c1bae8824c686e9b6ba352667607e5b10c5feb79372a1093c1c388d821841670702e940df12eae94bcebdeed90047870