Module Name: src Committed By: christos Date: Sat Aug 21 12:34:59 UTC 2021
Modified Files: src/lib/libedit: readline.c src/lib/libedit/readline: readline.h Log Message: Add more api to make gdb-11 happy (but not gdbtui as usual) To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/lib/libedit/readline.c cvs rdiff -u -r1.46 -r1.47 src/lib/libedit/readline/readline.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/readline.c diff -u src/lib/libedit/readline.c:1.162 src/lib/libedit/readline.c:1.163 --- src/lib/libedit/readline.c:1.162 Sun Aug 15 18:22:52 2021 +++ src/lib/libedit/readline.c Sat Aug 21 08:34:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.162 2021/08/15 22:22:52 rillig Exp $ */ +/* $NetBSD: readline.c,v 1.163 2021/08/21 12:34:59 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.162 2021/08/15 22:22:52 rillig Exp $"); +__RCSID("$NetBSD: readline.c,v 1.163 2021/08/21 12:34:59 christos Exp $"); #endif /* not lint && not SCCSID */ #include <sys/types.h> @@ -108,6 +108,7 @@ int rl_attempted_completion_over = 0; const char *rl_basic_word_break_characters = break_chars; char *rl_completer_word_break_characters = NULL; const char *rl_completer_quote_characters = NULL; +const char *rl_basic_quote_characters = "\"'"; rl_compentry_func_t *rl_completion_entry_function = NULL; char *(*rl_completion_word_break_hook)(void) = NULL; rl_completion_func_t *rl_attempted_completion_function = NULL; @@ -127,6 +128,15 @@ VFunction *rl_completion_display_matches VFunction *rl_prep_term_function = (VFunction *)rl_prep_terminal; VFunction *rl_deprep_term_function = (VFunction *)rl_deprep_terminal; KEYMAP_ENTRY_ARRAY emacs_meta_keymap; +unsigned long rl_readline_state; +int _rl_complete_mark_directories; +rl_icppfunc_t *rl_directory_completion_hook; +int rl_completion_suppress_append; +int rl_sort_completion_matches; +int _rl_completion_prefix_display_length; +int _rl_echoing_p; +int history_max_entries; +char *rl_display_prompt; /* * The current prompt string. @@ -2437,3 +2447,40 @@ rl_echo_signal_char(int sig) return; re_putc(e, c, 0); } + +int +rl_crlf(void) +{ + re_putc(e, '\n', 0); + return 0; +} + +int +rl_ding(void) +{ + re_putc(e, '\a', 0); + return 0; +} + +int +rl_abort(int count, int key) +{ + return count && key ? 0 : 0; +} + +int +rl_set_keymap_name(const char *name, Keymap k) +{ + return name && k ? 0 : 0; +} + +histdata_t +free_history_entry(HIST_ENTRY *he) +{ + return he ? NULL : NULL; +} + +void +_rl_erase_entire_line(void) +{ +} Index: src/lib/libedit/readline/readline.h diff -u src/lib/libedit/readline/readline.h:1.46 src/lib/libedit/readline/readline.h:1.47 --- src/lib/libedit/readline/readline.h:1.46 Fri Jun 7 11:19:29 2019 +++ src/lib/libedit/readline/readline.h Sat Aug 21 08:34:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.46 2019/06/07 15:19:29 christos Exp $ */ +/* $NetBSD: readline.h,v 1.47 2021/08/21 12:34:59 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -45,6 +45,7 @@ typedef char **rl_completion_func_t(cons typedef char *rl_compentry_func_t(const char *, int); typedef int rl_command_func_t(int, int); typedef int rl_hook_func_t(void); +typedef int rl_icppfunc_t(char **); /* only supports length */ typedef struct { @@ -106,6 +107,7 @@ extern char *rl_line_buffer; extern int rl_point, rl_end; extern int history_base, history_length; extern int max_input_history; +extern const char *rl_basic_quote_characters; extern const char *rl_basic_word_break_characters; extern char *rl_completer_word_break_characters; extern const char *rl_completer_quote_characters; @@ -127,6 +129,7 @@ extern int rl_done; /* * The following is not implemented */ +extern unsigned long rl_readline_state; extern int rl_catch_signals; extern int rl_catch_sigwinch; extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, @@ -142,6 +145,14 @@ extern VFunction *rl_deprep_term_functio extern rl_hook_func_t *rl_event_hook; extern int readline_echoing_p; extern int _rl_print_completions_horizontally; +extern int _rl_complete_mark_directories; +extern rl_icppfunc_t *rl_directory_completion_hook; +extern int rl_completion_suppress_append; +extern int rl_sort_completion_matches; +extern int _rl_completion_prefix_display_length; +extern int _rl_echoing_p; +extern int history_max_entries; +extern char *rl_display_prompt; /* supported functions */ char *readline(const char *); @@ -213,6 +224,8 @@ int rl_set_prompt(const char *); int rl_on_new_line(void); void rl_reset_after_signal(void); void rl_echo_signal_char(int); +int rl_crlf(void); +int rl_ding(void); /* * The following are not implemented @@ -226,6 +239,10 @@ int rl_bind_key_in_map(int, rl_command void rl_cleanup_after_signal(void); void rl_free_line_state(void); int rl_set_keyboard_input_timeout(int); +int rl_abort(int, int); +int rl_set_keymap_name(const char *, Keymap); +histdata_t free_history_entry(HIST_ENTRY *); +void _rl_erase_entire_line(void); #ifdef __cplusplus }