diff options
-rw-r--r-- | html.c | 10 | ||||
-rw-r--r-- | out.c | 2 | ||||
-rw-r--r-- | out.h | 7 | ||||
-rw-r--r-- | term_ascii.c | 1 | ||||
-rw-r--r-- | term_ps.c | 1 |
5 files changed, 9 insertions, 12 deletions
@@ -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); } @@ -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); } @@ -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) { @@ -431,6 +431,7 @@ ps_setfont(struct termp *p, enum termfont f) } +/* ARGSUSED */ static size_t ps_width(const struct termp *p, char c) { |