diff options
author | 2017-01-19 13:34:59 +0000 | |
---|---|---|
committer | 2017-01-19 13:34:59 +0000 | |
commit | ce781f36af26ee9fa7ea98d48e6df871bd077b9b (patch) | |
tree | a049bd14b0d1c8d64a529c17806f156cc9ccdd95 /usr.bin/mandoc/man_html.c | |
parent | No need for conditionals around free(9) (diff) | |
download | wireguard-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/man_html.c')
-rw-r--r-- | usr.bin/mandoc/man_html.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c index 6182f74c7f4..af77538e630 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.78 2017/01/19 01:00:11 schwarze Exp $ */ +/* $OpenBSD: man_html.c,v 1.79 2017/01/19 13:34:59 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -146,24 +146,22 @@ html_man(void *arg, const struct roff_man *man) { struct mhtml mh; struct html *h; - struct tag *t, *tt; + struct tag *t; memset(&mh, 0, sizeof(mh)); 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_man_head(&man->meta, man->first, &mh, 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"); + } print_man_nodelist(&man->meta, man->first, &mh, h); - print_tagq(h, t); + print_tagq(h, NULL); } static void |