summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-14 17:51:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-14 17:51:15 +0000
commit29dca53ec230c4b598c402ca964e308ca2dd627f (patch)
tree6a59b819bf4540af0b4a051be1fed72ff1323f83 /mdoc_term.c
parent249038d8e46090d651314d34d995078a1aeb6ee9 (diff)
downloadmandoc-29dca53ec230c4b598c402ca964e308ca2dd627f.tar.gz
improve rounding rules for scaling units
in horizontal orientation in the terminal formatter
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 9058f055..2f0728ff 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -540,7 +540,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);
}
/*
@@ -686,7 +686,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;
}
/*
@@ -704,7 +704,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)