=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.220 retrieving revision 1.222 diff -u -p -r1.220 -r1.222 --- mandoc/mdoc_validate.c 2014/07/02 11:43:20 1.220 +++ mandoc/mdoc_validate.c 2014/07/02 19:55:10 1.222 @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.220 2014/07/02 11:43:20 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.222 2014/07/02 19:55:10 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -1117,7 +1117,8 @@ post_vt(POST_ARGS) for (n = mdoc->last->child; n; n = n->next) if (MDOC_TEXT != n->type) - mdoc_nmsg(mdoc, n, MANDOCERR_CHILD); + mandoc_msg(MANDOCERR_VT_CHILD, mdoc->parse, + n->line, n->pos, mdoc_macronames[n->tok]); return(1); } @@ -1613,7 +1614,9 @@ post_bl(POST_ARGS) continue; } - mdoc_nmsg(mdoc, nchild, MANDOCERR_CHILD); + mandoc_msg(MANDOCERR_BL_MOVE, mdoc->parse, + nchild->line, nchild->pos, + mdoc_macronames[nchild->tok]); /* * Move the node out of the Bl block. @@ -1665,12 +1668,13 @@ ebool(struct mdoc *mdoc) { if (NULL == mdoc->last->child) { - mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_MACROEMPTY); - mdoc_node_delete(mdoc, mdoc->last); + if (MDOC_Sm == mdoc->last->tok) + mdoc->flags ^= MDOC_SMOFF; return(1); } - check_count(mdoc, MDOC_ELEM, CHECK_WARN, CHECK_EQ, 1); + check_count(mdoc, MDOC_ELEM, CHECK_WARN, CHECK_LT, 2); + assert(MDOC_TEXT == mdoc->last->child->type); if (0 == strcmp(mdoc->last->child->string, "on")) { @@ -1782,7 +1786,8 @@ post_rs(POST_ARGS) } next = nn->next; - mdoc_nmsg(mdoc, nn, MANDOCERR_CHILD); + mandoc_msg(MANDOCERR_RS_SKIP, mdoc->parse, + nn->line, nn->pos, mdoc_macronames[nn->tok]); mdoc_node_delete(mdoc, nn); }