rpms/readline/devel readline-5.2-008.patch, NONE, 1.1 readline-5.2-009.patch, NONE, 1.1 readline-5.2-010.patch, NONE, 1.1 readline-5.2-011.patch, NONE, 1.1 readline.spec, 1.36, 1.37 readline-5.2-inv.patch, 1.1, NONE

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Thu Jan 3 17:18:10 UTC 2008


Author: mlichvar

Update of /cvs/pkgs/rpms/readline/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31203

Modified Files:
	readline.spec 
Added Files:
	readline-5.2-008.patch readline-5.2-009.patch 
	readline-5.2-010.patch readline-5.2-011.patch 
Removed Files:
	readline-5.2-inv.patch 
Log Message:
- include upstream patches 008-011


readline-5.2-008.patch:

--- NEW FILE readline-5.2-008.patch ---
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 5.2
Patch-ID: readline52-008

Bug-Reported-by:	dAniel hAhler <ubuntu at thequod.de>
Bug-Reference-ID:	<4702ED8A.5000503 at thequod.de>
Bug-Reference-URL:	https://bugs.launchpad.net/ubuntu/+source/bash/+bug/119938

Bug-Description:

When updating the display after displaying, for instance, a list of possible
completions, readline will place the cursor at the wrong position if the
prompt contains invisible characters and a newline.

Patch:

*** ../readline-5.2-patched/display.c	Mon Aug  6 14:26:29 2007
--- display.c	Wed Oct 10 22:43:58 2007
***************
*** 1049,1053 ****
  	      else
  		tx = nleft;
! 	      if (_rl_last_c_pos > tx)
  		{
  	          _rl_backspace (_rl_last_c_pos - tx);	/* XXX */
--- 1049,1053 ----
  	      else
  		tx = nleft;
! 	      if (tx >= 0 && _rl_last_c_pos > tx)
  		{
  	          _rl_backspace (_rl_last_c_pos - tx);	/* XXX */
***************
*** 1205,1209 ****
  {
    register char *ofd, *ols, *oe, *nfd, *nls, *ne;
!   int temp, lendiff, wsatend, od, nd;
    int current_invis_chars;
    int col_lendiff, col_temp;
--- 1205,1209 ----
  {
    register char *ofd, *ols, *oe, *nfd, *nls, *ne;
!   int temp, lendiff, wsatend, od, nd, o_cpos;
    int current_invis_chars;
    int col_lendiff, col_temp;
***************
*** 1466,1469 ****
--- 1466,1471 ----
      }
  
+   o_cpos = _rl_last_c_pos;
+ 
    /* When this function returns, _rl_last_c_pos is correct, and an absolute
       cursor postion in multibyte mode, but a buffer index when not in a
***************
*** 1475,1479 ****
       invisible characters in the prompt string.  Let's see if setting this when
       we make sure we're at the end of the drawn prompt string works. */
!   if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars)
      cpos_adjusted = 1;
  #endif
--- 1477,1483 ----
       invisible characters in the prompt string.  Let's see if setting this when
       we make sure we're at the end of the drawn prompt string works. */
!   if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && 
!       (_rl_last_c_pos > 0 || o_cpos > 0) &&
!       _rl_last_c_pos == prompt_physical_chars)
      cpos_adjusted = 1;
  #endif

readline-5.2-009.patch:

--- NEW FILE readline-5.2-009.patch ---
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 5.2
Patch-ID: readline52-009

Bug-Reported-by:	dAniel hAhler <ubuntu at thequod.de>
Bug-Reference-ID:
Bug-Reference-URL:

Bug-Description:

Under some circumstances, readline will incorrectly display a prompt string
containing invisible characters after the final newline.

Patch:

*** ../readline-5.2-patched/display.c	2007-08-25 13:47:08.000000000 -0400
--- display.c	2007-11-10 17:51:29.000000000 -0500
***************
*** 392,396 ****
        local_prompt = expand_prompt (p, &prompt_visible_length,
  				       &prompt_last_invisible,
! 				       (int *)NULL,
  				       &prompt_physical_chars);
        c = *t; *t = '\0';
--- 420,424 ----
        local_prompt = expand_prompt (p, &prompt_visible_length,
  				       &prompt_last_invisible,
! 				       &prompt_invis_chars_first_line,
  				       &prompt_physical_chars);
        c = *t; *t = '\0';
***************
*** 399,403 ****
        local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
  						   (int *)NULL,
! 						   &prompt_invis_chars_first_line,
  						   (int *)NULL);
        *t = c;
--- 427,431 ----
        local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
  						   (int *)NULL,
! 						   (int *)NULL,
  						   (int *)NULL);
        *t = c;

readline-5.2-010.patch:

--- NEW FILE readline-5.2-010.patch ---
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 5.2
Patch-ID: readline52-010

Bug-Reported-by:	Miroslav Lichvar <mlichvar at redhat.com>
Bug-Reference-ID:	Fri, 02 Nov 2007 14:07:45 +0100
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-readline/2007-11/msg00000.html

Bug-Description:

In certain cases when outputting characters at the end of the line,
e.g., when displaying the prompt string, readline positions the cursor
incorrectly if the prompt string contains invisible characters and the
text being drawn begins before the last invisible character in the line.

Patch:

*** ../readline-5.2-patched/display.c	2007-08-25 13:47:08.000000000 -0400
--- display.c	2007-11-10 17:51:29.000000000 -0500
***************
*** 1566,1574 ****
  	  else
  	    {
- 	      /* We have horizontal scrolling and we are not inserting at
- 		 the end.  We have invisible characters in this line.  This
- 		 is a dumb update. */
  	      _rl_output_some_chars (nfd, temp);
  	      _rl_last_c_pos += col_temp;
  	      return;
  	    }
--- 1619,1632 ----
  	  else
  	    {
  	      _rl_output_some_chars (nfd, temp);
  	      _rl_last_c_pos += col_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;
  	    }

readline-5.2-011.patch:

--- NEW FILE readline-5.2-011.patch ---
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 5.2
Patch-ID: readline52-011

Bug-Reported-by:	Uwe Doering <gemini at geminix.org>
Bug-Reference-ID:	<46F3DD72.2090801 at geminix.org>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2007-09/msg00102.html

Bug-Description:

There is an off-by-one error in the code that buffers characters received
very quickly in succession, causing characters to be dropped.

Patch:

*** ../readline-5.2-patched/input.c	2007-08-25 13:47:10.000000000 -0400
--- input.c	2007-10-12 22:55:25.000000000 -0400
***************
*** 155,159 ****
        pop_index--;
        if (pop_index < 0)
! 	pop_index = ibuffer_len - 1;
        ibuffer[pop_index] = key;
        return (1);
--- 155,159 ----
        pop_index--;
        if (pop_index < 0)
! 	pop_index = ibuffer_len;
        ibuffer[pop_index] = key;
        return (1);


Index: readline.spec
===================================================================
RCS file: /cvs/pkgs/rpms/readline/devel/readline.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- readline.spec	5 Nov 2007 18:26:52 -0000	1.36
+++ readline.spec	3 Jan 2008 17:17:31 -0000	1.37
@@ -1,7 +1,7 @@
 Summary: A library for editing typed command lines
 Name: readline
 Version: 5.2
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPLv2+
 Group: System Environment/Libraries
 URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
@@ -14,7 +14,10 @@
 Patch6: readline-5.2-005.patch
 Patch7: readline-5.2-006.patch
 Patch8: readline-5.2-007.patch
-Patch9: readline-5.2-inv.patch
+Patch9: readline-5.2-008.patch
+Patch10: readline-5.2-009.patch
+Patch11: readline-5.2-010.patch
+Patch12: readline-5.2-011.patch
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 BuildRequires: ncurses-devel
@@ -61,7 +64,10 @@
 %patch6 -p0 -b .005
 %patch7 -p0 -b .006
 %patch8 -p0 -b .007
-%patch9 -p1 -b .inv
+%patch9 -p0 -b .008
+%patch10 -p0 -b .009
+%patch11 -p0 -b .010
+%patch12 -p0 -b .011
 
 pushd examples
 rm -f rlfe/configure
@@ -130,6 +136,9 @@
 %{_libdir}/lib*.a
 
 %changelog
+* Thu Jan 03 2008 Miroslav Lichvar <mlichvar at redhat.com> 5.2-9
+- include upstream patches 008-011
+
 * Mon Nov 05 2007 Miroslav Lichvar <mlichvar at redhat.com> 5.2-8
 - fix cursor position when prompt has one invisible character (#358231)
 - merge review fixes (#226361)


--- readline-5.2-inv.patch DELETED ---




More information about the fedora-extras-commits mailing list