diff src/collect-table.c @ 495:c7a2471e5c4e

Introduce macros to display debug messages. if (debug) printf(...) is now replaced by variadic macros: DEBUG_1() And for higher debugging levels: DEBUG_2() DEBUG_3() DEBUG_4()
author zas_
date Wed, 23 Apr 2008 20:47:19 +0000
parents 5212d4fed37f
children a33badd85f16
line wrap: on
line diff
--- a/src/collect-table.c	Wed Apr 23 13:46:18 2008 +0000
+++ b/src/collect-table.c	Wed Apr 23 20:47:19 2008 +0000
@@ -406,7 +406,7 @@
 		col2 = t;
 		}
 
-	if (debug) printf("table: %d x %d to %d x %d\n", row1, col1, row2, col2);
+	DEBUG_1("table: %d x %d to %d x %d\n", row1, col1, row2, col2);
 
 	for (i = row1; i <= row2; i++)
 		{
@@ -1642,7 +1642,7 @@
 
 	collection_table_populate(ct, TRUE);
 
-	if (debug) printf("col tab pop cols=%d rows=%d\n", ct->columns, ct->rows);
+	DEBUG_1("col tab pop cols=%d rows=%d\n", ct->columns, ct->rows);
 }
 
 static void collection_table_sync(CollectTable *ct)
@@ -2062,7 +2062,7 @@
 	CollectInfo *drop_info;
 	GList *work;
 
-	if (debug) printf("%s\n", selection_data->data);
+	DEBUG_1("%s\n", selection_data->data);
 
 	collection_table_scroll(ct, FALSE);
 	collection_table_insert_marker(ct, NULL, FALSE);