=================================================================== RCS file: /cvs/mandoc/Attic/validate.c,v retrieving revision 1.27 retrieving revision 1.30 diff -u -p -r1.27 -r1.30 --- mandoc/Attic/validate.c 2009/01/12 17:26:42 1.27 +++ mandoc/Attic/validate.c 2009/01/15 17:38:58 1.30 @@ -1,4 +1,4 @@ -/* $Id: validate.c,v 1.27 2009/01/12 17:26:42 kristaps Exp $ */ +/* $Id: validate.c,v 1.30 2009/01/15 17:38:58 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -79,8 +79,10 @@ const struct valids mdoc_valids[MDOC_MAX] = { { pres_prologue, NULL }, /* Os */ /* FIXME: preceding Pp. */ /* FIXME: NAME section internal ordering. */ + /* FIXME: can only be a child of root. */ { NULL, posts_sh }, /* Sh */ /* FIXME: preceding Pp. */ + /* FIXME: can only be a child of Sh. */ { NULL, posts_ss }, /* Ss */ /* FIXME: proceeding... */ { NULL, posts_pp }, /* Pp */ @@ -310,7 +312,7 @@ pre_display(struct mdoc *mdoc, struct mdoc_node *node) break; if (NULL == n) return(1); - return(mdoc_verr(mdoc, node, ERR_SCOPE_NONEST)); + return(mdoc_nerr(mdoc, node, ERR_SCOPE_NONEST)); } @@ -393,6 +395,8 @@ pre_bd(struct mdoc *mdoc, struct mdoc_node *node) /* FALLTHROUGH */ case (MDOC_Unfilled): /* FALLTHROUGH */ + case (MDOC_Filled): + /* FALLTHROUGH */ case (MDOC_Literal): /* FALLTHROUGH */ case (MDOC_File): @@ -423,9 +427,9 @@ pre_it(struct mdoc *mdoc, struct mdoc_node *node) assert(MDOC_It == mdoc->last->tok); if (MDOC_BODY != mdoc->last->parent->type) - return(mdoc_verr(mdoc, node, ERR_SYNTAX_PARENTBAD)); + return(mdoc_nerr(mdoc, node, ERR_SYNTAX_PARENTBAD)); if (MDOC_Bl != mdoc->last->parent->tok) - return(mdoc_verr(mdoc, node, ERR_SYNTAX_PARENTBAD)); + return(mdoc_nerr(mdoc, node, ERR_SYNTAX_PARENTBAD)); return(1); } @@ -436,7 +440,7 @@ pre_prologue(struct mdoc *mdoc, struct mdoc_node *node { if (SEC_PROLOGUE != mdoc->sec_lastn) - return(mdoc_verr(mdoc, node, ERR_SEC_NPROLOGUE)); + return(mdoc_nerr(mdoc, node, ERR_SEC_NPROLOGUE)); assert(MDOC_ELEM == node->type); /* Check for ordering. */ @@ -445,15 +449,15 @@ pre_prologue(struct mdoc *mdoc, struct mdoc_node *node case (MDOC_Os): if (mdoc->meta.title[0] && mdoc->meta.date) break; - return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_OO)); + return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_OO)); case (MDOC_Dt): if (0 == mdoc->meta.title[0] && mdoc->meta.date) break; - return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_OO)); + return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_OO)); case (MDOC_Dd): if (0 == mdoc->meta.title[0] && 0 == mdoc->meta.date) break; - return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_OO)); + return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_OO)); default: abort(); /* NOTREACHED */ @@ -479,7 +483,7 @@ pre_prologue(struct mdoc *mdoc, struct mdoc_node *node /* NOTREACHED */ } - return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_REP)); + return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_REP)); } @@ -614,7 +618,7 @@ post_bl(struct mdoc *mdoc) } if (NULL == n) return(1); - return(mdoc_verr(mdoc, n, ERR_SYNTAX_CHILDBAD)); + return(mdoc_nerr(mdoc, n, ERR_SYNTAX_CHILDBAD)); }