summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-30 12:30:36 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-30 12:30:36 +0000
commit1c345c57d0409711abb1ac63246e87a2cb57326f (patch)
treef7f075ebf1e7cb725e0d9b9cdd61665b708b4bf4 /term.c
parent38931802fd8955ea9a7423f1a83b5578eaa9314e (diff)
downloadmandoc-1c345c57d0409711abb1ac63246e87a2cb57326f.tar.gz
Pushed normalisation of scaling units into term_hspan().
Diffstat (limited to 'term.c')
-rw-r--r--term.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/term.c b/term.c
index 3776f250..71fea0f1 100644
--- a/term.c
+++ b/term.c
@@ -692,6 +692,11 @@ term_vspan(const struct termp *p, const struct roffsu *su)
size_t
term_hspan(const struct termp *p, const struct roffsu *su)
{
+ double v;
- return((*p->hspan)(p, su));
+ v = ((*p->hspan)(p, su));
+ if (v < 0.0)
+ v = 0.0;
+ return((size_t) /* LINTED */
+ v);
}