summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2013-09-15 17:33:47 +0000
committerschwarze <schwarze@openbsd.org>2013-09-15 17:33:47 +0000
commit7f7d2982dbdad76208a6f66a11c350324525f470 (patch)
treee208e54a6c84b464917f4e9fe1abe2256c9bfcf2
parentcddump() takes a daddr_t parameter. Call that parameter 'blkno' and not (diff)
downloadwireguard-openbsd-7f7d2982dbdad76208a6f66a11c350324525f470.tar.xz
wireguard-openbsd-7f7d2982dbdad76208a6f66a11c350324525f470.zip
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.
-rw-r--r--usr.bin/mandoc/tree.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mandoc/tree.c b/usr.bin/mandoc/tree.c
index 69939e268b6..dad34f56702 100644
--- a/usr.bin/mandoc/tree.c
+++ b/usr.bin/mandoc/tree.c
@@ -1,4 +1,4 @@
-/* $Id: tree.c,v 1.17 2013/05/18 17:08:09 schwarze Exp $ */
+/* $Id: tree.c,v 1.18 2013/09/15 17:33:47 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -155,8 +155,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)