=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/term_ps.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- src/usr.bin/mandoc/term_ps.c 2015/03/27 21:17:16 1.38 +++ src/usr.bin/mandoc/term_ps.c 2015/04/04 17:46:58 1.39 @@ -1,4 +1,4 @@ -/* $OpenBSD: term_ps.c,v 1.38 2015/03/27 21:17:16 schwarze Exp $ */ +/* $OpenBSD: term_ps.c,v 1.39 2015/04/04 17:46:58 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -85,7 +85,7 @@ size_t pdfobjsz; /* size of pdfobjs */ }; -static double ps_hspan(const struct termp *, +static int ps_hspan(const struct termp *, const struct roffsu *); static size_t ps_width(const struct termp *, int); static void ps_advance(struct termp *, size_t); @@ -101,7 +101,7 @@ static void ps_printf(struct termp *, const char *, ...); static void ps_putchar(struct termp *, char); static void ps_setfont(struct termp *, enum termfont); -static void ps_setwidth(struct termp *, int, size_t); +static void ps_setwidth(struct termp *, int, int); static struct termp *pspdf_alloc(const struct mchars *, const struct manoutput *); static void pdf_obj(struct termp *, size_t); @@ -615,7 +615,7 @@ } static void -ps_setwidth(struct termp *p, int iop, size_t width) +ps_setwidth(struct termp *p, int iop, int width) { size_t lastwidth; @@ -623,8 +623,8 @@ if (iop > 0) p->ps->width += width; else if (iop == 0) - p->ps->width = width ? width : p->ps->lastwidth; - else if (p->ps->width > width) + p->ps->width = width ? (size_t)width : p->ps->lastwidth; + else if (p->ps->width > (size_t)width) p->ps->width -= width; else p->ps->width = 0; @@ -1268,7 +1268,7 @@ return((size_t)fonts[(int)TERMFONT_NONE].gly[c].wx); } -static double +static int ps_hspan(const struct termp *p, const struct roffsu *su) { double r; @@ -1320,7 +1320,7 @@ break; } - return(r); + return(r * 24.0); } static void