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 | e98af5414161553ffd7b765ad3a2451626334232 (patch) | |
tree | 71e081d88f9d7e31540b032aa105d2794f17c438 /mdoc_man.c | |
parent | ff9ffdaa32c8d8843620079281b5c445b548babc (diff) | |
download | mandoc-e98af5414161553ffd7b765ad3a2451626334232.tar.gz mandoc-e98af5414161553ffd7b765ad3a2451626334232.tar.zst mandoc-e98af5414161553ffd7b765ad3a2451626334232.zip |
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 | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.79 2014/12/23 10:09:44 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.80 2014/12/23 13:48:57 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> * @@ -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 { |