From 49fc5b876caef96271d1484f9279fd423d9b04ff Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 8 Mar 2014 15:50:41 +0000 Subject: To find out whether .TP head arguments are same-line or next-line arguments, use the MAN_LINE flag instead of the man_node line member. This is required such that user-defined macros wrapping .TP work correctly. Issue found by Havard Eidnes in Tcl_NewStringObj(3), reported via the NetBSD bug tracking system and Thomas Klausner . --- tree.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tree.c') diff --git a/tree.c b/tree.c index fdb70e1b..4e417052 100644 --- a/tree.c +++ b/tree.c @@ -1,7 +1,7 @@ -/* $Id: tree.c,v 1.50 2013/12/24 19:11:46 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 Ingo Schwarze + * 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 @@ -252,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) -- cgit v1.2.3