diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2015-07-14 20:29:21 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2015-07-14 22:26:54 -0400 |
commit | 379059215e823555a37a8dc7e02cef8fd86566e4 (patch) | |
tree | 3e271ced95d561feb7b3701abe9a090a5511179c /readline/rlprivate.h | |
parent | 210187848791f50ee7dd8eaae8fc4bd371b3550b (diff) | |
download | gdb-users/ppalka/readline-7.0-update.zip gdb-users/ppalka/readline-7.0-update.tar.gz gdb-users/ppalka/readline-7.0-update.tar.bz2 |
Sync readline/ to version 7.0 alphausers/ppalka/readline-7.0-update
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. [This is especially convenient because it allows us forego
a consensus on how to manage local patches across readline syncs :)]
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. [And as new versions of readline 7.0 are
released, I will try to sync our local copy promptly.]
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/rlprivate.h')
-rw-r--r-- | readline/rlprivate.h | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/readline/rlprivate.h b/readline/rlprivate.h index 384ff67..9b859f9 100644 --- a/readline/rlprivate.h +++ b/readline/rlprivate.h @@ -1,7 +1,7 @@ /* rlprivate.h -- functions and variables global to the readline library, but not intended for use by applications. */ -/* Copyright (C) 1999-2010 Free Software Foundation, Inc. +/* Copyright (C) 1999-2012 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. @@ -42,6 +42,13 @@ if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ } while (0) +#define RL_SIG_RECEIVED() (_rl_caught_signal != 0) +#define RL_SIGINT_RECEIVED() (_rl_caught_signal == SIGINT) +#define RL_SIGWINCH_RECEIVED() (_rl_caught_signal == SIGWINCH) + +#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) +#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) + /************************************************************************* * * * Global structs undocumented in texinfo manual and not in readline.h * @@ -86,9 +93,11 @@ typedef struct __rl_search_context int history_pos; int direction; + int prevc; int lastc; #if defined (HANDLE_MULTIBYTE) char mb[MB_LEN_MAX]; + char pmb[MB_LEN_MAX]; #endif char *sline; @@ -156,6 +165,8 @@ typedef struct __rl_callback_generic_arg typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *)); +typedef void _rl_sigcleanup_func_t PARAMS((int, void *)); + /************************************************************************* * * * Global functions undocumented in texinfo manual and not in readline.h * @@ -173,12 +184,15 @@ extern int rl_complete_with_tilde_expansion; #if defined (VISIBLE_STATS) extern int rl_visible_stats; #endif /* VISIBLE_STATS */ +#if defined (COLOR_SUPPORT) +extern int _rl_colored_stats; +extern int _rl_colored_completion_prefix; +#endif /* readline.c */ extern int rl_line_buffer_len; extern int rl_arg_sign; extern int rl_visible_prompt_length; -extern int rl_key_sequence_length; extern int rl_byte_oriented; /* display.c */ @@ -189,7 +203,7 @@ extern int rl_blink_matching_paren; /************************************************************************* * * - * Global functions and variables unsed and undocumented * + * Global functions and variables unused and undocumented * * * *************************************************************************/ @@ -240,6 +254,7 @@ extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *)); #endif /* READLINE_CALLBACKS */ /* bind.c */ +extern char *_rl_untranslate_macro_value PARAMS((char *, int)); /* complete.c */ extern void _rl_reset_completion_state PARAMS((void)); @@ -248,6 +263,7 @@ extern void _rl_free_match_list PARAMS((char **)); /* display.c */ extern char *_rl_strip_prompt PARAMS((char *)); +extern void _rl_reset_prompt PARAMS((void)); extern void _rl_move_cursor_relative PARAMS((int, const char *)); extern void _rl_move_vert PARAMS((int)); extern void _rl_save_prompt PARAMS((void)); @@ -276,12 +292,24 @@ extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int)); extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int)); extern int _rl_isearch_callback PARAMS((_rl_search_cxt *)); +extern int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int)); extern int _rl_search_getchar PARAMS((_rl_search_cxt *)); +/* kill.c */ +#define BRACK_PASTE_PREF "\033[200~" +#define BRACK_PASTE_SUFF "\033[201~" + +#define BRACK_PASTE_LAST '~' +#define BRACK_PASTE_SLEN 6 + +#define BRACK_PASTE_INIT "\033[?2004h" +#define BRACK_PASTE_FINI "\033[?2004l" + /* macro.c */ extern void _rl_with_macro_input PARAMS((char *)); extern int _rl_next_macro_key PARAMS((void)); +extern int _rl_prev_macro_key PARAMS((void)); extern void _rl_push_executing_macro PARAMS((void)); extern void _rl_pop_executing_macro PARAMS((void)); extern void _rl_add_macro_char PARAMS((int)); @@ -319,6 +347,7 @@ extern int _rl_restore_tty_signals PARAMS((void)); /* search.c */ extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *)); +extern int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int)); /* signals.c */ extern void _rl_signal_handler PARAMS((int)); @@ -330,6 +359,7 @@ extern void _rl_release_sigwinch PARAMS((void)); /* terminal.c */ extern void _rl_get_screen_size PARAMS((int, int)); +extern void _rl_sigwinch_resize_terminal PARAMS((void)); extern int _rl_init_terminal_io PARAMS((const char *)); #ifdef _MINIX extern void _rl_output_character_function PARAMS((int)); @@ -339,6 +369,7 @@ extern int _rl_output_character_function PARAMS((int)); extern void _rl_output_some_chars PARAMS((const char *, int)); extern int _rl_backspace PARAMS((int)); extern void _rl_enable_meta_key PARAMS((void)); +extern void _rl_disable_meta_key PARAMS((void)); extern void _rl_control_keypad PARAMS((int)); extern void _rl_set_cursor PARAMS((int, int)); @@ -360,6 +391,7 @@ extern int _rl_set_mark_at_pos PARAMS((int)); /* undo.c */ extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *)); extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *)); +extern void _rl_free_undo_list PARAMS((UNDO_LIST *)); /* util.c */ #if defined (USE_VARARGS) && defined (PREFER_STDARG) @@ -371,6 +403,7 @@ extern void _rl_ttymsg (); extern void _rl_errmsg (); extern void _rl_trace (); #endif +extern void _rl_audit_tty PARAMS((char *)); extern int _rl_tropen PARAMS((void)); @@ -391,6 +424,7 @@ extern void _rl_vi_initialize_line PARAMS((void)); extern void _rl_vi_reset_last PARAMS((void)); extern void _rl_vi_set_last PARAMS((int, int, int)); extern int _rl_vi_textmod_command PARAMS((int)); +extern int _rl_vi_motion_command PARAMS((int)); extern void _rl_vi_done_inserting PARAMS((void)); extern int _rl_vi_domove_callback PARAMS((_rl_vimotion_cxt *)); @@ -427,6 +461,13 @@ extern int _rl_last_c_pos; extern int _rl_suppress_redisplay; extern int _rl_want_redisplay; +extern char *_rl_emacs_mode_str; +extern int _rl_emacs_modestr_len; +extern char *_rl_vi_ins_mode_str; +extern int _rl_vi_ins_modestr_len; +extern char *_rl_vi_cmd_mode_str; +extern int _rl_vi_cmd_modestr_len; + /* isearch.c */ extern char *_rl_isearch_terminators; @@ -441,6 +482,9 @@ extern int _rl_history_saved_point; extern _rl_arg_cxt _rl_argcxt; +/* nls.c */ +extern int _rl_utf8locale; + /* readline.c */ extern int _rl_echoing_p; extern int _rl_horizontal_scroll_mode; @@ -452,6 +496,8 @@ extern int _rl_output_meta_chars; extern int _rl_bind_stty_chars; extern int _rl_revert_all_at_newline; extern int _rl_echo_control_chars; +extern int _rl_show_mode_in_prompt; +extern int _rl_enable_bracketed_paste; extern char *_rl_comment_begin; extern unsigned char _rl_parsing_conditionalized_out; extern Keymap _rl_keymap; @@ -461,6 +507,9 @@ extern int _rl_last_command_was_kill; extern int _rl_eof_char; extern procenv_t _rl_top_level; extern _rl_keyseq_cxt *_rl_kscxt; +extern int _rl_keyseq_timeout; + +extern int _rl_executing_keyseq_size; /* search.c */ extern _rl_search_cxt *_rl_nscxt; @@ -469,6 +518,9 @@ extern _rl_search_cxt *_rl_nscxt; extern int _rl_interrupt_immediately; extern int volatile _rl_caught_signal; +extern _rl_sigcleanup_func_t *_rl_sigcleanup; +extern void *_rl_sigcleanarg; + extern int _rl_echoctl; extern int _rl_intr_char; @@ -495,6 +547,9 @@ extern int _rl_screenchars; extern int _rl_terminal_can_insert; extern int _rl_term_autowrap; +/* text.c */ +extern int _rl_optimize_typeahead; + /* undo.c */ extern int _rl_doing_an_undo; extern int _rl_undo_group_level; |