diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-11-07 19:39:21 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-11-07 19:39:21 +0000 |
commit | 302da1a3d35c15cb29d76e0a939f8bcb13f7ad80 (patch) | |
tree | c2146dca82d530521c4d2cc46a95c26964311a2c /metachar.h | |
parent | 6bbc783f48498b808e19db4441299dc7d85a278b (diff) |
Import bmake-20201101vendor/NetBSD/bmake/20201101
Lots of new unit-tests increase code coverage.
Lots of refactoring, cleanup and simlpification to reduce
code size.
Fixes for Bug 223564 and 245807
Updates to dirdeps.mk and meta2deps.py
Notes
Notes:
svn path=/vendor/NetBSD/bmake/dist/; revision=367460
svn path=/vendor/NetBSD/bmake/20201101/; revision=367461; tag=vendor/NetBSD/bmake/20201101
Diffstat (limited to 'metachar.h')
-rw-r--r-- | metachar.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/metachar.h b/metachar.h index 98408ab3fb58..f180b483f8c3 100644 --- a/metachar.h +++ b/metachar.h @@ -1,4 +1,4 @@ -/* $NetBSD: metachar.h,v 1.7 2020/08/25 17:37:09 rillig Exp $ */ +/* $NetBSD: metachar.h,v 1.11 2020/10/31 18:20:00 rillig Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -35,17 +35,13 @@ extern unsigned char _metachar[]; -#define ismeta(c) _metachar[(c) & 0x7f] +#define is_shell_metachar(c) _metachar[(c) & 0x7f] -static inline int MAKE_ATTR_UNUSED -needshell(const char *cmd, int white) +static inline MAKE_ATTR_UNUSED int +needshell(const char *cmd) { - while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') { - if (white && isspace((unsigned char)*cmd)) - break; + while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=') cmd++; - } - return *cmd != '\0'; } |