diff options
Diffstat (limited to 'usr.bin/make/var.c')
| -rw-r--r-- | usr.bin/make/var.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index d0ab186b3188..472e7372308f 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -396,9 +396,7 @@ VarAdd (name, val, ctxt) (void) Lst_AtFront (ctxt->context, (void *)v); (void) Lst_AtEnd (allVars, (void *) v); - if (DEBUG(VAR)) { - fprintf(stderr, "%s:%s = %s\n", ctxt->name, name, val); - } + DEBUGF(VAR, "%s:%s = %s\n", ctxt->name, name, val); } @@ -446,9 +444,7 @@ Var_Delete(name, ctxt) { LstNode ln; - if (DEBUG(VAR)) { - fprintf(stderr, "%s:delete %s\n", ctxt->name, name); - } + DEBUGF(VAR, "%s:delete %s\n", ctxt->name, name); ln = Lst_Find(ctxt->context, (void *)name, VarCmp); if (ln != NULL) { Var *v; @@ -503,9 +499,7 @@ Var_Set (name, val, ctxt) Buf_Discard(v->val, Buf_Size(v->val)); Buf_AddBytes(v->val, strlen(val), (Byte *)val); - if (DEBUG(VAR)) { - fprintf(stderr, "%s:%s = %s\n", ctxt->name, name, val); - } + DEBUGF(VAR, "%s:%s = %s\n", ctxt->name, name, val); } /* * Any variables given on the command line are automatically exported @@ -556,10 +550,8 @@ Var_Append (name, val, ctxt) Buf_AddByte(v->val, (Byte)' '); Buf_AddBytes(v->val, strlen(val), (Byte *)val); - if (DEBUG(VAR)) { - fprintf(stderr, "%s:%s = %s\n", ctxt->name, name, - (char *) Buf_GetAll(v->val, (int *)NULL)); - } + DEBUGF(VAR, "%s:%s = %s\n", ctxt->name, name, + (char *) Buf_GetAll(v->val, (int *)NULL)); if (v->flags & VAR_FROM_ENV) { /* @@ -1780,9 +1772,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) char *newStr; /* New value to return */ char termc; /* Character which terminated scan */ - if (DEBUG(VAR)) { - fprintf(stderr, "Applying :%c to \"%s\"\n", *tstr, str); - } + DEBUGF(VAR, "Applying :%c to \"%s\"\n", *tstr, str); switch (*tstr) { case 'U': if (tstr[1] == endc || tstr[1] == ':') { @@ -2251,9 +2241,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) } } } - if (DEBUG(VAR)) { - fprintf(stderr, "Result is \"%s\"\n", newStr); - } + DEBUGF(VAR, "Result is \"%s\"\n", newStr); if (*freePtr) { free (str); |
