Changeset a60e4c5 for patches/readline-5.2-fixes-4.patch
- Timestamp:
- Dec 19, 2007, 9:35:11 PM (18 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- a4357b0
- Parents:
- a2498b26
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/readline-5.2-fixes-4.patch
ra2498b26 ra60e4c5 1 1 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 2007-09-032 Date: 12-21-2007 3 3 Initial Package Version: 5.2 4 Origin: ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches5 Upstream Status: From Upstream6 Description: Contains patches 001-007 from upstream7 4 Origin: Upstream 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 5.2-012 7 8 8 diff -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 -070010 +++ readline-5.2/complete.c 2007- 09-03 22:06:46.000000000 -07009 --- 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 11 11 @@ -428,7 +428,7 @@ 12 12 return (1); … … 19 19 return (2); 20 20 diff -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; 23 40 @@ -561,6 +561,17 @@ 24 41 wrap_offset = prompt_invis_chars_first_line = 0; … … 47 64 #if defined (HANDLE_MULTIBYTE) 48 65 #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 @@ 50 105 { 51 106 /* Non-zero if we're increasing the number of lines. */ … … 80 135 /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and 81 136 _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 @@ 83 158 temp = nls - nfd; 84 159 if (temp > 0) … … 104 179 } 105 180 /* Otherwise, print over the existing material. */ 106 @@ -1595,8 +16 41,20 @@181 @@ -1595,8 +1650,20 @@ 107 182 { 108 183 if (temp > 0) … … 125 200 lendiff = (oe - old) - (ne - new); 126 201 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 127 @@ -1732,7 +179 0,10 @@202 @@ -1732,7 +1799,10 @@ 128 203 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 129 204 { … … 137 212 dpos -= woff; 138 213 /* Since this will be assigned to _rl_last_c_pos at the end (more 139 @@ -2380,6 +24 41,8 @@214 @@ -2380,6 +2450,8 @@ 140 215 141 216 if (end <= start) … … 147 222 148 223 diff -Naur readline-5.2.orig/input.c readline-5.2/input.c 149 --- readline-5.2.orig/input.c 2006-08-16 1 2:15:16.000000000 -0700150 +++ readline-5.2/input.c 2007- 09-03 22:06:51.000000000 -0700224 --- 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 151 226 @@ -133,8 +133,11 @@ 152 227 return (0); … … 162 237 163 238 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 } 164 248 @@ -250,7 +253,8 @@ 165 249 while (chars_avail--) … … 224 308 memset (&ps, 0, sizeof (mbstate_t)); 225 309 diff -Naur readline-5.2.orig/isearch.c readline-5.2/isearch.c 226 --- readline-5.2.orig/isearch.c 2005-12-26 1 4:18:53.000000000 -0800227 +++ readline-5.2/isearch.c 2007- 09-03 22:06:46.000000000 -0700310 --- 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 228 312 @@ -327,8 +327,15 @@ 229 313 rl_command_func_t *f; … … 245 329 f = _rl_keymap[c].function; 246 330 diff -Naur readline-5.2.orig/misc.c readline-5.2/misc.c 247 --- readline-5.2.orig/misc.c 2005-12-26 1 4:20:46.000000000 -0800248 +++ readline-5.2/misc.c 2007- 09-03 22:06:46.000000000 -0700331 --- 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 249 333 @@ -146,6 +146,8 @@ 250 334 rl_restore_prompt (); … … 257 341 } 258 342 diff -Naur readline-5.2.orig/readline.c readline-5.2/readline.c 259 --- readline-5.2.orig/readline.c 2006-08-16 1 2:00:36.000000000 -0700260 +++ readline-5.2/readline.c 2007- 09-03 22:06:46.000000000 -0700343 --- 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 261 345 @@ -645,6 +645,11 @@ 262 346 if ((cxt->flags & KSEQ_DISPATCHED) == 0) … … 271 355 cxt->flags |= KSEQ_DISPATCHED; 272 356 } 357 diff -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' 273 450 diff -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 -0700275 +++ readline-5.2/text.c 2007- 09-03 22:06:46.000000000 -0700451 --- 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 276 453 @@ -857,6 +857,9 @@ 277 454 c = rl_read_key (); … … 305 482 else 306 483 diff -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 1 3:42:28.000000000 -0700308 +++ readline-5.2/vi_mode.c 2007- 09-03 22:06:46.000000000 -0700484 --- 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 309 486 @@ -886,6 +886,13 @@ 310 487 RL_SETSTATE(RL_STATE_MOREINPUT);
Note:
See TracChangeset
for help on using the changeset viewer.