Changeset a50d3ff in clfs-sysroot


Ignore:
Timestamp:
Jan 3, 2009, 11:58:36 AM (16 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
master
Children:
d25b7db
Parents:
e950f58
Message:

Update Readline Patch.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/readline-5.2-fixes-5.patch

    re950f58 ra50d3ff  
    11Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    2 Date: 12-21-2007
     2Date: 12-20-2008
    33Initial Package Version: 5.2
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 5.2-012
     6Description: Contains all upstream patches up to 5.2-013
    77
    88diff -Naur readline-5.2.orig/complete.c readline-5.2/complete.c
    9 --- readline-5.2.orig/complete.c        2006-07-28 11:35:49.000000000 -0400
    10 +++ readline-5.2/complete.c     2007-12-21 00:06:28.000000000 -0500
     9--- readline-5.2.orig/complete.c        2006-07-28 08:35:49.000000000 -0700
     10+++ readline-5.2/complete.c     2008-12-20 14:28:42.000000000 -0800
    1111@@ -428,7 +428,7 @@
    1212        return (1);
     
    1919        return (2);
    2020diff -Naur readline-5.2.orig/display.c readline-5.2/display.c
    21 --- readline-5.2.orig/display.c 2006-09-14 14:20:12.000000000 -0400
    22 +++ readline-5.2/display.c      2007-12-21 00:06:31.000000000 -0500
     21--- readline-5.2.orig/display.c 2006-09-14 11:20:12.000000000 -0700
     22+++ readline-5.2/display.c      2008-12-20 14:28:55.000000000 -0800
    2323@@ -391,14 +391,14 @@
    2424       t = ++p;
     
    6464 #if defined (HANDLE_MULTIBYTE)   
    6565 #define CHECK_LPOS() \
    66 @@ -1036,7 +1048,7 @@
     66@@ -898,6 +910,10 @@
     67             second and subsequent lines start at inv_lbreaks[N], offset by
     68             OFFSET (which has already been calculated above).  */
     69 
     70+#define INVIS_FIRST()  (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset)
     71+#define WRAP_OFFSET(line, offset)  ((line == 0) \
     72+                                       ? (offset ? INVIS_FIRST() : 0) \
     73+                                       : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0))
     74 #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
     75 #define VIS_LLEN(l)    ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
     76 #define INV_LLEN(l)    (inv_lbreaks[l+1] - inv_lbreaks[l])
     77@@ -932,7 +948,13 @@
     78                  _rl_last_c_pos != o_cpos &&
     79                  _rl_last_c_pos > wrap_offset &&
     80                  o_cpos < prompt_last_invisible)
     81-               _rl_last_c_pos -= wrap_offset;
     82+               _rl_last_c_pos -= prompt_invis_chars_first_line;        /* XXX - was wrap_offset */
     83+             else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth &&
     84+                       (MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
     85+                       cpos_adjusted == 0 &&
     86+                       _rl_last_c_pos != o_cpos &&
     87+                       _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line))
     88+               _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line);
     89                 
     90              /* If this is the line with the prompt, we might need to
     91                 compensate for invisible characters in the new line. Do
     92@@ -1036,7 +1058,7 @@
    6793                tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset;
    6894              else
     
    7399                  _rl_backspace (_rl_last_c_pos - tx);  /* XXX */
    74100                  _rl_last_c_pos = tx;
    75 @@ -1192,7 +1204,7 @@
     101@@ -1192,7 +1214,7 @@
    76102      int current_line, omax, nmax, inv_botlin;
    77103 {
    78104   register char *ofd, *ols, *oe, *nfd, *nls, *ne;
    79105-  int temp, lendiff, wsatend, od, nd;
    80 +  int temp, lendiff, wsatend, od, nd, o_cpos;
     106+  int temp, lendiff, wsatend, od, nd, twidth, o_cpos;
    81107   int current_invis_chars;
    82108   int col_lendiff, col_temp;
    83109 #if defined (HANDLE_MULTIBYTE)
    84 @@ -1453,6 +1465,8 @@
     110@@ -1208,7 +1230,7 @@
     111   if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
     112     temp = _rl_last_c_pos;
     113   else
     114-    temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
     115+    temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset);
     116   if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
     117        && _rl_last_v_pos == current_line - 1)
     118     {
     119@@ -1453,6 +1475,8 @@
    85120        _rl_last_c_pos = lendiff;
    86121     }
     
    91126      cursor postion in multibyte mode, but a buffer index when not in a
    92127      multibyte locale. */
    93 @@ -1462,7 +1476,9 @@
     128@@ -1462,7 +1486,9 @@
    94129   /* We need to indicate that the cursor position is correct in the presence of
    95130      invisible characters in the prompt string.  Let's see if setting this when
     
    102137 #endif
    103138 #endif
    104 @@ -1506,11 +1522,31 @@
     139@@ -1506,11 +1532,31 @@
    105140     {
    106141       /* Non-zero if we're increasing the number of lines. */
     
    135170          /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and
    136171             _rl_horizontal_scroll_mode == 1, inserting the characters with
    137 @@ -1533,11 +1569,16 @@
     172@@ -1533,11 +1579,16 @@
    138173            }
    139174          else
     
    155190            }
    156191          /* Copy (new) chars to screen from first diff to last match. */
    157 @@ -1586,8 +1627,22 @@
     192@@ -1545,15 +1596,15 @@
     193          if ((temp - lendiff) > 0)
     194            {
     195              _rl_output_some_chars (nfd + lendiff, temp - lendiff);
     196-#if 1
     197             /* XXX -- this bears closer inspection.  Fixes a redisplay bug
     198                reported against bash-3.0-alpha by Andreas Schwab involving
     199                multibyte characters and prompt strings with invisible
     200                characters, but was previously disabled. */
     201-             _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
     202-#else
     203-             _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
     204-#endif
     205+             if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
     206+               twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
     207+             else
     208+               twidth = temp - lendiff;
     209+             _rl_last_c_pos += twidth;
     210            }
     211        }
     212       else
     213@@ -1586,8 +1637,22 @@
    158214          temp = nls - nfd;
    159215          if (temp > 0)
     
    179235        }
    180236       /* Otherwise, print over the existing material. */
    181 @@ -1595,8 +1650,20 @@
     237@@ -1595,8 +1660,20 @@
    182238        {
    183239          if (temp > 0)
     
    200256          lendiff = (oe - old) - (ne - new);
    201257          if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    202 @@ -1732,7 +1799,10 @@
     258@@ -1721,7 +1798,7 @@
     259   int woff;                    /* number of invisible chars on current line */
     260   int cpos, dpos;              /* current and desired cursor positions */
     261 
     262-  woff = W_OFFSET (_rl_last_v_pos, wrap_offset);
     263+  woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
     264   cpos = _rl_last_c_pos;
     265 #if defined (HANDLE_MULTIBYTE)
     266   /* If we have multibyte characters, NEW is indexed by the buffer point in
     267@@ -1732,7 +1809,14 @@
    203268   if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    204269     {
     
    208273+        prompt string, since they're both buffer indices and DPOS is a
    209274+        desired display position. */
    210 +      if (new > prompt_last_invisible)         /* XXX - don't use woff here */
     275+      if ((new > prompt_last_invisible) ||             /* XXX - don't use woff here */
     276+         (prompt_physical_chars > _rl_screenwidth &&
     277+          _rl_last_v_pos == prompt_last_screen_line &&
     278+          wrap_offset != woff &&
     279+          new > (prompt_last_invisible-_rl_screenwidth-wrap_offset)))
    211280        {
    212281          dpos -= woff;
    213282          /* Since this will be assigned to _rl_last_c_pos at the end (more
    214 @@ -2380,6 +2450,8 @@
     283@@ -2380,6 +2464,8 @@
    215284 
    216285   if (end <= start)
     
    222291 
    223292diff -Naur readline-5.2.orig/input.c readline-5.2/input.c
    224 --- readline-5.2.orig/input.c   2006-08-16 15:15:16.000000000 -0400
    225 +++ readline-5.2/input.c        2007-12-21 00:06:32.000000000 -0500
     293--- readline-5.2.orig/input.c   2006-08-16 12:15:16.000000000 -0700
     294+++ readline-5.2/input.c        2008-12-20 14:28:52.000000000 -0800
    226295@@ -133,8 +133,11 @@
    227296     return (0);
     
    308377       memset (&ps, 0, sizeof (mbstate_t));
    309378diff -Naur readline-5.2.orig/isearch.c readline-5.2/isearch.c
    310 --- readline-5.2.orig/isearch.c 2005-12-26 17:18:53.000000000 -0500
    311 +++ readline-5.2/isearch.c      2007-12-21 00:06:28.000000000 -0500
     379--- readline-5.2.orig/isearch.c 2005-12-26 14:18:53.000000000 -0800
     380+++ readline-5.2/isearch.c      2008-12-20 14:28:42.000000000 -0800
    312381@@ -327,8 +327,15 @@
    313382   rl_command_func_t *f;
     
    329398       f = _rl_keymap[c].function;
    330399diff -Naur readline-5.2.orig/misc.c readline-5.2/misc.c
    331 --- readline-5.2.orig/misc.c    2005-12-26 17:20:46.000000000 -0500
    332 +++ readline-5.2/misc.c 2007-12-21 00:06:28.000000000 -0500
     400--- readline-5.2.orig/misc.c    2005-12-26 14:20:46.000000000 -0800
     401+++ readline-5.2/misc.c 2008-12-20 14:28:42.000000000 -0800
    333402@@ -146,6 +146,8 @@
    334403          rl_restore_prompt ();
     
    341410     }
    342411diff -Naur readline-5.2.orig/readline.c readline-5.2/readline.c
    343 --- readline-5.2.orig/readline.c        2006-08-16 15:00:36.000000000 -0400
    344 +++ readline-5.2/readline.c     2007-12-21 00:06:28.000000000 -0500
     412--- readline-5.2.orig/readline.c        2006-08-16 12:00:36.000000000 -0700
     413+++ readline-5.2/readline.c     2008-12-20 14:28:42.000000000 -0800
    345414@@ -645,6 +645,11 @@
    346415   if ((cxt->flags & KSEQ_DISPATCHED) == 0)
     
    356425     }
    357426diff -Naur readline-5.2.orig/support/shobj-conf readline-5.2/support/shobj-conf
    358 --- readline-5.2.orig/support/shobj-conf        2006-04-11 09:15:43.000000000 -0400
    359 +++ readline-5.2/support/shobj-conf     2007-12-21 00:06:32.000000000 -0500
     427--- readline-5.2.orig/support/shobj-conf        2006-04-11 06:15:43.000000000 -0700
     428+++ readline-5.2/support/shobj-conf     2008-12-20 14:28:53.000000000 -0800
    360429@@ -10,7 +10,7 @@
    361430 # Chet Ramey
     
    449518        SHLIB_LIBSUFF='sl'
    450519diff -Naur readline-5.2.orig/text.c readline-5.2/text.c
    451 --- readline-5.2.orig/text.c    2006-07-28 11:55:27.000000000 -0400
    452 +++ readline-5.2/text.c 2007-12-21 00:06:28.000000000 -0500
     520--- readline-5.2.orig/text.c    2006-07-28 08:55:27.000000000 -0700
     521+++ readline-5.2/text.c 2008-12-20 14:28:42.000000000 -0800
    453522@@ -857,6 +857,9 @@
    454523   c = rl_read_key ();
     
    482551   else
    483552diff -Naur readline-5.2.orig/vi_mode.c readline-5.2/vi_mode.c
    484 --- readline-5.2.orig/vi_mode.c 2006-07-29 16:42:28.000000000 -0400
    485 +++ readline-5.2/vi_mode.c      2007-12-21 00:06:28.000000000 -0500
     553--- readline-5.2.orig/vi_mode.c 2006-07-29 13:42:28.000000000 -0700
     554+++ readline-5.2/vi_mode.c      2008-12-20 14:28:42.000000000 -0800
    486555@@ -886,6 +886,13 @@
    487556   RL_SETSTATE(RL_STATE_MOREINPUT);
Note: See TracChangeset for help on using the changeset viewer.