From 12bf2f26f8d476960eba07e14e64fd26661da3b3 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 25 Mar 2009 15:17:49 +0000 Subject: Added man validator, renamed mdoc validator. --- man_macro.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'man_macro.c') 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); -- cgit