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: rename Var_ValueDirect to GNode_ValueDirect



details:   https://anonhg.NetBSD.org/src/rev/bda53155c363
branches:  trunk
changeset: 951512:bda53155c363
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Feb 04 21:50:39 2021 +0000

description:
make: rename Var_ValueDirect to GNode_ValueDirect

diffstat:

 usr.bin/make/make.h    |  16 ++++++++--------
 usr.bin/make/nonints.h |   4 ++--
 usr.bin/make/var.c     |   8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)

diffs (84 lines):

diff -r f6e1abfd29c9 -r bda53155c363 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Thu Feb 04 21:42:46 2021 +0000
+++ b/usr.bin/make/make.h       Thu Feb 04 21:50:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.253 2021/02/04 21:42:46 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.254 2021/02/04 21:50:39 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -751,19 +751,19 @@
 }
 
 MAKE_INLINE const char *
-GNode_VarTarget(GNode *gn) { return Var_ValueDirect(TARGET, gn); }
+GNode_VarTarget(GNode *gn) { return GNode_ValueDirect(gn, TARGET); }
 MAKE_INLINE const char *
-GNode_VarOodate(GNode *gn) { return Var_ValueDirect(OODATE, gn); }
+GNode_VarOodate(GNode *gn) { return GNode_ValueDirect(gn, OODATE); }
 MAKE_INLINE const char *
-GNode_VarAllsrc(GNode *gn) { return Var_ValueDirect(ALLSRC, gn); }
+GNode_VarAllsrc(GNode *gn) { return GNode_ValueDirect(gn, ALLSRC); }
 MAKE_INLINE const char *
-GNode_VarImpsrc(GNode *gn) { return Var_ValueDirect(IMPSRC, gn); }
+GNode_VarImpsrc(GNode *gn) { return GNode_ValueDirect(gn, IMPSRC); }
 MAKE_INLINE const char *
-GNode_VarPrefix(GNode *gn) { return Var_ValueDirect(PREFIX, gn); }
+GNode_VarPrefix(GNode *gn) { return GNode_ValueDirect(gn, PREFIX); }
 MAKE_INLINE const char *
-GNode_VarArchive(GNode *gn) { return Var_ValueDirect(ARCHIVE, gn); }
+GNode_VarArchive(GNode *gn) { return GNode_ValueDirect(gn, ARCHIVE); }
 MAKE_INLINE const char *
-GNode_VarMember(GNode *gn) { return Var_ValueDirect(MEMBER, gn); }
+GNode_VarMember(GNode *gn) { return GNode_ValueDirect(gn, MEMBER); }
 
 #ifdef __GNUC__
 #define UNCONST(ptr)   ({              \
diff -r f6e1abfd29c9 -r bda53155c363 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Thu Feb 04 21:42:46 2021 +0000
+++ b/usr.bin/make/nonints.h    Thu Feb 04 21:50:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.199 2021/02/04 20:14:33 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.200 2021/02/04 21:50:39 rillig Exp $     */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -380,7 +380,7 @@
 Boolean Var_Exists(const char *, GNode *);
 Boolean Var_ExistsExpand(const char *, GNode *);
 FStr Var_Value(const char *, GNode *);
-const char *Var_ValueDirect(const char *, GNode *);
+const char *GNode_ValueDirect(GNode *, const char *);
 VarParseResult Var_Parse(const char **, GNode *, VarEvalFlags, FStr *);
 VarParseResult Var_Subst(const char *, GNode *, VarEvalFlags, char **);
 void Var_Stats(void);
diff -r f6e1abfd29c9 -r bda53155c363 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Thu Feb 04 21:42:46 2021 +0000
+++ b/usr.bin/make/var.c        Thu Feb 04 21:50:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.802 2021/02/04 21:42:46 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.803 2021/02/04 21:50:39 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.802 2021/02/04 21:42:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.803 2021/02/04 21:50:39 rillig Exp $");
 
 typedef enum VarFlags {
        VAR_NONE        = 0,
@@ -1228,9 +1228,9 @@
  * up the variable in any other scope.
  */
 const char *
-Var_ValueDirect(const char *name, GNode *scope)
+GNode_ValueDirect(GNode *gn, const char *name)
 {
-       Var *v = VarFind(name, scope, FALSE);
+       Var *v = VarFind(name, gn, FALSE);
        return v != NULL ? v->val.data : NULL;
 }
 



Home | Main Index | Thread Index | Old Index