aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--html.c12
-rw-r--r--out.c4
-rw-r--r--out.h9
-rw-r--r--term_ascii.c3
-rw-r--r--term_ps.c3
5 files changed, 14 insertions, 17 deletions
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 <kristaps@bsd.lv>
*
@@ -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);
}
diff --git a/out.c b/out.c
index 6a26f95a..f80d83a1 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.16 2010/06/19 20:46:28 kristaps Exp $ */
+/* $Id: out.c,v 1.17 2010/06/25 19:50:23 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -139,8 +139,6 @@ a2roffsu(const char *src, struct roffsu *dst, enum roffscale def)
if ((dst->scale = atof(buf)) < 0)
dst->scale = 0;
dst->unit = unit;
- dst->pt = hasd;
-
return(1);
}
diff --git a/out.h b/out.h
index 39dde420..9b432d59 100644
--- a/out.h
+++ b/out.h
@@ -1,4 +1,4 @@
-/* $Id: out.h,v 1.11 2010/06/19 20:46:28 kristaps Exp $ */
+/* $Id: out.h,v 1.12 2010/06/25 19:50:23 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -53,7 +53,6 @@ enum roffdeco {
struct roffsu {
enum roffscale unit;
double scale;
- int pt;
};
#define SCALE_INVERT(p) \
@@ -62,14 +61,12 @@ struct roffsu {
#define SCALE_VS_INIT(p, v) \
do { (p)->unit = SCALE_VS; \
- (p)->scale = (v); \
- (p)->pt = 0; } \
+ (p)->scale = (v); } \
while (/* CONSTCOND */ 0)
#define SCALE_HS_INIT(p, v) \
do { (p)->unit = SCALE_BU; \
- (p)->scale = (v); \
- (p)->pt = 0; } \
+ (p)->scale = (v); } \
while (/* CONSTCOND */ 0)
int a2roffsu(const char *,
diff --git a/term_ascii.c b/term_ascii.c
index 5dbb196c..3ab625a2 100644
--- a/term_ascii.c
+++ b/term_ascii.c
@@ -1,4 +1,4 @@
-/* $Id: term_ascii.c,v 1.5 2010/06/25 18:53:14 kristaps Exp $ */
+/* $Id: term_ascii.c,v 1.6 2010/06/25 19:50:23 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -79,6 +79,7 @@ ascii_alloc(char *outopts)
}
+/* ARGSUSED */
static size_t
ascii_width(const struct termp *p, char c)
{
diff --git a/term_ps.c b/term_ps.c
index 7d6891d9..d4eaa9ba 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -1,4 +1,4 @@
-/* $Id: term_ps.c,v 1.11 2010/06/25 18:53:14 kristaps Exp $ */
+/* $Id: term_ps.c,v 1.12 2010/06/25 19:50:23 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -431,6 +431,7 @@ ps_setfont(struct termp *p, enum termfont f)
}
+/* ARGSUSED */
static size_t
ps_width(const struct termp *p, char c)
{