freebsd-dev/contrib/groff/tmac/trace.tmac
2002-10-11 08:52:17 +00:00

62 lines
1.0 KiB
Plaintext

.\" trace.tmac
.\"
.\" Load this before a macro package that you want to trace.
.
.nr _C \n(.C
.cp 0
.
.do ds !!sp " \"
.
.eo
.
.rn de !!de
.
.
.!!de de
. do ecs
. ec
. do !!de \$1
. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** de trace enter: \\$0 \\$@
. el .do tm1 "\*[!!sp]*** trace enter \$1: \\$0 \\$@
. do as !!sp " \"
. do nop \\*[!!\$1]\\
. do substring !!sp 1
. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@
. el .do tm1 "\*[!!sp]*** trace exit \$1: \\$0 \\$@
\..
.
. do ds !!d1 !!\$1
. do ds !!d2 \$2
.
. do ecr
. do dei !!d1 !!d2
..
.
.rn am !!am
.
.!!am am
. do ecs
. ec
. do !!am \$1
. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am trace enter: \\$0 \\$@
. el .do tm1 "\*[!!sp]*** am trace enter \$1: \\$0 \\$@
. as !!sp " \"
. do nop \\*[!!\$1]\\
. substring !!sp 1
. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@
. el .do tm1 "\*[!!sp]*** trace exit \$1: \\$0 \\$@
\..
.
. do ds !!a1 !!\$1
. do ds !!a2 \$2
.
. do ecr
. do ami !!a1 !!a2
..
.
.ec
.
.cp \n(_C
.
.\" EOF