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: move VarEvalFlags_ToString down to the ot...
details: https://anonhg.NetBSD.org/src/rev/b300bf02ba0f
branches: trunk
changeset: 960960:b300bf02ba0f
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Apr 03 23:24:06 2021 +0000
description:
make: move VarEvalFlags_ToString down to the other functions
No functional change.
diffstat:
usr.bin/make/var.c | 45 +++++++++++++++++++++++----------------------
1 files changed, 23 insertions(+), 22 deletions(-)
diffs (73 lines):
diff -r 31a3288af828 -r b300bf02ba0f usr.bin/make/var.c
--- a/usr.bin/make/var.c Sat Apr 03 23:19:08 2021 +0000
+++ b/usr.bin/make/var.c Sat Apr 03 23:24:06 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.903 2021/04/03 23:19:08 rillig Exp $ */
+/* $NetBSD: var.c,v 1.904 2021/04/03 23:24:06 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.903 2021/04/03 23:19:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.904 2021/04/03 23:24:06 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -256,26 +256,6 @@
char sep;
} SepBuf;
-static const char *
-VarEvalFlags_ToString(VarEvalFlags eflags)
-{
- if (!eflags.wantRes) {
- assert(!eflags.undefErr);
- assert(!eflags.keepDollar && !eflags.keepUndef);
- return "parse-only";
- }
- if (eflags.undefErr) {
- assert(!eflags.keepDollar && !eflags.keepUndef);
- return "eval-defined";
- }
- if (eflags.keepDollar && eflags.keepUndef)
- return "eval-keep-dollar-and-undefined";
- if (eflags.keepDollar)
- return "eval-keep-dollar";
- if (eflags.keepUndef)
- return "eval-keep-undefined";
- return "eval";
-}
/*
* This lets us tell if we have replaced the original environ
@@ -339,6 +319,27 @@
static VarExportedMode var_exportedVars = VAR_EXPORTED_NONE;
+static const char *
+VarEvalFlags_ToString(VarEvalFlags eflags)
+{
+ if (!eflags.wantRes) {
+ assert(!eflags.undefErr);
+ assert(!eflags.keepDollar && !eflags.keepUndef);
+ return "parse-only";
+ }
+ if (eflags.undefErr) {
+ assert(!eflags.keepDollar && !eflags.keepUndef);
+ return "eval-defined";
+ }
+ if (eflags.keepDollar && eflags.keepUndef)
+ return "eval-keep-dollar-and-undefined";
+ if (eflags.keepDollar)
+ return "eval-keep-dollar";
+ if (eflags.keepUndef)
+ return "eval-keep-undefined";
+ return "eval";
+}
+
static Var *
VarNew(FStr name, const char *value, bool fromEnv, bool readOnly)
{
Home |
Main Index |
Thread Index |
Old Index