aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_ps.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-27 21:53:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-27 21:53:17 +0000
commit09d8ae540417e00bfa6ee4c17de85c9f9d89a570 (patch)
tree9f392409d21da457e431908d66c493ce105ef418 /term_ps.c
parent8eb68fb06ce6113d20d01d458aac0daec7b2419f (diff)
downloadmandoc-09d8ae540417e00bfa6ee4c17de85c9f9d89a570.tar.gz
mandoc-09d8ae540417e00bfa6ee4c17de85c9f9d89a570.tar.zst
mandoc-09d8ae540417e00bfa6ee4c17de85c9f9d89a570.zip
code readability; no functional change
Diffstat (limited to 'term_ps.c')
-rw-r--r--term_ps.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/term_ps.c b/term_ps.c
index f274c150..12177acd 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -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.61 2014/07/27 21:53:17 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -914,11 +914,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 +1101,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);
}