=================================================================== RCS file: /cvs/mandoc/term_ps.c,v retrieving revision 1.60 retrieving revision 1.63 diff -u -p -r1.60 -r1.63 --- mandoc/term_ps.c 2014/04/23 21:06:41 1.60 +++ mandoc/term_ps.c 2014/08/10 23:54:41 1.63 @@ -1,4 +1,4 @@ -/* $Id: term_ps.c,v 1.60 2014/04/23 21:06:41 schwarze Exp $ */ +/* $Id: term_ps.c,v 1.63 2014/08/10 23:54:41 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -15,9 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include @@ -914,11 +912,8 @@ ps_pletter(struct termp *p, int c) f = (int)p->ps->lastf; - if (c <= 32 || (c - 32 >= MAXCHAR)) { - ps_putchar(p, ' '); - p->ps->pscol += (size_t)fonts[f].gly[0].wx; - return; - } + if (c <= 32 || c - 32 >= MAXCHAR) + c = 32; ps_putchar(p, (char)c); c -= 32; @@ -1104,9 +1099,10 @@ ps_width(const struct termp *p, int c) { if (c <= 32 || c - 32 >= MAXCHAR) - return((size_t)fonts[(int)TERMFONT_NONE].gly[0].wx); + c = 0; + else + c -= 32; - c -= 32; return((size_t)fonts[(int)TERMFONT_NONE].gly[c].wx); } @@ -1125,13 +1121,13 @@ ps_hspan(const struct termp *p, const struct roffsu *s 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 *