summaryrefslogtreecommitdiff
path: root/metachar.h
diff options
context:
space:
mode:
Diffstat (limited to 'metachar.h')
-rw-r--r--metachar.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/metachar.h b/metachar.h
index db88d671067e4..98408ab3fb58b 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 */