Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit Add a entry point for the complete function for ...



details:   https://anonhg.NetBSD.org/src/rev/2c75f2df6d6e
branches:  trunk
changeset: 373338:2c75f2df6d6e
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 03 22:01:42 2023 +0000

description:
Add a entry point for the complete function for FreeBSD compatibility with sh.

diffstat:

 lib/libedit/filecomplete.c |  14 ++++++++++++--
 lib/libedit/histedit.h     |   3 ++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r de56c5a20303 -r 2c75f2df6d6e lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Fri Feb 03 20:16:03 2023 +0000
+++ b/lib/libedit/filecomplete.c        Fri Feb 03 22:01:42 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filecomplete.c,v 1.71 2022/10/30 19:11:31 christos Exp $       */
+/*     $NetBSD: filecomplete.c,v 1.72 2023/02/03 22:01:42 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.71 2022/10/30 19:11:31 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.72 2023/02/03 22:01:42 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -851,3 +851,13 @@
            break_chars, NULL, NULL, (size_t)100,
            NULL, NULL, NULL, NULL);
 }
+
+/*
+ * el-compatible wrapper around rl_complete; needed for key binding
+ */
+/* ARGSUSED */
+unsigned char
+_el_fn_sh_complete(EditLine *el, int ch)
+{
+       return _el_fn_complete(el, ch);
+}
diff -r de56c5a20303 -r 2c75f2df6d6e lib/libedit/histedit.h
--- a/lib/libedit/histedit.h    Fri Feb 03 20:16:03 2023 +0000
+++ b/lib/libedit/histedit.h    Fri Feb 03 22:01:42 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: histedit.h,v 1.61 2022/02/08 21:13:22 rillig Exp $     */
+/*     $NetBSD: histedit.h,v 1.62 2023/02/03 22:01:42 christos Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -113,6 +113,7 @@
 int             el_set(EditLine *, int, ...);
 int             el_get(EditLine *, int, ...);
 unsigned char  _el_fn_complete(EditLine *, int);
+unsigned char  _el_fn_sh_complete(EditLine *, int);
 
 /*
  * el_set/el_get parameters



Home | Main Index | Thread Index | Old Index