From 3aebc3c30c9b70518679c6e3c9610ac4ffc32b61 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 5 Jan 2019 00:36:50 +0000 Subject: Some high-level block macros have an effect similar to temporarily suspending no-fill mode during their head. Model this with an additional roff parser state flag ROFF_NONOFILL. That is much simpler than it would be to save and restore the ROFF_NOFILL flag itself, in particular since the latter can be switched (with lasting effect) by the .nf and .fi requests even while its effect is temporarily suspended. This commit does not change formatting yet, but prepares for future formatting simplifications and improvements. --- man_macro.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'man_macro.c') diff --git a/man_macro.c b/man_macro.c index c438cfe5..eec4896c 100644 --- a/man_macro.c +++ b/man_macro.c @@ -1,7 +1,7 @@ -/* $Id: man_macro.c,v 1.142 2018/12/31 10:04:39 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.143 2019/01/05 00:36:50 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze + * Copyright (c) 2012-2015, 2017-2019 Ingo Schwarze * Copyright (c) 2013 Franco Fichtner * * Permission to use, copy, modify, and distribute this software for any @@ -338,6 +338,7 @@ blk_imp(MACRO_PROT_ARGS) struct roff_node *n; rew_scope(man, tok); + man->flags |= ROFF_NONOFILL; if (tok == MAN_SH || tok == MAN_SS) man->flags &= ~ROFF_NOFILL; roff_block_alloc(man, line, ppos, tok); @@ -369,6 +370,7 @@ blk_imp(MACRO_PROT_ARGS) man_unscope(man, n); roff_body_alloc(man, line, ppos, tok); + man->flags &= ~ROFF_NONOFILL; } void -- cgit v1.2.3