static void vnc_write_pixels_generic(VncState *vs, void *pixels1, int size)

{

    uint8_t buf[4];



    if (vs->depth == 4) {

        uint32_t *pixels = pixels1;

        int n, i;

        n = size >> 2;

        for(i = 0; i < n; i++) {

            vnc_convert_pixel(vs, buf, pixels[i]);

            vnc_write(vs, buf, vs->pix_bpp);

        }

    } else if (vs->depth == 2) {

        uint16_t *pixels = pixels1;

        int n, i;

        n = size >> 1;

        for(i = 0; i < n; i++) {

            vnc_convert_pixel(vs, buf, pixels[i]);

            vnc_write(vs, buf, vs->pix_bpp);

        }

    } else if (vs->depth == 1) {

        uint8_t *pixels = pixels1;

        int n, i;

        n = size;

        for(i = 0; i < n; i++) {

            vnc_convert_pixel(vs, buf, pixels[i]);

            vnc_write(vs, buf, vs->pix_bpp);

        }

    } else {

        fprintf(stderr, "vnc_write_pixels_generic: VncState color depth not supported\n");

    }

}

static void vnc_write_pixels_generic(VncState *vs, void *pixels1, int size)

{

    uint8_t buf[4];



    if (vs->depth == 4) {

        uint32_t *pixels = pixels1;

        int n, i;

        n = size >> 2;

        for(i = 0; i < n; i++) {

            vnc_convert_pixel(vs, buf, pixels[i]);

            vnc_write(vs, buf, vs->pix_bpp);

        }

    } else if (vs->depth == 2) {

        uint16_t *pixels = pixels1;

        int n, i;

        n = size >> 1;

        for(i = 0; i < n; i++) {

            vnc_convert_pixel(vs, buf, pixels[i]);

            vnc_write(vs, buf, vs->pix_bpp);

        }

    } else if (vs->depth == 1) {

        uint8_t *pixels = pixels1;

        int n, i;

        n = size;

        for(i = 0; i < n; i++) {

            vnc_convert_pixel(vs, buf, pixels[i]);

            vnc_write(vs, buf, vs->pix_bpp);

        }

    } else {

        fprintf(stderr, "vnc_write_pixels_generic: VncState color depth not supported\n");

    }

}

    if (vs->depth == 4) {             vnc_write(vs, buf, vs->pix_bpp);     } else if (vs->depth == 2) {             vnc_write(vs, buf, vs->pix_bpp);     } else if (vs->depth == 1) {             vnc_write(vs, buf, vs->pix_bpp);     if (vs->depth == 4) {     } else if (vs->depth == 2) {     } else if (vs->depth == 1) {
static void FUNC_0(VncState *VAR_0, void *VAR_1, int VAR_2)

{

    uint8_t buf[4];



    if (VAR_0->depth == 4) {

        uint32_t *pixels = VAR_1;

        int VAR_5, VAR_5;

        VAR_5 = VAR_2 >> 2;

        for(VAR_5 = 0; VAR_5 < VAR_5; VAR_5++) {

            vnc_convert_pixel(VAR_0, buf, pixels[VAR_5]);

            vnc_write(VAR_0, buf, VAR_0->pix_bpp);

        }

    } else if (VAR_0->depth == 2) {

        uint16_t *pixels = VAR_1;

        int VAR_5, VAR_5;

        VAR_5 = VAR_2 >> 1;

        for(VAR_5 = 0; VAR_5 < VAR_5; VAR_5++) {

            vnc_convert_pixel(VAR_0, buf, pixels[VAR_5]);

            vnc_write(VAR_0, buf, VAR_0->pix_bpp);

        }

    } else if (VAR_0->depth == 1) {

        uint8_t *pixels = VAR_1;

        int VAR_5, VAR_5;

        VAR_5 = VAR_2;

        for(VAR_5 = 0; VAR_5 < VAR_5; VAR_5++) {

            vnc_convert_pixel(VAR_0, buf, pixels[VAR_5]);

            vnc_write(VAR_0, buf, VAR_0->pix_bpp);

        }

    } else {

        fprintf(stderr, "FUNC_0: VncState color depth not supported\VAR_5");

    }

}

static void FUNC_0(VncState *VAR_0, void *VAR_1, int VAR_2)
{ uint8_t buf[4]; if (VAR_0->depth == 4) { uint32_t *pixels = VAR_1; int VAR_5, VAR_5; VAR_5 = VAR_2 >> 2; for(VAR_5 = 0; VAR_5 < VAR_5; VAR_5++) { vnc_convert_pixel(VAR_0, buf, pixels[VAR_5]); vnc_write(VAR_0, buf, VAR_0->pix_bpp); } } else if (VAR_0->depth == 2) { uint16_t *pixels = VAR_1; int VAR_5, VAR_5; VAR_5 = VAR_2 >> 1; for(VAR_5 = 0; VAR_5 < VAR_5; VAR_5++) { vnc_convert_pixel(VAR_0, buf, pixels[VAR_5]); vnc_write(VAR_0, buf, VAR_0->pix_bpp); } } else if (VAR_0->depth == 1) { uint8_t *pixels = VAR_1; int VAR_5, VAR_5; VAR_5 = VAR_2; for(VAR_5 = 0; VAR_5 < VAR_5; VAR_5++) { vnc_convert_pixel(VAR_0, buf, pixels[VAR_5]); vnc_write(VAR_0, buf, VAR_0->pix_bpp); } } else { fprintf(stderr, "FUNC_0: VncState color depth not supported\VAR_5"); } }