summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--html.c10
-rw-r--r--out.c2
-rw-r--r--out.h7
-rw-r--r--term_ascii.c1
-rw-r--r--term_ps.c1
5 files changed, 9 insertions, 12 deletions
diff --git a/html.c b/html.c
index 312b5ead..bdf99e0c 100644
--- a/html.c
+++ b/html.c
@@ -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 6dec9537..347338c3 100644
--- a/out.c
+++ b/out.c
@@ -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 8810cec3..80a2d40c 100644
--- a/out.h
+++ b/out.h
@@ -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 1b0ed345..da85aae4 100644
--- a/term_ascii.c
+++ b/term_ascii.c
@@ -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 8d843806..0903c827 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -431,6 +431,7 @@ ps_setfont(struct termp *p, enum termfont f)
}
+/* ARGSUSED */
static size_t
ps_width(const struct termp *p, char c)
{