From 68183e3516ca405d803db497157cd8246b9b8bad Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 30 Dec 2018 00:49:54 +0000 Subject: Cleanup, no functional change: The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h. Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication. This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters. --- libman.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libman.h') diff --git a/libman.h b/libman.h index 92f49e7f..a9dd5418 100644 --- a/libman.h +++ b/libman.h @@ -1,4 +1,4 @@ -/* $Id: libman.h,v 1.83 2018/08/26 16:21:23 schwarze Exp $ */ +/* $Id: libman.h,v 1.84 2018/12/30 00:49:54 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2018 Ingo Schwarze @@ -16,6 +16,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +struct roff_node; +struct roff_man; + #define MACRO_PROT_ARGS struct roff_man *man, \ enum roff_tok tok, \ int line, \ -- cgit v1.2.3