[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] improved trace package
From: |
Werner LEMBERG |
Subject: |
[Groff] improved trace package |
Date: |
Wed, 07 Aug 2002 04:51:32 +0200 (CEST) |
Below an improved version of trace.tmac; it now shows the nesting
level by adding whitespace at the beginning of the tracing message.
I've commited it to the CVS.
Werner
======================================================================
.\" 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] improved trace package,
Werner LEMBERG <=