summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_term.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-06-14 17:50:43 +0000
committerschwarze <schwarze@openbsd.org>2017-06-14 17:50:43 +0000
commitf4692b45e52736f046fc866de16fee7398c119eb (patch)
tree5c72c50847e2dfb91b1285619acfdf8d81c8c941 /usr.bin/mandoc/man_term.c
parentCurrently, iwm(4) uses only one phy context, so stop sending commands to the (diff)
downloadwireguard-openbsd-f4692b45e52736f046fc866de16fee7398c119eb.tar.xz
wireguard-openbsd-f4692b45e52736f046fc866de16fee7398c119eb.zip
improve rounding rules for scaling units
in horizontal orientation in the terminal formatter
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r--usr.bin/mandoc/man_term.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index f43d1bd2a34..9b76fdc53f7 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_term.c,v 1.157 2017/06/08 12:54:40 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.158 2017/06/14 17:50:43 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -375,7 +375,7 @@ pre_in(DECL_ARGS)
if (a2roffsu(++cp, &su, SCALE_EN) == NULL)
return 0;
- v = (term_hspan(p, &su) + 11) / 24;
+ v = term_hen(p, &su);
if (less < 0)
p->tcol->offset -= p->tcol->offset > v ? v : p->tcol->offset;
@@ -424,7 +424,7 @@ pre_HP(DECL_ARGS)
if ((nn = n->parent->head->child) != NULL &&
a2roffsu(nn->string, &su, SCALE_EN) != NULL) {
- len = term_hspan(p, &su) / 24;
+ len = term_hen(p, &su);
if (len < 0 && (size_t)(-len) > mt->offset)
len = -mt->offset;
else if (len > SHRT_MAX)
@@ -509,7 +509,7 @@ pre_IP(DECL_ARGS)
if ((nn = n->parent->head->child) != NULL &&
(nn = nn->next) != NULL &&
a2roffsu(nn->string, &su, SCALE_EN) != NULL) {
- len = term_hspan(p, &su) / 24;
+ len = term_hen(p, &su);
if (len < 0 && (size_t)(-len) > mt->offset)
len = -mt->offset;
else if (len > SHRT_MAX)
@@ -591,7 +591,7 @@ pre_TP(DECL_ARGS)
if ((nn = n->parent->head->child) != NULL &&
nn->string != NULL && ! (NODE_LINE & nn->flags) &&
a2roffsu(nn->string, &su, SCALE_EN) != NULL) {
- len = term_hspan(p, &su) / 24;
+ len = term_hen(p, &su);
if (len < 0 && (size_t)(-len) > mt->offset)
len = -mt->offset;
else if (len > SHRT_MAX)
@@ -795,7 +795,7 @@ pre_RS(DECL_ARGS)
if (n->child == NULL)
n->aux = mt->lmargin[mt->lmargincur];
else if (a2roffsu(n->child->string, &su, SCALE_EN) != NULL)
- n->aux = term_hspan(p, &su) / 24;
+ n->aux = term_hen(p, &su);
if (n->aux < 0 && (size_t)(-n->aux) > mt->offset)
n->aux = -mt->offset;
else if (n->aux > SHRT_MAX)