From 8b69d26fa934f09b4760b7bbc27bd379c1598176 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 31 Jan 2013 10:51:44 -0300 Subject: [PATCH] ubb-la/gui.c: make debug output clearer and more detailed --- ubb-la/gui.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ubb-la/gui.c b/ubb-la/gui.c index 0743e97..1f90294 100644 --- a/ubb-la/gui.c +++ b/ubb-la/gui.c @@ -232,7 +232,7 @@ static void show_buffer_zoom_in(const uint8_t *buf, int skip, int nibbles, int last[4] = { -1, -1, -1, -1}; uint8_t v, bit; - DEBUG("in: %d-%d (%d) Sa %d-%d (%d) pix %d f (%d)\n", + DEBUG("in: %d-%d (%d) Sa; %d-%d (%d) pix; %d f (%d)\n", skip, nibbles, nibbles-skip, x0, x1, x1-x0, f, f*(nibbles-skip)); x = x0; for (i = skip; i != nibbles; i++) { @@ -261,7 +261,7 @@ static void show_buffer_zoom_out(const uint8_t *buf, int skip, int nibbles, int changes[4], last[4] = { -1, -1, -1, -1}, next[4]; uint8_t v, bit; - DEBUG("out: %d-%d (%d) Sa %d-%d (%d) pix %d f (%d)\n", + DEBUG("out: %d-%d (%d) Sa; %d-%d (%d) pix; %d f (%d)\n", skip, nibbles, nibbles-skip, x0, x1, x1-x0, f, f*(x1-x0)); for (x = x0; x != x1; x++) { n = i+f; @@ -301,6 +301,8 @@ static void show_buffer(const uint8_t *buf, int skip, int nibbles, xm = (x0+x1) >> 1; dp = pos-((nibbles+skip) >> 1); + DEBUG("show: %d-%d Sa; %d-%d pix; pos %d dp %d; xm %d xcenter %d\n", + skip, nibbles, x0, x1, pos, dp, xm, XCENTER); if (zoom < 0) { s = (x1-x0) << -zoom; show_map(skip, nibbles, pos-s/2, pos+s/2);