+ const char *cp;
+ int active;
+
+ /*
+ * In the options section, proceed to the layout section
+ * after a semicolon, or right away if there is no semicolon.
+ * Ignore semicolons in arguments.
+ */
+
+ if (tbl->part == TBL_PART_OPTS) {
+ tbl->part = TBL_PART_LAYOUT;
+ active = 1;
+ for (cp = p + pos; *cp != '\0'; cp++) {
+ switch (*cp) {
+ case '(':
+ active = 0;
+ continue;
+ case ')':
+ active = 1;
+ continue;
+ case ';':
+ if (active)
+ break;
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ if (*cp == ';') {
+ tbl_option(tbl, ln, p, &pos);
+ if (p[pos] == '\0')
+ return(ROFF_IGN);
+ }
+ }
+
+ /* Process the other section types. */
+
+ switch (tbl->part) {
+ case TBL_PART_LAYOUT:
+ tbl_layout(tbl, ln, p, pos);
+ return(ROFF_IGN);
+ case TBL_PART_CDATA:
+ return(tbl_cdata(tbl, ln, p, pos) ? ROFF_TBL : ROFF_IGN);
+ default:
+ break;
+ }
+
+ tbl_data(tbl, ln, p, pos);
+ return(ROFF_TBL);