=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.38 retrieving revision 1.41 diff -u -p -r1.38 -r1.41 --- mandoc/mdoc_validate.c 2009/07/20 15:05:34 1.38 +++ mandoc/mdoc_validate.c 2009/07/25 16:03:03 1.41 @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.38 2009/07/20 15:05:34 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.41 2009/07/25 16:03:03 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -912,7 +912,7 @@ post_an(POST_ARGS) if (mdoc->last->args) { if (NULL == mdoc->last->child) return(1); - return(mdoc_nerr(mdoc, mdoc->last, ELINE)); + return(mdoc_nerr(mdoc, mdoc->last, ENOLINE)); } if (mdoc->last->child) @@ -1029,7 +1029,7 @@ post_it(POST_ARGS) for (i = 0; c && MDOC_HEAD == c->type; c = c->next) i++; - if (i < cols) { + if (i < cols || i == (cols + 1)) { if ( ! mdoc_vwarn(mdoc, mdoc->last->line, mdoc->last->pos, "column " "mismatch: have %d, want %d", @@ -1219,6 +1219,7 @@ post_sh_body(POST_ARGS) return(0); } + assert(n); if (MDOC_BLOCK == n->type && MDOC_Nd == n->tok) return(1); return(mdoc_nwarn(mdoc, mdoc->last, ENAMESECINC));