[BACK]Return to mdoc_macro.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc_macro.c between version 1.205 and 1.206

version 1.205, 2015/10/17 00:21:07 version 1.206, 2015/10/20 02:01:32
Line 228  mdoc_endparse(struct roff_man *mdoc)
Line 228  mdoc_endparse(struct roff_man *mdoc)
         /* Rewind to the first. */          /* Rewind to the first. */
   
         rew_last(mdoc, mdoc->first);          rew_last(mdoc, mdoc->first);
           mdoc_state_reset(mdoc);
 }  }
   
 /*  /*
Line 262  lookup(struct roff_man *mdoc, int from, int line, int 
Line 263  lookup(struct roff_man *mdoc, int from, int line, int 
 static void  static void
 rew_last(struct roff_man *mdoc, const struct roff_node *to)  rew_last(struct roff_man *mdoc, const struct roff_node *to)
 {  {
         struct roff_node        *np;  
   
         if (to->flags & MDOC_VALID)          if (to->flags & MDOC_VALID)
                 return;                  return;
   
         while (mdoc->last != to) {          while (mdoc->last != to) {
                 /*                  mdoc_state(mdoc, mdoc->last);
                  * Save the parent here, because we may delete the                  mdoc->last->flags |= MDOC_VALID | MDOC_ENDED;
                  * mdoc->last node in the post-validation phase and reset                  mdoc->last = mdoc->last->parent;
                  * it to mdoc->last->parent, causing a step in the closing  
                  * out to be lost.  
                  */  
                 np = mdoc->last->parent;  
                 mdoc_valid_post(mdoc);  
                 mdoc->last = np;  
                 assert(mdoc->last);  
         }          }
           mdoc_state(mdoc, mdoc->last);
           mdoc->last->flags |= MDOC_VALID | MDOC_ENDED;
         mdoc->next = ROFF_NEXT_SIBLING;          mdoc->next = ROFF_NEXT_SIBLING;
         mdoc_valid_post(mdoc);  
 }  }
   
 /*  /*

Legend:
Removed from v.1.205  
changed lines
  Added in v.1.206

CVSweb