aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit3f3598dbafb3e0fcfc9a097c8e1500d63cf9e609 (patch)
tree95f01f9225b549d78127d63ccef325f3986b371a /tree.c
parentb981028b7b1f17de7dd7e6ce533d8c0b06c2a96f (diff)
downloadmandoc-3f3598dbafb3e0fcfc9a097c8e1500d63cf9e609.tar.gz
mandoc-3f3598dbafb3e0fcfc9a097c8e1500d63cf9e609.tar.zst
mandoc-3f3598dbafb3e0fcfc9a097c8e1500d63cf9e609.zip
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tree.c b/tree.c
index c6121f01..7574209b 100644
--- a/tree.c
+++ b/tree.c
@@ -1,4 +1,4 @@
-/* $Id: tree.c,v 1.52 2014/04/20 16:46:05 schwarze Exp $ */
+/* $Id: tree.c,v 1.53 2014/07/02 07:10:38 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 : "");