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. --- roff_int.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roff_int.h') diff --git a/roff_int.h b/roff_int.h index 8cde310e..ac876434 100644 --- a/roff_int.h +++ b/roff_int.h @@ -1,4 +1,4 @@ -/* $Id: roff_int.h,v 1.12 2018/12/30 00:49:56 schwarze Exp $ */ +/* $Id: roff_int.h,v 1.13 2018/12/31 04:55:47 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze @@ -80,6 +80,7 @@ struct ohash *roffhash_alloc(enum roff_tok, enum roff_tok); enum roff_tok roffhash_find(struct ohash *, const char *, size_t); void roffhash_free(struct ohash *); +void roff_state_reset(struct roff_man *); void roff_validate(struct roff_man *); /* -- cgit v1.2.3-56-ge451