summaryrefslogtreecommitdiff
path: root/tmac/trace.tmac
diff options
context:
space:
mode:
authorwlemb <wlemb>2002-08-07 04:51:49 +0000
committerwlemb <wlemb>2002-08-07 04:51:49 +0000
commit6c11b7718f85c3c1f4417f0c176a971de2af8e4d (patch)
treede2a932f03e423c5304f3b012b271a371f51f41c /tmac/trace.tmac
parent77c9a96b7f22c1601b42331416e3a60e10cdd4a1 (diff)
downloadgroff-6c11b7718f85c3c1f4417f0c176a971de2af8e4d.tar.gz
* MORE.STUFF: Added gpresent.
* tmac/trace.tmac: Show nesting level by a corresponding amount of whitespace before printing the logging message.
Diffstat (limited to 'tmac/trace.tmac')
-rw-r--r--tmac/trace.tmac23
1 files changed, 15 insertions, 8 deletions
diff --git a/tmac/trace.tmac b/tmac/trace.tmac
index 7019f030..c341b762 100644
--- a/tmac/trace.tmac
+++ b/tmac/trace.tmac
@@ -5,19 +5,24 @@
.nr _C \n(.C
.cp 0
.
+.do ds !!sp " \"
+.
.eo
.
.rn de !!de
.
+.
.!!de de
. do ecs
. ec
. do !!de \$1
-. ie "\$1"\\$0" .tm *** de trace enter: \\$0 \\$@
-. el .tm *** de trace enter \$1: \\$0 \\$@
+. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** de trace enter: \\$0 \\$@
+. el .do tm1 "\*[!!sp]*** trace enter \$1: \\$0 \\$@
+. do as !!sp " \"
. do nop \\*[!!\$1]\\
-. ie "\$1"\\$0" .tm *** trace exit: \\$0 \\$@
-. el .tm *** trace exit \$1: \\$0 \\$@
+. 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
@@ -33,11 +38,13 @@
. do ecs
. ec
. do !!am \$1
-. ie "\$1"\\$0" .tm *** am trace enter: \\$0 \\$@
-. el .tm *** am trace enter \$1: \\$0 \\$@
+. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am trace enter: \\$0 \\$@
+. el .do tm1 "\*[!!sp]*** am trace enter \$1: \\$0 \\$@
+. as !!sp " \"
. do nop \\*[!!\$1]\\
-. ie "\$1"\\$0" .tm *** trace exit: \\$0 \\$@
-. el .tm *** trace exit \$1: \\$0 \\$@
+. substring !!sp 1
+. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@
+. el .do tm1 "\*[!!sp]*** trace exit \$1: \\$0 \\$@
\..
.
. do ds !!a1 !!\$1