version 1.22, 2015/01/30 00:27:09 |
version 1.23, 2015/01/30 02:08:37 |
|
|
struct tbl_cell *p, *pp; |
struct tbl_cell *p, *pp; |
struct tbl_head *h, *hp; |
struct tbl_head *h, *hp; |
|
|
p = mandoc_calloc(1, sizeof(struct tbl_cell)); |
p = mandoc_calloc(1, sizeof(*p)); |
|
|
if (NULL != (pp = rp->last)) { |
if ((pp = rp->last) != NULL) { |
pp->next = p; |
pp->next = p; |
h = pp->head->next; |
h = pp->head->next; |
} else { |
} else { |
|
|
|
|
/* Re-use header. */ |
/* Re-use header. */ |
|
|
if (h) { |
if (h != NULL) { |
p->head = h; |
p->head = h; |
return(p); |
return(p); |
} |
} |
|
|
hp = mandoc_calloc(1, sizeof(struct tbl_head)); |
hp = mandoc_calloc(1, sizeof(*hp)); |
hp->ident = tbl->opts.cols++; |
hp->ident = tbl->opts.cols++; |
|
|
if (tbl->last_head) { |
if (tbl->last_head != NULL) { |
hp->prev = tbl->last_head; |
hp->prev = tbl->last_head; |
tbl->last_head->next = hp; |
tbl->last_head->next = hp; |
} else |
} else |