diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-25 15:36:05 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-25 15:36:05 +0000 |
commit | 33f7ee51d3c8ff72c2d828a8d5be302ad73cbbe9 (patch) | |
tree | 40f221172d5f2db3277c3528338d7773d5bb6190 /man_macro.c | |
parent | 12bf2f26f8d476960eba07e14e64fd26661da3b3 (diff) | |
download | mandoc-33f7ee51d3c8ff72c2d828a8d5be302ad73cbbe9.tar.gz |
Added man_action.c, renamed mdoc_action.c.
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/man_macro.c b/man_macro.c index 651b7503..4431e1b0 100644 --- a/man_macro.c +++ b/man_macro.c @@ -57,13 +57,20 @@ man_macro(struct man *man, int tok, int line, } for ( ; man->last && man->last != n; - man->last = man->last->parent) + man->last = man->last->parent) { if ( ! man_valid_post(man)) return(0); + if ( ! man_action_post(man)) + return(0); + } assert(man->last); + if ( ! man_valid_post(man)) return(0); + if ( ! man_action_post(man)) + return(0); + man->next = MAN_NEXT_SIBLING; return(1); @@ -74,7 +81,19 @@ int man_macroend(struct man *m) { - /* TODO: validate & actions. */ + for ( ; m->last && m->last != m->first; + m->last = m->last->parent) { + if ( ! man_valid_post(m)) + return(0); + if ( ! man_action_post(m)) + return(0); + } + + if ( ! man_valid_post(m)) + return(0); + if ( ! man_action_post(m)) + return(0); + return(1); } |