From: Eric S. Raymond Date: Wed, 10 Sep 2003 04:45:56 +0000 (+0000) Subject: Add debugging logic X-Git-Tag: 1.2~9 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=6fc4a416aae13e09ba9ed100f006f4c8d86ea6dc;p=comparator.git Add debugging logic --- diff --git a/shredtree.c b/shredtree.c index acd216c..7462ada 100644 --- a/shredtree.c +++ b/shredtree.c @@ -98,9 +98,15 @@ static struct hash_t emit_chunk(shred *display, int linecount) /* build completed chunk onto end of array */ md5_init_ctx(&ctx); + if (debug) + fprintf(stderr, "Chunk:\n"); for (i = 0; i < shredsize; i++) if (display[i].line) + { + if (debug) + fprintf(stderr, "%d: '%s'\n", i, display[i].line); md5_process_bytes(display[i].line, strlen(display[i].line), &ctx); + } md5_finish_ctx(&ctx, (void *)&out.hash); for (i = shredsize - 1; i >= 0; i--) if (display[i].line)