diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-22 21:54:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-22 21:54:23 +0000 |
commit | e66bc70731870e9afaa3b406e8e49e65b95bfb57 (patch) | |
tree | e5dd94d28e6f4546833c334a078d677f759dd890 /man_macro.c | |
parent | 9712be0c6ab0aa2d1baa5449bf191e975946ebdb (diff) | |
download | mandoc-e66bc70731870e9afaa3b406e8e49e65b95bfb57.tar.gz mandoc-e66bc70731870e9afaa3b406e8e49e65b95bfb57.tar.zst mandoc-e66bc70731870e9afaa3b406e8e49e65b95bfb57.zip |
move man(7) validation into the dedicated validation phase, too
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 24 |
1 files changed, 5 insertions, 19 deletions
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 <kristaps@bsd.lv> * Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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 |