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): replace '(' and ')' with neutral '\0' ...



details:   https://anonhg.NetBSD.org/src/rev/8b7007964f58
branches:  trunk
changeset: 945723:8b7007964f58
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Nov 05 18:26:59 2020 +0000

description:
make(1): replace '(' and ')' with neutral '\0' in Var_Parse

The only possible values for extramodifiers are "H:" and "T:", therefore
parsing is independent of startc and endc.  Use '\0' instead of '(' and
')' to remove any possible confusion about how '{' and '}' would be
handled.

diffstat:

 usr.bin/make/var.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 98be7a8c8b37 -r 8b7007964f58 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Thu Nov 05 18:20:23 2020 +0000
+++ b/usr.bin/make/var.c        Thu Nov 05 18:26:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.660 2020/11/05 18:20:23 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.661 2020/11/05 18:26:59 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -130,7 +130,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.660 2020/11/05 18:20:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.661 2020/11/05 18:26:59 rillig Exp $");
 
 #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
 #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -3882,7 +3882,7 @@
        extraFree = NULL;
        if (extramodifiers != NULL) {
            const char *em = extramodifiers;
-           nstr = ApplyModifiers(&em, nstr, '(', ')',
+           nstr = ApplyModifiers(&em, nstr, '\0', '\0',
                                  v, &exprFlags, ctxt, eflags, &extraFree);
        }
 



Home | Main Index | Thread Index | Old Index