diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-27 21:53:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-27 21:53:17 +0000 |
commit | 1146ced33c4a59a115f352a3cd7c07344c04e746 (patch) | |
tree | f1f1dd616f6498a1469982910f25547e4091f8a7 /term_ps.c | |
parent | bf244b038b727daea658caa6ef403eb2f0fb0e3e (diff) | |
download | mandoc-1146ced33c4a59a115f352a3cd7c07344c04e746.tar.gz |
code readability; no functional change
Diffstat (limited to 'term_ps.c')
-rw-r--r-- | term_ps.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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); } |