Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): rename ismeta to is_shell_metachar



details:   https://anonhg.NetBSD.org/src/rev/98eca74f6b85
branches:  trunk
changeset: 956505:98eca74f6b85
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 31 18:17:08 2020 +0000

description:
make(1): rename ismeta to is_shell_metachar

The old name was too broad.

diffstat:

 usr.bin/make/metachar.h |  6 +++---
 usr.bin/make/var.c      |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r d244ce421c89 -r 98eca74f6b85 usr.bin/make/metachar.h
--- a/usr.bin/make/metachar.h   Sat Oct 31 18:14:59 2020 +0000
+++ b/usr.bin/make/metachar.h   Sat Oct 31 18:17:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: metachar.h,v 1.9 2020/09/13 15:27:25 rillig Exp $      */
+/*     $NetBSD: metachar.h,v 1.10 2020/10/31 18:17:08 rillig Exp $     */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -35,12 +35,12 @@
 
 extern unsigned char _metachar[];
 
-#define ismeta(c)      _metachar[(c) & 0x7f]
+#define is_shell_metachar(c)   _metachar[(c) & 0x7f]
 
 static inline MAKE_ATTR_UNUSED int
 needshell(const char *cmd, int white)
 {
-       while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') {
+       while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=') {
                if (white && ch_isspace(*cmd))
                        break;
                cmd++;
diff -r d244ce421c89 -r 98eca74f6b85 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sat Oct 31 18:14:59 2020 +0000
+++ b/usr.bin/make/var.c        Sat Oct 31 18:17:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.628 2020/10/31 18:14:59 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.629 2020/10/31 18:17:08 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
 #include    "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.628 2020/10/31 18:14:59 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.629 2020/10/31 18:17:08 rillig Exp $");
 
 #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
 #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -1647,7 +1647,7 @@
            Buf_AddStr(&buf, newline);
            continue;
        }
-       if (ch_isspace(*str) || ismeta((unsigned char)*str))
+       if (ch_isspace(*str) || is_shell_metachar((unsigned char)*str))
            Buf_AddByte(&buf, '\\');
        Buf_AddByte(&buf, *str);
        if (quoteDollar && *str == '$')



Home | Main Index | Thread Index | Old Index