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

Diff for /mandoc/tbl_layout.c between version 1.36 and 1.37

version 1.36, 2015/01/30 02:09:04 version 1.37, 2015/01/30 04:11:50
Line 282  tbl_layout(struct tbl_node *tbl, int ln, const char *p
Line 282  tbl_layout(struct tbl_node *tbl, int ln, const char *p
                                 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 324  static struct tbl_cell *
Line 324  static struct tbl_cell *
 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.36  
changed lines
  Added in v.1.37

CVSweb