[BACK]Return to mdoc_validate.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc_validate.c between version 1.215 and 1.216

version 1.215, 2014/06/20 17:24:00 version 1.216, 2014/06/20 23:02:31
Line 1645  ebool(struct mdoc *mdoc)
Line 1645  ebool(struct mdoc *mdoc)
 static int  static int
 post_root(POST_ARGS)  post_root(POST_ARGS)
 {  {
         int               erc;          int               ret;
         struct mdoc_node *n;          struct mdoc_node *n;
   
         erc = 0;          ret = 1;
   
         /* Check that we have a finished prologue. */          /* Check that we have a finished prologue. */
   
         if ( ! (MDOC_PBODY & mdoc->flags)) {          if ( ! (MDOC_PBODY & mdoc->flags)) {
                 erc++;                  ret = 0;
                 mdoc_nmsg(mdoc, mdoc->first, MANDOCERR_NODOCPROLOG);                  mdoc_nmsg(mdoc, mdoc->first, MANDOCERR_NODOCPROLOG);
         }          }
   
Line 1662  post_root(POST_ARGS)
Line 1662  post_root(POST_ARGS)
   
         /* Check that we begin with a proper `Sh'. */          /* Check that we begin with a proper `Sh'. */
   
         if (NULL == n->child) {          if (NULL == n->child)
                 erc++;                  mdoc_nmsg(mdoc, n, MANDOCERR_DOC_EMPTY);
                 mdoc_nmsg(mdoc, n, MANDOCERR_NODOCBODY);          else if (MDOC_BLOCK != n->child->type ||
         } else if (MDOC_BLOCK != n->child->type ||              MDOC_Sh != n->child->tok)
             MDOC_Sh != n->child->tok) {                  mdoc_nmsg(mdoc, n->child, MANDOCERR_SEC_BEFORE);
                 erc++;  
                 /* Can this be lifted?  See rxdebug.1 for example. */  
                 mdoc_nmsg(mdoc, n, MANDOCERR_NODOCBODY);  
         }  
   
         return(erc ? 0 : 1);          return(ret);
 }  }
   
 static int  static int

Legend:
Removed from v.1.215  
changed lines
  Added in v.1.216

CVSweb