source:
clfs-sysroot/patches/readline-5.2-fixes-2.patch@
6906605
Last change on this file since 6906605 was ff91a87, checked in by , 17 years ago | |
---|---|
|
|
File size: 3.3 KB |
-
readline-5.2
Submitted By: Joe Ciccone <jciccone@gmail.com> Date: 2007-07-23 Initial Package Version: 5.2 Origin: ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches Upstream Status: From Upstream Description: Contains patches 001 - 004 from upstream diff -Naur readline-5.2.orig/display.c readline-5.2/display.c
old new 561 561 wrap_offset = prompt_invis_chars_first_line = 0; 562 562 } 563 563 564 #if defined (HANDLE_MULTIBYTE) 565 #define CHECK_INV_LBREAKS() \ 566 do { \ 567 if (newlines >= (inv_lbsize - 2)) \ 568 { \ 569 inv_lbsize *= 2; \ 570 inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ 571 _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ 572 } \ 573 } while (0) 574 #else 564 575 #define CHECK_INV_LBREAKS() \ 565 576 do { \ 566 577 if (newlines >= (inv_lbsize - 2)) \ … … 569 580 inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ 570 581 } \ 571 582 } while (0) 583 #endif /* HANDLE_MULTIBYTE */ 572 584 573 585 #if defined (HANDLE_MULTIBYTE) 574 586 #define CHECK_LPOS() \ … … 1586 1598 temp = nls - nfd; 1587 1599 if (temp > 0) 1588 1600 { 1601 /* If nfd begins at the prompt, or before the invisible 1602 characters in the prompt, we need to adjust _rl_last_c_pos 1603 in a multibyte locale to account for the wrap offset and 1604 set cpos_adjusted accordingly. */ 1589 1605 _rl_output_some_chars (nfd, temp); 1590 _rl_last_c_pos += _rl_col_width (nfd, 0, temp);; 1606 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 1607 { 1608 _rl_last_c_pos += _rl_col_width (nfd, 0, temp); 1609 if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) 1610 { 1611 _rl_last_c_pos -= wrap_offset; 1612 cpos_adjusted = 1; 1613 } 1614 } 1615 else 1616 _rl_last_c_pos += temp; 1591 1617 } 1592 1618 } 1593 1619 /* Otherwise, print over the existing material. */ … … 1595 1621 { 1596 1622 if (temp > 0) 1597 1623 { 1624 /* If nfd begins at the prompt, or before the invisible 1625 characters in the prompt, we need to adjust _rl_last_c_pos 1626 in a multibyte locale to account for the wrap offset and 1627 set cpos_adjusted accordingly. */ 1598 1628 _rl_output_some_chars (nfd, temp); 1599 1629 _rl_last_c_pos += col_temp; /* XXX */ 1630 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 1631 { 1632 if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) 1633 { 1634 _rl_last_c_pos -= wrap_offset; 1635 cpos_adjusted = 1; 1636 } 1637 } 1600 1638 } 1601 1639 lendiff = (oe - old) - (ne - new); 1602 1640 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) … … 1732 1770 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 1733 1771 { 1734 1772 dpos = _rl_col_width (data, 0, new); 1735 if (dpos > prompt_last_invisible) /* XXX - don't use woff here */ 1773 /* Use NEW when comparing against the last invisible character in the 1774 prompt string, since they're both buffer indices and DPOS is a 1775 desired display position. */ 1776 if (new > prompt_last_invisible) /* XXX - don't use woff here */ 1736 1777 { 1737 1778 dpos -= woff; 1738 1779 /* Since this will be assigned to _rl_last_c_pos at the end (more … … 2380 2421 2381 2422 if (end <= start) 2382 2423 return 0; 2424 if (MB_CUR_MAX == 1 || rl_byte_oriented) 2425 return (end - start); 2383 2426 2384 2427 memset (&ps, 0, sizeof (mbstate_t)); 2385 2428
Note:
See TracBrowser
for help on using the repository browser.