summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man_html.c2
-rw-r--r--mdoc_html.c4
-rw-r--r--out.c4
-rw-r--r--term.c12
-rw-r--r--term_ascii.c12
-rw-r--r--term_ps.c6
6 files changed, 20 insertions, 20 deletions
diff --git a/man_html.c b/man_html.c
index 13bfd883..90cf629c 100644
--- a/man_html.c
+++ b/man_html.c
@@ -388,7 +388,7 @@ man_br_pre(MAN_ARGS)
if ( ! a2roffsu(n->string, &su, SCALE_VS))
SCALE_VS_INIT(&su, atoi(n->string));
} else
- su.scale = 0;
+ su.scale = 0.0;
bufinit(h);
bufcat_su(h, "height", &su);
diff --git a/mdoc_html.c b/mdoc_html.c
index 7130c376..43ff1d27 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -699,7 +699,7 @@ mdoc_nm_pre(MDOC_ARGS)
if (0 == len && meta->name)
len = html_strlen(meta->name);
- SCALE_HS_INIT(&su, (double)len);
+ SCALE_HS_INIT(&su, len);
bufinit(h);
bufcat_su(h, "width", &su);
PAIR_STYLE_INIT(&tag, h);
@@ -1565,7 +1565,7 @@ mdoc_sp_pre(MDOC_ARGS)
if ( ! a2roffsu(n->string, &su, SCALE_VS))
SCALE_VS_INIT(&su, atoi(n->string));
} else
- su.scale = 0;
+ su.scale = 0.0;
bufinit(h);
bufcat_su(h, "height", &su);
diff --git a/out.c b/out.c
index 6ae02fb5..9bed1371 100644
--- a/out.c
+++ b/out.c
@@ -128,8 +128,8 @@ a2roffsu(const char *src, struct roffsu *dst, enum roffscale def)
}
/* FIXME: do this in the caller. */
- if ((dst->scale = atof(buf)) < 0)
- dst->scale = 0;
+ if ((dst->scale = atof(buf)) < 0.0)
+ dst->scale = 0.0;
dst->unit = unit;
return(1);
}
diff --git a/term.c b/term.c
index abae31e5..7e5c05eb 100644
--- a/term.c
+++ b/term.c
@@ -769,25 +769,25 @@ term_vspan(const struct termp *p, const struct roffsu *su)
switch (su->unit) {
case SCALE_CM:
- r = su->scale * 2;
+ r = su->scale * 2.0;
break;
case SCALE_IN:
- r = su->scale * 6;
+ r = su->scale * 6.0;
break;
case SCALE_PC:
r = su->scale;
break;
case SCALE_PT:
- r = su->scale / 8;
+ r = su->scale / 8.0;
break;
case SCALE_MM:
- r = su->scale / 1000;
+ r = su->scale / 1000.0;
break;
case SCALE_VS:
r = su->scale;
break;
default:
- r = su->scale - 1;
+ r = su->scale - 1.0;
break;
}
@@ -801,7 +801,7 @@ term_hspan(const struct termp *p, const struct roffsu *su)
{
double v;
- v = ((*p->hspan)(p, su));
+ v = (*p->hspan)(p, su);
if (v < 0.0)
v = 0.0;
return((size_t)v);
diff --git a/term_ascii.c b/term_ascii.c
index abc70f03..c749c982 100644
--- a/term_ascii.c
+++ b/term_ascii.c
@@ -238,22 +238,22 @@ ascii_hspan(const struct termp *p, const struct roffsu *su)
switch (su->unit) {
case SCALE_CM:
- r = 4 * su->scale;
+ r = su->scale * 4.0;
break;
case SCALE_IN:
- r = 10 * su->scale;
+ r = su->scale * 10.0;
break;
case SCALE_PC:
- r = (10 * su->scale) / 6;
+ r = (su->scale * 10.0) / 6.0;
break;
case SCALE_PT:
- r = (10 * su->scale) / 72;
+ r = (su->scale * 10.0) / 72.0;
break;
case SCALE_MM:
- r = su->scale / 1000;
+ r = su->scale / 1000.0;
break;
case SCALE_VS:
- r = su->scale * 2 - 1;
+ r = su->scale * 2.0 - 1.0;
break;
default:
r = su->scale;
diff --git a/term_ps.c b/term_ps.c
index 0e47d6dc..f63f2ef5 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -1123,13 +1123,13 @@ ps_hspan(const struct termp *p, const struct roffsu *su)
r = PNT2AFM(p, su->scale * 28.34);
break;
case SCALE_IN:
- r = PNT2AFM(p, su->scale * 72);
+ r = PNT2AFM(p, su->scale * 72.0);
break;
case SCALE_PC:
- r = PNT2AFM(p, su->scale * 12);
+ r = PNT2AFM(p, su->scale * 12.0);
break;
case SCALE_PT:
- r = PNT2AFM(p, su->scale * 100);
+ r = PNT2AFM(p, su->scale * 100.0);
break;
case SCALE_EM:
r = su->scale *