Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Adjust API to a more modern readline (Ryo Onodera)
details: https://anonhg.NetBSD.org/src/rev/7577f727cf7b
branches: trunk
changeset: 808786:7577f727cf7b
user: christos <christos%NetBSD.org@localhost>
date: Tue Jun 02 15:35:31 2015 +0000
description:
Adjust API to a more modern readline (Ryo Onodera)
diffstat:
lib/libedit/readline.c | 14 +++++++-------
lib/libedit/readline/readline.h | 16 ++++++++--------
2 files changed, 15 insertions(+), 15 deletions(-)
diffs (109 lines):
diff -r a49d528ed3c2 -r 7577f727cf7b lib/libedit/readline.c
--- a/lib/libedit/readline.c Tue Jun 02 14:19:26 2015 +0000
+++ b/lib/libedit/readline.c Tue Jun 02 15:35:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.116 2015/05/26 19:59:21 christos Exp $ */
+/* $NetBSD: readline.c,v 1.117 2015/06/02 15:35:31 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.116 2015/05/26 19:59:21 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.117 2015/06/02 15:35:31 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -78,7 +78,7 @@
int rl_point = 0;
int rl_end = 0;
char *rl_line_buffer = NULL;
-VCPFunction *rl_linefunc = NULL;
+rl_vcpfunc_t *rl_linefunc = NULL;
int rl_done = 0;
VFunction *rl_event_hook = NULL;
KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
@@ -107,9 +107,9 @@
char *rl_basic_word_break_characters = break_chars;
char *rl_completer_word_break_characters = NULL;
char *rl_completer_quote_characters = NULL;
-CPFunction *rl_completion_entry_function = NULL;
+rl_compentry_func_t *rl_completion_entry_function = NULL;
char *(*rl_completion_word_break_hook)(void) = NULL;
-CPPFunction *rl_attempted_completion_function = NULL;
+rl_completion_func_t *rl_attempted_completion_function = NULL;
Function *rl_pre_input_hook = NULL;
Function *rl_startup1_hook = NULL;
int (*rl_getc_function)(FILE *) = NULL;
@@ -1831,7 +1831,7 @@
/* Just look at how many global variables modify this operation! */
return fn_complete(e,
- (CPFunction *)rl_completion_entry_function,
+ (rl_compentry_func_t *)rl_completion_entry_function,
rl_attempted_completion_function,
ct_decode_string(rl_basic_word_break_characters, &wbreak_conv),
ct_decode_string(breakchars, &sprefix_conv),
@@ -2009,7 +2009,7 @@
}
void
-rl_callback_handler_install(const char *prompt, VCPFunction *linefunc)
+rl_callback_handler_install(const char *prompt, rl_vcpfunc_t *linefunc)
{
if (e == NULL) {
rl_initialize();
diff -r a49d528ed3c2 -r 7577f727cf7b lib/libedit/readline/readline.h
--- a/lib/libedit/readline/readline.h Tue Jun 02 14:19:26 2015 +0000
+++ b/lib/libedit/readline/readline.h Tue Jun 02 15:35:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.h,v 1.35 2015/05/26 19:59:21 christos Exp $ */
+/* $NetBSD: readline.h,v 1.36 2015/06/02 15:35:31 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -39,9 +39,9 @@
/* typedefs */
typedef int Function(const char *, int);
typedef void VFunction(void);
-typedef void VCPFunction(char *);
-typedef char *CPFunction(const char *, int);
-typedef char **CPPFunction(const char *, int, int);
+typedef void rl_vcpfunc_t(char *);
+typedef char *rl_compentry_func_t(const char *, int);
+typedef char **rl_completion_func_t(const char *, int, int);
typedef char *rl_compentry_func_t(const char *, int);
typedef int rl_command_func_t(int, int);
@@ -108,9 +108,9 @@
extern char *rl_basic_word_break_characters;
extern char *rl_completer_word_break_characters;
extern char *rl_completer_quote_characters;
-extern CPFunction *rl_completion_entry_function;
+extern rl_compentry_func_t *rl_completion_entry_function;
extern char *(*rl_completion_word_break_hook)(void);
-extern CPPFunction *rl_attempted_completion_function;
+extern rl_completion_func_t *rl_attempted_completion_function;
extern int rl_attempted_completion_over;
extern int rl_completion_type;
extern int rl_completion_query_items;
@@ -175,7 +175,7 @@
char *username_completion_function(const char *, int);
int rl_complete(int, int);
int rl_read_key(void);
-char **completion_matches(const char *, CPFunction *);
+char **completion_matches(const char *, rl_compentry_func_t *);
void rl_display_match_list(char **, int, int);
int rl_insert(int, int);
@@ -184,7 +184,7 @@
int rl_bind_key(int, rl_command_func_t *);
int rl_newline(int, int);
void rl_callback_read_char(void);
-void rl_callback_handler_install(const char *, VCPFunction *);
+void rl_callback_handler_install(const char *, rl_vcpfunc_t *);
void rl_callback_handler_remove(void);
void rl_redisplay(void);
int rl_get_previous_history(int, int);
Home |
Main Index |
Thread Index |
Old Index