+
+ if (pos >= (int)ln.sz)
+ if (! resize_buf(&ln, 256))
+ goto bailout;
+ ln.buf[pos] = '\0';
+
+ /*
+ * A significant amount of complexity is contained by
+ * the roff preprocessor. It's line-oriented but can be
+ * expressed on one line, so we need at times to
+ * readjust our starting point and re-run it. The roff
+ * preprocessor can also readjust the buffers with new
+ * data, so we pass them in wholesale.
+ */
+
+ of = 0;
+ do {
+ re = roff_parseln(roff, lnn_start,
+ &ln.buf, &ln.sz, of, &of);
+ } while (ROFF_RERUN == re);
+
+ if (ROFF_IGN == re)
+ continue;
+ else if (ROFF_ERR == re)
+ goto bailout;
+
+ /*
+ * If input parsers have not been allocated, do so now.
+ * We keep these instanced betwen parsers, but set them
+ * locally per parse routine since we can use different
+ * parsers with each one.
+ */
+
+ if ( ! (man || mdoc))
+ if ( ! pset(ln.buf + of, pos - of, curp, &man, &mdoc))
+ goto bailout;
+
+ /* Lastly, push down into the parsers themselves. */
+
+ if (man && ! man_parseln(man, lnn_start, ln.buf, of))
+ goto bailout;
+ if (mdoc && ! mdoc_parseln(mdoc, lnn_start, ln.buf, of))
+ goto bailout;
+ }
+
+ /* NOTE a parser may not have been assigned, yet. */
+
+ if ( ! (man || mdoc)) {
+ fprintf(stderr, "%s: Not a manual\n", curp->file);
+ goto bailout;