source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: code readability; no functional change
@ 2014-07-27 21:53 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-07-27 21:53 UTC (permalink / raw)
  To: source

Log Message:
-----------
code readability; no functional change

Modified Files:
--------------
    mdocml:
        term_ps.c

Revision Data
-------------
Index: term_ps.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ps.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lterm_ps.c -Lterm_ps.c -u -p -r1.60 -r1.61
--- term_ps.c
+++ term_ps.c
@@ -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);
 }
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-27 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-27 21:53 mdocml: code readability; no functional change schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).