[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.277 and 1.278

version 1.277, 2015/02/10 08:05:30 version 1.278, 2015/02/12 12:24:33
Line 325  mdoc_valid_post(struct mdoc *mdoc)
Line 325  mdoc_valid_post(struct mdoc *mdoc)
         n = mdoc->last;          n = mdoc->last;
         if (n->flags & MDOC_VALID)          if (n->flags & MDOC_VALID)
                 return;                  return;
         n->flags |= MDOC_VALID;          n->flags |= MDOC_VALID | MDOC_ENDED;
   
         switch (n->type) {          switch (n->type) {
         case MDOC_TEXT:          case MDOC_TEXT:
Line 416  pre_display(PRE_ARGS)
Line 416  pre_display(PRE_ARGS)
 static void  static void
 pre_bl(PRE_ARGS)  pre_bl(PRE_ARGS)
 {  {
         struct mdoc_node *np;  
         struct mdoc_argv *argv, *wa;          struct mdoc_argv *argv, *wa;
         int               i;          int               i;
         enum mdocargt     mdoclt;          enum mdocargt     mdoclt;
         enum mdoc_list    lt;          enum mdoc_list    lt;
   
         if (MDOC_BLOCK != n->type) {          if (n->type != MDOC_BLOCK)
                 if (ENDBODY_NOT != n->end) {  
                         assert(n->pending);  
                         np = n->pending->parent;  
                 } else  
                         np = n->parent;  
   
                 assert(np);  
                 assert(MDOC_BLOCK == np->type);  
                 assert(MDOC_Bl == np->tok);  
                 return;                  return;
         }  
   
         /*          /*
          * First figure out which kind of list to use: bind ourselves to           * First figure out which kind of list to use: bind ourselves to
Line 609  pre_bl(PRE_ARGS)
Line 598  pre_bl(PRE_ARGS)
 static void  static void
 pre_bd(PRE_ARGS)  pre_bd(PRE_ARGS)
 {  {
         struct mdoc_node *np;  
         struct mdoc_argv *argv;          struct mdoc_argv *argv;
         int               i;          int               i;
         enum mdoc_disp    dt;          enum mdoc_disp    dt;
   
         pre_literal(mdoc, n);          pre_literal(mdoc, n);
   
         if (MDOC_BLOCK != n->type) {          if (n->type != MDOC_BLOCK)
                 if (ENDBODY_NOT != n->end) {  
                         assert(n->pending);  
                         np = n->pending->parent;  
                 } else  
                         np = n->parent;  
   
                 assert(np);  
                 assert(MDOC_BLOCK == np->type);  
                 assert(MDOC_Bd == np->tok);  
                 return;                  return;
         }  
   
         for (i = 0; n->args && i < (int)n->args->argc; i++) {          for (i = 0; n->args && i < (int)n->args->argc; i++) {
                 argv = n->args->argv + i;                  argv = n->args->argv + i;
Line 797  post_bf(POST_ARGS)
Line 775  post_bf(POST_ARGS)
          * element, which contains the goods.           * element, which contains the goods.
          */           */
   
         if (MDOC_HEAD != mdoc->last->type) {          np = mdoc->last;
                 if (ENDBODY_NOT != mdoc->last->end) {          if (MDOC_HEAD != np->type)
                         assert(mdoc->last->pending);  
                         np = mdoc->last->pending->parent->head;  
                 } else if (MDOC_BLOCK != mdoc->last->type) {  
                         np = mdoc->last->parent->head;  
                 } else  
                         np = mdoc->last->head;  
   
                 assert(np);  
                 assert(MDOC_HEAD == np->type);  
                 assert(MDOC_Bf == np->tok);  
                 return;                  return;
         }  
   
         np = mdoc->last;  
         assert(MDOC_BLOCK == np->parent->type);          assert(MDOC_BLOCK == np->parent->type);
         assert(MDOC_Bf == np->parent->tok);          assert(MDOC_Bf == np->parent->tok);
   

Legend:
Removed from v.1.277  
changed lines
  Added in v.1.278

CVSweb