Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit pass lint.
details: https://anonhg.NetBSD.org/src/rev/5330810b53a8
branches: trunk
changeset: 374477:5330810b53a8
user: christos <christos%NetBSD.org@localhost>
date: Tue Apr 25 17:51:32 2023 +0000
description:
pass lint.
diffstat:
lib/libedit/filecomplete.c | 6 +++---
lib/libedit/filecomplete.h | 5 ++++-
lib/libedit/readline.c | 8 +++++---
lib/libedit/readline/readline.h | 25 +++++++++++++++++--------
lib/libedit/sys.h | 4 ++--
5 files changed, 31 insertions(+), 17 deletions(-)
diffs (167 lines):
diff -r acffeb3a2cd6 -r 5330810b53a8 lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c Tue Apr 25 01:48:37 2023 +0000
+++ b/lib/libedit/filecomplete.c Tue Apr 25 17:51:32 2023 +0000
@@ -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))
{
diff -r acffeb3a2cd6 -r 5330810b53a8 lib/libedit/filecomplete.h
--- a/lib/libedit/filecomplete.h Tue Apr 25 01:48:37 2023 +0000
+++ b/lib/libedit/filecomplete.h Tue Apr 25 17:51:32 2023 +0000
@@ -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
diff -r acffeb3a2cd6 -r 5330810b53a8 lib/libedit/readline.c
--- a/lib/libedit/readline.c Tue Apr 25 01:48:37 2023 +0000
+++ b/lib/libedit/readline.c Tue Apr 25 17:51:32 2023 +0000
@@ -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 @@
#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;
diff -r acffeb3a2cd6 -r 5330810b53a8 lib/libedit/readline/readline.h
--- a/lib/libedit/readline/readline.h Tue Apr 25 01:48:37 2023 +0000
+++ b/lib/libedit/readline/readline.h Tue Apr 25 17:51:32 2023 +0000
@@ -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
*/
diff -r acffeb3a2cd6 -r 5330810b53a8 lib/libedit/sys.h
--- a/lib/libedit/sys.h Tue Apr 25 01:48:37 2023 +0000
+++ b/lib/libedit/sys.h Tue Apr 25 17:51:32 2023 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index