Module Name: src
Committed By: christos
Date: Tue Apr 25 17:51:32 UTC 2023
Modified Files:
src/lib/libedit: filecomplete.c filecomplete.h readline.c sys.h
src/lib/libedit/readline: readline.h
Log Message:
pass lint.
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/lib/libedit/filecomplete.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libedit/filecomplete.h
cvs rdiff -u -r1.180 -r1.181 src/lib/libedit/readline.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libedit/sys.h
cvs rdiff -u -r1.54 -r1.55 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/filecomplete.c
diff -u src/lib/libedit/filecomplete.c:1.72 src/lib/libedit/filecomplete.c:1.73
--- src/lib/libedit/filecomplete.c:1.72 Fri Feb 3 17:01:42 2023
+++ src/lib/libedit/filecomplete.c Tue Apr 25 13:51:32 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.c,v 1.72 2023/02/03 22:01:42 christos Exp $ */
+/* $NetBSD: filecomplete.c,v 1.73 2023/04/25 17:51:32 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.72 2023/02/03 22:01:42 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.73 2023/04/25 17:51:32 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -459,11 +459,11 @@ out:
el_free(expname);
return rs;
}
+
/*
* returns list of completions for text given
* non-static for readline.
*/
-char ** completion_matches(const char *, char *(*)(const char *, int));
char **
completion_matches(const char *text, char *(*genfunc)(const char *, int))
{
Index: src/lib/libedit/filecomplete.h
diff -u src/lib/libedit/filecomplete.h:1.14 src/lib/libedit/filecomplete.h:1.15
--- src/lib/libedit/filecomplete.h:1.14 Sun Sep 26 09:45:54 2021
+++ src/lib/libedit/filecomplete.h Tue Apr 25 13:51:32 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.h,v 1.14 2021/09/26 13:45:54 christos Exp $ */
+/* $NetBSD: filecomplete.h,v 1.15 2023/04/25 17:51:32 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -48,4 +48,7 @@ void fn_display_match_list(EditLine *, c
char *fn_tilde_expand(const char *);
char *fn_filename_completion_function(const char *, int);
+/* XXX: readline */
+char **completion_matches(const char *, char *(*)(const char *, int));
+
#endif
Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.180 src/lib/libedit/readline.c:1.181
--- src/lib/libedit/readline.c:1.180 Mon Apr 24 16:02:53 2023
+++ src/lib/libedit/readline.c Tue Apr 25 13:51:32 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.180 2023/04/24 20:02:53 christos Exp $ */
+/* $NetBSD: readline.c,v 1.181 2023/04/25 17:51:32 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.180 2023/04/24 20:02:53 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.181 2023/04/25 17:51:32 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -51,7 +51,9 @@ __RCSID("$NetBSD: readline.c,v 1.180 202
#include <unistd.h>
#include <vis.h>
+#define completion_matches xxx_completion_matches
#include "readline/readline.h"
+#undef completion_matches
#include "el.h"
#include "fcns.h"
#include "filecomplete.h"
@@ -101,7 +103,7 @@ int max_input_history = 0;
char history_expansion_char = '!';
char history_subst_char = '^';
char *history_no_expand_chars = expand_chars;
-Function *history_inhibit_expansion_function = NULL;
+rl_linebuf_func_t *history_inhibit_expansion_function = NULL;
char *history_arg_extract(int start, int end, const char *str);
int rl_inhibit_completion = 0;
Index: src/lib/libedit/sys.h
diff -u src/lib/libedit/sys.h:1.28 src/lib/libedit/sys.h:1.29
--- src/lib/libedit/sys.h:1.28 Sat Feb 4 09:34:28 2023
+++ src/lib/libedit/sys.h Tue Apr 25 13:51:32 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sys.h,v 1.28 2023/02/04 14:34:28 christos Exp $ */
+/* $NetBSD: sys.h,v 1.29 2023/04/25 17:51:32 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -44,7 +44,7 @@
#include <sys/cdefs.h>
#endif
-#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
+#if !defined(__attribute__) && !defined(__lint__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
# define __attribute__(A)
#endif
Index: src/lib/libedit/readline/readline.h
diff -u src/lib/libedit/readline/readline.h:1.54 src/lib/libedit/readline/readline.h:1.55
--- src/lib/libedit/readline/readline.h:1.54 Fri Apr 21 10:56:13 2023
+++ src/lib/libedit/readline/readline.h Tue Apr 25 13:51:32 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.h,v 1.54 2023/04/21 14:56:13 christos Exp $ */
+/* $NetBSD: readline.h,v 1.55 2023/04/25 17:51:32 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
/* list of readline stuff supported by editline library's readline wrapper */
/* typedefs */
-typedef int Function(const char *, int);
+typedef int rl_linebuf_func_t(const char *, int);
typedef void rl_voidfunc_t(void);
typedef void rl_vintfunc_t(int);
typedef void rl_vcpfunc_t(char *);
@@ -65,7 +65,7 @@ typedef struct _keymap_entry {
#define ISFUNC 0
#define ISKMAP 1
#define ISMACR 2
- Function *function;
+ rl_linebuf_func_t *function;
} KEYMAP_ENTRY;
#define KEYMAP_SIZE 256
@@ -112,9 +112,7 @@ extern const char *rl_readline_name;
extern FILE *rl_instream;
extern FILE *rl_outstream;
extern char *rl_line_buffer;
-extern int rl_point, rl_end;
-extern int history_base, history_length;
-extern int max_input_history;
+extern int rl_point, rl_end;
extern const char *rl_basic_quote_characters;
extern const char *rl_basic_word_break_characters;
extern char *rl_completer_word_break_characters;
@@ -128,12 +126,23 @@ extern int rl_completion_query_items;
extern const char *rl_special_prefixes;
extern int rl_completion_append_character;
extern int rl_inhibit_completion;
-extern rl_hook_func_t *rl_pre_input_hook;
-extern rl_hook_func_t *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;
extern int rl_done;
+extern rl_vcpfunc_t *rl_linefunc;
+extern rl_hook_func_t *rl_startup1_hook;
+extern char *rl_prompt_saved;
+extern int history_base, history_length;
+extern int history_offset;
+extern char history_expansion_char;
+extern char history_subst_char;
+extern char *history_no_expand_chars;
+extern rl_linebuf_func_t *history_inhibit_expansion_function;
+extern int max_input_history;
+
/*
* The following is not implemented
*/