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 ApplyModifier_Defined to Var_P...
details: https://anonhg.NetBSD.org/src/rev/1075911cb0f1
branches: trunk
changeset: 1013687:1075911cb0f1
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Sep 03 18:53:46 2020 +0000
description:
make(1): migrate ApplyModifier_Defined to Var_ParsePP
diffstat:
usr.bin/make/var.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diffs (47 lines):
diff -r 38a32af7da0f -r 1075911cb0f1 usr.bin/make/var.c
--- a/usr.bin/make/var.c Thu Sep 03 18:52:36 2020 +0000
+++ b/usr.bin/make/var.c Thu Sep 03 18:53:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.485 2020/09/03 18:19:15 rillig Exp $ */
+/* $NetBSD: var.c,v 1.486 2020/09/03 18:53:46 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.485 2020/09/03 18:19:15 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.486 2020/09/03 18:53:46 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.485 2020/09/03 18:19:15 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.486 2020/09/03 18:53:46 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2029,14 +2029,12 @@
/* Nested variable expression */
if (*p == '$') {
- const char *cp2;
- int len;
- void *freeIt;
-
- cp2 = Var_Parse(p, st->ctxt, eflags, &len, &freeIt);
- Buf_AddStr(&buf, cp2);
- free(freeIt);
- p += len;
+ const char *nested_val;
+ void *nested_val_freeIt;
+
+ nested_val = Var_ParsePP(&p, st->ctxt, eflags, &nested_val_freeIt);
+ Buf_AddStr(&buf, nested_val);
+ free(nested_val_freeIt);
continue;
}
Home |
Main Index |
Thread Index |
Old Index