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. --- man.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'man.c') diff --git a/man.c b/man.c index b62f3ed1..2a198dd9 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.181 2018/12/14 05:18:02 schwarze Exp $ */ +/* $Id: man.c,v 1.182 2018/12/30 00:49:55 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze @@ -372,7 +372,7 @@ void man_validate(struct roff_man *man) { - man->last = man->first; + man->last = man->meta.first; man_node_validate(man); man->flags &= ~MAN_LITERAL; } -- cgit v1.2.3-56-ge451