From 5a5628dc998069023794af4893cac46a5db6f66e Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 23 Feb 2009 12:35:46 +0000 Subject: Update to 6.0: This is a terse description of the new features added to readline-6.0 since the release of readline-5.2. 1. New Features in Readline a. A new variable, rl_sort_completion_matches; allows applications to inhibit match list sorting (but beware: some things don't work right if applications do this). b. A new variable, rl_completion_invoking_key; allows applications to discover the key that invoked rl_complete or rl_menu_complete. c. The functions rl_block_sigint and rl_release_sigint are now public and available to calling applications who want to protect critical sections (like redisplay). d. The functions rl_save_state and rl_restore_state are now public and available to calling applications; documented rest of readline's state flag values. e. A new user-settable variable, `history-size', allows setting the maximum number of entries in the history list. f. There is a new implementation of menu completion, with several improvements over the old; the most notable improvement is a better `completions browsing' mode. g. The menu completion code now uses the rl_menu_completion_entry_function variable, allowing applications to provide their own menu completion generators. h. There is support for replacing a prefix of a pathname with a `...' when displaying possible completions. This is controllable by setting the `completion-prefix-display-length' variable. Matches with a common prefix longer than this value have the common prefix replaced with `...'. i. There is a new `revert-all-at-newline' variable. If enabled, readline will undo all outstanding changes to all history lines when `accept-line' is executed. --- devel/readline/Makefile | 5 +- devel/readline/distinfo | 11 ++-- devel/readline/patches/patch-ae | 20 +++---- devel/readline/patches/patch-af | 124 ---------------------------------------- 4 files changed, 17 insertions(+), 143 deletions(-) delete mode 100644 devel/readline/patches/patch-af (limited to 'devel') diff --git a/devel/readline/Makefile b/devel/readline/Makefile index ecc309672dc..d54a4c415cb 100644 --- a/devel/readline/Makefile +++ b/devel/readline/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.46 2008/08/13 11:11:38 he Exp $ +# $NetBSD: Makefile,v 1.47 2009/02/23 12:35:46 wiz Exp $ # -DISTNAME= readline-5.2 -PKGREVISION= 2 +DISTNAME= readline-6.0 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU:=readline/} diff --git a/devel/readline/distinfo b/devel/readline/distinfo index 2716356a582..e62a6f6ee6a 100644 --- a/devel/readline/distinfo +++ b/devel/readline/distinfo @@ -1,9 +1,8 @@ -$NetBSD: distinfo,v 1.15 2008/08/13 11:11:38 he Exp $ +$NetBSD: distinfo,v 1.16 2009/02/23 12:35:46 wiz Exp $ -SHA1 (readline-5.2.tar.gz) = 18f3412c73068509d5f491b7b4535aeaf9522834 -RMD160 (readline-5.2.tar.gz) = 983cbb25192e0a376b80cb2428fe8ee254a041c7 -Size (readline-5.2.tar.gz) = 2037705 bytes -SHA1 (patch-ae) = b68716ae29eeb101c34d69dd274dbd846689a794 -SHA1 (patch-af) = 0b18362412b4bbe0ea3a821fec59129f6a8f7f50 +SHA1 (readline-6.0.tar.gz) = 1e511b091514ef631c539552316787c75ace5262 +RMD160 (readline-6.0.tar.gz) = 9f886f437dfa3387cb3a4ce3439cefecffc2c789 +Size (readline-6.0.tar.gz) = 2270818 bytes +SHA1 (patch-ae) = 5ef968372e27be7a4f5bfbfd71f8bcd371ab99e9 SHA1 (patch-ag) = 3114e6959dfff3e2aae74c3df3ba4b0f692b79bb SHA1 (patch-ah) = 107701a092b4294907e9a2066cfa7cbb3afad301 diff --git a/devel/readline/patches/patch-ae b/devel/readline/patches/patch-ae index 7a6600b5d82..4ed53d7458e 100644 --- a/devel/readline/patches/patch-ae +++ b/devel/readline/patches/patch-ae @@ -1,6 +1,6 @@ -$NetBSD: patch-ae,v 1.13 2007/11/21 23:33:14 minskim Exp $ +$NetBSD: patch-ae,v 1.14 2009/02/23 12:35:46 wiz Exp $ ---- Makefile.in.orig 2005-05-07 18:11:23.000000000 -0700 +--- Makefile.in.orig 2009-01-06 17:03:14.000000000 +0000 +++ Makefile.in @@ -18,6 +18,9 @@ RL_LIBRARY_VERSION = @LIBVERSION@ @@ -12,7 +12,7 @@ $NetBSD: patch-ae,v 1.13 2007/11/21 23:33:14 minskim Exp $ PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ -@@ -72,6 +75,7 @@ CTAGS = ctags -tw +@@ -74,6 +77,7 @@ CTAGS = ctags -tw CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' CPPFLAGS = @CPPFLAGS@ @@ -20,7 +20,7 @@ $NetBSD: patch-ae,v 1.13 2007/11/21 23:33:14 minskim Exp $ DEFS = @DEFS@ @CROSS_COMPILE@ LOCAL_DEFS = @LOCAL_DEFS@ -@@ -94,9 +98,15 @@ GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT +@@ -96,9 +100,15 @@ GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT ${RM} $@ $(CC) -c $(CCFLAGS) $< @@ -36,7 +36,7 @@ $NetBSD: patch-ae,v 1.13 2007/11/21 23:33:14 minskim Exp $ # The C code source files for this library. CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ -@@ -145,6 +155,8 @@ INSTALL_TARGETS = @STATIC_INSTALL_TARGET +@@ -147,6 +157,8 @@ INSTALL_TARGETS = @STATIC_INSTALL_TARGET all: $(TARGETS) @@ -45,7 +45,7 @@ $NetBSD: patch-ae,v 1.13 2007/11/21 23:33:14 minskim Exp $ everything: all examples static: $(STATIC_LIBS) -@@ -154,17 +166,33 @@ libreadline.a: $(OBJECTS) +@@ -156,17 +168,33 @@ libreadline.a: $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS) -test -n "$(RANLIB)" && $(RANLIB) $@ @@ -77,11 +77,11 @@ $NetBSD: patch-ae,v 1.13 2007/11/21 23:33:14 minskim Exp $ + $(LIBTOOL) --mode=compile $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c + readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a - $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB} + $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.c ./libreadline.a ${TERMCAP_LIB} -@@ -243,6 +271,12 @@ install-shared: installdirs install-head - uninstall-shared: maybe-uninstall-headers - -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) +@@ -251,6 +279,12 @@ install-examples: installdirs install-he + uninstall-examples: maybe-uninstall-headers + -( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) +install-libtool: installdirs $(LIBTOOL_LIBS) install-headers install-doc + -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libreadline.la diff --git a/devel/readline/patches/patch-af b/devel/readline/patches/patch-af deleted file mode 100644 index cc33a10b9d2..00000000000 --- a/devel/readline/patches/patch-af +++ /dev/null @@ -1,124 +0,0 @@ -$NetBSD: patch-af,v 1.4 2008/08/13 11:11:38 he Exp $ - -3 patches from Debian rolled into one: - -http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00017.html - -Bug-Description: - -In some cases, code that is intended to be used in the presence of multibyte -characters is called when no such characters are present, leading to incorrect -display position calculations and incorrect redisplay. - -http://lists.gnu.org/archive/html/bug-readline/2007-01/msg00002.html - -Bug-Description: - -Readline neglects to reallocate the array it uses to keep track of wrapped -screen lines when increasing its size. This will eventually result in -segmentation faults when given sufficiently long input. - -http://lists.gnu.org/archive/html/bug-bash/2007-02/msg00054.html - -Bug-Description: - -When moving the cursor, bash sometimes misplaces the cursor when the prompt -contains two or more multibyte characters. The particular circumstance that -uncovered the problem was having the (multibyte) current directory name in -the prompt string. - - ---- display.c.orig 2006-09-14 20:20:12.000000000 +0200 -+++ display.c -@@ -561,14 +561,25 @@ 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 -+ do { \ -+ if (newlines >= (inv_lbsize - 2)) \ -+ { \ -+ inv_lbsize *= 2; \ -+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ - } \ - } while (0) -+#endif /* HANDLE_MULTIBYTE */ - - #if defined (HANDLE_MULTIBYTE) - #define CHECK_LPOS() \ -@@ -1586,8 +1597,22 @@ update_line (old, new, current_line, oma - temp = nls - nfd; - if (temp > 0) - { -+ /* If nfd begins at the prompt, or before the invisible -+ characters in the prompt, we need to adjust _rl_last_c_pos -+ in a multibyte locale to account for the wrap offset and -+ set cpos_adjusted accordingly. */ - _rl_output_some_chars (nfd, temp); -- _rl_last_c_pos += _rl_col_width (nfd, 0, temp);; -+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) -+ { -+ _rl_last_c_pos += _rl_col_width (nfd, 0, temp); -+ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) -+ { -+ _rl_last_c_pos -= wrap_offset; -+ cpos_adjusted = 1; -+ } -+ } -+ else -+ _rl_last_c_pos += temp; - } - } - /* Otherwise, print over the existing material. */ -@@ -1595,8 +1620,20 @@ update_line (old, new, current_line, oma - { - if (temp > 0) - { -+ /* If nfd begins at the prompt, or before the invisible -+ characters in the prompt, we need to adjust _rl_last_c_pos -+ in a multibyte locale to account for the wrap offset and -+ set cpos_adjusted accordingly. */ - _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += col_temp; /* XXX */ -+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) -+ { -+ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) -+ { -+ _rl_last_c_pos -= wrap_offset; -+ cpos_adjusted = 1; -+ } -+ } - } - lendiff = (oe - old) - (ne - new); - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) -@@ -1732,7 +1769,10 @@ _rl_move_cursor_relative (new, data) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) - { - dpos = _rl_col_width (data, 0, new); -- if (dpos > prompt_last_invisible) /* XXX - don't use woff here */ -+ /* Use NEW when comparing against the last invisible character in the -+ prompt string, since they're both buffer indices and DPOS is a -+ desired display position. */ -+ if (new > prompt_last_invisible) /* XXX - don't use woff here */ - { - dpos -= woff; - /* Since this will be assigned to _rl_last_c_pos at the end (more -@@ -2380,6 +2420,8 @@ _rl_col_width (str, start, end) - - if (end <= start) - return 0; -+ if (MB_CUR_MAX == 1) -+ return end - start; - - memset (&ps, 0, sizeof (mbstate_t)); - -- cgit v1.2.3