Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit Add more api to make gdb-11 happy (but not gdbtu...



details:   https://anonhg.NetBSD.org/src/rev/6ae2a59c49b6
branches:  trunk
changeset: 1023056:6ae2a59c49b6
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Aug 21 12:34:59 2021 +0000

description:
Add more api to make gdb-11 happy (but not gdbtui as usual)

diffstat:

 lib/libedit/readline.c          |  51 +++++++++++++++++++++++++++++++++++++++-
 lib/libedit/readline/readline.h |  19 ++++++++++++++-
 2 files changed, 67 insertions(+), 3 deletions(-)

diffs (151 lines):

diff -r f1da2350e33f -r 6ae2a59c49b6 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Sat Aug 21 11:58:12 2021 +0000
+++ b/lib/libedit/readline.c    Sat Aug 21 12:34:59 2021 +0000
@@ -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 @@
 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_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 @@
                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)
+{
+}
diff -r f1da2350e33f -r 6ae2a59c49b6 lib/libedit/readline/readline.h
--- a/lib/libedit/readline/readline.h   Sat Aug 21 11:58:12 2021 +0000
+++ b/lib/libedit/readline/readline.h   Sat Aug 21 12:34:59 2021 +0000
@@ -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_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 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 @@
 /*
  * 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 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_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 @@
 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
 }



Home | Main Index | Thread Index | Old Index