summaryrefslogtreecommitdiffstats
path: root/tree.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-09-15 17:33:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-09-15 17:33:57 +0000
commit54aca1486c2520e1551a4830dcda4044a7b61228 (patch)
treec725bc8cd98097375e81cd8226dd6e79a4e8882d /tree.c
parent6b008d7b7367077ae625b92a7b6557dc3f7ff7b1 (diff)
downloadmandoc-54aca1486c2520e1551a4830dcda4044a7b61228.tar.gz
For some mdoc(7) macros, it is (unfortunately) semantically significant
whether they are the first macro on the line or called by another macro. To help debugging, indicate this property "first macro on a new input line" by prefixing an asterisk to the line number in -Ttree output.
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tree.c b/tree.c
index 4b38111d..ee7e25dd 100644
--- a/tree.c
+++ b/tree.c
@@ -159,8 +159,11 @@ print_mdoc(const struct mdoc_node *n, int indent)
if (argv[i].sz > 0)
printf(" ]");
}
-
- printf(" %d:%d\n", n->line, n->pos);
+
+ putchar(' ');
+ if (MDOC_LINE & n->flags)
+ putchar('*');
+ printf("%d:%d\n", n->line, n->pos);
}
if (n->child)