commit bash-20110513 snapshot

This commit is contained in:
Chet Ramey
2011-12-29 13:08:05 -05:00
parent bfd181e794
commit f4f5e1c2b8
31 changed files with 6412 additions and 1481 deletions
+3 -3
View File
@@ -901,10 +901,10 @@ internal_free (mem, file, line, flags)
if (mg.i != p->mh_nbytes)
xbotch (mem, ERR_ASSERT_FAILED, _("free: start and end chunk sizes differ"), file, line);
#if 1
if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop))
#if GLIBC21
if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == sbrk (0)))
#else
if (((char *)p + binsize(nunits) == memtop) && nunits >= LESSCORE_MIN)
if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop))
#endif
{
/* If above LESSCORE_FRC, give back unconditionally. This should be set
+7
View File
@@ -2721,6 +2721,13 @@ _rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1");
{
point += tmp;
max -= tmp;
#if defined (MACOSX)
/* Mac OS X has a bug where wcwidth returns 1 for UTF-8 combining
characters */
if (wc >= 769 && wc <= 833)
tmp = 0;
else
#endif
tmp = wcwidth(wc);
width += (tmp >= 0) ? tmp : 1;
}
+28 -2
View File
@@ -41,6 +41,10 @@
#include <stdio.h>
#ifdef __MSDOS__
# include <pc.h>
#endif
/* System-specific feature definitions and include files. */
#include "rldefs.h"
#include "rlmbutil.h"
@@ -2057,9 +2061,18 @@ _rl_move_vert (to)
}
else
{ /* delta < 0 */
#ifdef __DJGPP__
int row, col;
fflush (rl_outstream);
ScreenGetCursor (&row, &col);
ScreenSetCursor (row + delta, col);
i = -delta;
#else
if (_rl_term_up && *_rl_term_up)
for (i = 0; i < -delta; i++)
tputs (_rl_term_up, 1, _rl_output_character_function);
#endif /* !__DJGPP__ */
}
_rl_last_v_pos = to; /* Now TO is here */
@@ -2342,10 +2355,13 @@ void
_rl_clear_to_eol (count)
int count;
{
#ifndef __MSDOS__
if (_rl_term_clreol)
tputs (_rl_term_clreol, 1, _rl_output_character_function);
else if (count)
space_to_eol (count);
else
#endif
if (count)
space_to_eol (count);
}
/* Clear to the end of the line using spaces. COUNT is the minimum
@@ -2365,10 +2381,15 @@ space_to_eol (count)
void
_rl_clear_screen ()
{
#ifndef __DJGPP__
if (_rl_term_clrpag)
tputs (_rl_term_clrpag, 1, _rl_output_character_function);
else
rl_crlf ();
#else
ScreenClear ();
ScreenSetCursor (0, 0);
#endif /* __DJGPP__ */
}
/* Insert COUNT characters from STRING to the output stream at column COL. */
@@ -2700,6 +2721,11 @@ _rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1");
{
point += tmp;
max -= tmp;
#if defined (MACOSX)
if (wc >= 769 && wc <= 833)
tmp = 0;
else
#endif
tmp = wcwidth(wc);
width += (tmp >= 0) ? tmp : 1;
}
+8 -4
View File
@@ -369,6 +369,11 @@ readline_internal_setup ()
_rl_in_stream = rl_instream;
_rl_out_stream = rl_outstream;
/* Enable the meta key only for the duration of readline(), if this
terminal has one. */
if (_rl_enable_meta)
_rl_enable_meta_key ();
if (rl_startup_hook)
(*rl_startup_hook) ();
@@ -437,6 +442,9 @@ readline_internal_teardown (eof)
if (rl_undo_list)
rl_free_undo_list ();
/* Disable the meta key, if this terminal has one. */
_rl_disable_meta_key ();
/* Restore normal cursor, if available. */
_rl_set_insert_mode (RL_IM_INSERT, 0);
@@ -1091,10 +1099,6 @@ readline_initialize_everything ()
/* Try to bind a common arrow key prefix, if not already bound. */
bind_arrow_keys ();
/* Enable the meta key, if this terminal has one. */
if (_rl_enable_meta)
_rl_enable_meta_key ();
/* If the completion parser's default word break characters haven't
been set yet, then do so now. */
if (rl_completer_word_break_characters == (char *)NULL)