summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-01-19 13:34:59 +0000
committerschwarze <schwarze@openbsd.org>2017-01-19 13:34:59 +0000
commitce781f36af26ee9fa7ea98d48e6df871bd077b9b (patch)
treea049bd14b0d1c8d64a529c17806f156cc9ccdd95 /usr.bin/mandoc/mdoc_html.c
parentNo need for conditionals around free(9) (diff)
downloadwireguard-openbsd-ce781f36af26ee9fa7ea98d48e6df871bd077b9b.tar.xz
wireguard-openbsd-ce781f36af26ee9fa7ea98d48e6df871bd077b9b.zip
Start cleanup: trim useless HTML comments and <div> elements
on the <html> and <body> levels.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index b1f8379f80f..a41ce23cbb8 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_html.c,v 1.126 2017/01/19 01:00:11 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.127 2017/01/19 13:34:59 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -297,25 +297,23 @@ void
html_mdoc(void *arg, const struct roff_man *mdoc)
{
struct html *h;
- struct tag *t, *tt;
+ struct tag *t;
h = (struct html *)arg;
- if ( ! (HTML_FRAGMENT & h->oflags)) {
+ if ((h->oflags & HTML_FRAGMENT) == 0) {
print_gen_decls(h);
- t = print_otag(h, TAG_HTML, "");
- tt = print_otag(h, TAG_HEAD, "");
+ print_otag(h, TAG_HTML, "");
+ t = print_otag(h, TAG_HEAD, "");
print_mdoc_head(&mdoc->meta, mdoc->first->child, h);
- print_tagq(h, tt);
+ print_tagq(h, t);
print_otag(h, TAG_BODY, "");
- print_otag(h, TAG_DIV, "c", "mandoc");
- } else
- t = print_otag(h, TAG_DIV, "c", "mandoc");
+ }
mdoc_root_pre(&mdoc->meta, mdoc->first->child, h);
print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h);
mdoc_root_post(&mdoc->meta, mdoc->first->child, h);
- print_tagq(h, t);
+ print_tagq(h, NULL);
}
static void