[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.303 and 1.307

version 1.303, 2016/08/10 12:06:41 version 1.307, 2016/08/11 11:39:46
Line 886  post_display(POST_ARGS)
Line 886  post_display(POST_ARGS)
         n = mdoc->last;          n = mdoc->last;
         switch (n->type) {          switch (n->type) {
         case ROFFT_BODY:          case ROFFT_BODY:
                 if (n->end != ENDBODY_NOT)                  if (n->end != ENDBODY_NOT) {
                         break;                          if (n->tok == MDOC_Bd &&
                 if (n->child == NULL)                              n->body->parent->args == NULL)
                                   roff_node_delete(mdoc, n);
                   } else if (n->child == NULL)
                         mandoc_msg(MANDOCERR_BLK_EMPTY, mdoc->parse,                          mandoc_msg(MANDOCERR_BLK_EMPTY, mdoc->parse,
                             n->line, n->pos, mdoc_macronames[n->tok]);                              n->line, n->pos, mdoc_macronames[n->tok]);
                 else if (n->tok == MDOC_D1)                  else if (n->tok == MDOC_D1)
Line 1064  post_it(POST_ARGS)
Line 1066  post_it(POST_ARGS)
                             mdoc_argnames[nbl->args->argv[0].arg]);                              mdoc_argnames[nbl->args->argv[0].arg]);
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case LIST_item:          case LIST_item:
                 if (nit->head->child != NULL)                  if ((nch = nit->head->child) != NULL)
                         mandoc_vmsg(MANDOCERR_ARG_SKIP,                          mandoc_vmsg(MANDOCERR_ARG_SKIP,
                             mdoc->parse, nit->line, nit->pos,                              mdoc->parse, nit->line, nit->pos,
                             "It %s", nit->head->child->string);                              "It %s", nch->string == NULL ?
                               mdoc_macronames[nch->tok] : nch->string);
                 break;                  break;
         case LIST_column:          case LIST_column:
                 cols = (int)nbl->norm->Bl.ncols;                  cols = (int)nbl->norm->Bl.ncols;
Line 1760  post_sh_authors(POST_ARGS)
Line 1763  post_sh_authors(POST_ARGS)
 static void  static void
 post_sh_head(POST_ARGS)  post_sh_head(POST_ARGS)
 {  {
         const char      *goodsec;          struct roff_node        *nch;
         enum roff_sec    sec;          const char              *goodsec;
           enum roff_sec            sec;
   
         /*          /*
          * Process a new section.  Sections are either "named" or           * Process a new section.  Sections are either "named" or
Line 1777  post_sh_head(POST_ARGS)
Line 1781  post_sh_head(POST_ARGS)
         if (sec != SEC_NAME && mdoc->lastnamed == SEC_NONE)          if (sec != SEC_NAME && mdoc->lastnamed == SEC_NONE)
                 mandoc_vmsg(MANDOCERR_NAMESEC_FIRST, mdoc->parse,                  mandoc_vmsg(MANDOCERR_NAMESEC_FIRST, mdoc->parse,
                     mdoc->last->line, mdoc->last->pos, "Sh %s",                      mdoc->last->line, mdoc->last->pos, "Sh %s",
                     sec == SEC_CUSTOM ? mdoc->last->child->string :                      sec != SEC_CUSTOM ? secnames[sec] :
                     secnames[sec]);                      (nch = mdoc->last->child) == NULL ? "" :
                       nch->type == ROFFT_TEXT ? nch->string :
                       mdoc_macronames[nch->tok]);
   
         /* The SYNOPSIS gets special attention in other areas. */          /* The SYNOPSIS gets special attention in other areas. */
   

Legend:
Removed from v.1.303  
changed lines
  Added in v.1.307

CVSweb