summaryrefslogtreecommitdiff
path: root/tmac/trace.tmac
blob: 0c8d7410f50d48a994f6b6543b92ae610b0d96ea (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.\" trace.tmac
.\"
.\" Load this before a macro package that you want to trace.
.
.nr _C \n(.C
.cp 0
.
.do ds !!!sp " \"
.
.eo
.
.rn nr !!nr
.
.de nr
.  do tm1 "\*[!!!sp]*** .nr \$*
.  !!nr \$*
..
.
.rn ds !!ds
.rn ds1 !!ds1
.rn as !!as
.rn as1 !!as1
.
.de ds
.  do tm1 "\*[!!!sp]*** .ds \$^
.  do !!ds \$^\"
..
.
.de ds1
.  do tm1 "\*[!!!sp]*** .ds1 \$^
.  do !!ds1 \$^\"
..
.
.de as
.  do tm1 "\*[!!!sp]*** .as \$^
.  do !!as \$^\"
..
.
.de as1
.  do tm1 "\*[!!!sp]*** .as1 \$^
.  do !!as1 \$^\"
..
.
.rn de !!de
.rn de1 !!de1
.
.!!de de
.  do ecs
.  ec
.  do !!de \$1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** de trace enter: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** de trace enter \$1: \\*[!!!br]\\$0 \\$@
.    do !!as !!!sp " \"
.    do ie \\n[.br] .do !!\$1 \\$@
.    el 'do !!\$1 \\$@
.    do substring !!!sp 1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@
\..
.
.  do !!ds !!d1 !!\$1
.  do !!ds !!d2 \$2
.
.  do ecr
.  do dei !!d1 !!d2
..
.
.!!de de1
.  do ecs
.  ec
.  do !!de \$1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** de1 trace enter: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** de1 trace enter \$1: \\*[!!!br]\\$0 \\$@
.    do !!as !!!sp " \"
.    do ie \\n[.br] .do !!\$1 \\$@
.    el 'do !!\$1 \\$@
.    do substring !!!sp 1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@
\..
.
.  do !!ds !!d1 !!\$1
.  do !!ds !!d2 \$2
.
.  do ecr
.  do dei1 !!d1 !!d2
..
.
.rn am !!am
.rn am1 !!am1
.
.!!de am
.  do ecs
.  ec
.  do !!de \$1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** am trace enter: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** am trace enter \$1: \\*[!!!br]\\$0 \\$@
.    do !!as !!!sp " \"
.    do ie \\n[.br] .do !!\$1 \\$@
.    el 'do !!\$1 \\$@
.    do substring !!!sp 1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@
\..
.
.  do !!ds !!a1 !!\$1
.  do !!ds !!a2 \$2
.
.  do ecr
.  do ami !!a1 !!a2
..
.
.!!de am1
.  do ecs
.  ec
.  do !!de \$1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** am1 trace enter: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** am1 trace enter \$1: \\*[!!!br]\\$0 \\$@
.    do !!as !!!sp " \"
.    do ie \\n[.br] .do !!\$1 \\$@
.    el 'do !!\$1 \\$@
.    do substring !!!sp 1
.    do ie \\n[.br] .!!ds !!!br .\"
.    el .do !!ds !!!br '\"
.    ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@
.    el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@
\..
.
.  do !!ds !!a1 !!\$1
.  do !!ds !!a2 \$2
.
.  do ecr
.  do ami1 !!a1 !!a2
..
.
.rn return !!return
.
.!!de1 return
.  tm1 "\*[!!!sp]*** return
.  !!return twice
..
.
.ec
.
.cp \n(_C
.
.\" EOF