Attached the patch against SVN head.
Notes that I removed the "const" from the "analyze_do" and "analyze_general" function headers to make the code compile. The alternative would have been to add it to all the call hierarchy down to pipe.c -> pipe_elements_calculate and whatever depends on it, which didn't seem to me the right thing to do.
Note that the "rt_pipe_volume" and friends are kind of cheating on the rt_functab.ft_volume headers: they all dropped the "const" from "struct rt_db_internal...", so I wonder what's the purpose of that "const" there at all ?
Anyway, this time I really tried to have white space right. All in all I spent 10 times more time on making sure spaces/tabs are right; trying to figure out why code is not compiling; why some test cases fail (I'm pretty sure it's not my additions); trying to get some advice on IRC - than on actually writing code. Perhaps that's how things should work, but it's frustrating... I really don't have much time to spend on this, and while I usually answer my own quetions finally, some timely answers on IRC would also be nice, things would work out much faster.