source: scripts/patches/readline-5.1-fixes-2.patch@ 2a5b875

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 2a5b875 was 46f79ff, checked in by Jim Gifford <clfs@…>, 19 years ago

r2511@server (orig r1250): ryan | 2006-03-10 02:08:45 -0800

r1300@rei: lfs | 2006-03-09 18:59:02 +1100
Add readline-5.1-fixes-2.patch
------------------------------
Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2006-02-06
Initial Package Version: 5.1
Origin: Upstream
Upstream Status: Applied
Description: Contains Patch 001-002 from Upstream



  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[46f79ff]1Submitted By: Jim Gifford (patches at jg555 dot com)
2Date: 2006-02-06
3Initial Package Version: 5.1
4Origin: Upstream
5Upstream Status: Applied
6Description: Contains Patch 001-002 from Upstream
7
8diff -Naur readline-5.1.orig/readline.c readline-5.1/readline.c
9--- readline-5.1.orig/readline.c 2005-07-05 02:29:35.000000000 +0000
10+++ readline-5.1/readline.c 2006-02-06 22:23:31.000000000 +0000
11@@ -714,7 +714,7 @@
12
13 rl_dispatching = 1;
14 RL_SETSTATE(RL_STATE_DISPATCHING);
15- r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
16+ (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
17 RL_UNSETSTATE(RL_STATE_DISPATCHING);
18 rl_dispatching = 0;
19
20diff -Naur readline-5.1.orig/terminal.c readline-5.1/terminal.c
21--- readline-5.1.orig/terminal.c 2005-11-13 01:46:54.000000000 +0000
22+++ readline-5.1/terminal.c 2006-02-06 22:24:54.000000000 +0000
23@@ -122,7 +122,7 @@
24 static char *_rl_visible_bell;
25
26 /* Non-zero means the terminal can auto-wrap lines. */
27-int _rl_term_autowrap;
28+int _rl_term_autowrap = -1;
29
30 /* Non-zero means that this terminal has a meta key. */
31 static int term_has_meta;
32@@ -274,6 +274,9 @@
33 _rl_set_screen_size (rows, cols)
34 int rows, cols;
35 {
36+ if (_rl_term_autowrap == -1)
37+ _rl_init_terminal_io (rl_terminal_name);
38+
39 if (rows > 0)
40 _rl_screenheight = rows;
41 if (cols > 0)
42diff -Naur readline-5.1.orig/text.c readline-5.1/text.c
43--- readline-5.1.orig/text.c 2005-09-24 23:06:07.000000000 +0000
44+++ readline-5.1/text.c 2006-02-06 22:23:31.000000000 +0000
45@@ -1071,8 +1071,6 @@
46 rl_delete (count, key)
47 int count, key;
48 {
49- int r;
50-
51 if (count < 0)
52 return (_rl_rubout_char (-count, key));
53
54@@ -1090,17 +1088,17 @@
55 else
56 rl_forward_byte (count, key);
57
58- r = rl_kill_text (orig_point, rl_point);
59+ rl_kill_text (orig_point, rl_point);
60 rl_point = orig_point;
61- return r;
62 }
63 else
64 {
65 int new_point;
66
67 new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
68- return (rl_delete_text (rl_point, new_point));
69+ rl_delete_text (rl_point, new_point);
70 }
71+ return 0;
72 }
73
74 /* Delete the character under the cursor, unless the insertion
Note: See TracBrowser for help on using the repository browser.