X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/a2bb2735d5095aabeba4a891fe4ba867a9afc2b3..7b215d149ac4fd5709635111d86a2062fc7ac3ad:/client/emv/dump.c?ds=sidebyside

diff --git a/client/emv/dump.c b/client/emv/dump.c
index 9915ad73..2368680a 100644
--- a/client/emv/dump.c
+++ b/client/emv/dump.c
@@ -18,8 +18,10 @@
 #endif
 
 #include "dump.h"
-
 #include <stdio.h>
+#include <string.h>
+
+#define PRINT_INDENT(level) 	{for (int i = 0; i < (level); i++) fprintf(f, "\t");}
 
 void dump_buffer_simple(const unsigned char *ptr, size_t len, FILE *f)
 {
@@ -32,7 +34,7 @@ void dump_buffer_simple(const unsigned char *ptr, size_t len, FILE *f)
 		fprintf(f, "%s%02hhX", i ? " " : "", ptr[i]);
 }
 
-void dump_buffer(const unsigned char *ptr, size_t len, FILE *f)
+void dump_buffer(const unsigned char *ptr, size_t len, FILE *f, int level)
 {
 	int i, j;
 
@@ -40,6 +42,7 @@ void dump_buffer(const unsigned char *ptr, size_t len, FILE *f)
 		f = stdout;
 
 	for (i = 0; i < len; i += 16) {
+		PRINT_INDENT(level);
 		fprintf(f, "\t%02x:", i);
 		for (j = 0; j < 16; j++) {
 			if (i + j < len)