diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-06-14 17:50:45 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-06-14 17:50:45 +0000 |
commit | 80ac93be26e104b44e59db20f822b3f1b3727034 (patch) | |
tree | ac6ead0756eed56a0f66ab9975b9b840171f3032 /usr.bin/mandoc/mdoc_term.c | |
parent | da25b5189535e7811c024d84f0c57bf36591811b (diff) |
improve rounding rules for scaling units
in horizontal orientation in the terminal formatter
Diffstat (limited to 'usr.bin/mandoc/mdoc_term.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index d91ad6ef46f..3adb397fcfa 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.262 2017/06/08 12:54:40 schwarze Exp $ */ +/* $OpenBSD: mdoc_term.c,v 1.263 2017/06/14 17:50:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org> @@ -538,7 +538,7 @@ a2width(const struct termp *p, const char *v) SCALE_HS_INIT(&su, term_strlen(p, v)); su.scale /= term_strlen(p, "0"); } - return term_hspan(p, &su) / 24; + return term_hen(p, &su); } /* @@ -684,7 +684,7 @@ termp_it_pre(DECL_ARGS) SCALE_HS_INIT(&su, term_strlen(p, bl->norm->Bl.cols[i])); su.scale /= term_strlen(p, "0"); - offset += term_hspan(p, &su) / 24 + dcol; + offset += term_hen(p, &su) + dcol; } /* @@ -702,7 +702,7 @@ termp_it_pre(DECL_ARGS) */ SCALE_HS_INIT(&su, term_strlen(p, bl->norm->Bl.cols[i])); su.scale /= term_strlen(p, "0"); - width = term_hspan(p, &su) / 24 + dcol; + width = term_hen(p, &su) + dcol; break; default: if (NULL == bl->norm->Bl.width) |