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): migrate SuffExpandChildren to Var_ParsePP



details:   https://anonhg.NetBSD.org/src/rev/c42114aaec4e
branches:  trunk
changeset: 943648:c42114aaec4e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Sep 07 07:15:26 2020 +0000

description:
make(1): migrate SuffExpandChildren to Var_ParsePP

diffstat:

 usr.bin/make/suff.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r 042b5bdef1a7 -r c42114aaec4e usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Mon Sep 07 07:10:56 2020 +0000
+++ b/usr.bin/make/suff.c       Mon Sep 07 07:15:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.143 2020/09/05 06:46:12 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.144 2020/09/07 07:15:26 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.143 2020/09/05 06:46:12 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.144 2020/09/07 07:15:26 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)suff.c     8.4 (Berkeley) 3/21/94";
 #else
-__RCSID("$NetBSD: suff.c,v 1.143 2020/09/05 06:46:12 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.144 2020/09/07 07:15:26 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1324,14 +1324,14 @@
                     * Start of a variable spec -- contact variable module
                     * to find the end so we can skip over it.
                     */
+                   const char *nested_p = cp;
                    const char  *junk;
-                   int         len;
                    void        *freeIt;
 
-                   junk = Var_Parse(cp, pgn, VARE_UNDEFERR|VARE_WANTRES,
-                                    &len, &freeIt);
+                   junk = Var_ParsePP(&nested_p, pgn,
+                                      VARE_UNDEFERR|VARE_WANTRES, &freeIt);
                    if (junk != var_Error) {
-                       cp += len - 1;
+                       cp += nested_p - cp;
                    }
 
                    free(freeIt);



Home | Main Index | Thread Index | Old Index