summaryrefslogtreecommitdiff
path: root/tmac/trace.tmac
blob: 143f95400d1d0de7b6dace48638d0b1d6c145e18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" trace.tmac
.\"
.\" Load this before a macro package that you want to trace.
.
.eo
.
.rn de !!de
.
.!!de de
.  ecs
.  ec
.  !!de \$1
.    ie "\$1"\\$0" .tm *** trace enter: \\$0 \\$@
.    el .tm *** trace enter \$1: \\$0 \\$@
.    nop \\*[!!\$1]\\
.    ie "\$1"\\$0" .tm *** trace exit: \\$0 \\$@
.    el .tm *** trace exit \$1: \\$0 \\$@
\..
.
.  ds !!d1 !!\$1
.  ds !!d2 \$2
.
.  ecr
.  dei !!d1 !!d2
..
.
.ec
.
.\" EOF