summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-31 04:55:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-31 04:55:46 +0000
commitc0cea6817b9d23d8e5e4a752fc1dff8dfb604cdc (patch)
tree8583999131b10c7f020825880396b50813e04620 /read.c
parent0cd2663fe9e76ba0ad357a566dc3416eccab70e5 (diff)
downloadmandoc-c0cea6817b9d23d8e5e4a752fc1dff8dfb604cdc.tar.gz
Cleanup, minus 15 LOC, no functional change:
Simplify the way the man(7) and mdoc(7) validators are called. Reset the parser state with a common function before calling them. There is no need to again reset the parser state afterwards, the parsers are no longer used after validation. This allows getting rid of man_node_validate() and mdoc_node_validate() as separate functions.
Diffstat (limited to 'read.c')
-rw-r--r--read.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/read.c b/read.c
index 3a3b579a..22c502c6 100644
--- a/read.c
+++ b/read.c
@@ -688,6 +688,7 @@ mparse_free(struct mparse *curp)
struct roff_meta *
mparse_result(struct mparse *curp)
{
+ roff_state_reset(curp->man);
if (curp->options & MPARSE_VALIDATE) {
if (curp->man->meta.macroset == MACROSET_MDOC)
mdoc_validate(curp->man);