summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-12-23 09:31:17 +0000
committerschwarze <schwarze@openbsd.org>2014-12-23 09:31:17 +0000
commit84f230ba6e30895d9c993ecfab5b8fd60dc01934 (patch)
treecb3c6651b3e65864c78b193243373222a650d9d8 /usr.bin/mandoc/mdoc_html.c
parenttweak meta-info checking a bit. (diff)
downloadwireguard-openbsd-84f230ba6e30895d9c993ecfab5b8fd60dc01934.tar.xz
wireguard-openbsd-84f230ba6e30895d9c993ecfab5b8fd60dc01934.zip
some scaling unit fixes:
- .sp with an invalid argument is .sp 1v, not .sp 0v - in man(1), trailing garbage doesn't make scaling units invalid
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index 1b95dc47e92..05b678b2d26 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.91 2014/12/02 10:07:17 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.92 2014/12/23 09:31:17 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -277,7 +277,7 @@ static void
a2width(const char *p, struct roffsu *su)
{
- if ( ! a2roffsu(p, su, SCALE_MAX)) {
+ if (a2roffsu(p, su, SCALE_MAX) < 2) {
su->unit = SCALE_EN;
su->scale = html_strlen(p);
}
@@ -1566,7 +1566,7 @@ mdoc_sp_pre(MDOC_ARGS)
if (MDOC_sp == n->tok) {
if (NULL != (n = n->child))
if ( ! a2roffsu(n->string, &su, SCALE_VS))
- SCALE_VS_INIT(&su, atoi(n->string));
+ su.scale = 1.0;
} else
su.scale = 0.0;