summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-19 15:18:30 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-19 15:18:30 +0000
commit4adbe5cf76760740befd56e2a28d830dcc269c21 (patch)
treedf1161da41f73d57cc1f72e1e55575bff0c47825 /term.c
parent7c66abf718a841b668e220adaff53df0c108d52f (diff)
downloadmandoc-4adbe5cf76760740befd56e2a28d830dcc269c21.tar.gz
More fixes to scaling-width multipliers (which, just to make my life difficult, differ not only between -mdoc and -man, but between various invocation, e.g., -offset and -width).
Diffstat (limited to 'term.c')
-rw-r--r--term.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/term.c b/term.c
index 5ba6c8ab..20db6cfe 100644
--- a/term.c
+++ b/term.c
@@ -602,18 +602,21 @@ term_hspan(const struct roffsu *su)
{
double r;
+ /* XXX: CM, IN, and PT are approximations. */
+
switch (su->unit) {
case (SCALE_CM):
- r = (4 * su->scale) + 2; /* FIXME: double-check. */
+ r = 4 * su->scale;
break;
case (SCALE_IN):
- r = (10 * su->scale) + 2; /* FIXME: double-check. */
+ /* XXX: this is an approximation. */
+ r = 10 * su->scale;
break;
case (SCALE_PC):
- r = (10 * su->scale) / 6; /* FIXME: double-check. */
+ r = (10 * su->scale) / 6;
break;
case (SCALE_PT):
- r = (10 * su->scale) / 72; /* FIXME: double-check. */
+ r = (10 * su->scale) / 72;
break;
case (SCALE_MM):
r = su->scale / 1000; /* FIXME: double-check. */