=================================================================== RCS file: /cvs/mandoc/tree.c,v retrieving revision 1.49 retrieving revision 1.51 diff -u -p -r1.49 -r1.51 --- mandoc/tree.c 2013/09/15 17:33:57 1.49 +++ mandoc/tree.c 2014/03/08 15:50:41 1.51 @@ -1,6 +1,7 @@ -/* $Id: tree.c,v 1.49 2013/09/15 17:33:57 schwarze Exp $ */ +/* $Id: tree.c,v 1.51 2014/03/08 15:50:41 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons + * Copyright (c) 2013, 2014 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -163,7 +164,10 @@ print_mdoc(const struct mdoc_node *n, int indent) putchar(' '); if (MDOC_LINE & n->flags) putchar('*'); - printf("%d:%d\n", n->line, n->pos); + printf("%d:%d", n->line, n->pos); + if (n->lastline != n->line) + printf("-%d", n->lastline); + putchar('\n'); } if (n->child) @@ -248,7 +252,10 @@ print_man(const struct man_node *n, int indent) } else { for (i = 0; i < indent; i++) putchar('\t'); - printf("%s (%s) %d:%d\n", p, t, n->line, n->pos); + printf("%s (%s) ", p, t); + if (MAN_LINE & n->flags) + putchar('*'); + printf("%d:%d\n", n->line, n->pos); } if (n->child)