aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-23 09:31:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-23 09:31:46 +0000
commitb746353a05b8aa9d139a3058dfc846eb7c978997 (patch)
tree148663f150cd664bbc197e0cecd0dbb1c442a185 /mdoc_man.c
parent5d42210e3b9f8220e4026cbeb581e5953e7bd23d (diff)
downloadmandoc-b746353a05b8aa9d139a3058dfc846eb7c978997.tar.gz
mandoc-b746353a05b8aa9d139a3058dfc846eb7c978997.tar.zst
mandoc-b746353a05b8aa9d139a3058dfc846eb7c978997.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 'mdoc_man.c')
-rw-r--r--mdoc_man.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 974cfbd4..daa5a764 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.77 2014/11/30 05:29:00 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.78 2014/12/23 09:31:46 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -434,7 +434,7 @@ print_offs(const char *v, int keywords)
sz = 6;
else if (keywords && !strcmp(v, "indent-two"))
sz = 12;
- else if (a2roffsu(v, &su, SCALE_MAX)) {
+ else if (a2roffsu(v, &su, SCALE_EN) < 2) {
if (SCALE_EN == su.unit)
sz = su.scale;
else {
@@ -481,7 +481,7 @@ print_width(const char *v, const struct mdoc_node *child, size_t defsz)
/* Convert v into a number (of characters). */
if (NULL == v)
sz = defsz;
- else if (a2roffsu(v, &su, SCALE_MAX)) {
+ else if (a2roffsu(v, &su, SCALE_MAX) < 2) {
if (SCALE_EN == su.unit)
sz = su.scale;
else {