Adjust API to a more modern readline (Ryo Onodera)
This commit is contained in:
parent
9437f450fa
commit
0804279dff
|
@ -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 @@ FILE *rl_outstream = NULL;
|
|||
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 @@ int rl_attempted_completion_over = 0;
|
|||
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 @@ rl_complete(int ignore __attribute__((__unused__)), int invoking_key)
|
|||
|
||||
/* 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 @@ rl_callback_read_char(void)
|
|||
}
|
||||
|
||||
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();
|
||||
|
|
|
@ -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 int max_input_history;
|
|||
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 *filename_completion_function(const char *, int);
|
|||
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 @@ void rl_reset_terminal(const char *);
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue