[dev] [st] [PATCH 4/5] Make dodraw bool and remove initialization.

From: noname <noname_AT_inventati.org>
Date: Sat, 18 Apr 2015 16:45:41 +0000

---
 st.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/st.c b/st.c
index 1bcdb7f..cacb7f6 100644
--- a/st.c
+++ b/st.c
_AT_@ -3912,7 +3912,8 @@ run(void) {
 	XEvent ev;
 	int w = xw.w, h = xw.h;
 	fd_set rfd;
-	int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0, dodraw = 0;
+	int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0;
+	bool dodraw;
 	struct timespec drawtimeout, *tv = NULL, now, last, lastblink;
 	long deltatime;
 
_AT_@ -3959,17 +3960,17 @@ run(void) {
 		drawtimeout.tv_nsec = 1000000000 / xfps;
 		tv = &drawtimeout;
 
-		dodraw = 0;
+		dodraw = false;
 		if(blinktimeout && TIMEDIFF(now, lastblink) > blinktimeout) {
 			tsetdirtattr(ATTR_BLINK);
 			term.mode ^= MODE_BLINK;
 			lastblink = now;
-			dodraw = 1;
+			dodraw = true;
 		}
 		deltatime = TIMEDIFF(now, last);
 		if(deltatime > (xev? (1000/xfps) : (1000/actionfps))
 				|| deltatime < 0) {
-			dodraw = 1;
+			dodraw = true;
 			last = now;
 		}
 
-- 
1.8.4
Received on Sat Apr 18 2015 - 18:45:41 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 18 2015 - 18:48:29 CEST