- tt = print_otag(h, TAG_TD, 1, &tag);
- if (dp) {
- if (dp->string)
- print_text(h, dp->string);
+ print_otag(h, TAG_COL, 1, &tag);
+ }
+
+ print_otag(h, TAG_TBODY, 0, NULL);
+}
+
+void
+print_tblclose(struct html *h)
+{
+
+ assert(h->tblt);
+ print_tagq(h, h->tblt);
+ h->tblt = NULL;
+}
+
+void
+print_tbl(struct html *h, const struct tbl_span *sp)
+{
+ const struct tbl_head *hp;
+ const struct tbl_dat *dp;
+ struct htmlpair tag;
+ struct tag *tt;
+
+ /* Inhibit printing of spaces: we do padding ourselves. */
+
+ if (NULL == h->tblt)
+ html_tblopen(h, sp);
+
+ assert(h->tblt);
+
+ h->flags |= HTML_NONOSPACE;
+ h->flags |= HTML_NOSPACE;
+
+ tt = print_otag(h, TAG_TR, 0, NULL);
+
+ switch (sp->pos) {
+ case TBL_SPAN_HORIZ:
+ /* FALLTHROUGH */
+ case TBL_SPAN_DHORIZ:
+ PAIR_INIT(&tag, ATTR_COLSPAN, "0");
+ print_otag(h, TAG_TD, 1, &tag);
+ break;
+ default:
+ dp = sp->first;
+ for (hp = sp->head; hp; hp = hp->next) {
+ print_stagq(h, tt);
+ print_otag(h, TAG_TD, 0, NULL);
+
+ if (NULL == dp)
+ break;
+ if (TBL_CELL_DOWN != dp->layout->pos)
+ if (dp->string)
+ print_text(h, dp->string);