diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-21 08:24:39 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-21 08:24:39 +0000 |
commit | 6ff953b9dae270b837ca8b8a0ba146a1c3296243 (patch) | |
tree | 2bdc3633e6d7229f50ffc2a6ead39743b8efb606 /term_ps.c | |
parent | 714ad8829b754f1142d7471b3dbf5e2400f8e96d (diff) | |
download | mandoc-6ff953b9dae270b837ca8b8a0ba146a1c3296243.tar.gz |
The "wx" value is quite small, so use a u_short instead of a size_t.
Diffstat (limited to 'term_ps.c')
-rw-r--r-- | term_ps.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -42,7 +42,7 @@ ((double)(x) / (1000.0 / (double)(p)->engine.ps.scale)) struct glyph { - size_t wx; /* WX in AFM */ + unsigned short wx; /* WX in AFM */ }; struct font { @@ -708,13 +708,13 @@ ps_pletter(struct termp *p, int c) if (c <= 32 || (c - 32 > MAXCHAR)) { ps_putchar(p, ' '); - p->engine.ps.pscol += fonts[f].gly[0].wx; + p->engine.ps.pscol += (size_t)fonts[f].gly[0].wx; return; } ps_putchar(p, (char)c); c -= 32; - p->engine.ps.pscol += fonts[f].gly[c].wx; + p->engine.ps.pscol += (size_t)fonts[f].gly[c].wx; } @@ -901,10 +901,10 @@ ps_width(const struct termp *p, char c) { if (c <= 32 || c - 32 >= MAXCHAR) - return(fonts[(int)TERMFONT_NONE].gly[0].wx); + return((size_t)fonts[(int)TERMFONT_NONE].gly[0].wx); c -= 32; - return(fonts[(int)TERMFONT_NONE].gly[(int)c].wx); + return((size_t)fonts[(int)TERMFONT_NONE].gly[(int)c].wx); } @@ -932,14 +932,14 @@ ps_hspan(const struct termp *p, const struct roffsu *su) r = PNT2AFM(p, su->scale * 100); break; case (SCALE_EM): - r = su->scale * + r = su->scale * fonts[(int)TERMFONT_NONE].gly[109 - 32].wx; break; case (SCALE_MM): r = PNT2AFM(p, su->scale * 2.834); break; case (SCALE_EN): - r = su->scale * + r = su->scale * fonts[(int)TERMFONT_NONE].gly[110 - 32].wx; break; case (SCALE_VS): |