From f313579fbb5a5318367521793dc24d2567da2fde Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 10 Jan 2017 12:53:07 +0000 Subject: Introduce flags NODE_NOSRC and NODE_NOPRT for AST nodes. Use them to mark generated nodes and nodes that shall not produce output. Let -Ttree output mode display these new flags. Use NODE_NOSRC for .Ar, .Mt, and .Pa default arguments. Use NODE_NOPRT for .Dd, .Dt, and .Os. These will help to make handling of text production macros more rigorous. --- mdoc_man.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mdoc_man.c') diff --git a/mdoc_man.c b/mdoc_man.c index ab245313..24241d8c 100644 --- a/mdoc_man.c +++ b/mdoc_man.c @@ -1,6 +1,6 @@ -/* $Id: mdoc_man.c,v 1.96 2016/01/08 17:48:09 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.97 2017/01/10 12:53:07 schwarze Exp $ */ /* - * Copyright (c) 2011-2016 Ingo Schwarze + * Copyright (c) 2011-2017 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 @@ -575,6 +575,9 @@ print_node(DECL_ARGS) struct roff_node *sub; int cond, do_sub; + if (n->flags & NODE_NOPRT) + return; + /* * Break the line if we were parsed subsequent the current node. * This makes the page structure be more consistent. -- cgit v1.2.3