2 # forloop_arg(from, to, macro) - invoke MACRO(value) for
3 # each value between FROM and TO, without define overhead
4 define(`forloop_arg', `ifelse(eval(`($1) <= ($2)'), `1',
5 `_forloop(`$1', eval(`$2'), `$3(', `)')')')
6 # forloop(var, from, to, stmt) - refactored to share code
7 define(`forloop', `ifelse(eval(`($2) <= ($3)'), `1',
8 `pushdef(`$1')_forloop(eval(`$2'), eval(`$3'),
9 `define(`$1',', `)$4')popdef(`$1')')')
11 `$3`$1'$4`'ifelse(`$1', `$2', `',
12 `$0(incr(`$1'), `$2', `$3', `$4')')')