Module Name: src
Committed By: rillig
Date: Sat Oct 3 21:23:42 UTC 2020
Modified Files:
src/usr.bin/make: parse.c
Log Message:
make(1): inline macro ISEQOPERATOR
The name of the macro was wrong. These characters are not used in an
equality operator, it's an assignment operator.
To generate a diff of this commit:
cvs rdiff -u -r1.345 -r1.346 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.345 src/usr.bin/make/parse.c:1.346
--- src/usr.bin/make/parse.c:1.345 Sat Oct 3 21:19:54 2020
+++ src/usr.bin/make/parse.c Sat Oct 3 21:23:42 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.345 2020/10/03 21:19:54 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.346 2020/10/03 21:23:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -132,7 +132,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.345 2020/10/03 21:19:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.346 2020/10/03 21:23:42 rillig Exp $");
/* types and constants */
@@ -1690,12 +1690,8 @@ Parse_IsVar(const char *line)
Boolean wasSpace = FALSE; /* set TRUE if found a space */
char ch;
int level = 0;
-#define ISEQOPERATOR(c) \
- (((c) == '+') || ((c) == ':') || ((c) == '?') || ((c) == '!'))
- /*
- * Skip to variable name
- */
+ /* Skip to variable name */
while (*line == ' ' || *line == '\t')
line++;
@@ -1723,7 +1719,7 @@ Parse_IsVar(const char *line)
#endif
if (ch == '=')
return TRUE;
- if (*line == '=' && ISEQOPERATOR(ch))
+ if (*line == '=' && (ch == '+' || ch == ':' || ch == '?' || ch == '!'))
return TRUE;
if (wasSpace)
return FALSE;