diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 13:48:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 13:48:57 +0000 |
commit | 4ad53635f5202474c55af90f70bba0ade18962cb (patch) | |
tree | ec073e4714b3d859a66a94147789aa077e78dd38 /mdoc_man.c | |
parent | f2c1420553b275dd2f792b3a15c8fb0437f58052 (diff) | |
download | mandoc-4ad53635f5202474c55af90f70bba0ade18962cb.tar.gz |
support negative horizontal widths in man(7);
minus twenty lines of code in spite of enhanced functionality
Diffstat (limited to 'mdoc_man.c')
-rw-r--r-- | mdoc_man.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -435,6 +435,8 @@ print_offs(const char *v, int keywords) else if (keywords && !strcmp(v, "indent-two")) sz = 12; else if (a2roffsu(v, &su, SCALE_EN) > 1) { + if (su.scale < 0.0) + su.scale = 0.0; if (SCALE_EN == su.unit) sz = su.scale; else { @@ -482,6 +484,8 @@ print_width(const char *v, const struct mdoc_node *child, size_t defsz) if (NULL == v) sz = defsz; else if (a2roffsu(v, &su, SCALE_MAX) > 1) { + if (su.scale < 0.0) + su.scale = 0.0; if (SCALE_EN == su.unit) sz = su.scale; else { |