diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-01-05 00:36:50 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-01-05 00:36:50 +0000 |
commit | d8913894b97315b5c09b9489ccee2d1f74f0c450 (patch) | |
tree | 2dc7d0348225eb3b00c73e760bd0a2321e97bcac /roff.c | |
parent | 8140a5cf4789491731d059713fd14af34686dcc3 (diff) | |
download | mandoc-d8913894b97315b5c09b9489ccee2d1f74f0c450.tar.gz |
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.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2010-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2010-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -889,7 +889,7 @@ roff_node_alloc(struct roff_man *man, int line, int pos, n->flags |= NODE_SYNPRETTY; else n->flags &= ~NODE_SYNPRETTY; - if (man->flags & ROFF_NOFILL) + if ((man->flags & (ROFF_NOFILL | ROFF_NONOFILL)) == ROFF_NOFILL) n->flags |= NODE_NOFILL; else n->flags &= ~NODE_NOFILL; |