[ekg2-commit] ekg2: xtext.c (HEAD) [darkjames]

CVS commit cvs w toxygen.net
Wto, 22 Sty 2008, 12:58:10 CET


Module name:	ekg2
Changes by:	darkjames	2008-01-22 12:58:07

Modified files:
	xtext.c

Log message:
remove debug code from xtext.

Index: xtext.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/gtk/xtext.c,v
diff -d -u -r1.11 -r1.12
--- xtext.c	1 Sep 2007 22:47:05 -0000	1.11
+++ xtext.c	22 Jan 2008 11:58:07 -0000	1.12
@@ -2320,11 +2320,6 @@
 		     unsigned char *str, short *attr, int len, int win_width, int indent,
 		     int line, int left_only, int *x_size_ret)
 {
-// #define DEBUG_RENDER(args...) printf(args)
-#define DEBUG_RENDER(args...) 
-
-	static int kolorek = 0;
-
 	GdkGC *gc;
 	int i = 0, x = indent, j = 0;
 	unsigned char *pstr = str;
@@ -2338,8 +2333,6 @@
 
 	offset = str - ent->str;
 
-	DEBUG_RENDER("fcall() data: ");
-
 	if (line < 255 && line >= 0)
 		xtext->buffer->grid_offset[line] = offset;
 
@@ -2408,15 +2401,10 @@
 			int isbold;
 			last_attr = attr[i];
 
-			DEBUG_RENDER("\n");
-
 			if (i) {
-				DEBUG_RENDER("flushing render: %i\n", kolorek);
 				x += gtk_xtext_render_flush(xtext, x, y, pstr, j, gc, ent->mb);
 				pstr += j;
 				j = 0;
-
-				kolorek++;
 			}
 
 			gtk_xtext_reset(xtext, mark, !xtext->in_hilight);
@@ -2426,11 +2414,6 @@
 /*			xtext->bold = (isbold); */
 			/* more follow */
 
-			DEBUG_RENDER("[B: %d] ", isbold);
-			DEBUG_RENDER("[Bl: %d] ", last_attr & 256);
-			DEBUG_RENDER("[U: %d] ", last_attr & 512);
-			DEBUG_RENDER("[R: %d] ", last_attr & 1024);
-
                         if (!(last_attr & 128)) {
 				if (!mark) {
 					xtext_set_fg(xtext, gc, ((last_attr & 7) + 8*isbold));
@@ -2438,19 +2421,13 @@
 				}
 				xtext->col_fore = ((last_attr & 7) + 8*isbold);
 /*				xtext->col_back = ((last_attr >> 3) & 7); */
-
-				DEBUG_RENDER("[C:%.2d] ", xtext->col_fore);
 			} else {
 				if (isbold) {
 					if (!mark)
 						xtext_set_fg(xtext, gc, 7+8);
 					xtext->col_fore = 7+8;
-
-					DEBUG_RENDER("[C:%.2d] ", xtext->col_fore);
 				}
 			}
-
-			DEBUG_RENDER("[%.3d] data :", last_attr);
 		}
 
 
@@ -2460,8 +2437,6 @@
 			if (tmp + i > len)
 				tmp = len - i;
 			j += tmp;	/* move to the next utf8 char */
-
-			DEBUG_RENDER("%c", str[i]);
 		}
 
 		i += charlen(str + i);	/* move to the next utf8 char */
@@ -2584,9 +2559,6 @@
 	/* return how much we drew in the x direction */
 	if (x_size_ret)
 		*x_size_ret = x - indent;
-
-	DEBUG_RENDER("\n");
-
 	return ret;
 }
 


Więcej informacji o liście dyskusyjnej ekg2-commit