[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.245 and 1.246

version 1.245, 2014/08/19 17:31:55 version 1.246, 2014/09/07 00:05:28
Line 1643  post_root(POST_ARGS)
Line 1643  post_root(POST_ARGS)
                 mdoc->meta.os = mandoc_strdup("");                  mdoc->meta.os = mandoc_strdup("");
         }          }
   
         n = mdoc->first;  
         assert(n);  
   
         /* Check that we begin with a proper `Sh'. */          /* Check that we begin with a proper `Sh'. */
   
         if (NULL == n->child)          n = mdoc->first->child;
                 mandoc_msg(MANDOCERR_DOC_EMPTY, mdoc->parse,          while (n != NULL && mdoc_macros[n->tok].flags & MDOC_PROLOGUE)
                     n->line, n->pos, NULL);                  n = n->next;
         else if (MDOC_Sh != n->child->tok)  
           if (n == NULL)
                   mandoc_msg(MANDOCERR_DOC_EMPTY, mdoc->parse, 0, 0, NULL);
           else if (n->tok != MDOC_Sh)
                 mandoc_msg(MANDOCERR_SEC_BEFORE, mdoc->parse,                  mandoc_msg(MANDOCERR_SEC_BEFORE, mdoc->parse,
                     n->child->line, n->child->pos,                      n->line, n->pos, mdoc_macronames[n->tok]);
                     mdoc_macronames[n->child->tok]);  
   
         return(1);          return(1);
 }  }

Legend:
Removed from v.1.245  
changed lines
  Added in v.1.246

CVSweb