diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-30 12:27:55 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-30 12:27:55 +0000 |
commit | 38931802fd8955ea9a7423f1a83b5578eaa9314e (patch) | |
tree | 2fc2c109b4907dbcb1d4e7015be734c5d4763be3 /term.c | |
parent | dcf50a690b6571696456b49bcbccad413234f421 (diff) | |
download | mandoc-38931802fd8955ea9a7423f1a83b5578eaa9314e.tar.gz |
Move term_hspan() calculation into the output devices, where it belongs.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 35 |
1 files changed, 1 insertions, 34 deletions
@@ -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)); } - - |