summaryrefslogtreecommitdiffstatshomepage
path: root/term_ps.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_ps.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_ps.c')
-rw-r--r--term_ps.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/term_ps.c b/term_ps.c
index 034eb4ec..da5355ee 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -1,4 +1,4 @@
-/* $Id: term_ps.c,v 1.19 2010/06/30 12:27:55 kristaps Exp $ */
+/* $Id: term_ps.c,v 1.20 2010/06/30 12:30:36 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -359,7 +359,7 @@ static const struct font fonts[TERMFONT__MAX] = {
} while (/* CONSTCOND */ 0)
-static size_t ps_hspan(const struct termp *,
+static double ps_hspan(const struct termp *,
const struct roffsu *);
static size_t ps_width(const struct termp *, char);
static void ps_advance(struct termp *, size_t);
@@ -828,7 +828,7 @@ ps_width(const struct termp *p, char c)
}
-static size_t
+static double
ps_hspan(const struct termp *p, const struct roffsu *su)
{
double r;
@@ -871,12 +871,6 @@ ps_hspan(const struct termp *p, const struct roffsu *su)
break;
}
- /* Explicitly disallow negative values. */
-
- if (r < 0.0)
- r = 0.0;
-
- return((size_t)/* LINTED */
- r);
+ return(r);
}