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: rename is_shell_metachar, fix character c...
details: https://anonhg.NetBSD.org/src/rev/fcd6df6059e1
branches: trunk
changeset: 359516:fcd6df6059e1
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jan 08 11:04:13 2022 +0000
description:
make: rename is_shell_metachar, fix character conversion warning
No binary change.
diffstat:
usr.bin/make/metachar.h | 6 +++---
usr.bin/make/var.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r bfcd34fbb51e -r fcd6df6059e1 usr.bin/make/metachar.h
--- a/usr.bin/make/metachar.h Sat Jan 08 10:22:03 2022 +0000
+++ b/usr.bin/make/metachar.h Sat Jan 08 11:04:13 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: metachar.h,v 1.19 2021/12/15 12:08:25 rillig Exp $ */
+/* $NetBSD: metachar.h,v 1.20 2022/01/08 11:04:13 rillig Exp $ */
/*
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
extern const unsigned char _metachar[];
MAKE_INLINE bool MAKE_ATTR_USE
-is_shell_metachar(char c)
+ch_is_shell_meta(char c)
{
return _metachar[c & 0x7f] != 0;
}
@@ -44,7 +44,7 @@
MAKE_INLINE bool MAKE_ATTR_USE
needshell(const char *cmd)
{
- while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=')
+ while (!ch_is_shell_meta(*cmd) && *cmd != ':' && *cmd != '=')
cmd++;
return *cmd != '\0';
}
diff -r bfcd34fbb51e -r fcd6df6059e1 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sat Jan 08 10:22:03 2022 +0000
+++ b/usr.bin/make/var.c Sat Jan 08 11:04:13 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.996 2022/01/07 20:37:25 rillig Exp $ */
+/* $NetBSD: var.c,v 1.997 2022/01/08 11:04:13 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.996 2022/01/07 20:37:25 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.997 2022/01/08 11:04:13 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -1870,7 +1870,7 @@
LazyBuf_AddStr(buf, newline);
continue;
}
- if (ch_isspace(*p) || is_shell_metachar((unsigned char)*p))
+ if (ch_isspace(*p) || ch_is_shell_meta(*p))
LazyBuf_Add(buf, '\\');
LazyBuf_Add(buf, *p);
if (quoteDollar && *p == '$')
Home |
Main Index |
Thread Index |
Old Index