diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-12-23 13:48:16 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-12-23 13:48:16 +0000 |
commit | 88738766bd0fd15e2cc7d36482c9dcc0bf332195 (patch) | |
tree | f3a91fe08eaf21da6fa8fbb637a477a7c01e9194 /usr.bin/mandoc/mdoc_term.c | |
parent | 942764cac42d968894189610b320aabb2e7454a6 (diff) |
support negative horizontal widths in man(7);
minus twenty lines of code in spite of enhanced functionality
Diffstat (limited to 'usr.bin/mandoc/mdoc_term.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index f12989e5f54..902f5bdc4dc 100644 --- a/usr.bin/mandoc/mdoc_term.c +++ b/usr.bin/mandoc/mdoc_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_term.c,v 1.199 2014/12/23 09:31:17 schwarze Exp $ */ +/* $OpenBSD: mdoc_term.c,v 1.200 2014/12/23 13:48:15 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -531,7 +531,8 @@ a2width(const struct termp *p, const char *v) if (a2roffsu(v, &su, SCALE_MAX) < 2) { SCALE_HS_INIT(&su, term_strlen(p, v)); su.scale /= term_strlen(p, "0"); - } + } else if (su.scale < 0.0) + su.scale = 0.0; return(term_hspan(p, &su)); } |