From 04c844c9b370f59b5c07157eec6ba5a879b30218 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. --- mdoc_state.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'mdoc_state.c') diff --git a/mdoc_state.c b/mdoc_state.c index e592dcce..5fd38f16 100644 --- a/mdoc_state.c +++ b/mdoc_state.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_state.c,v 1.12 2018/12/30 00:49:55 schwarze Exp $ */ +/* $Id: mdoc_state.c,v 1.13 2018/12/31 04:55:47 schwarze Exp $ */ /* * Copyright (c) 2014, 2015, 2017 Ingo Schwarze * @@ -179,14 +179,6 @@ mdoc_state(struct roff_man *mdoc, struct roff_node *n) (*handler)(mdoc, n); } -void -mdoc_state_reset(struct roff_man *mdoc) -{ - - roff_setreg(mdoc->roff, "nS", 0, '='); - mdoc->flags = 0; -} - static void state_bd(STATE_ARGS) { -- cgit v1.2.3-56-ge451