diff options
author | 2018-12-31 08:17:58 +0000 | |
---|---|---|
committer | 2018-12-31 08:17:58 +0000 | |
commit | 21dcc2b4b736d187187c4666d88619f46fa8eb1b (patch) | |
tree | 237eee65e27ce20df390dcaef5428a822e7826d2 /usr.bin/mandoc/roff.c | |
parent | For .EX and .EE, set the fill mode parser state directly in the (diff) | |
download | wireguard-openbsd-21dcc2b4b736d187187c4666d88619f46fa8eb1b.tar.xz wireguard-openbsd-21dcc2b4b736d187187c4666d88619f46fa8eb1b.zip |
Store the fill mode with a new flag NODE_NOFILL in every node,
like it is already done with NODE_SYNPRETTY, such that the fill
mode becomes more directly available to the formatters.
Not used yet, but will be used by upcoming commits.
Diffstat (limited to 'usr.bin/mandoc/roff.c')
-rw-r--r-- | usr.bin/mandoc/roff.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 2bc920e96f2..fc9ab9a5620 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.230 2018/12/31 07:07:43 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.231 2018/12/31 08:17:58 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -887,6 +887,10 @@ 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) + n->flags |= NODE_NOFILL; + else + n->flags &= ~NODE_NOFILL; if (man->flags & MDOC_NEWLINE) n->flags |= NODE_LINE; man->flags &= ~MDOC_NEWLINE; |