diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 09:31:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 09:31:46 +0000 |
commit | 83592bae7b4cc86364128d1a37075c8d2ab3f14f (patch) | |
tree | 0c4bbf3561d1fd7d3645e88846d2a774680001dc /mdoc_man.c | |
parent | ce8ab0a1bb72b1a1bf7fbc11edfcad682e7d1619 (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 { |