summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/for.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-09 14:06:04 +0000
committerharti <harti@FreeBSD.org>2005-05-09 14:06:04 +0000
commitef37b341c376efaab6437df4baf8531dd11eb641 (patch)
tree5aba5fcd4ee95bf72b4b360ea351bf814500ce84 /usr.bin/make/for.c
parent7993c4292d145a1c61b5465ce3735a8c9b867e3f (diff)
downloadFreeBSD-src-ef37b341c376efaab6437df4baf8531dd11eb641.zip
FreeBSD-src-ef37b341c376efaab6437df4baf8531dd11eb641.tar.gz
Split Var_Subst() into two functions: Var_SubstOnly() which substitutes
only one variable and Var_Subst() which substitutes all. Split out the test whether a variable should not be expanded into match_var(). Make access to the input string consistently using str[]. Remove two unused functions: Var_GetTail() and Var_GetHead(). Patches: 7.184-7.189 Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/for.c')
-rw-r--r--usr.bin/make/for.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index 823a7cc..f0e0b4e 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -150,7 +150,7 @@ For_For(char *line)
* Make a list with the remaining words
* XXX should use brk_string here.
*/
- sub = Buf_Peel(Var_Subst(NULL, ptr, VAR_CMD, FALSE));
+ sub = Buf_Peel(Var_Subst(ptr, VAR_CMD, FALSE));
for (ptr = sub; *ptr != '\0' && isspace((u_char)*ptr); ptr++)
;
@@ -271,7 +271,7 @@ For_Run(int lineno)
Var_Set(var, val, VAR_GLOBAL);
DEBUGF(FOR, ("--- %s = %s\n", var, val));
- str = Buf_Peel(Var_Subst(var, Buf_Data(buf),
+ str = Buf_Peel(Var_SubstOnly(var, Buf_Data(buf),
VAR_GLOBAL, FALSE));
Parse_FromString(str, lineno);
OpenPOWER on IntegriCloud