summaryrefslogtreecommitdiffstatshomepage
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
commitdfaa88b92e98290528c2dec012e0186375a89b4a (patch)
tree71e27b9400b74e13840cb9cf6a10b85b20f67e7f /term.c
parent7124f05f10769bae30b3b76cc9d89f104c9e2f0c (diff)
downloadmandoc-dfaa88b92e98290528c2dec012e0186375a89b4a.tar.gz
mandoc-dfaa88b92e98290528c2dec012e0186375a89b4a.tar.zst
mandoc-dfaa88b92e98290528c2dec012e0186375a89b4a.zip
Pushed normalisation of scaling units into term_hspan().
Diffstat (limited to 'term.c')
-rw-r--r--term.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/term.c b/term.c
index 92d6e15d..cfc74066 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.155 2010/06/30 12:27:55 kristaps Exp $ */
+/* $Id: term.c,v 1.156 2010/06/30 12:30:36 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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);
}