aboutsummaryrefslogtreecommitdiff
path: root/readline/readline.h
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2015-07-14 20:29:21 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2015-07-25 09:53:01 -0400
commit4a11f2065906976675808364ddbd1c0f77eea41f (patch)
tree8b25495190b4d41b1785910c4cc4fd709d0a628a /readline/readline.h
parenta496fbc8802f0a5719db6347a43cc869e03d83c9 (diff)
downloadfsf-binutils-gdb-4a11f2065906976675808364ddbd1c0f77eea41f.zip
fsf-binutils-gdb-4a11f2065906976675808364ddbd1c0f77eea41f.tar.gz
fsf-binutils-gdb-4a11f2065906976675808364ddbd1c0f77eea41f.tar.bz2
Sync readline/ to version 7.0 alpha
This patch syncs our upstream copy of readline from version 6.2 to the latest version, 7.0 alpha (released July 10 2015). I essentially copied what was done the last time readline was synced, when Jan updated to readline 6.2 in 2011: http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html Procedure: 1. I extracted the readline-7.0-alpha tarball on top of readline/. 2. I deleted all the new files under doc/ that were deliberately omitted before. 3. I regenerated readline/configure and readline/examples/rlfe/configure using autoconf 2.64. No other configure files need regenerating. 4. I updated the function gdb_printable_part in completer.c with a trivial change made to the readline function it is based off of, printable_part in readline/complete.c. There is more work to be done in completer.c to sync it with readline/complete.c, but it is non-trivial and should probably be done separately anyway. Local patches that had to be reapplied: None. readline 7.0 alpha contains all of our local readline patches. New files in readline/: colors.{c,h} examples/{hist_erasedups,hist_purgecmd,rl-callbacktest,rlbasic}.c parse-colors.{c,h} readline.pc.in configure.ac Deleted files in readline/: configure.in Regressions: After the sync there is one testsuite regression, the test "signal SIGINT" in gdb.gdb/selftest.exp which now FAILs. Previously, the readline 6.2 SIGINT handler would temporarily reinstall the underlying application's SIGINT handler and immediately re-raise SIGINT so that the orginal handler gets invoked. But now (since readline 6.3) its SIGINT handler does not re-raise SIGINT or directly invoke the original handler; it now sets a flag marking that SIGINT was raised, and waits until readline explicitly has control to call the application's SIGINT handler. Anyway, because SIGINT is no longer re-raised from within readline's SIGINT handler, doing "signal SIGINT" with a stopped inferior gdb process will no longer resume and then immediately stop the process (since there is no 2nd SIGINT to immediately catch). Instead, the inferior gdb process will now just print "Quit" and continue to run. So with this commit, this particular test case is adjusted to reflect this change in behavior (we now have to send a 2nd SIGINT manually to stop it). Aside from this one testsuite regression, I personally noticed no regression in user-visible behavior. Though I only tested on x86_64 and on i686 Debian Stretch. Getting this kind of change in at the start of the GDB 7.11 development cycle will allow us to get a lot of passive testing from developers and from bleeding-edge users. readline/ChangeLog.gdb: Import readline 7.0 alpha * configure: Regenerate. * examples/rlfe/configure: Regenerate. gdb/ChangeLog: * completer.c (gdb_printable_part): Sync with readline function it is based off of. gdb/testsuite/ChangeLog: * gdb.gdb/selftest.exp (test_with_self): Update test to now expect the GDB inferior to no longer immediately stop after being resumed with "signal SIGINT".
Diffstat (limited to 'readline/readline.h')
-rw-r--r--readline/readline.h54
1 files changed, 48 insertions, 6 deletions
diff --git a/readline/readline.h b/readline/readline.h
index 0de168c..cac13d7 100644
--- a/readline/readline.h
+++ b/readline/readline.h
@@ -1,6 +1,6 @@
/* Readline.h -- the names of functions callable from within readline. */
-/* Copyright (C) 1987-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -39,9 +39,9 @@ extern "C" {
#endif
/* Hex-encoded Readline version number. */
-#define RL_READLINE_VERSION 0x0602 /* Readline 6.2 */
-#define RL_VERSION_MAJOR 6
-#define RL_VERSION_MINOR 2
+#define RL_READLINE_VERSION 0x0700 /* Readline 7.0 */
+#define RL_VERSION_MAJOR 7
+#define RL_VERSION_MINOR 0
/* Readline data structures. */
@@ -172,8 +172,9 @@ extern int rl_yank PARAMS((int, int));
extern int rl_yank_pop PARAMS((int, int));
extern int rl_yank_nth_arg PARAMS((int, int));
extern int rl_yank_last_arg PARAMS((int, int));
-/* Not available unless __CYGWIN__ is defined. */
-#ifdef __CYGWIN__
+extern int rl_bracketed_paste_begin PARAMS((int, int));
+/* Not available unless _WIN32 is defined. */
+#if defined (_WIN32)
extern int rl_paste_from_clipboard PARAMS((int, int));
#endif
@@ -185,6 +186,7 @@ extern int rl_forward_search_history PARAMS((int, int));
extern int rl_start_kbd_macro PARAMS((int, int));
extern int rl_end_kbd_macro PARAMS((int, int));
extern int rl_call_last_kbd_macro PARAMS((int, int));
+extern int rl_print_last_kbd_macro PARAMS((int, int));
/* Bindable undo commands. */
extern int rl_revert_line PARAMS((int, int));
@@ -204,6 +206,8 @@ extern int rl_tty_status PARAMS((int, int));
/* Bindable commands for incremental and non-incremental history searching. */
extern int rl_history_search_forward PARAMS((int, int));
extern int rl_history_search_backward PARAMS((int, int));
+extern int rl_history_substr_search_forward PARAMS((int, int));
+extern int rl_history_substr_search_backward PARAMS((int, int));
extern int rl_noninc_forward_search PARAMS((int, int));
extern int rl_noninc_reverse_search PARAMS((int, int));
extern int rl_noninc_forward_search_again PARAMS((int, int));
@@ -216,6 +220,7 @@ extern int rl_insert_close PARAMS((int, int));
extern void rl_callback_handler_install PARAMS((const char *, rl_vcpfunc_t *));
extern void rl_callback_read_char PARAMS((void));
extern void rl_callback_handler_remove PARAMS((void));
+extern void rl_callback_sigcleanup PARAMS((void));
/* Things for vi mode. Not available unless readline is compiled -DVI_MODE. */
/* VI-mode bindable commands. */
@@ -244,6 +249,7 @@ extern int rl_vi_column PARAMS((int, int));
extern int rl_vi_delete_to PARAMS((int, int));
extern int rl_vi_change_to PARAMS((int, int));
extern int rl_vi_yank_to PARAMS((int, int));
+extern int rl_vi_yank_pop PARAMS((int, int));
extern int rl_vi_rubout PARAMS((int, int));
extern int rl_vi_delete PARAMS((int, int));
extern int rl_vi_back_to_indent PARAMS((int, int));
@@ -339,6 +345,7 @@ extern Keymap rl_make_bare_keymap PARAMS((void));
extern Keymap rl_copy_keymap PARAMS((Keymap));
extern Keymap rl_make_keymap PARAMS((void));
extern void rl_discard_keymap PARAMS((Keymap));
+extern void rl_free_keymap PARAMS((Keymap));
extern Keymap rl_get_keymap_by_name PARAMS((const char *));
extern char *rl_get_keymap_name PARAMS((Keymap));
@@ -385,6 +392,7 @@ extern int rl_show_char PARAMS((int));
/* Undocumented in texinfo manual. */
extern int rl_character_len PARAMS((int, int));
+extern void rl_redraw_prompt_last_line PARAMS((void));
/* Save and restore internal prompt redisplay information. */
extern void rl_save_prompt PARAMS((void));
@@ -436,6 +444,10 @@ extern void rl_echo_signal_char PARAMS((int));
extern int rl_set_paren_blink_timeout PARAMS((int));
+/* History management functions. */
+
+extern void rl_clear_history PARAMS((void));
+
/* Undocumented. */
extern int rl_maybe_save_line PARAMS((void));
extern int rl_maybe_unsave_line PARAMS((void));
@@ -560,6 +572,13 @@ extern rl_hook_func_t *rl_pre_input_hook;
awaiting character input, or NULL, for no event handling. */
extern rl_hook_func_t *rl_event_hook;
+/* The address of a function to call if a read is interrupted by a signal. */
+extern rl_hook_func_t *rl_signal_event_hook;
+
+/* The address of a function to call if Readline needs to know whether or not
+ there is data available from the current input source. */
+extern rl_hook_func_t *rl_input_available_hook;
+
/* The address of the function to call to fetch a character from the current
Readline input stream */
extern rl_getc_func_t *rl_getc_function;
@@ -573,6 +592,10 @@ extern rl_voidfunc_t *rl_deprep_term_function;
extern Keymap rl_executing_keymap;
extern Keymap rl_binding_keymap;
+extern int rl_executing_key;
+extern char *rl_executing_keyseq;
+extern int rl_key_sequence_length;
+
/* Display variables. */
/* If non-zero, readline will erase the entire line, including any prompt,
if the only thing typed on an otherwise-blank line is something bound to
@@ -603,6 +626,10 @@ extern int rl_catch_signals;
to do that. */
extern int rl_catch_sigwinch;
+/* If non-zero, the readline SIGWINCH handler will modify LINES and
+ COLUMNS in the environment. */
+extern int rl_change_environment;
+
/* Completion variables. */
/* Pointer to the generator function for completion_matches ().
NULL means to use rl_filename_completion_function (), the default
@@ -686,6 +713,13 @@ extern rl_icppfunc_t *rl_directory_completion_hook;
it in bash to see how well it goes. */
extern rl_icppfunc_t *rl_directory_rewrite_hook;
+/* If non-zero, this is the address of a function for the completer to call
+ before deciding which character to append to a completed name. It should
+ modify the directory name passed as an argument if appropriate, and return
+ non-zero if it modifies the name. This should not worry about dequoting
+ the filename; that has already happened by the time it gets here. */
+extern rl_icppfunc_t *rl_filename_stat_hook;
+
/* If non-zero, this is the address of a function to call when reading
directory entries from the filesystem for completion and comparing
them to the partial word to be completed. The function should
@@ -863,6 +897,7 @@ struct readline_state {
rl_command_func_t *lastfunc;
int insmode;
int edmode;
+ char *kseq;
int kseqlen;
FILE *inf;
FILE *outf;
@@ -876,9 +911,16 @@ struct readline_state {
/* search state */
/* completion state */
+ rl_compentry_func_t *entryfunc;
+ rl_compentry_func_t *menuentryfunc;
+ rl_compignore_func_t *ignorefunc;
+ rl_completion_func_t *attemptfunc;
+ char *wordbreakchars;
/* options state */
+ /* hook state */
+
/* reserved for future expansion, so the struct size doesn't change */
char reserved[64];
};