Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): inline macro ISEQOPERATOR



details:   https://anonhg.NetBSD.org/src/rev/803f56271d65
branches:  trunk
changeset: 944570:803f56271d65
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 03 21:23:42 2020 +0000

description:
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.

diffstat:

 usr.bin/make/parse.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (41 lines):

diff -r 50e5ee3d3a9e -r 803f56271d65 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Oct 03 21:19:54 2020 +0000
+++ b/usr.bin/make/parse.c      Sat Oct 03 21:23:42 2020 +0000
@@ -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 @@
     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 @@
 #endif
        if (ch == '=')
            return TRUE;
-       if (*line == '=' && ISEQOPERATOR(ch))
+       if (*line == '=' && (ch == '+' || ch == ':' || ch == '?' || ch == '!'))
            return TRUE;
        if (wasSpace)
            return FALSE;



Home | Main Index | Thread Index | Old Index