wok-6.x view readline/stuff/readline-6.3-upstream_fixes-3.patch @ rev 22742

updated dstat (0.7.3 -> 0.7.4)
author Hans-G?nter Theisgen
date Fri Jan 24 08:08:29 2020 +0100 (2020-01-24)
parents
children
line source
1 Submitted By: Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
2 Updated By: Armin K. <krejzi at email dot com>
3 Date: 2014-10-04
4 Initial Package Version: 6.3
5 Upstream Status: Already in upstream patch repo
6 Origin: Upstream
7 Description: This patch contains upstream patch numbers 001 through 008.
9 --- a/display.c 2013-12-27 19:10:56.000000000 +0100
10 +++ b/display.c 2014-10-04 21:30:27.039621661 +0200
11 @@ -1637,7 +1637,7 @@
12 /* If we are changing the number of invisible characters in a line, and
13 the spot of first difference is before the end of the invisible chars,
14 lendiff needs to be adjusted. */
15 - if (current_line == 0 && !_rl_horizontal_scroll_mode &&
16 + if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */
17 current_invis_chars != visible_wrap_offset)
18 {
19 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
20 @@ -1825,8 +1825,13 @@
21 else
22 _rl_last_c_pos += bytes_to_insert;
24 + /* XXX - we only want to do this if we are at the end of the line
25 + so we move there with _rl_move_cursor_relative */
26 if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new)))
27 - goto clear_rest_of_line;
28 + {
29 + _rl_move_cursor_relative (ne-new, new);
30 + goto clear_rest_of_line;
31 + }
32 }
33 }
34 /* Otherwise, print over the existing material. */
35 @@ -2677,7 +2682,8 @@
36 {
37 if (_rl_echoing_p)
38 {
39 - _rl_move_vert (_rl_vis_botlin);
40 + if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */
41 + _rl_move_vert (_rl_vis_botlin);
42 _rl_vis_botlin = 0;
43 fflush (rl_outstream);
44 rl_restart_output (1, 0);
45 --- a/input.c 2014-01-10 21:07:08.000000000 +0100
46 +++ b/input.c 2014-10-04 21:30:27.347630462 +0200
47 @@ -534,8 +534,16 @@
48 return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
49 else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
50 return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
51 + /* keyboard-generated signals of interest */
52 else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
53 RL_CHECK_SIGNALS ();
54 + /* non-keyboard-generated signals of interest */
55 + else if (_rl_caught_signal == SIGALRM
56 +#if defined (SIGVTALRM)
57 + || _rl_caught_signal == SIGVTALRM
58 +#endif
59 + )
60 + RL_CHECK_SIGNALS ();
62 if (rl_signal_event_hook)
63 (*rl_signal_event_hook) ();
64 --- a/misc.c 2012-09-02 00:03:11.000000000 +0200
65 +++ b/misc.c 2014-10-04 21:30:27.625638402 +0200
66 @@ -461,6 +461,7 @@
67 saved_undo_list = 0;
68 /* Set up rl_line_buffer and other variables from history entry */
69 rl_replace_from_history (entry, 0); /* entry->line is now current */
70 + entry->data = 0; /* entry->data is now current undo list */
71 /* Undo all changes to this history entry */
72 while (rl_undo_list)
73 rl_do_undo ();
74 @@ -468,7 +469,6 @@
75 the timestamp. */
76 FREE (entry->line);
77 entry->line = savestring (rl_line_buffer);
78 - entry->data = 0;
79 }
80 entry = previous_history ();
81 }
82 --- a/patchlevel 2013-11-15 14:11:11.000000000 +0100
83 +++ b/patchlevel 2014-10-04 21:30:27.625638402 +0200
84 @@ -1,3 +1,3 @@
85 # Do not edit -- exists only for use by patch
87 -5
88 +8
89 --- a/readline.c 2013-10-28 19:58:06.000000000 +0100
90 +++ b/readline.c 2014-10-04 21:30:25.951590557 +0200
91 @@ -744,7 +744,8 @@
92 r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
94 RL_CHECK_SIGNALS ();
95 - if (r == 0) /* success! */
96 + /* We only treat values < 0 specially to simulate recursion. */
97 + if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
98 {
99 _rl_keyseq_chain_dispose ();
100 RL_UNSETSTATE (RL_STATE_MULTIKEY);
101 @@ -964,7 +965,7 @@
102 #if defined (VI_MODE)
103 if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
104 key != ANYOTHERKEY &&
105 - rl_key_sequence_length == 1 && /* XXX */
106 + _rl_dispatching_keymap == vi_movement_keymap &&
107 _rl_vi_textmod_command (key))
108 _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
109 #endif
110 --- a/rltypedefs.h 2011-03-26 19:53:31.000000000 +0100
111 +++ b/rltypedefs.h 2014-10-04 21:30:26.747613312 +0200
112 @@ -26,6 +26,25 @@
113 extern "C" {
114 #endif
116 +/* Old-style, attempt to mark as deprecated in some way people will notice. */
117 +
118 +#if !defined (_FUNCTION_DEF)
119 +# define _FUNCTION_DEF
120 +
121 +#if defined(__GNUC__) || defined(__clang__)
122 +typedef int Function () __attribute__ ((deprecated));
123 +typedef void VFunction () __attribute__ ((deprecated));
124 +typedef char *CPFunction () __attribute__ ((deprecated));
125 +typedef char **CPPFunction () __attribute__ ((deprecated));
126 +#else
127 +typedef int Function ();
128 +typedef void VFunction ();
129 +typedef char *CPFunction ();
130 +typedef char **CPPFunction ();
131 +#endif
132 +
133 +#endif /* _FUNCTION_DEF */
134 +
135 /* New style. */
137 #if !defined (_RL_FUNCTION_TYPEDEF)
138 --- a/util.c 2013-09-02 19:36:12.000000000 +0200
139 +++ b/util.c 2014-10-04 21:30:26.206597848 +0200
140 @@ -476,6 +476,7 @@
141 return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s)));
142 }
144 +#if defined (DEBUG)
145 #if defined (USE_VARARGS)
146 static FILE *_rl_tracefp;
148 @@ -538,6 +539,7 @@
149 _rl_tracefp = fp;
150 }
151 #endif
152 +#endif /* DEBUG */
155 #if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)