diff options
author | 2017-01-10 21:54:34 +0000 | |
---|---|---|
committer | 2017-01-10 21:54:34 +0000 | |
commit | 816c3c540ddb65c361e8f838413abc9bbd012ec8 (patch) | |
tree | bd8fb5d1f63b81f88fec611b3825881f3ce050d3 /usr.bin/mandoc/mdoc_html.c | |
parent | Fix white spaces. No binary change. (diff) | |
download | wireguard-openbsd-816c3c540ddb65c361e8f838413abc9bbd012ec8.tar.xz wireguard-openbsd-816c3c540ddb65c361e8f838413abc9bbd012ec8.zip |
For the .Ux/.Ox family of macros, do text production at the validation
stage rather than in each and every individual formatter, using the
new NODE_NOSRC flag. More rigorous and also ten lines less code.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index a09008a1f1b..c1bab9d133d 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.119 2017/01/10 13:46:53 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.120 2017/01/10 21:54:34 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -730,44 +730,11 @@ mdoc_ar_pre(MDOC_ARGS) static int mdoc_xx_pre(MDOC_ARGS) { - const char *pp; struct htmlpair tag; - int flags; - - switch (n->tok) { - case MDOC_Bsx: - pp = "BSD/OS"; - break; - case MDOC_Dx: - pp = "DragonFly"; - break; - case MDOC_Fx: - pp = "FreeBSD"; - break; - case MDOC_Nx: - pp = "NetBSD"; - break; - case MDOC_Ox: - pp = "OpenBSD"; - break; - case MDOC_Ux: - pp = "UNIX"; - break; - default: - return 1; - } PAIR_CLASS_INIT(&tag, "unix"); print_otag(h, TAG_SPAN, 1, &tag); - - print_text(h, pp); - if (n->child) { - flags = h->flags; - h->flags |= HTML_KEEP; - print_text(h, n->child->string); - h->flags = flags; - } - return 0; + return 1; } static int |