+ if (tbl->last_span != NULL) {
+ if (tbl->last_span->pos == TBL_SPAN_DATA) {
+ for (rp = tbl->last_span->layout->next;
+ rp != NULL && rp->first != NULL;
+ rp = rp->next) {
+ switch (rp->first->pos) {
+ case TBL_CELL_HORIZ:
+ dp = newspan(tbl, ln, rp);
+ dp->pos = TBL_SPAN_HORIZ;
+ continue;
+ case TBL_CELL_DHORIZ:
+ dp = newspan(tbl, ln, rp);
+ dp->pos = TBL_SPAN_DHORIZ;
+ continue;
+ default:
+ break;
+ }
+ break;
+ }
+ } else
+ rp = tbl->last_span->layout;
+
+ if (rp == NULL)