diff --git a/contrib/libreadline/FREEBSD-upgrade b/contrib/libreadline/FREEBSD-upgrade index 87000ca0c150..1e35444b98a3 100644 --- a/contrib/libreadline/FREEBSD-upgrade +++ b/contrib/libreadline/FREEBSD-upgrade @@ -1,6 +1,7 @@ # $FreeBSD$ # # Official patch 001 imported as v5_2_p1 +# Official patch 002 imported as v5_2_p2 # rm doc/*.dvi doc/*.html doc/*.ps doc/*.0 doc/*.info doc/*.tex doc/texi2* doc/*.pdf diff --git a/contrib/libreadline/display.c b/contrib/libreadline/display.c index 927f92712fed..399cd4b8097c 100644 --- a/contrib/libreadline/display.c +++ b/contrib/libreadline/display.c @@ -562,6 +562,17 @@ rl_redisplay () wrap_offset = prompt_invis_chars_first_line = 0; } +#if defined (HANDLE_MULTIBYTE) +#define CHECK_INV_LBREAKS() \ + do { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ + } \ + } while (0) +#else #define CHECK_INV_LBREAKS() \ do { \ if (newlines >= (inv_lbsize - 2)) \ @@ -570,6 +581,7 @@ rl_redisplay () inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ } while (0) +#endif /* HANDLE_MULTIBYTE */ #if defined (HANDLE_MULTIBYTE) #define CHECK_LPOS() \