From dfaa88b92e98290528c2dec012e0186375a89b4a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 30 Jun 2010 12:30:36 +0000 Subject: Pushed normalisation of scaling units into term_hspan(). --- term.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'term.c') 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 * @@ -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); } -- cgit v1.2.3