- if ( ! strcmp(p, "_")) {
- dp->pos = TBL_SPAN_HORIZ;
- return(1);
- } else if ( ! strcmp(p, "=")) {
- dp->pos = TBL_SPAN_DHORIZ;
- return(1);
+void
+tbl_data(struct tbl_node *tbl, int ln, const char *p, int pos)
+{
+ struct tbl_row *rp;
+ struct tbl_cell *cp;
+ struct tbl_span *sp;
+
+ rp = (sp = tbl->last_span) == NULL ? tbl->first_row :
+ sp->pos == TBL_SPAN_DATA && sp->layout->next != NULL ?
+ sp->layout->next : sp->layout;
+
+ assert(rp != NULL);
+
+ if (p[1] == '\0') {
+ switch (p[0]) {
+ case '.':
+ /*
+ * Empty request lines must be handled here
+ * and cannot be discarded in roff_parseln()
+ * because in the layout section, they
+ * are significant and end the layout.
+ */
+ return;
+ case '_':
+ sp = newspan(tbl, ln, rp);
+ sp->pos = TBL_SPAN_HORIZ;
+ return;
+ case '=':
+ sp = newspan(tbl, ln, rp);
+ sp->pos = TBL_SPAN_DHORIZ;
+ return;
+ default:
+ break;
+ }