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): remove redundant :tl from getBoolean
details: https://anonhg.NetBSD.org/src/rev/96dd987f3cae
branches: trunk
changeset: 941815:96dd987f3cae
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Oct 31 09:35:58 2020 +0000
description:
make(1): remove redundant :tl from getBoolean
Uppercase and lowercase letters are already handled the same by
s2Boolean, which makes the :tl modifier redundant.
diffstat:
usr.bin/make/main.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (49 lines):
diff -r 94fee6487abb -r 96dd987f3cae usr.bin/make/main.c
--- a/usr.bin/make/main.c Sat Oct 31 09:27:19 2020 +0000
+++ b/usr.bin/make/main.c Sat Oct 31 09:35:58 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.416 2020/10/31 09:27:19 rillig Exp $ */
+/* $NetBSD: main.c,v 1.417 2020/10/31 09:35:58 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.416 2020/10/31 09:27:19 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.417 2020/10/31 09:35:58 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -2049,7 +2049,7 @@
static int quietly = -1;
if (quietly < 0) {
- if (DEBUG(JOB) || getBoolean(".MAKE.DIE_QUIETLY", 1) == 0)
+ if (DEBUG(JOB) || !getBoolean(".MAKE.DIE_QUIETLY", TRUE))
quietly = 0;
else if (bf >= 0)
quietly = bf;
@@ -2225,16 +2225,16 @@
}
/*
- * Return a Boolean based on setting of a knob.
+ * Return a Boolean based on a variable.
*
- * If the knob is not set, the supplied default is the return value.
- * If set, anything that looks or smells like "No", "False", "Off", "0" etc,
+ * If the knob is not set, return the fallback.
+ * If set, anything that looks or smells like "No", "False", "Off", "0", etc.
* is FALSE, otherwise TRUE.
*/
Boolean
-getBoolean(const char *name, Boolean fallback)
+getBoolean(const char *varname, Boolean fallback)
{
- char *expr = str_concat3("${", name, ":U:tl}");
+ char *expr = str_concat3("${", varname, ":U}");
char *value;
Boolean res;
Home |
Main Index |
Thread Index |
Old Index