From e66bc70731870e9afaa3b406e8e49e65b95bfb57 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 22 Oct 2015 21:54:23 +0000 Subject: move man(7) validation into the dedicated validation phase, too --- man_macro.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'man_macro.c') diff --git a/man_macro.c b/man_macro.c index 06415308..52073410 100644 --- a/man_macro.c +++ b/man_macro.c @@ -1,4 +1,4 @@ -/* $Id: man_macro.c,v 1.112 2015/10/06 18:32:19 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.113 2015/10/22 21:54:23 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze @@ -130,7 +130,7 @@ man_unscope(struct roff_man *man, const struct roff_node *to) man->last = n; n = n->parent; - man_valid_post(man); + man->last->flags |= MAN_VALID; } /* @@ -379,28 +379,13 @@ in_line_eoln(MACRO_PROT_ARGS) assert(man->last->type != ROFFT_ROOT); man->next = ROFF_NEXT_SIBLING; - /* - * Rewind our element scope. Note that when TH is pruned, we'll - * be back at the root, so make sure that we don't clobber as - * its sibling. - */ + /* Rewind our element scope. */ for ( ; man->last; man->last = man->last->parent) { + man_state(man, man->last); if (man->last == n) break; - if (man->last->type == ROFFT_ROOT) - break; - man_valid_post(man); } - - assert(man->last); - - /* - * Same here regarding whether we're back at the root. - */ - - if (man->last->type != ROFFT_ROOT) - man_valid_post(man); } void @@ -408,6 +393,7 @@ man_endparse(struct roff_man *man) { man_unscope(man, man->first); + man->flags &= ~MAN_LITERAL; } static int -- cgit v1.2.3-56-ge451