From 6fc4a416aae13e09ba9ed100f006f4c8d86ea6dc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 10 Sep 2003 04:45:56 +0000 Subject: [PATCH] Add debugging logic --- shredtree.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.43.0