summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2018-12-30 00:48:47 +0000
committerschwarze <schwarze@openbsd.org>2018-12-30 00:48:47 +0000
commit6b86842e6cdb3960f6b08bd377e1a60a2f8ba124 (patch)
tree50673084d24eb85a3039a769d815803000c6565f /usr.bin/mandoc/man_html.c
parentCleanup: Initialize the pointers to position data early, and use (diff)
downloadwireguard-openbsd-6b86842e6cdb3960f6b08bd377e1a60a2f8ba124.tar.xz
wireguard-openbsd-6b86842e6cdb3960f6b08bd377e1a60a2f8ba124.zip
Cleanup, no functional change:
The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h. Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication. This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters.
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r--usr.bin/mandoc/man_html.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index a420656083d..79a24cb8b38 100644
--- a/usr.bin/mandoc/man_html.c
+++ b/usr.bin/mandoc/man_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_html.c,v 1.113 2018/12/15 23:33:20 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.114 2018/12/30 00:48:47 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -137,7 +137,7 @@ print_bvspace(struct html *h, const struct roff_node *n)
}
void
-html_man(void *arg, const struct roff_man *man)
+html_man(void *arg, const struct roff_meta *man)
{
struct html *h;
struct roff_node *n;
@@ -152,16 +152,16 @@ html_man(void *arg, const struct roff_man *man)
if (n->type == ROFFT_COMMENT)
print_gen_comment(h, n);
t = print_otag(h, TAG_HEAD, "");
- print_man_head(&man->meta, h);
+ print_man_head(man, h);
print_tagq(h, t);
print_otag(h, TAG_BODY, "");
}
- man_root_pre(&man->meta, h);
+ man_root_pre(man, h);
t = print_otag(h, TAG_DIV, "c", "manual-text");
- print_man_nodelist(&man->meta, n, h);
+ print_man_nodelist(man, n, h);
print_tagq(h, t);
- man_root_post(&man->meta, h);
+ man_root_post(man, h);
print_tagq(h, NULL);
}