[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.261 and 1.264

version 1.261, 2014/11/28 18:09:01 version 1.264, 2014/12/18 19:23:41
Line 210  static const struct valids mdoc_valids[MDOC_MAX] = {
Line 210  static const struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, NULL },                         /* Nx */          { NULL, NULL },                         /* Nx */
         { NULL, NULL },                         /* Ox */          { NULL, NULL },                         /* Ox */
         { NULL, NULL },                         /* Pc */          { NULL, NULL },                         /* Pc */
         { NULL, ewarn_eq1 },                    /* Pf */          { NULL, NULL },                         /* Pf */
         { NULL, NULL },                         /* Po */          { NULL, NULL },                         /* Po */
         { NULL, NULL },                         /* Pq */          { NULL, NULL },                         /* Pq */
         { NULL, NULL },                         /* Qc */          { NULL, NULL },                         /* Qc */
Line 1197  post_it(POST_ARGS)
Line 1197  post_it(POST_ARGS)
         struct mdoc_node *nbl, *nit, *nch;          struct mdoc_node *nbl, *nit, *nch;
   
         nit = mdoc->last;          nit = mdoc->last;
         if (MDOC_BLOCK != nit->type)          if (nit->type != MDOC_BLOCK)
                 return;                  return;
   
         nbl = nit->parent->parent;          nbl = nit->parent->parent;
Line 1213  post_it(POST_ARGS)
Line 1213  post_it(POST_ARGS)
         case LIST_inset:          case LIST_inset:
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case LIST_diag:          case LIST_diag:
                 if (NULL == nit->head->child)                  if (nit->head->child == NULL)
                         mandoc_vmsg(MANDOCERR_IT_NOHEAD,                          mandoc_vmsg(MANDOCERR_IT_NOHEAD,
                             mdoc->parse, nit->line, nit->pos,                              mdoc->parse, nit->line, nit->pos,
                             "Bl -%s It",                              "Bl -%s It",
Line 1226  post_it(POST_ARGS)
Line 1226  post_it(POST_ARGS)
         case LIST_enum:          case LIST_enum:
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case LIST_hyphen:          case LIST_hyphen:
                 if (NULL == nit->body->child)                  if (nit->body == NULL || nit->body->child == NULL)
                         mandoc_vmsg(MANDOCERR_IT_NOBODY,                          mandoc_vmsg(MANDOCERR_IT_NOBODY,
                             mdoc->parse, nit->line, nit->pos,                              mdoc->parse, nit->line, nit->pos,
                             "Bl -%s It",                              "Bl -%s It",
                             mdoc_argnames[nbl->args->argv[0].arg]);                              mdoc_argnames[nbl->args->argv[0].arg]);
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case LIST_item:          case LIST_item:
                 if (NULL != nit->head->child)                  if (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", nit->head->child->string);
Line 1241  post_it(POST_ARGS)
Line 1241  post_it(POST_ARGS)
         case LIST_column:          case LIST_column:
                 cols = (int)nbl->norm->Bl.ncols;                  cols = (int)nbl->norm->Bl.ncols;
   
                 assert(NULL == nit->head->child);                  assert(nit->head->child == NULL);
   
                 for (i = 0, nch = nit->child; nch; nch = nch->next)                  for (i = 0, nch = nit->child; nch; nch = nch->next)
                         if (MDOC_BODY == nch->type)                          if (nch->type == MDOC_BODY)
                                 i++;                                  i++;
   
                 if (i < cols || i > cols + 1)                  if (i < cols || i > cols + 1)
Line 2280  post_dt(POST_ARGS)
Line 2280  post_dt(POST_ARGS)
                 mdoc->meta.msec = mandoc_strdup(nn->string);                  mdoc->meta.msec = mandoc_strdup(nn->string);
         }          }
   
         if (NULL == (nn = nn->next))          /* Handle an optional architecture */
                 goto out;  
   
         /*          if ((nn = nn->next) != NULL) {
          * If the third argument is a volume name, format is,  
          * otherwise assume it's an architecture.  
          */  
   
         cp = mdoc_a2vol(nn->string);  
         if (cp) {  
                 free(mdoc->meta.vol);  
                 mdoc->meta.vol = mandoc_strdup(cp);  
         } else {  
                 for (p = nn->string; *p; p++)                  for (p = nn->string; *p; p++)
                         *p = tolower((unsigned char)*p);                          *p = tolower((unsigned char)*p);
                 mdoc->meta.arch = mandoc_strdup(nn->string);                  mdoc->meta.arch = mandoc_strdup(nn->string);

Legend:
Removed from v.1.261  
changed lines
  Added in v.1.264

CVSweb