diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-25 15:17:49 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-25 15:17:49 +0000 |
commit | 12bf2f26f8d476960eba07e14e64fd26661da3b3 (patch) | |
tree | b759d2d2e7467b1cffc89fb98e9d6e4ccb5bdbed /man_macro.c | |
parent | 4b4e799e741ce5040d46930f13430debab688774 (diff) | |
download | mandoc-12bf2f26f8d476960eba07e14e64fd26661da3b3.tar.gz |
Added man validator, renamed mdoc validator.
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/man_macro.c b/man_macro.c index 05a95d22..651b7503 100644 --- a/man_macro.c +++ b/man_macro.c @@ -56,9 +56,14 @@ man_macro(struct man *man, int tok, int line, man->next = MAN_NEXT_SIBLING; } - /* TODO: validate & actions. */ + for ( ; man->last && man->last != n; + man->last = man->last->parent) + if ( ! man_valid_post(man)) + return(0); - man->last = n; + assert(man->last); + if ( ! man_valid_post(man)) + return(0); man->next = MAN_NEXT_SIBLING; return(1); |