aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-05 02:06:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-05 02:06:19 +0000
commit1481c0648531c03ad8b53843797e3c269032f43c (patch)
tree45ea03c49eb82d26f334f5a790e760417bd7b9b5 /roff_html.c
parentd4309408b94eb36fcea040582e8579967cb7878b (diff)
downloadmandoc-1481c0648531c03ad8b53843797e3c269032f43c.tar.gz
mandoc-1481c0648531c03ad8b53843797e3c269032f43c.tar.zst
mandoc-1481c0648531c03ad8b53843797e3c269032f43c.zip
Move handling of the roff(7) .ft request from the man(7)
modules to the new roff(7) modules. As a side effect, mdoc(7) now handles .ft, too. Of course, do not use that.
Diffstat (limited to 'roff_html.c')
-rw-r--r--roff_html.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/roff_html.c b/roff_html.c
index 533fb9b7..3e30aa14 100644
--- a/roff_html.c
+++ b/roff_html.c
@@ -17,6 +17,7 @@
#include <sys/types.h>
#include <assert.h>
+#include <stddef.h>
#include "roff.h"
#include "out.h"
@@ -30,6 +31,7 @@ static void roff_html_pre_br(ROFF_HTML_ARGS);
static const roff_html_pre_fp roff_html_pre_acts[ROFF_MAX] = {
roff_html_pre_br, /* br */
+ NULL, /* ft */
};
@@ -37,7 +39,8 @@ void
roff_html_pre(struct html *h, const struct roff_node *n)
{
assert(n->tok < ROFF_MAX);
- (*roff_html_pre_acts[n->tok])(h, n);
+ if (roff_html_pre_acts[n->tok] != NULL)
+ (*roff_html_pre_acts[n->tok])(h, n);
}
static void