Browse code

Replace printf statements with VERBOSE statements.

Xavier G authored on 25/08/2016 01:48:35
Showing 3 changed files
... ...
@@ -5,8 +5,6 @@
5 5
  * as published by Sam Hocevar. See the COPYING file for more details.
6 6
  */
7 7
 
8
-#include <stdio.h>
9
-
10 8
 void array_sort(unsigned int **array, unsigned int count);
11 9
 #define ARRAY_SORT 1
12 10
 #include "common.c"
... ...
@@ -48,5 +46,5 @@ void array_sort(unsigned int **array, unsigned int count) {
48 46
 		/* Optimization: iterate one less step next time */
49 47
 		target = latest_swap;
50 48
 	} while (latest_swap);
51
-	printf("  Bubble-sort: made %u swaps to sort %u items.\n", swap_count, count);
49
+	VERBOSE(1, "  Bubble sort: made %u swaps to sort %u items.\n", swap_count, count);
52 50
 }
... ...
@@ -5,8 +5,6 @@
5 5
  * as published by Sam Hocevar. See the COPYING file for more details.
6 6
  */
7 7
 
8
-#include <stdio.h>
9
-
10 8
 void array_sort(unsigned int **array, unsigned int count);
11 9
 #define ARRAY_SORT 1
12 10
 #include "common.c"
... ...
@@ -45,5 +43,5 @@ void array_sort(unsigned int **array, unsigned int count) {
45 43
 			++ insertions;
46 44
 		}
47 45
 	}
48
-	printf("Insertion sort: made %u insertions, moved %u items.\n", insertions, moved_items);
46
+	VERBOSE(1, "  Insertion sort: made %u insertions, moved %u items.\n", insertions, moved_items);
49 47
 }
... ...
@@ -5,8 +5,6 @@
5 5
  * as published by Sam Hocevar. See the COPYING file for more details.
6 6
  */
7 7
 
8
-#include <stdio.h>
9
-
10 8
 void array_sort(unsigned int **array, unsigned int count);
11 9
 #define ARRAY_SORT 1
12 10
 #include "common.c"