Add an empty line between groups when the group IDs are not shown.
authorFrancois Fleuret <francois@fleuret.org>
Wed, 10 Mar 2010 21:46:24 +0000 (22:46 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Wed, 10 Mar 2010 21:46:24 +0000 (22:46 +0100)
finddup.c

index 2067372..a8847f5 100644 (file)
--- a/finddup.c
+++ b/finddup.c
@@ -317,6 +317,9 @@ void print_result(struct file_with_size *list1, struct file_with_size *list2) {
   qsort(nodes, nb, sizeof(struct file_with_size *), compare_nodes);
 
   for(n = 0; n < nb; n++) {
+    if(!show_groups && n > 0 && nodes[n]->group_id != nodes[n-1]->group_id) {
+      printf("\n");
+    }
     print_file(nodes[n]);
   }