Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit PR/56695: Walter Lozano: Correct declaration of ...



details:   https://anonhg.NetBSD.org/src/rev/f023dda46821
branches:  trunk
changeset: 361974:f023dda46821
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 19 17:45:02 2022 +0000

description:
PR/56695: Walter Lozano: Correct declaration of hook functions.

diffstat:

 lib/libedit/readline.c          |  14 +++++++-------
 lib/libedit/readline/readline.h |   6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (76 lines):

diff -r 77d52b8790dc -r f023dda46821 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Fri Feb 18 19:04:52 2022 +0000
+++ b/lib/libedit/readline.c    Sat Feb 19 17:45:02 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.172 2022/02/08 15:05:10 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.173 2022/02/19 17:45:02 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.172 2022/02/08 15:05:10 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.173 2022/02/19 17:45:02 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -113,8 +113,8 @@
 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;
-Function *rl_pre_input_hook = NULL;
-Function *rl_startup1_hook = NULL;
+rl_hook_func_t *rl_pre_input_hook = NULL;
+rl_hook_func_t *rl_startup1_hook = NULL;
 int (*rl_getc_function)(FILE *) = NULL;
 char *rl_terminal_name = NULL;
 int rl_already_prompted = 0;
@@ -123,7 +123,7 @@
 int readline_echoing_p = 1;
 int _rl_print_completions_horizontally = 0;
 VFunction *rl_redisplay_function = NULL;
-Function *rl_startup_hook = NULL;
+rl_hook_func_t *rl_startup_hook = NULL;
 VFunction *rl_completion_display_matches_hook = NULL;
 VFunction *rl_prep_term_function = (VFunction *)rl_prep_terminal;
 VFunction *rl_deprep_term_function = (VFunction *)rl_deprep_terminal;
@@ -445,7 +445,7 @@
        if (e == NULL || h == NULL)
                rl_initialize();
        if (rl_startup_hook) {
-               (*rl_startup_hook)(NULL, 0);
+               (*rl_startup_hook)();
        }
        tty_init(e);
 
@@ -460,7 +460,7 @@
                goto out;
 
        if (rl_pre_input_hook)
-               (*rl_pre_input_hook)(NULL, 0);
+               (*rl_pre_input_hook)();
 
        if (rl_event_hook && !(e->el_flags & NO_TTY)) {
                el_set(e, EL_GETCFN, _rl_event_read_char);
diff -r 77d52b8790dc -r f023dda46821 lib/libedit/readline/readline.h
--- a/lib/libedit/readline/readline.h   Fri Feb 18 19:04:52 2022 +0000
+++ b/lib/libedit/readline/readline.h   Sat Feb 19 17:45:02 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.h,v 1.52 2022/02/08 15:05:10 christos Exp $   */
+/*     $NetBSD: readline.h,v 1.53 2022/02/19 17:45:02 christos Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -127,8 +127,8 @@
 extern const char      *rl_special_prefixes;
 extern int             rl_completion_append_character;
 extern int             rl_inhibit_completion;
-extern Function                *rl_pre_input_hook;
-extern Function                *rl_startup_hook;
+extern rl_hook_func_t          *rl_pre_input_hook;
+extern rl_hook_func_t          *rl_startup_hook;
 extern char            *rl_terminal_name;
 extern int             rl_already_prompted;
 extern char            *rl_prompt;



Home | Main Index | Thread Index | Old Index