diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-09-05 16:11:04 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-09-05 16:11:04 +0000 |
commit | 6bbc783f48498b808e19db4441299dc7d85a278b (patch) | |
tree | be201219a56594c76537191ee91fdd3ef8cfb348 /metachar.h | |
parent | 367d32e2b15fe0397ddecccaa04cf9ed0164c969 (diff) | |
download | src-6bbc783f48498b808e19db4441299dc7d85a278b.tar.gz src-6bbc783f48498b808e19db4441299dc7d85a278b.zip |
Notes
Diffstat (limited to 'metachar.h')
-rw-r--r-- | metachar.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/metachar.h b/metachar.h index db88d671067e..98408ab3fb58 100644 --- a/metachar.h +++ b/metachar.h @@ -1,4 +1,4 @@ -/* $NetBSD: metachar.h,v 1.4 2015/06/21 20:26:02 christos Exp $ */ +/* $NetBSD: metachar.h,v 1.7 2020/08/25 17:37:09 rillig Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -28,25 +28,16 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _METACHAR_H -#define _METACHAR_H +#ifndef MAKE_METACHAR_H +#define MAKE_METACHAR_H -#include <ctype.h> +#include "make.h" extern unsigned char _metachar[]; #define ismeta(c) _metachar[(c) & 0x7f] -static inline int -hasmeta(const char *cmd) -{ - while (!ismeta(*cmd)) - cmd++; - - return *cmd != '\0'; -} - -static inline int +static inline int MAKE_ATTR_UNUSED needshell(const char *cmd, int white) { while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') { @@ -58,4 +49,4 @@ needshell(const char *cmd, int white) return *cmd != '\0'; } -#endif /* _METACHAR_H */ +#endif /* MAKE_METACHAR_H */ |