diff --git a/ubb-la/gui.c b/ubb-la/gui.c index e6323ba..e7834f3 100644 --- a/ubb-la/gui.c +++ b/ubb-la/gui.c @@ -19,6 +19,13 @@ #include "gui.h" +#if 0 +#define DEBUG(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) +#else +#define DEBUG(fmt, ...) +#endif + + #define XRES 320 /* canvas width */ #define YRES 240 /* canvas height */ @@ -98,8 +105,8 @@ 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; -fprintf(stderr, "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)); + 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++) { v = (buf[i >> 1] >> 4*(~i & 1)) & 0xf; @@ -127,8 +134,8 @@ 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; -fprintf(stderr, "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)); + 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; for (j = 0; j != 4; j++) {