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): improve type signature of Var_Export
details: https://anonhg.NetBSD.org/src/rev/b1db82bb90fa
branches: trunk
changeset: 974732:b1db82bb90fa
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 09 13:05:04 2020 +0000
description:
make(1): improve type signature of Var_Export
diffstat:
usr.bin/make/nonints.h | 4 ++--
usr.bin/make/parse.c | 10 +++++-----
usr.bin/make/var.c | 12 ++++++++----
3 files changed, 15 insertions(+), 11 deletions(-)
diffs (104 lines):
diff -r 0a46aaa32bb7 -r b1db82bb90fa usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h Sun Aug 09 12:59:16 2020 +0000
+++ b/usr.bin/make/nonints.h Sun Aug 09 13:05:04 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.90 2020/08/08 13:00:07 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.91 2020/08/09 13:05:04 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -200,7 +200,7 @@
void Var_Stats(void);
void Var_Dump(GNode *);
void Var_ExportVars(void);
-void Var_Export(const char *, int);
+void Var_Export(const char *, Boolean);
void Var_UnExport(const char *);
/* util.c */
diff -r 0a46aaa32bb7 -r b1db82bb90fa usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sun Aug 09 12:59:16 2020 +0000
+++ b/usr.bin/make/parse.c Sun Aug 09 13:05:04 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $ */
+/* $NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $");
+__RCSID("$NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2020,7 +2020,7 @@
} else if (strcmp(line, MAKE_JOB_PREFIX) == 0) {
Job_SetPrefix();
} else if (strcmp(line, MAKE_EXPORTED) == 0) {
- Var_Export(cp, 0);
+ Var_Export(cp, FALSE);
}
if (freeCp)
free(cp);
@@ -3098,7 +3098,7 @@
} else if (strncmp(cp, "export", 6) == 0) {
for (cp += 6; isspace((unsigned char) *cp); cp++)
continue;
- Var_Export(cp, 1);
+ Var_Export(cp, TRUE);
continue;
} else if (strncmp(cp, "unexport", 8) == 0) {
Var_UnExport(cp);
diff -r 0a46aaa32bb7 -r b1db82bb90fa usr.bin/make/var.c
--- a/usr.bin/make/var.c Sun Aug 09 12:59:16 2020 +0000
+++ b/usr.bin/make/var.c Sun Aug 09 13:05:04 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $ */
+/* $NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 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.440 2020/08/09 11:04:05 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -623,10 +623,14 @@
/*
* This is called when .export is seen or .MAKE.EXPORTED is modified.
+ *
* It is also called when any exported variable is modified.
+ * XXX: Is it really?
+ *
+ * str has the format "[-env|-literal] varname...".
*/
void
-Var_Export(const char *str, int isExport)
+Var_Export(const char *str, Boolean isExport)
{
VarExportFlags flags;
char *val;
Home |
Main Index |
Thread Index |
Old Index