X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/fd975ee52323b5a37569bba943c722004161f5ec..53beca6323818e3247d4b1602f92addf87fb3f69:/tree.c?ds=sidebyside diff --git a/tree.c b/tree.c index dccbe37f..fdb70e1b 100644 --- a/tree.c +++ b/tree.c @@ -1,6 +1,7 @@ -/* $Id: tree.c,v 1.48 2013/05/18 17:08:43 schwarze Exp $ */ +/* $Id: tree.c,v 1.50 2013/12/24 19:11:46 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons + * Copyright (c) 2013 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 @@ -159,8 +160,14 @@ 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->line, n->pos); + if (n->lastline != n->line) + printf("-%d", n->lastline); + putchar('\n'); } if (n->child)