diff options
author | 2018-12-31 08:38:17 +0000 | |
---|---|---|
committer | 2018-12-31 08:38:17 +0000 | |
commit | 7faedc4a8ed073e49682a395ba802df3811ec609 (patch) | |
tree | 1cce5e00e1abd058d46f4c2c344df08d3edcf902 /usr.bin/mandoc/man.c | |
parent | Store the fill mode with a new flag NODE_NOFILL in every node, (diff) | |
download | wireguard-openbsd-7faedc4a8ed073e49682a395ba802df3811ec609.tar.xz wireguard-openbsd-7faedc4a8ed073e49682a395ba802df3811ec609.zip |
Use the new flag NODE_NOFILL in the validators, which is sometimes
simpler and always more robust. In particular, move the nesting
warnings for .EX and .EE from man_state(), where they were misplaced,
to the man(7) validator.
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r-- | usr.bin/mandoc/man.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c index 312b8ef5d16..bfc6b6e5b3b 100644 --- a/usr.bin/mandoc/man.c +++ b/usr.bin/mandoc/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.132 2018/12/31 07:07:43 schwarze Exp $ */ +/* $OpenBSD: man.c,v 1.133 2018/12/31 08:38:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> @@ -349,15 +349,10 @@ man_state(struct roff_man *man, struct roff_node *n) switch(n->tok) { case ROFF_nf: case MAN_EX: - if (man->flags & ROFF_NOFILL && (n->flags & NODE_VALID) == 0) - mandoc_msg(MANDOCERR_NF_SKIP, n->line, n->pos, "nf"); man->flags |= ROFF_NOFILL; break; case ROFF_fi: case MAN_EE: - if ( (man->flags & ROFF_NOFILL) == 0 && - ! (n->flags & NODE_VALID)) - mandoc_msg(MANDOCERR_FI_SKIP, n->line, n->pos, "fi"); man->flags &= ~ROFF_NOFILL; break; default: |