diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-07-30 09:51:54 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-07-30 09:51:54 +0000 |
commit | efa0d3130461b35a2d6a7e220e7eb4221d97d4e4 (patch) | |
tree | d87e7134b4faac669f6cb2f32d0f2d4773754d0a /usr.bin/make/varmodifiers.c | |
parent | 5987d56a4bba5f26086e0ae6cb8283fdb9a076ad (diff) |
everywhere except in Var_Parse, we always add/append variables to the
VAR_GLOBAL context, so make it the common case: rename the basic functions
to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_Set and Var_Append
as macros that specify VAR_GLOBAL, and use these.
okay miod@
Diffstat (limited to 'usr.bin/make/varmodifiers.c')
-rw-r--r-- | usr.bin/make/varmodifiers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/make/varmodifiers.c b/usr.bin/make/varmodifiers.c index 17f23325685..37be0e6efc0 100644 --- a/usr.bin/make/varmodifiers.c +++ b/usr.bin/make/varmodifiers.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: varmodifiers.c,v 1.18 2007/07/24 18:58:48 espie Exp $ */ +/* $OpenBSD: varmodifiers.c,v 1.19 2007/07/30 09:51:53 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* @@ -542,22 +542,22 @@ do_assign(const char *s, const struct Name *n, void *arg) switch (v->flags) { case VAR_EQUAL: - Var_Seti(n->s, n->e, v->lbuffer, VAR_GLOBAL); + Var_Seti(n->s, n->e, v->lbuffer); break; case VAR_MAY_EQUAL: if (s == NULL) - Var_Seti(n->s, n->e, v->lbuffer, VAR_GLOBAL); + Var_Seti(n->s, n->e, v->lbuffer); break; case VAR_ADD_EQUAL: if (s == NULL) - Var_Seti(n->s, n->e, v->lbuffer, VAR_GLOBAL); + Var_Seti(n->s, n->e, v->lbuffer); else - Var_Appendi(n->s, n->e, v->lbuffer, VAR_GLOBAL); + Var_Appendi(n->s, n->e, v->lbuffer); break; case VAR_BANG_EQUAL: result = Cmd_Exec(v->lbuffer, &msg); if (result != NULL) { - Var_Seti(n->s, n->e, result, VAR_GLOBAL); + Var_Seti(n->s, n->e, result); free(result); } else Error(msg, v->lbuffer); |