summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/var.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-10 08:14:26 +0000
committerharti <harti@FreeBSD.org>2005-05-10 08:14:26 +0000
commitede5ad1020057388f7939e175e2171e1c06ecae5 (patch)
tree22b94baeee58914568b894143d8c92b1005f87a0 /usr.bin/make/var.c
parent35798a61f5bc26fc5367c82049406055d1e71604 (diff)
downloadFreeBSD-src-ede5ad1020057388f7939e175e2171e1c06ecae5.zip
FreeBSD-src-ede5ad1020057388f7939e175e2171e1c06ecae5.tar.gz
Move some debugging code from targ.c to var.c where it actually belongs.
Patch: 7.192 Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/var.c')
-rw-r--r--usr.bin/make/var.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 1ca3e4c..9848d58 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -182,8 +182,8 @@ VarCreate(const char name[], const char value[], int flags)
* Destroy a Var object.
*
* Params:
- * v Object to destroy.
- * f True if internal buffer in Buffer object is to be removed.
+ * v Object to destroy.
+ * f True if internal buffer in Buffer object is to be removed.
*/
static void
VarDestroy(Var *v, Boolean f)
@@ -2029,13 +2029,21 @@ Var_Init(char **env)
*-----------------------------------------------------------------------
*/
void
-Var_Dump(const GNode *ctxt)
+Var_Dump(void)
{
const LstNode *ln;
const Var *v;
- LST_FOREACH(ln, &ctxt->context) {
+ printf("#*** Global Variables:\n");
+ LST_FOREACH(ln, &VAR_GLOBAL->context) {
+ v = Lst_Datum(ln);
+ printf("%-16s = %s\n", v->name, Buf_Data(v->val));
+ }
+
+ printf("#*** Command-line Variables:\n");
+ LST_FOREACH(ln, &VAR_CMD->context) {
v = Lst_Datum(ln);
printf("%-16s = %s\n", v->name, Buf_Data(v->val));
}
}
+
OpenPOWER on IntegriCloud