summaryrefslogtreecommitdiffstats
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
commit83592bae7b4cc86364128d1a37075c8d2ab3f14f (patch)
tree0c4bbf3561d1fd7d3645e88846d2a774680001dc /mdoc_man.c
parentce8ab0a1bb72b1a1bf7fbc11edfcad682e7d1619 (diff)
downloadmandoc-83592bae7b4cc86364128d1a37075c8d2ab3f14f.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 458706c5..505d274f 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -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 {