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. --- mdoc_macro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index 062021de..a9343d67 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.228 2018/12/21 17:15:19 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.229 2018/12/30 00:49:55 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2018 Ingo Schwarze @@ -233,7 +233,7 @@ mdoc_endparse(struct roff_man *mdoc) /* Rewind to the first. */ - rew_last(mdoc, mdoc->first); + rew_last(mdoc, mdoc->meta.first); mdoc_state_reset(mdoc); } -- cgit v1.2.3-56-ge451