[BACK]Return to tbl_layout.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/tbl_layout.c between version 1.23 and 1.24

version 1.23, 2015/01/30 02:08:37 version 1.24, 2015/01/30 04:08:37
Line 280 
Line 280 
                                 if (tbl->opts.lvert < rp->vert)                                  if (tbl->opts.lvert < rp->vert)
                                         tbl->opts.lvert = rp->vert;                                          tbl->opts.lvert = rp->vert;
                                 if (rp->last != NULL &&                                  if (rp->last != NULL &&
                                     rp->last->head == tbl->last_head &&                                      rp->last->col + 1 == tbl->opts.cols &&
                                     tbl->opts.rvert < rp->last->vert)                                      tbl->opts.rvert < rp->last->vert)
                                         tbl->opts.rvert = rp->last->vert;                                          tbl->opts.rvert = rp->last->vert;
   
Line 322 
Line 322 
 cell_alloc(struct tbl_node *tbl, struct tbl_row *rp, enum tbl_cellt pos)  cell_alloc(struct tbl_node *tbl, struct tbl_row *rp, enum tbl_cellt pos)
 {  {
         struct tbl_cell *p, *pp;          struct tbl_cell *p, *pp;
         struct tbl_head *h, *hp;  
   
         p = mandoc_calloc(1, sizeof(*p));          p = mandoc_calloc(1, sizeof(*p));
           p->pos = pos;
   
         if ((pp = rp->last) != NULL) {          if ((pp = rp->last) != NULL) {
                 pp->next = p;                  pp->next = p;
                 h = pp->head->next;                  p->col = pp->col + 1;
         } else {          } else
                 rp->first = p;                  rp->first = p;
                 h = tbl->first_head;  
         }  
         rp->last = p;          rp->last = p;
   
         p->pos = pos;          if (tbl->opts.cols <= p->col)
                   tbl->opts.cols = p->col + 1;
   
         /* Re-use header. */  
   
         if (h != NULL) {  
                 p->head = h;  
                 return(p);  
         }  
   
         hp = mandoc_calloc(1, sizeof(*hp));  
         hp->ident = tbl->opts.cols++;  
   
         if (tbl->last_head != NULL) {  
                 hp->prev = tbl->last_head;  
                 tbl->last_head->next = hp;  
         } else  
                 tbl->first_head = hp;  
         tbl->last_head = hp;  
   
         p->head = hp;  
         return(p);          return(p);
 }  }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24