summaryrefslogtreecommitdiffstats
path: root/tree.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-02 07:10:38 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-02 07:10:38 +0000
commit75e12f6fac5699d80ada9d0aa0128cc3d922a73c (patch)
treeab3b9bec85915c313577d61092643134dc167b59 /tree.c
parent82b921ceb9411072fc74ac549038d20ec4b2dc2a (diff)
downloadmandoc-75e12f6fac5699d80ada9d0aa0128cc3d922a73c.tar.gz
Change column display in -Ttree to be 1-based instead of 0-based
such that column numbers agree between messages and -Ttree.
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tree.c b/tree.c
index 49f20602..8735ee3c 100644
--- a/tree.c
+++ b/tree.c
@@ -160,7 +160,7 @@ print_mdoc(const struct mdoc_node *n, int indent)
putchar(' ');
if (MDOC_LINE & n->flags)
putchar('*');
- printf("%d:%d", n->line, n->pos);
+ printf("%d:%d", n->line, n->pos + 1);
if (n->lastline != n->line)
printf("-%d", n->lastline);
putchar('\n');
@@ -250,7 +250,7 @@ print_man(const struct man_node *n, int indent)
printf("%s (%s) ", p, t);
if (MAN_LINE & n->flags)
putchar('*');
- printf("%d:%d\n", n->line, n->pos);
+ printf("%d:%d\n", n->line, n->pos + 1);
}
if (n->child)
@@ -292,7 +292,7 @@ print_box(const struct eqn_box *ep, int indent)
assert(t);
printf("%s(%d, %d, %d, %d, %d, \"%s\", \"%s\") %s\n",
t, EQN_DEFSIZE == ep->size ? 0 : ep->size,
- ep->pos, ep->font, ep->mark, ep->pile,
+ ep->pos + 1, ep->font, ep->mark, ep->pile,
ep->left ? ep->left : "",
ep->right ? ep->right : "",
ep->text ? ep->text : "");