From 39b58d4bdaf839012f3c93a64454305b3a6f7c6a Mon Sep 17 00:00:00 2001 From: schwarze Date: Sun, 27 Jul 2014 21:53:04 +0000 Subject: [PATCH] code readability; no functional change --- usr.bin/mandoc/term_ps.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.bin/mandoc/term_ps.c b/usr.bin/mandoc/term_ps.c index f77280ebb27..5cb4369c469 100644 --- a/usr.bin/mandoc/term_ps.c +++ b/usr.bin/mandoc/term_ps.c @@ -1,4 +1,4 @@ -/* $Id: term_ps.c,v 1.25 2014/04/23 21:06:33 schwarze Exp $ */ +/* $Id: term_ps.c,v 1.26 2014/07/27 21:53:04 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -907,11 +907,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; @@ -1097,9 +1094,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); } -- 2.20.1