diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-12-16 17:27:19 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-12-16 17:27:19 +0000 |
commit | e9bb57f13b18dbbb09d5354c662aeb3471885f12 (patch) | |
tree | 1cc14b0f3d389bd48bdcb03e405d933651889a8e /usr.bin/make/job.c | |
parent | 26e78184c6440181321bd87115ed17bc5f66811a (diff) |
Var_Subst is actually two distinct functions folded into one:
split the function specific to for.c out, and give them more sensible
arguments at the same time.
This makes .for loop handling more efficient, as we have some heuristic
to evaluate the size of the buffer needed...
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r-- | usr.bin/make/job.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 715cb9a85ce..16fa9528dd1 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.15 1999/12/06 22:28:44 espie Exp $ */ +/* $OpenBSD: job.c,v 1.16 1999/12/16 17:27:18 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: job.c,v 1.15 1999/12/06 22:28:44 espie Exp $"; +static char rcsid[] = "$OpenBSD: job.c,v 1.16 1999/12/16 17:27:18 espie Exp $"; #endif #endif /* not lint */ @@ -558,7 +558,7 @@ JobPrintCommand(cmdp, jobp) * the variables in the command. */ cmdNode = Lst_Member(job->node->commands, (ClientData)cmd); - cmdStart = cmd = Var_Subst(NULL, cmd, job->node, FALSE); + cmdStart = cmd = Var_Subst(cmd, job->node, FALSE); Lst_Replace(cmdNode, (ClientData)cmdStart); cmdTemplate = "%s\n"; @@ -678,7 +678,7 @@ JobSaveCommand(cmd, gn) ClientData cmd; ClientData gn; { - cmd = (ClientData) Var_Subst(NULL, (char *) cmd, (GNode *) gn, FALSE); + cmd = (ClientData) Var_Subst((char *) cmd, (GNode *) gn, FALSE); (void) Lst_AtEnd(postCommands->commands, cmd); return(0); } |