From c0cea6817b9d23d8e5e4a752fc1dff8dfb604cdc Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 31 Dec 2018 04:55:46 +0000 Subject: 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. --- read.c | 1 + 1 file changed, 1 insertion(+) (limited to 'read.c') 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); -- cgit