From 3234ace1ba2fef84ad009e6822dd76699a34e344 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 25 Jun 2010 19:50:23 +0000 Subject: Remove "pt" from struct roffsu, as CSS (the only reason it was there) is unclear about which units accept floats/integers, which leads me to assume that it handles either and rounds as appropriate. --- html.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index 817272ad..0ec9bc91 100644 --- a/html.c +++ b/html.c @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.102 2010/06/19 20:46:27 kristaps Exp $ */ +/* $Id: html.c,v 1.103 2010/06/25 19:50:23 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -718,11 +718,11 @@ bufcat_su(struct html *h, const char *p, const struct roffsu *su) break; } - if (su->pt) - buffmt(h, "%s: %f%s;", p, v, u); - else - /* LINTED */ - buffmt(h, "%s: %d%s;", p, (int)v, u); + /* + * XXX: the CSS spec isn't clear as to which types accept + * integer or real numbers, so we just make them all decimals. + */ + buffmt(h, "%s: %.2f%s;", p, v, u); } -- cgit v1.2.3