[Pkg-wmaker-commits] [wmbubble] 103/207: Whitespace futzing, hopefully the last time

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbubble.

commit 645d66cfb02c071b5c1b74265419aa692a379ed6
Author: Robert Jacobs <rnjacobs at mit.edu>
Date:   Sat Sep 3 00:47:47 2011 -0700

    Whitespace futzing, hopefully the last time
---
 bubblemon.c | 108 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/bubblemon.c b/bubblemon.c
index f2bbb38..83ef7e7 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -1061,36 +1061,36 @@ void draw_cpugauge(int cpu) {
 }
 
 void draw_dtchr(const char letter, unsigned char * rgbbuf) {
-  int x,y;
-  unsigned char * attenuator;
-  char * xpm_line;
-
-  for (y=0;y<8;y++) {
-	  xpm_line = datefont_xpm[((unsigned char)letter-32)*8+y+datefont_offset];
-	  for (x=0,attenuator=&rgbbuf[y*BOX_SIZE*3];x<datefont_widths[(unsigned char)letter]-1;x++)
-		  if (xpm_line[x] == datefont_transparent) {
-			  attenuator += 3;
-		  } else {
-			  *(attenuator++)>>=1; *(attenuator++)>>=1; *(attenuator++)>>=1;
-		  }
-  }
+	int x,y;
+	unsigned char * attenuator;
+	char * xpm_line;
+
+	for (y=0;y<8;y++) {
+		xpm_line = datefont_xpm[((unsigned char)letter-32)*8+y+datefont_offset];
+		for (x=0,attenuator=&rgbbuf[y*BOX_SIZE*3];x<datefont_widths[(unsigned char)letter]-1;x++)
+			if (xpm_line[x] == datefont_transparent) {
+				attenuator += 3;
+			} else {
+				*(attenuator++)>>=1; *(attenuator++)>>=1; *(attenuator++)>>=1;
+			}
+	}
 }
 
 void draw_largedigit(char number, unsigned char * rgbbuf) {
-  int x,y;
-  int t,v;
-  unsigned char * from, * to;
-
-  if (number>='0' && number<='9') number-='0';
-  if (number>=0 && number<=9) {
-	  for (y=0;y<32;y++)
-		  for (x=0,from=&bigdigits[number*13+y*130],to=&rgbbuf[y*BOX_SIZE*3];x<13;x++) {
-	      v=*from++>>2;
-	      t=*to+v; *(to++)=(t>255)?255:t;
-	      t=*to+v; *(to++)=(t>255)?255:t;
-	      t=*to+v; *(to++)=(t>255)?255:t;
-      }
-  }
+	int x,y;
+	int t,v;
+	unsigned char * from, * to;
+
+	if (number>='0' && number<='9') number-='0';
+	if (number>=0 && number<=9) {
+		for (y=0;y<32;y++)
+			for (x=0,from=&bigdigits[number*13+y*130],to=&rgbbuf[y*BOX_SIZE*3];x<13;x++) {
+				v=*from++>>2;
+				t=*to+v; *(to++)=(t>255)?255:t;
+				t=*to+v; *(to++)=(t>255)?255:t;
+				t=*to+v; *(to++)=(t>255)?255:t;
+			}
+	}
 }
 
 void draw_rgba_pixel(unsigned char * whither, int color, float opacity) {
@@ -1211,36 +1211,36 @@ void draw_clockhands(void) {
 void alpha_date(struct tm * mytime) {
 	const char *roman[]={"I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"};
 	char format[32];
-  int ii, width;
-  unsigned char * rgbptr;
-
-  if (strftime(format,32,"%a %b %d",mytime) != 0) {
-	  for (width = ii = 0; ii < strlen(format); ii++)
-		  width += datefont_widths[(unsigned char)format[ii]];
-	  if (width > BOX_SIZE - 1) { /* if too wide */
-		  snprintf(format,32,"%s-%d",roman[mytime->tm_mon],mytime->tm_mday);
-		  for (width = ii = 0; ii < strlen(format); ii++)
-			  width += datefont_widths[(unsigned char)format[ii]];
-	  }
-  } else { /* if strftime failed */
-	  snprintf(format,32,"%s-%d",roman[mytime->tm_mon],mytime->tm_mday);
-	  for (width = ii = 0; ii < strlen(format); ii++)
-		  width += datefont_widths[(unsigned char)format[ii]];
-  }
-
-  rgbptr = &bm.rgb_buf[3*(2*BOX_SIZE+(BOX_SIZE-width)/2)]; /* calculate centered */
-
-  for (ii = 0; ii < strlen(format); ii++) {
-	  draw_dtchr(format[ii],rgbptr);
-	  rgbptr += 3*datefont_widths[(unsigned char)format[ii]];
-  }
+	int ii, width;
+	unsigned char * rgbptr;
+
+	if (strftime(format,32,"%a %b %d",mytime) != 0) {
+		for (width = ii = 0; ii < strlen(format); ii++)
+			width += datefont_widths[(unsigned char)format[ii]];
+		if (width > BOX_SIZE - 1) { /* if too wide */
+			snprintf(format,32,"%s-%d",roman[mytime->tm_mon],mytime->tm_mday);
+			for (width = ii = 0; ii < strlen(format); ii++)
+				width += datefont_widths[(unsigned char)format[ii]];
+		}
+	} else { /* if strftime failed */
+		snprintf(format,32,"%s-%d",roman[mytime->tm_mon],mytime->tm_mday);
+		for (width = ii = 0; ii < strlen(format); ii++)
+			width += datefont_widths[(unsigned char)format[ii]];
+	}
+
+	rgbptr = &bm.rgb_buf[3*(2*BOX_SIZE+(BOX_SIZE-width)/2)]; /* calculate centered */
+
+	for (ii = 0; ii < strlen(format); ii++) {
+		draw_dtchr(format[ii],rgbptr);
+		rgbptr += 3*datefont_widths[(unsigned char)format[ii]];
+	}
 }
 
 void alpha_digitalclock(struct tm * mytime) {
-  draw_largedigit(mytime->tm_hour/10,&bm.rgb_buf[3*(3+BOX_SIZE*13)]);
-  draw_largedigit(mytime->tm_hour%10,&bm.rgb_buf[3*(16+BOX_SIZE*13)]);
-  draw_largedigit(mytime->tm_min/10,&bm.rgb_buf[3*(30+BOX_SIZE*13)]);
-  draw_largedigit(mytime->tm_min%10,&bm.rgb_buf[3*(43+BOX_SIZE*13)]);
+	draw_largedigit(mytime->tm_hour/10,&bm.rgb_buf[3*(3+BOX_SIZE*13)]);
+	draw_largedigit(mytime->tm_hour%10,&bm.rgb_buf[3*(16+BOX_SIZE*13)]);
+	draw_largedigit(mytime->tm_min/10,&bm.rgb_buf[3*(30+BOX_SIZE*13)]);
+	draw_largedigit(mytime->tm_min%10,&bm.rgb_buf[3*(43+BOX_SIZE*13)]);
 }
 
 void calculate_transparencies(int proximity) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git



More information about the Pkg-wmaker-commits mailing list