diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-14 17:51:15 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-14 17:51:15 +0000 |
commit | 29dca53ec230c4b598c402ca964e308ca2dd627f (patch) | |
tree | 6a59b819bf4540af0b4a051be1fed72ff1323f83 /man_term.c | |
parent | 249038d8e46090d651314d34d995078a1aeb6ee9 (diff) | |
download | mandoc-29dca53ec230c4b598c402ca964e308ca2dd627f.tar.gz |
improve rounding rules for scaling units
in horizontal orientation in the terminal formatter
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -377,7 +377,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; @@ -426,7 +426,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) @@ -511,7 +511,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) @@ -593,7 +593,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) @@ -797,7 +797,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) |