X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/8824599579c15c29a52a6ec127ec1b2a35719e2c..fc974a57cd34bcbd149a89e1e5927d795492b4aa:/man_validate.c diff --git a/man_validate.c b/man_validate.c index 94bfdf29..bcfcbacf 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.55 2010/12/06 15:31:19 kristaps Exp $ */ +/* $Id: man_validate.c,v 1.57 2011/01/01 12:59:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -98,11 +98,9 @@ static const struct man_valid man_valids[MAN_MAX] = { { NULL, NULL }, /* IR */ { NULL, NULL }, /* RI */ { NULL, posts_eq0 }, /* na */ /* FIXME: should warn only. */ - { NULL, NULL }, /* i */ { NULL, posts_le1 }, /* sp */ /* FIXME: should warn only. */ { pres_bline, posts_nf }, /* nf */ { pres_bline, posts_fi }, /* fi */ - { NULL, NULL }, /* r */ { NULL, NULL }, /* RE */ { NULL, posts_part }, /* RS */ { NULL, NULL }, /* DT */ @@ -119,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); @@ -147,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; }