diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-01 12:59:17 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-01 12:59:17 +0000 |
commit | c80b8c034f0e42db26a04a17527b0b7e3dc6512b (patch) | |
tree | 7a146488e062534e63eb8c284052e30e2d869cd6 /man_validate.c | |
parent | 625153bf5457ded8b8946e7f0f831993b94dd863 (diff) | |
download | mandoc-c80b8c034f0e42db26a04a17527b0b7e3dc6512b.tar.gz mandoc-c80b8c034f0e42db26a04a17527b0b7e3dc6512b.tar.zst mandoc-c80b8c034f0e42db26a04a17527b0b7e3dc6512b.zip |
Add -man support for tables. Like -mdoc, this consists of an
external-facing function man_addspan() (this required shuffling around
the descope routine) and hooks elsewhere.
Also fixed mdoc.c's post-validation of tables.
Diffstat (limited to 'man_validate.c')
-rw-r--r-- | man_validate.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/man_validate.c b/man_validate.c index d3665d6b..bcfcbacf 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.56 2010/12/08 10:58:22 kristaps Exp $ */ +/* $Id: man_validate.c,v 1.57 2011/01/01 12:59:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -117,10 +117,16 @@ man_valid_pre(struct man *m, struct man_node *n) { v_check *cp; - if (MAN_TEXT == n->type) - return(1); - if (MAN_ROOT == n->type) + switch (n->type) { + case (MAN_TEXT): + /* FALLTHROUGH */ + case (MAN_ROOT): + /* FALLTHROUGH */ + case (MAN_TBL): return(1); + default: + break; + } if (NULL == (cp = man_valids[n->tok].pres)) return(1); @@ -145,6 +151,8 @@ man_valid_post(struct man *m) return(check_text(m, m->last)); case (MAN_ROOT): return(check_root(m, m->last)); + case (MAN_TBL): + return(1); default: break; } |