Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by George Sherwood (e90875f41bf289c0cc4382dc240d8b45eed14df0)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: George Sherwood <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by George Sherwood (e90875f41bf289c0cc4382dc240d8b45eed14df0)
  • Date: Sat, 25 Aug 2007 06:32:12 -0500

GIT changes to master grimoire by George Sherwood <gsherwood AT sourcemage.org>:

libs/readline/DETAILS | 2
libs/readline/HISTORY | 5
libs/readline/PRE_BUILD | 6
libs/readline/readline52-005 | 328
+++++++++++++++++++++++++++++++++++++++++++
libs/readline/readline52-006 | 62 ++++++++
libs/readline/readline52-007 | 65 ++++++++
6 files changed, 466 insertions(+), 2 deletions(-)

New commits:
commit e90875f41bf289c0cc4382dc240d8b45eed14df0
Author: George Sherwood <gsherwood AT sourcemage.org>
Commit: George Sherwood <gsherwood AT sourcemage.org>

readline: Updated with latest upstream patches.

diff --git a/libs/readline/DETAILS b/libs/readline/DETAILS
index c159ac7..c02c048 100755
--- a/libs/readline/DETAILS
+++ b/libs/readline/DETAILS
@@ -12,7 +12,7 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
LICENSE[0]=GPL
WEB_SITE=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
ENTERED=20010922
- PATCHLEVEL=3
+ PATCHLEVEL=4
KEYWORDS="libs"
SHORT="readline lets users edit command lines as they are typed
in."
cat << EOF
diff --git a/libs/readline/HISTORY b/libs/readline/HISTORY
index 784a4d5..148b326 100644
--- a/libs/readline/HISTORY
+++ b/libs/readline/HISTORY
@@ -1,3 +1,8 @@
+2007-08-25 George Sherwood <george AT beernabeer.com>
+ * DETAILS: PATCHLEVEL++
+ * PRE_BUILD: Added patches readline52-005/006/007
+ * readline52-005/006/007: Added upstream patches
+
2007-06-23 George Sherwood <george AT beernabeer.com>
* DETAILS: converted to upstream signature checking.

diff --git a/libs/readline/PRE_BUILD b/libs/readline/PRE_BUILD
index fcdc774..1ad32d3 100755
--- a/libs/readline/PRE_BUILD
+++ b/libs/readline/PRE_BUILD
@@ -4,7 +4,11 @@ cd $SOURCE_DIRECTORY &&
patch -p0 < $SCRIPT_DIRECTORY/readline52-001 &&
patch -p0 < $SCRIPT_DIRECTORY/readline52-002 &&
patch -p0 < $SCRIPT_DIRECTORY/readline52-003 &&
-patch -p0 < $SCRIPT_DIRECTORY/readline52-004
+patch -p0 < $SCRIPT_DIRECTORY/readline52-004 &&
+patch -p0 < $SCRIPT_DIRECTORY/readline52-005 &&
+patch -p0 < $SCRIPT_DIRECTORY/readline52-006 &&
+patch -p0 < $SCRIPT_DIRECTORY/readline52-007
+


# Dynamically link against termcap or ncurses
diff --git a/libs/readline/readline52-005 b/libs/readline/readline52-005
new file mode 100644
index 0000000..d192ac1
--- /dev/null
+++ b/libs/readline/readline52-005
@@ -0,0 +1,328 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 5.2
+Patch-ID: readline52-005
+
+Bug-Reported-by: Thomas Loeber <ifp AT loeber1.de>
+Bug-Reference-ID: <200703082223.08919.ifp AT loeber1.de>
+Bug-Reference-URL:
http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00036.html
+
+Bug-Description:
+
+When rl_read_key returns -1, indicating that readline's controlling terminal
+has been invalidated for some reason (e.g., receiving a SIGHUP), the error
+status was not reported correctly to the caller. This could cause input
+loops.
+
+Patch:
+
+*** ../readline-5.2/complete.c Fri Jul 28 11:35:49 2006
+--- complete.c Tue Mar 13 08:50:16 2007
+***************
+*** 429,433 ****
+ if (c == 'n' || c == 'N' || c == RUBOUT)
+ return (0);
+! if (c == ABORT_CHAR)
+ _rl_abort_internal ();
+ if (for_pager && (c == NEWLINE || c == RETURN))
+--- 440,444 ----
+ if (c == 'n' || c == 'N' || c == RUBOUT)
+ return (0);
+! if (c == ABORT_CHAR || c < 0)
+ _rl_abort_internal ();
+ if (for_pager && (c == NEWLINE || c == RETURN))
+*** ../readline-5.2/input.c Wed Aug 16 15:15:16 2006
+--- input.c Wed May 2 16:07:59 2007
+***************
+*** 514,518 ****
+ int size;
+ {
+! int mb_len = 0;
+ size_t mbchar_bytes_length;
+ wchar_t wc;
+--- 522,526 ----
+ int size;
+ {
+! int mb_len, c;
+ size_t mbchar_bytes_length;
+ wchar_t wc;
+***************
+*** 521,531 ****
+ memset(&ps, 0, sizeof (mbstate_t));
+ memset(&ps_back, 0, sizeof (mbstate_t));
+!
+ while (mb_len < size)
+ {
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+! mbchar[mb_len++] = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps);
+ if (mbchar_bytes_length == (size_t)(-1))
+--- 529,545 ----
+ memset(&ps, 0, sizeof (mbstate_t));
+ memset(&ps_back, 0, sizeof (mbstate_t));
+!
+! mb_len = 0;
+ while (mb_len < size)
+ {
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+! c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
++ if (c < 0)
++ break;
++
++ mbchar[mb_len++] = c;
++
+ mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps);
+ if (mbchar_bytes_length == (size_t)(-1))
+***************
+*** 565,569 ****
+ c = first;
+ memset (mb, 0, mlen);
+! for (i = 0; i < mlen; i++)
+ {
+ mb[i] = (char)c;
+--- 579,583 ----
+ c = first;
+ memset (mb, 0, mlen);
+! for (i = 0; c >= 0 && i < mlen; i++)
+ {
+ mb[i] = (char)c;
+*** ../readline-5.2/isearch.c Mon Dec 26 17:18:53 2005
+--- isearch.c Fri Mar 9 14:30:59 2007
+***************
+*** 328,333 ****
+
+ f = (rl_command_func_t *)NULL;
+!
+! /* Translate the keys we do something with to opcodes. */
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC)
+ {
+--- 328,340 ----
+
+ f = (rl_command_func_t *)NULL;
+!
+! if (c < 0)
+! {
+! cxt->sflags |= SF_FAILED;
+! cxt->history_pos = cxt->last_found_line;
+! return -1;
+! }
+!
+! /* Translate the keys we do something with to opcodes. */
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC)
+ {
+*** ../readline-5.2/misc.c Mon Dec 26 17:20:46 2005
+--- misc.c Fri Mar 9 14:44:11 2007
+***************
+*** 147,150 ****
+--- 147,152 ----
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
++ if (key < 0)
++ return -1;
+ return (_rl_dispatch (key, _rl_keymap));
+ }
+*** ../readline-5.2/readline.c Wed Aug 16 15:00:36 2006
+--- readline.c Fri Mar 9 14:47:24 2007
+***************
+*** 646,649 ****
+--- 669,677 ----
+ {
+ nkey = _rl_subseq_getchar (cxt->okey);
++ if (nkey < 0)
++ {
++ _rl_abort_internal ();
++ return -1;
++ }
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+ cxt->flags |= KSEQ_DISPATCHED;
+*** ../readline-5.2/text.c Fri Jul 28 11:55:27 2006
+--- text.c Sun Mar 25 13:41:38 2007
+***************
+*** 858,861 ****
+--- 864,870 ----
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
++ if (c < 0)
++ return -1;
++
+ #if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+***************
+*** 1521,1524 ****
+--- 1530,1536 ----
+ mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX);
+
++ if (mb_len <= 0)
++ return -1;
++
+ if (count < 0)
+ return (_rl_char_search_internal (-count, bdir, mbchar, mb_len));
+***************
+*** 1537,1540 ****
+--- 1549,1555 ----
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
++ if (c < 0)
++ return -1;
++
+ if (count < 0)
+ return (_rl_char_search_internal (-count, bdir, c));
+*** ../readline-5.2/vi_mode.c Sat Jul 29 16:42:28 2006
+--- vi_mode.c Fri Mar 9 15:02:11 2007
+***************
+*** 887,890 ****
+--- 887,897 ----
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
++
++ if (c < 0)
++ {
++ *nextkey = 0;
++ return -1;
++ }
++
+ *nextkey = c;
+
+***************
+*** 903,906 ****
+--- 910,918 ----
+ c = rl_read_key (); /* real command */
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
++ if (c < 0)
++ {
++ *nextkey = 0;
++ return -1;
++ }
+ *nextkey = c;
+ }
+***************
+*** 1225,1236 ****
+ _rl_callback_generic_arg *data;
+ {
+ #if defined (HANDLE_MULTIBYTE)
+! _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar,
MB_LEN_MAX);
+ #else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+! _rl_vi_last_search_char = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ #endif
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+--- 1243,1262 ----
+ _rl_callback_generic_arg *data;
+ {
++ int c;
+ #if defined (HANDLE_MULTIBYTE)
+! c = _rl_vi_last_search_mblen = _rl_read_mbchar
(_rl_vi_last_search_mbchar, MB_LEN_MAX);
+ #else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+! c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ #endif
+
++ if (c <= 0)
++ return -1;
++
++ #if !defined (HANDLE_MULTIBYTE)
++ _rl_vi_last_search_char = c;
++ #endif
++
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+***************
+*** 1248,1251 ****
+--- 1274,1278 ----
+ int count, key;
+ {
++ int c;
+ #if defined (HANDLE_MULTIBYTE)
+ static char *target;
+***************
+*** 1294,1302 ****
+ {
+ #if defined (HANDLE_MULTIBYTE)
+! _rl_vi_last_search_mblen = _rl_read_mbchar
(_rl_vi_last_search_mbchar, MB_LEN_MAX);
+ #else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+! _rl_vi_last_search_char = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ #endif
+ }
+--- 1321,1335 ----
+ {
+ #if defined (HANDLE_MULTIBYTE)
+! c = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+! if (c <= 0)
+! return -1;
+! _rl_vi_last_search_mblen = c;
+ #else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+! c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
++ if (c < 0)
++ return -1;
++ _rl_vi_last_search_char = c;
+ #endif
+ }
+***************
+*** 1468,1471 ****
+--- 1501,1507 ----
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
++ if (c < 0)
++ return -1;
++
+ #if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+***************
+*** 1486,1489 ****
+--- 1522,1528 ----
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
++ if (c < 0)
++ return -1;
++
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+***************
+*** 1517,1520 ****
+--- 1556,1562 ----
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
++ if (c < 0)
++ return -1;
++
+ return (_rl_vi_change_char (count, c, mb));
+ }
+***************
+*** 1651,1655 ****
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+! if (ch < 'a' || ch > 'z')
+ {
+ rl_ding ();
+--- 1693,1697 ----
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+! if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0
explicit */
+ {
+ rl_ding ();
+***************
+*** 1703,1707 ****
+ return 0;
+ }
+! else if (ch < 'a' || ch > 'z')
+ {
+ rl_ding ();
+--- 1745,1749 ----
+ return 0;
+ }
+! else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0
explicit */
+ {
+ rl_ding ();
diff --git a/libs/readline/readline52-006 b/libs/readline/readline52-006
new file mode 100644
index 0000000..d739143
--- /dev/null
+++ b/libs/readline/readline52-006
@@ -0,0 +1,62 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 5.2
+Patch-ID: readline52-006
+
+Bug-Reported-by: Peter Volkov <torre_cremata AT mail.ru>
+Bug-Reference-ID: <1178376645.9063.25.camel@localhost>
+Bug-Reference-URL: http://bugs.gentoo.org/177095
+
+Bug-Description:
+
+The readline display code miscalculated the screen position when performing
+a redisplay in which the new text occupies more screen space that the old,
+but takes fewer bytes to do so (e.g., when replacing a shorter string
+containing multibyte characters with a longer one containing only ASCII).
+
+Patch:
+
+*** ../readline-5.2/display.c Thu Apr 26 11:38:22 2007
+--- display.c Thu Jul 12 23:10:10 2007
+***************
+*** 1519,1527 ****
+ /* Non-zero if we're increasing the number of lines. */
+ int gl = current_line >= _rl_vis_botlin && inv_botlin >
_rl_vis_botlin;
+ /* Sometimes it is cheaper to print the characters rather than
+ use the terminal's capabilities. If we're growing the number
+ of lines, make sure we actually cause the new line to wrap
+ around on auto-wrapping terminals. */
+! if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff ||
_rl_term_IC) && (!_rl_term_autowrap || !gl))
+ {
+ /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and
+--- 1568,1596 ----
+ /* Non-zero if we're increasing the number of lines. */
+ int gl = current_line >= _rl_vis_botlin && inv_botlin >
_rl_vis_botlin;
++ /* If col_lendiff is > 0, implying that the new string takes up more
++ screen real estate than the old, but lendiff is < 0, meaning that it
++ takes fewer bytes, we need to just output the characters starting
++ from the first difference. These will overwrite what is on the
++ display, so there's no reason to do a smart update. This can really
++ only happen in a multibyte environment. */
++ if (lendiff < 0)
++ {
++ _rl_output_some_chars (nfd, temp);
++ _rl_last_c_pos += _rl_col_width (nfd, 0, temp);
++ /* If nfd begins before any invisible characters in the prompt,
++ adjust _rl_last_c_pos to account for wrap_offset and set
++ cpos_adjusted to let the caller know. */
++ if (current_line == 0 && wrap_offset && ((nfd - new) <=
prompt_last_invisible))
++ {
++ _rl_last_c_pos -= wrap_offset;
++ cpos_adjusted = 1;
++ }
++ return;
++ }
+ /* Sometimes it is cheaper to print the characters rather than
+ use the terminal's capabilities. If we're growing the number
+ of lines, make sure we actually cause the new line to wrap
+ around on auto-wrapping terminals. */
+! else if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff
|| _rl_term_IC) && (!_rl_term_autowrap || !gl))
+ {
+ /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and
diff --git a/libs/readline/readline52-007 b/libs/readline/readline52-007
new file mode 100644
index 0000000..f75f53f
--- /dev/null
+++ b/libs/readline/readline52-007
@@ -0,0 +1,65 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 5.2
+Patch-ID: readline52-007
+
+Bug-Reported-by: Tom Bjorkholm <tom.bjorkholm AT ericsson.com>
+Bug-Reference-ID:
<AEA1A32F001C6B4F98614B5B80D7647D01C075E9 AT esealmw115.eemea.ericsson.se>
+Bug-Reference-URL:
http://lists.gnu.org/archive/html/bug-readline/2007-04/msg00004.html
+
+
+Bug-Description:
+
+An off-by-one error in readline's input buffering caused readline to drop
+each 511th character of buffered input (e.g., when pasting a large amount
+of data into a terminal window).
+
+Patch:
+
+*** ../readline-5.2/input.c Wed Aug 16 15:15:16 2006
+--- input.c Tue Jul 17 09:24:21 2007
+***************
+*** 134,139 ****
+
+ *key = ibuffer[pop_index++];
+!
+ if (pop_index >= ibuffer_len)
+ pop_index = 0;
+
+--- 134,142 ----
+
+ *key = ibuffer[pop_index++];
+! #if 0
+ if (pop_index >= ibuffer_len)
++ #else
++ if (pop_index > ibuffer_len)
++ #endif
+ pop_index = 0;
+
+***************
+*** 251,255 ****
+ {
+ k = (*rl_getc_function) (rl_instream);
+! rl_stuff_char (k);
+ if (k == NEWLINE || k == RETURN)
+ break;
+--- 254,259 ----
+ {
+ k = (*rl_getc_function) (rl_instream);
+! if (rl_stuff_char (k) == 0)
+! break; /* some problem; no more room */
+ if (k == NEWLINE || k == RETURN)
+ break;
+***************
+*** 374,378 ****
+--- 378,386 ----
+ }
+ ibuffer[push_index++] = key;
++ #if 0
+ if (push_index >= ibuffer_len)
++ #else
++ if (push_index > ibuffer_len)
++ #endif
+ push_index = 0;
+



  • [SM-Commit] GIT changes to master grimoire by George Sherwood (e90875f41bf289c0cc4382dc240d8b45eed14df0), George Sherwood, 08/25/2007

Archive powered by MHonArc 2.6.24.

Top of Page