From 25ff8b966434d6241daa2713fa7210a36563d40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 2 Aug 2014 23:26:20 +0000 Subject: [PATCH] Print hex strings in groups of eight. --- t/t_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/t/t_main.c b/t/t_main.c index 719793a..4605ef4 100644 --- a/t/t_main.c +++ b/t/t_main.c @@ -53,9 +53,13 @@ void t_verbose_hex(const uint8_t *buf, size_t len) { - if (verbose) - while (len--) + if (verbose) { + while (len--) { fprintf(stderr, "%02x", *buf++); + if (len > 0 && len % 4 == 0) + fprintf(stderr, " "); + } + } } /*