summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_term.c15
-rw-r--r--out.h5
2 files changed, 8 insertions, 12 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:
diff --git a/out.h b/out.h
index 3c9e63fc..e1f77934 100644
--- a/out.h
+++ b/out.h
@@ -57,11 +57,6 @@ struct rofftbl {
void *arg; /* passed to sulen, slen, and len */
};
-#define SCALE_HS_INIT(p, v) \
- do { (p)->unit = SCALE_EN; \
- (p)->scale = (v); } \
- while (/* CONSTCOND */ 0)
-
struct tbl_span;