commit ecbb4aba3113b7f05f1b06ddff9aa36e4205257c parent 9ed69fa464358312fb18bbda54d281aa7f69e9d6 Author: Christian Grothoff <christian@grothoff.org> Date: Sat, 16 Nov 2019 11:06:26 +0100 see stuff Diffstat:
| M | src/main.c | | | 49 | ------------------------------------------------- |
1 file changed, 0 insertions(+), 49 deletions(-)
diff --git a/src/main.c b/src/main.c @@ -247,9 +247,6 @@ show_qrcode (const char *uri) // size /= 2; unsigned int nwidth = qrc->width + 8; // 4 pixel border scale = size / nwidth; -#if LEGACY - pixels = GNUNET_malloc (size * size * n_channels); -#endif xOff = 4 * scale; yOff = 4 * scale; if (qrDisplay.var_info.xres < qrDisplay.var_info.yres) @@ -259,59 +256,13 @@ show_qrcode (const char *uri) for (unsigned int x = 0; x < qrDisplay.var_info.xres - 2 * xOff; x++) for (unsigned int y = 0; y < qrDisplay.var_info.yres - 2 * yOff; y++) { - qrDisplay.memory[(y + yOff) * qrDisplay.var_info.xres + (x + xOff)] = 0; - // 0xFFFF * x / size; - } -#if 0 - for (unsigned int x = 0; x < size; x++) - for (unsigned int y = 0; y < size; y++) - { unsigned int off = (x * qrc->width / size) + (y * qrc->width / size) * qrc->width; qrDisplay.memory[(y + yOff) * qrDisplay.var_info.xres + (x + xOff)] = (0 == (qrc->data[off] & 1)) ? 0xFFFF : 0x0000; } -#endif QRcode_free (qrc); QRinput_free (qri); -#if LEGACY - if (0 < qrDisplay.devicefd) - { - xwidth = qrDisplay.var_info.xres; - yheight = qrDisplay.var_info.yres; - /* show the qrcode */ - yOff = (yheight - size) / 2; - xOff = (xwidth - size) / 2; - for (size_t yrow = yOff; row < yheight; yrow++) - { - for (size_t xcol = xOff; col < xwidth; col++) - { - if (((yrow - yOff) < size)&&((xcol - xOff) < size)) - { - for (unsigned int c = 0; c < n_channels; c++) - { - qrDisplay.memory[(yrow * xwidth + xcol)] = - pixels[((yrow - yOff) * size + (xcol - xOff)) * n_channels + c]; - } - } - } - } - } - else - { - /* show on stdout */ - for (size_t row = 0; row < size; row++) - { - for (size_t col = 0; col < size; col++) - { - printf ("%c", (pixels[(row * size + col) * n_channels] == - 0x00 ? '#' : ' ')); - } - printf ("\n"); - } - } - GNUNET_free (pixels); -#endif }