* configure.ac (AC_INIT): Bump version number.
[m4.git] / examples / trace.m4
bloba79dbcdd27e5a6d3b82337b780543f8d33864f6d
1 divert(-1)
3 # move(from, to)
4 define(`move', `Move one disk from `$1' to `$2'.
5 ')
7 # _hanoi (cnt, from, to, aux)
8 define(`_hanoi', `ifelse(eval(`$1'<=1), 1, `move($2, $3)',
9 `_hanoi(decr($1), $2, $4, $3)move($2, $3)_hanoi(decr($1), $4, $3, $2)')')
11 # hanoi (cnt)
12 define(`hanoi', `_hanoi(`$1', source, destination, auxilliary)')
13 divert`'dnl
15 # Debugmode t
16 debugmode(`t')
17 hanoi(2)
19 # Debugmode taeq
20 debugmode(`taeq')
21 hanoi(2)
23 # Debugmode OFF
24 debugmode
25 hanoi(2)
27 # Debugmode ae
28 debugmode(`ae')
29 traceon(`move', `_hanoi')
30 hanoi(2)