Ignore:
Timestamp:
Dec 19, 2007, 9:35:11 PM (18 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
a4357b0
Parents:
a2498b26
Message:

Updated Various branch update patches.

File:
1 moved

Legend:

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

    ra2498b26 ra60e4c5  
    11Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    2 Date: 2007-09-03
     2Date: 12-21-2007
    33Initial Package Version: 5.2
    4 Origin: ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches
    5 Upstream Status: From Upstream
    6 Description: Contains patches 001-007 from upstream
    7  
     4Origin: Upstream
     5Upstream Status: Applied
     6Description: Contains all upstream patches up to 5.2-012
     7
    88diff -Naur readline-5.2.orig/complete.c readline-5.2/complete.c
    9 --- readline-5.2.orig/complete.c        2006-07-28 08:35:49.000000000 -0700
    10 +++ readline-5.2/complete.c     2007-09-03 22:06:46.000000000 -0700
     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
    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 11:20:12.000000000 -0700
    22 +++ readline-5.2/display.c      2007-09-03 22:06:48.000000000 -0700
     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
     23@@ -391,14 +391,14 @@
     24       t = ++p;
     25       local_prompt = expand_prompt (p, &prompt_visible_length,
     26                                       &prompt_last_invisible,
     27-                                      (int *)NULL,
     28+                                      &prompt_invis_chars_first_line,
     29                                       &prompt_physical_chars);
     30       c = *t; *t = '\0';
     31       /* The portion of the prompt string up to and including the
     32         final newline is now null-terminated. */
     33       local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
     34                                                   (int *)NULL,
     35-                                                  &prompt_invis_chars_first_line,
     36+                                                  (int *)NULL,
     37                                                   (int *)NULL);
     38       *t = c;
     39       local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
    2340@@ -561,6 +561,17 @@
    2441       wrap_offset = prompt_invis_chars_first_line = 0;
     
    4764 #if defined (HANDLE_MULTIBYTE)   
    4865 #define CHECK_LPOS() \
    49 @@ -1506,11 +1518,31 @@
     66@@ -1036,7 +1048,7 @@
     67                tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset;
     68              else
     69                tx = nleft;
     70-             if (_rl_last_c_pos > tx)
     71+             if (tx >= 0 && _rl_last_c_pos > tx)
     72                {
     73                  _rl_backspace (_rl_last_c_pos - tx);  /* XXX */
     74                  _rl_last_c_pos = tx;
     75@@ -1192,7 +1204,7 @@
     76      int current_line, omax, nmax, inv_botlin;
     77 {
     78   register char *ofd, *ols, *oe, *nfd, *nls, *ne;
     79-  int temp, lendiff, wsatend, od, nd;
     80+  int temp, lendiff, wsatend, od, nd, o_cpos;
     81   int current_invis_chars;
     82   int col_lendiff, col_temp;
     83 #if defined (HANDLE_MULTIBYTE)
     84@@ -1453,6 +1465,8 @@
     85        _rl_last_c_pos = lendiff;
     86     }
     87 
     88+  o_cpos = _rl_last_c_pos;
     89+
     90   /* When this function returns, _rl_last_c_pos is correct, and an absolute
     91      cursor postion in multibyte mode, but a buffer index when not in a
     92      multibyte locale. */
     93@@ -1462,7 +1476,9 @@
     94   /* We need to indicate that the cursor position is correct in the presence of
     95      invisible characters in the prompt string.  Let's see if setting this when
     96      we make sure we're at the end of the drawn prompt string works. */
     97-  if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars)
     98+  if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 &&
     99+      (_rl_last_c_pos > 0 || o_cpos > 0) &&
     100+      _rl_last_c_pos == prompt_physical_chars)
     101     cpos_adjusted = 1;
     102 #endif
     103 #endif
     104@@ -1506,11 +1522,31 @@
    50105     {
    51106       /* Non-zero if we're increasing the number of lines. */
     
    80135          /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and
    81136             _rl_horizontal_scroll_mode == 1, inserting the characters with
    82 @@ -1586,8 +1618,22 @@
     137@@ -1533,11 +1569,16 @@
     138            }
     139          else
     140            {
     141-             /* We have horizontal scrolling and we are not inserting at
     142-                the end.  We have invisible characters in this line.  This
     143-                is a dumb update. */
     144              _rl_output_some_chars (nfd, temp);
     145              _rl_last_c_pos += col_temp;
     146+             /* If nfd begins before any invisible characters in the prompt,
     147+                adjust _rl_last_c_pos to account for wrap_offset and set
     148+                cpos_adjusted to let the caller know. */
     149+             if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
     150+               {
     151+                 _rl_last_c_pos -= wrap_offset;
     152+                 cpos_adjusted = 1;
     153+               }
     154              return;
     155            }
     156          /* Copy (new) chars to screen from first diff to last match. */
     157@@ -1586,8 +1627,22 @@
    83158          temp = nls - nfd;
    84159          if (temp > 0)
     
    104179        }
    105180       /* Otherwise, print over the existing material. */
    106 @@ -1595,8 +1641,20 @@
     181@@ -1595,8 +1650,20 @@
    107182        {
    108183          if (temp > 0)
     
    125200          lendiff = (oe - old) - (ne - new);
    126201          if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    127 @@ -1732,7 +1790,10 @@
     202@@ -1732,7 +1799,10 @@
    128203   if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    129204     {
     
    137212          dpos -= woff;
    138213          /* Since this will be assigned to _rl_last_c_pos at the end (more
    139 @@ -2380,6 +2441,8 @@
     214@@ -2380,6 +2450,8 @@
    140215 
    141216   if (end <= start)
     
    147222 
    148223diff -Naur readline-5.2.orig/input.c readline-5.2/input.c
    149 --- readline-5.2.orig/input.c   2006-08-16 12:15:16.000000000 -0700
    150 +++ readline-5.2/input.c        2007-09-03 22:06:51.000000000 -0700
     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
    151226@@ -133,8 +133,11 @@
    152227     return (0);
     
    162237 
    163238   return (1);
     239@@ -151,7 +154,7 @@
     240     {
     241       pop_index--;
     242       if (pop_index < 0)
     243-       pop_index = ibuffer_len - 1;
     244+       pop_index = ibuffer_len;
     245       ibuffer[pop_index] = key;
     246       return (1);
     247     }
    164248@@ -250,7 +253,8 @@
    165249       while (chars_avail--)
     
    224308       memset (&ps, 0, sizeof (mbstate_t));
    225309diff -Naur readline-5.2.orig/isearch.c readline-5.2/isearch.c
    226 --- readline-5.2.orig/isearch.c 2005-12-26 14:18:53.000000000 -0800
    227 +++ readline-5.2/isearch.c      2007-09-03 22:06:46.000000000 -0700
     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
    228312@@ -327,8 +327,15 @@
    229313   rl_command_func_t *f;
     
    245329       f = _rl_keymap[c].function;
    246330diff -Naur readline-5.2.orig/misc.c readline-5.2/misc.c
    247 --- readline-5.2.orig/misc.c    2005-12-26 14:20:46.000000000 -0800
    248 +++ readline-5.2/misc.c 2007-09-03 22:06:46.000000000 -0700
     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
    249333@@ -146,6 +146,8 @@
    250334          rl_restore_prompt ();
     
    257341     }
    258342diff -Naur readline-5.2.orig/readline.c readline-5.2/readline.c
    259 --- readline-5.2.orig/readline.c        2006-08-16 12:00:36.000000000 -0700
    260 +++ readline-5.2/readline.c     2007-09-03 22:06:46.000000000 -0700
     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
    261345@@ -645,6 +645,11 @@
    262346   if ((cxt->flags & KSEQ_DISPATCHED) == 0)
     
    271355       cxt->flags |= KSEQ_DISPATCHED;
    272356     }
     357diff -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
     360@@ -10,7 +10,7 @@
     361 # Chet Ramey
     362 # chet@po.cwru.edu
     363 
     364-# Copyright (C) 1996-2002 Free Software Foundation, Inc.
     365+# Copyright (C) 1996-2007 Free Software Foundation, Inc.
     366 #
     367 # This program is free software; you can redistribute it and/or modify
     368 # it under the terms of the GNU General Public License as published by
     369@@ -114,7 +114,7 @@
     370        SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
     371        ;;
     372 
     373-freebsd2* | netbsd*)
     374+freebsd2*)
     375        SHOBJ_CFLAGS=-fpic
     376        SHOBJ_LD=ld
     377        SHOBJ_LDFLAGS='-x -Bshareable'
     378@@ -125,7 +125,7 @@
     379 
     380 # FreeBSD-3.x ELF
     381 freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*)
     382-       SHOBJ_CFLAGS=-fpic
     383+       SHOBJ_CFLAGS=-fPIC
     384        SHOBJ_LD='${CC}'
     385 
     386        if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
     387@@ -142,7 +142,7 @@
     388        ;;
     389 
     390 # Darwin/MacOS X
     391-darwin8*)
     392+darwin[89]*)
     393        SHOBJ_STATUS=supported
     394        SHLIB_STATUS=supported
     395       
     396@@ -153,7 +153,7 @@
     397        SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
     398        SHLIB_LIBSUFF='dylib'
     399 
     400-       SHOBJ_LDFLAGS='-undefined dynamic_lookup'
     401+       SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`'
     402        SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
     403 
     404        SHLIB_LIBS='-lncurses'  # see if -lcurses works on MacOS X 10.1
     405@@ -171,7 +171,7 @@
     406        SHLIB_LIBSUFF='dylib'
     407 
     408        case "${host_os}" in
     409-       darwin[78]*)    SHOBJ_LDFLAGS=''
     410+       darwin[789]*)   SHOBJ_LDFLAGS=''
     411                        SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
     412                        ;;
     413        *)              SHOBJ_LDFLAGS='-dynamic'
     414@@ -182,7 +182,7 @@
     415        SHLIB_LIBS='-lncurses'  # see if -lcurses works on MacOS X 10.1
     416        ;;
     417 
     418-openbsd*)
     419+openbsd*|netbsd*)
     420        SHOBJ_CFLAGS=-fPIC
     421        SHOBJ_LD='${CC}'
     422        SHOBJ_LDFLAGS='-shared'
     423@@ -247,7 +247,7 @@
     424        SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
     425        ;;
     426 
     427-aix4.[2-9]*-*gcc*)             # lightly tested by jik@cisco.com
     428+aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*)            # lightly tested by jik@cisco.com
     429        SHOBJ_CFLAGS=-fpic
     430        SHOBJ_LD='ld'
     431        SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
     432@@ -258,7 +258,7 @@
     433        SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
     434        ;;
     435 
     436-aix4.[2-9]*)
     437+aix4.[2-9]*|aix[5-9].*)
     438        SHOBJ_CFLAGS=-K
     439        SHOBJ_LD='ld'
     440        SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
     441@@ -329,7 +329,7 @@
     442        SHOBJ_LD='${CC}'
     443        # if you have problems linking here, moving the `-Wl,+h,$@' from
     444        # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work
     445-       SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
     446+       SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s'
     447 
     448        SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
     449        SHLIB_LIBSUFF='sl'
    273450diff -Naur readline-5.2.orig/text.c readline-5.2/text.c
    274 --- readline-5.2.orig/text.c    2006-07-28 08:55:27.000000000 -0700
    275 +++ readline-5.2/text.c 2007-09-03 22:06:46.000000000 -0700
     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
    276453@@ -857,6 +857,9 @@
    277454   c = rl_read_key ();
     
    305482   else
    306483diff -Naur readline-5.2.orig/vi_mode.c readline-5.2/vi_mode.c
    307 --- readline-5.2.orig/vi_mode.c 2006-07-29 13:42:28.000000000 -0700
    308 +++ readline-5.2/vi_mode.c      2007-09-03 22:06:46.000000000 -0700
     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
    309486@@ -886,6 +886,13 @@
    310487   RL_SETSTATE(RL_STATE_MOREINPUT);
Note: See TracChangeset for help on using the changeset viewer.