static void framebuffer_update_request(VncState *vs, int incremental,

                                       int x_position, int y_position,

                                       int w, int h)

{

    int i;

    const size_t width = surface_width(vs->vd->ds) / VNC_DIRTY_PIXELS_PER_BIT;

    const size_t height = surface_height(vs->vd->ds);



    if (y_position > height) {

        y_position = height;

    }

    if (y_position + h >= height) {

        h = height - y_position;

    }



    vs->need_update = 1;

    if (!incremental) {

        vs->force_update = 1;

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

            bitmap_set(vs->dirty[y_position + i], 0, width);

            bitmap_clear(vs->dirty[y_position + i], width,

                         VNC_DIRTY_BITS - width);

        }

    }

}

static void framebuffer_update_request(VncState *vs, int incremental,

                                       int x_position, int y_position,

                                       int w, int h)

{

    int i;

    const size_t width = surface_width(vs->vd->ds) / VNC_DIRTY_PIXELS_PER_BIT;

    const size_t height = surface_height(vs->vd->ds);



    if (y_position > height) {

        y_position = height;

    }

    if (y_position + h >= height) {

        h = height - y_position;

    }



    vs->need_update = 1;

    if (!incremental) {

        vs->force_update = 1;

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

            bitmap_set(vs->dirty[y_position + i], 0, width);

            bitmap_clear(vs->dirty[y_position + i], width,

                         VNC_DIRTY_BITS - width);

        }

    }

}

                                       int x_position, int y_position,                                        int w, int h)     int i;     const size_t width = surface_width(vs->vd->ds) / VNC_DIRTY_PIXELS_PER_BIT;     const size_t height = surface_height(vs->vd->ds);     if (y_position > height) {         y_position = height;     if (y_position + h >= height) {         h = height - y_position;     if (!incremental) {         vs->force_update = 1;         for (i = 0; i < h; i++) {             bitmap_set(vs->dirty[y_position + i], 0, width);             bitmap_clear(vs->dirty[y_position + i], width,                          VNC_DIRTY_BITS - width);
static void FUNC_0(VncState *VAR_0, int VAR_1,

                                       int VAR_2, int VAR_3,

                                       int VAR_4, int VAR_5)

{

    int VAR_6;

    const size_t VAR_7 = surface_width(VAR_0->vd->ds) / VNC_DIRTY_PIXELS_PER_BIT;

    const size_t VAR_8 = surface_height(VAR_0->vd->ds);



    if (VAR_3 > VAR_8) {

        VAR_3 = VAR_8;

    }

    if (VAR_3 + VAR_5 >= VAR_8) {

        VAR_5 = VAR_8 - VAR_3;

    }



    VAR_0->need_update = 1;

    if (!VAR_1) {

        VAR_0->force_update = 1;

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

            bitmap_set(VAR_0->dirty[VAR_3 + VAR_6], 0, VAR_7);

            bitmap_clear(VAR_0->dirty[VAR_3 + VAR_6], VAR_7,

                         VNC_DIRTY_BITS - VAR_7);

        }

    }

}

static void FUNC_0(VncState *VAR_0, int VAR_1,
int VAR_2, int VAR_3,
int VAR_4, int VAR_5)
{ int VAR_6; const size_t VAR_7 = surface_width(VAR_0->vd->ds) / VNC_DIRTY_PIXELS_PER_BIT; const size_t VAR_8 = surface_height(VAR_0->vd->ds); if (VAR_3 > VAR_8) { VAR_3 = VAR_8; } if (VAR_3 + VAR_5 >= VAR_8) { VAR_5 = VAR_8 - VAR_3; } VAR_0->need_update = 1; if (!VAR_1) { VAR_0->force_update = 1; for (VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) { bitmap_set(VAR_0->dirty[VAR_3 + VAR_6], 0, VAR_7); bitmap_clear(VAR_0->dirty[VAR_3 + VAR_6], VAR_7,
VNC_DIRTY_BITS - VAR_7); } } }