----
configure.ac
- hpux: add -DTGETENT_BROKEN to LOCAL_CFLAGS
+
+ 8/28
+ ----
+configure.ac
+ - hpux: add -DTGETFLAG_BROKEN to LOCAL_CFLAGS
+
+ 9/6
+ ---
+examples/autoconf/RL_LIB_READLINE_VERSION
+ - include <stdlib.h> in the AC_TRY_RUN block to accommodate compilers
+ that treat functions without an existing prototype as fatal errors.
+ Report and fix from Florian Weimer <fweimer@redhat.com>
called when readline is reading terminal input and read(2) is interrupted
by a signal. Currently not called for SIGHUP or SIGTERM.
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to readline-6.2 since
+the release of readline-6.1.
+
+a. The history library does not try to write the history filename in the
+ current directory if $HOME is unset. This closes a potential security
+ problem if the application does not specify a history filename.
+
+b. New bindable variable `completion-display-width' to set the number of
+ columns used when displaying completions.
+
+c. New bindable variable `completion-case-map' to cause case-insensitive
+ completion to treat `-' and `_' as identical.
+
+d. There are new bindable vi-mode command names to avoid readline's case-
+ insensitive matching not allowing them to be bound separately.
+
+e. New bindable variable `menu-complete-display-prefix' causes the menu
+ completion code to display the common prefix of the possible completions
+ before cycling through the list, instead of after.
+
-------------------------------------------------------------------------------
This is a terse description of the new features added to readline-6.1 since
the release of readline-6.0.
if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL)
colored_filetype = C_MISSING;
- else if (linkok == 0 && S_ISLNK(mode) && _rl_color_indicator[C_ORPHAN].string != NULL)
+ else if (linkok == 0 && _rl_color_indicator[C_ORPHAN].string != NULL)
colored_filetype = C_ORPHAN; /* dangling symlink */
else if(stat_ok != 0)
{
if (rl_inhibit_completion)
return (_rl_insert_char (ignore, invoking_key));
+#if 0
else if (rl_last_func == rl_complete && completion_changed_buffer == 0 && last_completion_failed == 0)
+#else
+ else if (rl_last_func == rl_complete && completion_changed_buffer == 0)
+#endif
return (rl_complete_internal ('?'));
else if (_rl_complete_show_all)
return (rl_complete_internal ('!'));
int start, end, delimiter, found_quote, i, nontrivial_lcd;
char *text, *saved_line_buffer;
char quote_char;
- int tlen, mlen;
+ int tlen, mlen, saved_last_completion_failed;
RL_SETSTATE(RL_STATE_COMPLETING);
+ saved_last_completion_failed = last_completion_failed;
+
set_completion_defaults (what_to_do);
saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL;
break;
case '?':
+ /* Let's try to insert a single match here if the last completion failed
+ but this attempt returned a single match. */
+ if (saved_last_completion_failed && matches[0] && *matches[0] && matches[1] == 0)
+ {
+ insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char);
+ append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd);
+ break;
+ }
+
if (rl_completion_display_matches_hook == 0)
{
_rl_sigcleanup = _rl_complete_sigcleanup;
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#include <stdlib.h>
typedef RETSIGTYPE sigfunc();
#include <sys/types.h>
#include <signal.h>
#include <setjmp.h>
+#include <stdlib.h>
main()
{
case "$host_os" in
isc*) LOCAL_CFLAGS=-Disc386 ;;
-hpux*) LOCAL_CFLAGS=-DTGETENT_BROKEN ;;
+hpux*) LOCAL_CFLAGS="-DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;;
esac
# shared library configuration section
case "$host_os" in
isc*) LOCAL_CFLAGS=-Disc386 ;;
-hpux*) LOCAL_CFLAGS=-DTGETENT_BROKEN ;;
+hpux*) LOCAL_CFLAGS="-DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;;
esac
# shared library configuration section
[AC_TRY_RUN([
#include <stdio.h>
#include <readline/readline.h>
+#include <stdlib.h>
extern int rl_gnu_readline_p;
static char *_rl_term_vs; /* very visible */
static char *_rl_term_ve; /* normal */
+/* It's not clear how HPUX is so broken here. */
+#ifdef TGETENT_BROKEN
+# define TGETENT_SUCCESS 0
+#else
+# define TGETENT_SUCCESS 1
+#endif
+#ifdef TGETFLAG_BROKEN
+# define TGETFLAG_SUCCESS 0
+#else
+# define TGETFLAG_SUCCESS 1
+#endif
+#define TGETFLAG(cap) (tgetflag (cap) == TGETFLAG_SUCCESS)
+
static void bind_termcap_arrow_keys PARAMS((Keymap));
/* Variables that hold the screen dimensions, used by the display code. */
tgetent_ret = tgetent (term_buffer, term);
}
-#ifdef TGETENT_BROKEN
- if (tgetent_ret < 0)
-#else
- if (tgetent_ret <= 0)
-#endif
+ if (tgetent_ret != TGETENT_SUCCESS)
{
FREE (term_string_buffer);
FREE (term_buffer);
if (!_rl_term_cr)
_rl_term_cr = "\r";
- _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
+ _rl_term_autowrap = TGETFLAG ("am") && TGETFLAG ("xn");
/* Allow calling application to set default height and width, using
rl_set_screen_size */
/* Check to see if this terminal has a meta key and clear the capability
variables if there is none. */
- term_has_meta = tgetflag ("km") != 0;
+ term_has_meta = TGETFLAG ("km");
if (term_has_meta == 0)
_rl_term_mm = _rl_term_mo = (char *)NULL;
#endif /* !__MSDOS__ */