Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Sync the alternative readline interface with rea...
details: https://anonhg.NetBSD.org/src/rev/f7a9c2d185c1
branches: trunk
changeset: 581128:f7a9c2d185c1
user: agc <agc%NetBSD.org@localhost>
date: Fri May 27 11:35:07 2005 +0000
description:
Sync the alternative readline interface with reality:
+ the rl_callback_handler_install takes a pointer to a void function
which has one char * argument (it's called that way in the readline
emulation source, otherwise there's no way to pass the line buffer
to the function which processes the line when EOL is encountered)
+ provide a prototype for that function signature and use it
Makes the callback readline interface work now.
diffstat:
lib/libedit/readline.c | 6 +++---
lib/libedit/readline/readline.h | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r 3c9ddb9f0805 -r f7a9c2d185c1 lib/libedit/readline.c
--- a/lib/libedit/readline.c Fri May 27 08:04:58 2005 +0000
+++ b/lib/libedit/readline.c Fri May 27 11:35:07 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.53 2005/05/07 16:01:25 dsl Exp $ */
+/* $NetBSD: readline.c,v 1.54 2005/05/27 11:35:07 agc Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.53 2005/05/07 16:01:25 dsl Exp $");
+__RCSID("$NetBSD: readline.c,v 1.54 2005/05/27 11:35:07 agc Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -1588,7 +1588,7 @@
}
void
-rl_callback_handler_install (const char *prompt, VFunction *linefunc)
+rl_callback_handler_install (const char *prompt, VCPFunction *linefunc)
{
if (e == NULL) {
rl_initialize();
diff -r 3c9ddb9f0805 -r f7a9c2d185c1 lib/libedit/readline/readline.h
--- a/lib/libedit/readline/readline.h Fri May 27 08:04:58 2005 +0000
+++ b/lib/libedit/readline/readline.h Fri May 27 11:35:07 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.h,v 1.13 2005/04/12 22:01:40 christos Exp $ */
+/* $NetBSD: readline.h,v 1.14 2005/05/27 11:35:07 agc Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -45,6 +45,7 @@
/* 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);
@@ -167,7 +168,7 @@
int rl_bind_key(int, int (*)(int, int));
int rl_newline(int, int);
void rl_callback_read_char(void);
-void rl_callback_handler_install(const char *, VFunction *);
+void rl_callback_handler_install(const char *, VCPFunction *);
void rl_callback_handler_remove(void);
void rl_redisplay(void);
int rl_get_previous_history(int, int);
Home |
Main Index |
Thread Index |
Old Index