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 | 54ffa6b6bcb97f97cc0a3604078eb63aa8c759ef (patch) | |
tree | dc900d7df0c1cae2b95adfcc260ada272f57839b /man_macro.c | |
parent | 9953b888e25942fa632d3e754daa293a4239d4c5 (diff) | |
download | mandoc-54ffa6b6bcb97f97cc0a3604078eb63aa8c759ef.tar.gz |
move man(7) validation into the dedicated validation phase, too
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/man_macro.c b/man_macro.c index aa0ba895..4b124363 100644 --- a/man_macro.c +++ b/man_macro.c @@ -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 |