Subject: make: fix modifiers in variables
To: None <email@example.com>
From: Simon J. Gerraty <firstname.lastname@example.org>
Date: 05/06/2006 00:31:23
Ok, I'm not including the patch - it is at
and since it is unforunately large, the resulting var.c is there too -
might be easier to read.
It moves the bulk of modifier handling out of Var_Parse to a separate
function. This seems to be the best way to handle modifiers in
There are a couple of problems with the existing implementation that
didn't show up in simple test cases.
1/ Var_Subst() was the wrong thing to use - doesn't matter in simple
cases, but doesn't work well in loops - expands too much.
2/ Using Var_Parse() addresses #1, but doesn't address the issue that
the accounting for text consumed ends up wrong.
Allowing the modifier code to call itself recursively seems to be the
best way to address the issues. It also splits 1000 lines of code out
of Var_Parse() which isn't a bad thing either.