summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index a9d67b0c..db62ba31 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -569,8 +569,8 @@ a2width(const struct termp *p, const char *v)
end = a2roffsu(v, &su, SCALE_MAX);
if (end == NULL || *end != '\0') {
- SCALE_HS_INIT(&su, term_strlen(p, v));
- su.scale /= term_strlen(p, "0");
+ su.unit = SCALE_EN;
+ su.scale = term_strlen(p, v) / term_strlen(p, "0");
}
return term_hen(p, &su);
}
@@ -706,9 +706,9 @@ termp_it_pre(DECL_ARGS)
for (i = 0, nn = n->prev;
nn->prev && i < (int)ncols;
nn = nn->prev, i++) {
- SCALE_HS_INIT(&su,
- term_strlen(p, bl->norm->Bl.cols[i]));
- su.scale /= term_strlen(p, "0");
+ su.unit = SCALE_EN;
+ su.scale = term_strlen(p, bl->norm->Bl.cols[i]) /
+ term_strlen(p, "0");
offset += term_hen(p, &su) + dcol;
}
@@ -725,8 +725,9 @@ termp_it_pre(DECL_ARGS)
* Use the declared column widths, extended as explained
* in the preceding paragraph.
*/
- SCALE_HS_INIT(&su, term_strlen(p, bl->norm->Bl.cols[i]));
- su.scale /= term_strlen(p, "0");
+ su.unit = SCALE_EN;
+ su.scale = term_strlen(p, bl->norm->Bl.cols[i]) /
+ term_strlen(p, "0");
width = term_hen(p, &su) + dcol;
break;
default: