diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-12-23 09:31:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-12-23 09:31:18 +0000 |
commit | 62f18bd6c1bbefef224c3860a29b4829e48cf0eb (patch) | |
tree | 3eec7deddaf4e59e078afb9858382b5439701d4f /usr.bin/mandoc/mdoc_man.c | |
parent | 5cae6a4490c8e47f52719dc5c18920edbfe81d7d (diff) |
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_man.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index 5989154f41d..30799cd4c7a 100644 --- a/usr.bin/mandoc/mdoc_man.c +++ b/usr.bin/mandoc/mdoc_man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_man.c,v 1.75 2014/11/30 05:28:00 schwarze Exp $ */ +/* $OpenBSD: mdoc_man.c,v 1.76 2014/12/23 09:31:17 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> * @@ -432,7 +432,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 { @@ -479,7 +479,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 { |