diff src/dupe.c @ 507:135570a8bd96

Move debug macros from main.h to new debug.h. Make debug_level static to debug.c and add utility functions to manipulate it. Add #include "debug.h" where needed.
author zas_
date Thu, 24 Apr 2008 08:53:39 +0000
parents fc9c8a3e1a8b
children f9bf33be53ff
line wrap: on
line diff
--- a/src/dupe.c	Thu Apr 24 00:15:03 2008 +0000
+++ b/src/dupe.c	Thu Apr 24 08:53:39 2008 +0000
@@ -17,6 +17,7 @@
 #include "cache.h"
 #include "collect.h"
 #include "collect-table.h"
+#include "debug.h"
 #include "dnd.h"
 #include "editors.h"
 #include "filelist.h"
@@ -1097,7 +1098,7 @@
 
 	list = dupe_match_rank_sort(dw->list);
 
-	if (debug >= 2) dupe_match_print_list(list);
+	if (required_debug_level(2)) dupe_match_print_list(list);
 
 	DEBUG_1("Similar items: %d", g_list_length(list));
 	list = dupe_match_group_trim(list, dw);
@@ -1105,7 +1106,7 @@
 
 	dupe_match_sort_groups(list);
 
-	if (debug) dupe_match_print_list(list);
+	if (required_debug_level(2)) dupe_match_print_list(list);
 
 	list = dupe_match_rank_sort(list);