+termp_fo_pre(DECL_ARGS)
+{
+ const struct mdoc_node *n;
+
+ if (MDOC_BODY == node->type) {
+ word(p, "(");
+ p->flags |= TERMP_NOSPACE;
+ return(1);
+ } else if (MDOC_HEAD != node->type)
+ return(1);
+
+ /* XXX - groff shows only first parameter */
+
+ p->flags |= ttypes[TTYPE_FUNC_NAME];
+ for (n = node->child; n; n = n->next) {
+ assert(MDOC_TEXT == n->type);
+ word(p, n->data.text.string);
+ }
+ p->flags &= ~ttypes[TTYPE_FUNC_NAME];
+
+ return(0);
+}
+
+
+/* ARGSUSED */
+static void
+termp_fo_post(DECL_ARGS)
+{
+
+ if (MDOC_BODY != node->type)
+ return;
+ word(p, ")");
+ word(p, ";");
+ newln(p);
+}
+
+
+/* ARGSUSED */
+static int
+termp_bf_pre(DECL_ARGS)
+{
+ const struct mdoc_node *n;
+ const struct mdoc_block *b;
+
+ /* XXX - we skip over possible trailing HEAD tokens. */
+
+ if (MDOC_HEAD == node->type)
+ return(0);
+ else if (MDOC_BLOCK != node->type)
+ return(1);
+
+ b = &node->data.block;
+
+ if (NULL == (n = b->head->child)) {
+ if (arg_hasattr(MDOC_Emphasis, b->argc, b->argv))
+ TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_EMPH]);
+ else if (arg_hasattr(MDOC_Symbolic, b->argc, b->argv))
+ TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_SYMB]);
+
+ return(1);
+ }
+
+ assert(MDOC_TEXT == n->type);
+
+ if (0 == strcmp("Em", n->data.text.string))
+ TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_EMPH]);
+ else if (0 == strcmp("Sy", n->data.text.string))
+ TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_EMPH]);
+
+ return(1);
+}
+
+
+/* ARGSUSED */
+static int
+termp_sy_pre(DECL_ARGS)
+{
+
+ TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_SYMB]);
+ return(1);
+}
+
+
+/* ARGSUSED */
+static int
+termp_ms_pre(DECL_ARGS)