Module Name: src Committed By: rillig Date: Sat Oct 31 18:17:08 UTC 2020
Modified Files: src/usr.bin/make: metachar.h var.c Log Message: make(1): rename ismeta to is_shell_metachar The old name was too broad. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/metachar.h cvs rdiff -u -r1.628 -r1.629 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/metachar.h diff -u src/usr.bin/make/metachar.h:1.9 src/usr.bin/make/metachar.h:1.10 --- src/usr.bin/make/metachar.h:1.9 Sun Sep 13 15:27:25 2020 +++ src/usr.bin/make/metachar.h Sat Oct 31 18:17:08 2020 @@ -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++; Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.628 src/usr.bin/make/var.c:1.629 --- src/usr.bin/make/var.c:1.628 Sat Oct 31 18:14:59 2020 +++ src/usr.bin/make/var.c Sat Oct 31 18:17:08 2020 @@ -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 @@ VarQuote(const char *str, Boolean quoteD 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 == '$')