[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.95 and 1.96

version 1.95, 2010/06/12 11:41:50 version 1.96, 2010/06/12 11:58:22
Line 539  pre_bl(PRE_ARGS)
Line 539  pre_bl(PRE_ARGS)
                 assert(n->parent);                  assert(n->parent);
                 assert(MDOC_BLOCK == n->parent->type);                  assert(MDOC_BLOCK == n->parent->type);
                 assert(MDOC_Bl == n->parent->tok);                  assert(MDOC_Bl == n->parent->tok);
                 assert(LIST__NONE != n->parent->data.list);                  assert(LIST__NONE != n->parent->data.Bl.type);
                 n->data.list = n->parent->data.list;                  memcpy(&n->data.Bl, &n->parent->data.Bl,
                                   sizeof(struct mdoc_bl));
                 return(1);                  return(1);
         }          }
   
Line 550  pre_bl(PRE_ARGS)
Line 551  pre_bl(PRE_ARGS)
          * ones.  If we find no list type, we default to LIST_item.           * ones.  If we find no list type, we default to LIST_item.
          */           */
   
         assert(LIST__NONE == n->data.list);          assert(LIST__NONE == n->data.Bl.type);
         offs = width = cmpt = -1;          offs = width = cmpt = -1;
   
         /* LINTED */          /* LINTED */
Line 618  pre_bl(PRE_ARGS)
Line 619  pre_bl(PRE_ARGS)
   
                 /* Check: multiple list types. */                  /* Check: multiple list types. */
   
                 if (LIST__NONE != lt && n->data.list != LIST__NONE)                  if (LIST__NONE != lt && n->data.Bl.type != LIST__NONE)
                         if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTREP))                          if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTREP))
                                 return(0);                                  return(0);
   
                 /* Assign list type. */                  /* Assign list type. */
   
                 if (LIST__NONE != lt && n->data.list == LIST__NONE)                  if (LIST__NONE != lt && n->data.Bl.type == LIST__NONE)
                         n->data.list = lt;                          n->data.Bl.type = lt;
   
                 /* The list type should come first. */                  /* The list type should come first. */
   
                 if (n->data.list == LIST__NONE)                  if (n->data.Bl.type == LIST__NONE)
                         if (width >= 0 || offs >= 0 || cmpt >= 0)                          if (width >= 0 || offs >= 0 || cmpt >= 0)
                                 if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTFIRST))                                  if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTFIRST))
                                         return(0);                                          return(0);
Line 639  pre_bl(PRE_ARGS)
Line 640  pre_bl(PRE_ARGS)
   
         /* Allow lists to default to LIST_item. */          /* Allow lists to default to LIST_item. */
   
         if (LIST__NONE == n->data.list) {          if (LIST__NONE == n->data.Bl.type) {
                 if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTTYPE))                  if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTTYPE))
                         return(0);                          return(0);
                 n->data.list = LIST_item;                  n->data.Bl.type = LIST_item;
         }          }
   
         /*          /*
Line 651  pre_bl(PRE_ARGS)
Line 652  pre_bl(PRE_ARGS)
          * and must also be warned.           * and must also be warned.
          */           */
   
         switch (n->data.list) {          switch (n->data.Bl.type) {
         case (LIST_tag):          case (LIST_tag):
                 if (width >= 0)                  if (width >= 0)
                         break;                          break;
Line 1031  post_it(POST_ARGS)
Line 1032  post_it(POST_ARGS)
                 return(1);                  return(1);
   
         n = mdoc->last->parent->parent;          n = mdoc->last->parent->parent;
         lt = n->data.list;          lt = n->data.Bl.type;
   
         if (LIST__NONE == lt) {          if (LIST__NONE == lt) {
                 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_LISTTYPE);                  mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_LISTTYPE);
Line 1123  post_bl_head(POST_ARGS) 
Line 1124  post_bl_head(POST_ARGS) 
         assert(mdoc->last->parent);          assert(mdoc->last->parent);
         n = mdoc->last->parent;          n = mdoc->last->parent;
   
         if (LIST_column == n->data.list) {          if (LIST_column == n->data.Bl.type) {
                 for (i = 0; i < (int)n->args->argc; i++)                  for (i = 0; i < (int)n->args->argc; i++)
                         if (MDOC_Column == n->args->argv[i].arg)                          if (MDOC_Column == n->args->argv[i].arg)
                                 break;                                  break;

Legend:
Removed from v.1.95  
changed lines
  Added in v.1.96

CVSweb