- switch (n->type) {
- case ROFFT_EQN:
- break;
- default:
- if (mans[n->tok].post)
- (*mans[n->tok].post)(man, n, mh, h);
- break;
+ if (fillmode(h, 0) == MAN_nf &&
+ n->next != NULL && n->next->flags & NODE_LINE)
+ print_endline(h);
+}
+
+/*
+ * MAN_nf switches to no-fill mode, MAN_fi to fill mode.
+ * Other arguments do not switch.
+ * The old mode is returned.
+ */
+static int
+fillmode(struct html *h, int want)
+{
+ struct tag *pre;
+ int had;
+
+ for (pre = h->tag; pre != NULL; pre = pre->next)
+ if (pre->tag == TAG_PRE)
+ break;
+
+ had = pre == NULL ? MAN_fi : MAN_nf;
+
+ if (want && want != had) {
+ if (want == MAN_nf)
+ print_otag(h, TAG_PRE, "");
+ else
+ print_tagq(h, pre);