diff options
author | 2014-12-23 13:48:15 +0000 | |
---|---|---|
committer | 2014-12-23 13:48:15 +0000 | |
commit | bf8e53c9869db7abf5443183f2efb7ec67b973bc (patch) | |
tree | 9f1734421b33e5966b0f60a524123942b4d83218 /usr.bin/mandoc/mdoc_man.c | |
parent | pf now supports source-hash and random with tables so we can allow it (diff) | |
download | wireguard-openbsd-bf8e53c9869db7abf5443183f2efb7ec67b973bc.tar.xz wireguard-openbsd-bf8e53c9869db7abf5443183f2efb7ec67b973bc.zip |
support negative horizontal widths in man(7);
minus twenty lines of code in spite of enhanced functionality
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index 5151b3a4b00..28cede1fd0b 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.77 2014/12/23 10:09:23 schwarze Exp $ */ +/* $OpenBSD: mdoc_man.c,v 1.78 2014/12/23 13:48:15 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> * @@ -433,6 +433,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 { @@ -480,6 +482,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 { |