Gergely Nagy <algernon@balabit.hu> writes:
From: Gergely Nagy <algernon@madhouse-project.org>
Implement addition, substraction, multiplication, division and modulus template functions: $(+ N M), $(- N M), $(* N M), $(/ N M) and $(% N M), respectively.
This is against 3.4, but should apply to 3.3 aswell, provided the $(substr) patch sent earlier is applied too, because this patch reuses the tf_substr_parse_int() introduced there. I chose short function names because, well... they're short, and for numbers, they made sense. Could've used $(add-int) and similar, but that seemed unnatural to me. As for the reasoning behind these functions - apart from getting the template function sub-language closer to Turing completeness - is to be able to fix priority numbers coming from sources that are off by one, for example (or going to destinations that expect it off by one). At least, that's for $(+). The rest is just for fun, because I was there. -- |8]