Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit Pass the unescaped filename the the append funct...



details:   https://anonhg.NetBSD.org/src/rev/213163d7004a
branches:  trunk
changeset: 954053:213163d7004a
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 28 13:33:54 2021 +0000

description:
Pass the unescaped filename the the append function so it has to do less work
(for example it can call stat(2) directly (Piotr Stefaniak)

diffstat:

 lib/libedit/filecomplete.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8e57cc51da4d -r 213163d7004a lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Sun Mar 28 13:09:43 2021 +0000
+++ b/lib/libedit/filecomplete.c        Sun Mar 28 13:33:54 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filecomplete.c,v 1.65 2021/03/27 18:55:02 christos Exp $       */
+/*     $NetBSD: filecomplete.c,v 1.66 2021/03/28 13:33:54 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.65 2021/03/27 18:55:02 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.66 2021/03/28 13:33:54 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -291,7 +291,7 @@
 
        if (single_match && app_func) {
                escaped_str[offset] = 0;
-               append_char = app_func(escaped_str);
+               append_char = app_func(filename);
                /* we want to append space only if we are not inside quotes */
                if (append_char[0] == ' ') {
                        if (!s_quoted && !d_quoted)



Home | Main Index | Thread Index | Old Index