summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-30 12:27:55 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-30 12:27:55 +0000
commit38931802fd8955ea9a7423f1a83b5578eaa9314e (patch)
tree2fc2c109b4907dbcb1d4e7015be734c5d4763be3 /term.c
parentdcf50a690b6571696456b49bcbccad413234f421 (diff)
downloadmandoc-38931802fd8955ea9a7423f1a83b5578eaa9314e.tar.gz
Move term_hspan() calculation into the output devices, where it belongs.
Diffstat (limited to 'term.c')
-rw-r--r--term.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/term.c b/term.c
index d87f123b..3776f250 100644
--- a/term.c
+++ b/term.c
@@ -692,39 +692,6 @@ term_vspan(const struct termp *p, const struct roffsu *su)
size_t
term_hspan(const struct termp *p, const struct roffsu *su)
{
- double r;
-
- /* XXX: CM, IN, and PT are approximations. */
- switch (su->unit) {
- case (SCALE_CM):
- r = 4 * su->scale;
- break;
- case (SCALE_IN):
- /* XXX: this is an approximation. */
- r = 10 * su->scale;
- break;
- case (SCALE_PC):
- r = (10 * su->scale) / 6;
- break;
- case (SCALE_PT):
- r = (10 * su->scale) / 72;
- break;
- case (SCALE_MM):
- r = su->scale / 1000; /* FIXME: double-check. */
- break;
- case (SCALE_VS):
- r = su->scale * 2 - 1; /* FIXME: double-check. */
- break;
- default:
- r = su->scale;
- break;
- }
-
- if (r < 0.0)
- r = 0.0;
- return((size_t)/* LINTED */
- r);
+ return((*p->hspan)(p, su));
}
-
-