diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-01-10 15:26:55 +0000 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-01-13 18:11:59 +0200 |
commit | 68c2897e5bc910151ab5f6c1c06299ae7e60c678 (patch) | |
tree | 310c8fe12f509c67d350a74b0ecfefc363bb6843 /common | |
parent | 51f1ad54ad51cdf202566f26e7d29082a3c577ed (diff) | |
download | spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.tar.gz spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.tar.xz spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.zip |
Remove trailing whitespace from end of lines
Diffstat (limited to 'common')
-rw-r--r-- | common/canvas_base.c | 2 | ||||
-rw-r--r-- | common/gdi_canvas.c | 45 | ||||
-rw-r--r-- | common/lz.c | 2 | ||||
-rw-r--r-- | common/lz_compress_tmpl.c | 2 | ||||
-rw-r--r-- | common/lz_decompress_tmpl.c | 2 | ||||
-rw-r--r-- | common/quic.c | 2 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/getopt.h | 4 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/main.c | 6 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/my_getopt.c | 6 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/my_getopt.h | 4 |
10 files changed, 37 insertions, 38 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c index 16688fb3..c4203dd7 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -619,7 +619,7 @@ static pixman_image_t *canvas_get_jpeg_alpha(CanvasBase *canvas, decomp_alpha_buf = dest; } lz_decode(lz_data->lz, LZ_IMAGE_TYPE_XXXA, decomp_alpha_buf); - + if (invers) { uint8_t *end = dest + height * stride; for (; dest != end; dest += stride) { diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c index 2cb83d8c..d3e9c7ff 100644 --- a/common/gdi_canvas.c +++ b/common/gdi_canvas.c @@ -641,7 +641,7 @@ static HBRUSH get_brush(GdiCanvas *canvas, SpiceBrush *brush, RecurciveMutex **b CANVAS_ERROR("CreateSolidBrush failed"); } return hbrush; - case SPICE_BRUSH_TYPE_PATTERN: { + case SPICE_BRUSH_TYPE_PATTERN: { GdiCanvas *gdi_surface = NULL; HBRUSH hbrush; pixman_image_t *surface = NULL; @@ -810,11 +810,11 @@ static struct BitmapData get_mask_bitmap(struct GdiCanvas *canvas, struct SpiceQ bitmap.cache = 0; bitmap.from_surface = 1; } else { - + if (!(surface = canvas_get_mask(&canvas->base, mask, NULL))) { return bitmap; } - + pixman_data = (PixmanData *)pixman_image_get_destroy_data (surface); if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { bitmap.dc = create_compatible_dc(); @@ -1060,16 +1060,16 @@ static void gdi_canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi } else { surface = canvas_get_image(&canvas->base, copy->src_bitmap, FALSE); pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); bitmapmask = get_mask_bitmap(canvas, ©->mask); set_scale_mode(canvas, copy->scale_mode); set_clip(canvas, clip); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_redrop(canvas->dc, ©->src_area, bbox, dc, @@ -1083,7 +1083,6 @@ static void gdi_canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi } pixman_image_unref(surface); - } free_mask(&bitmapmask); } @@ -1149,7 +1148,7 @@ static void gdi_canvas_put_image(SpiceCanvas *spice_canvas, HDC dc, const SpiceR gdi_draw_bitmap_redrop(canvas->dc, &src, dest, dc, NULL, SPICE_ROPD_OP_PUT, 0); } else { - pixman_image_t *image = pixman_image_create_bits(PIXMAN_a8r8g8b8, src_width, src_height, + pixman_image_t *image = pixman_image_create_bits(PIXMAN_a8r8g8b8, src_width, src_height, (uint32_t *)src_data, src_stride); gdi_draw_image(canvas->dc, &src, dest, image, NULL, SPICE_ROPD_OP_PUT, 0); pixman_image_unref(image); @@ -1166,7 +1165,7 @@ static void gdi_draw_bitmap_transparent(GdiCanvas *canvas, HDC dest_dc, const Sp } static void gdi_draw_image_transparent(GdiCanvas *canvas, HDC dest_dc, const SpiceRect *src, - const SpiceRect *dest, pixman_image_t *image, + const SpiceRect *dest, pixman_image_t *image, uint32_t color, int rotate) { HDC dc; @@ -1203,12 +1202,12 @@ static void gdi_canvas_draw_transparent(SpiceCanvas *spice_canvas, SpiceRect *bb if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_transparent(canvas, canvas->dc, &transparent->src_area, bbox, dc, transparent->true_color); - + SelectObject(dc, prev_bitmap); DeleteObject(dc); ReleaseMutex(pixman_data->mutex); @@ -1216,7 +1215,7 @@ static void gdi_canvas_draw_transparent(SpiceCanvas *spice_canvas, SpiceRect *bb gdi_draw_image_transparent(canvas, canvas->dc, &transparent->src_area, bbox, surface, transparent->true_color, 0); } - + pixman_image_unref(surface); } } @@ -1278,13 +1277,13 @@ static void gdi_canvas_draw_alpha_blend(SpiceCanvas *spice_canvas, SpiceRect *bb surface = canvas_get_image(&canvas->base, alpha_blend->src_bitmap, TRUE); use_bitmap_alpha = pixman_image_get_depth(surface) == 32; pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); set_clip(canvas, clip); if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_alpha(canvas->dc, &alpha_blend->src_area, bbox, dc, alpha_blend->alpha, @@ -1296,7 +1295,7 @@ static void gdi_canvas_draw_alpha_blend(SpiceCanvas *spice_canvas, SpiceRect *bb gdi_draw_image_alpha(canvas->dc, &alpha_blend->src_area, bbox, surface, alpha_blend->alpha, 0, use_bitmap_alpha); } - + pixman_image_unref(surface); } } @@ -1334,18 +1333,18 @@ static void gdi_canvas_draw_opaque(SpiceCanvas *spice_canvas, SpiceRect *bbox, S } else { surface = canvas_get_image(&canvas->base, opaque->src_bitmap, FALSE); pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); bitmapmask = get_mask_bitmap(canvas, &opaque->mask); hbrush = get_brush(canvas, &opaque->brush, &brush_lock); set_scale_mode(canvas, opaque->scale_mode); set_clip(canvas, clip); prev_hbrush = set_brush(canvas->dc, hbrush, &opaque->brush); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); if (brush_lock) { @@ -1392,16 +1391,16 @@ static void gdi_canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, Sp } else { surface = canvas_get_image(&canvas->base, blend->src_bitmap, FALSE); pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); bitmapmask = get_mask_bitmap(canvas, &blend->mask); set_scale_mode(canvas, blend->scale_mode); set_clip(canvas, clip); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_redrop(canvas->dc, &blend->src_area, bbox, dc, @@ -1497,11 +1496,11 @@ static void gdi_canvas_draw_rop3(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi set_scale_mode(canvas, rop3->scale_mode); set_clip(canvas, clip); prev_hbrush = set_brush(canvas->dc, hbrush, &rop3->brush); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); if (brush_lock) { diff --git a/common/lz.c b/common/lz.c index 1d695a07..5f517940 100644 --- a/common/lz.c +++ b/common/lz.c @@ -439,7 +439,7 @@ typedef uint16_t rgb16_pixel_t; #define COMP_LEVEL_SIZE_LIMIT 65536 // TODO: implemented lz2. should lz1 be an option (no RLE + distance limitation of MAX_DISTANCE) -// TODO: I think MAX_FARDISTANCE can be changed easily to 2^29 +// TODO: I think MAX_FARDISTANCE can be changed easily to 2^29 // (and maybe even more when pixel > byte). // i.e. we can support 512M Bytes/Pixels distance instead of only ~68K. #define MAX_DISTANCE 8191 // 2^13 diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c index ea878ffd..6db53872 100644 --- a/common/lz_compress_tmpl.c +++ b/common/lz_compress_tmpl.c @@ -296,7 +296,7 @@ match: // RLE or dictionary (both are encoded by distance from ref (-1) a PIXEL x = *ref; while ((ip < ip_bound) && (ref < ref_limit)) { // TODO: maybe separate a run from // the same seg or from different - // ones in order to spare + // ones in order to spare // ref < ref_limit if (!SAME_PIXEL(*ref, x)) { ref++; diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c index 46587eef..b0cbb2a9 100644 --- a/common/lz_decompress_tmpl.c +++ b/common/lz_decompress_tmpl.c @@ -170,7 +170,7 @@ out->b = (out->b << 3) | ((out->b >> 2) & 0x07); \ out->pad = 0; \ out++; \ -} +} #endif #endif diff --git a/common/quic.c b/common/quic.c index 46666383..707724a2 100644 --- a/common/quic.c +++ b/common/quic.c @@ -1515,7 +1515,7 @@ static void uncompress_gray(Encoder *encoder, uint8_t *buf, int stride) encoder->width); \ encoder->rows_completed++; \ } - + int quic_decode(QuicContext *quic, QuicImageType type, uint8_t *buf, int stride) { Encoder *encoder = (Encoder *)quic; diff --git a/common/win/my_getopt-1.5/getopt.h b/common/win/my_getopt-1.5/getopt.h index 5f08ccb4..df07082a 100644 --- a/common/win/my_getopt-1.5/getopt.h +++ b/common/win/my_getopt-1.5/getopt.h @@ -9,10 +9,10 @@ * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/common/win/my_getopt-1.5/main.c b/common/win/my_getopt-1.5/main.c index 25674e1c..a9de2723 100644 --- a/common/win/my_getopt-1.5/main.c +++ b/common/win/my_getopt-1.5/main.c @@ -163,7 +163,7 @@ main(int argc, char * argv[]) /* long option list index */ int longind = 0; - /* + /* * print a warning when the POSIXLY_CORRECT environment variable will * interfere with argument placement */ @@ -326,12 +326,12 @@ main(int argc, char * argv[]) if (optind < argc) { int argindex; - + for (argindex = optind; argindex < argc; argindex ++) { char *infilename = argv[argindex]; FILE *infile; - + /* we allow "-" as a synonym for stdin here */ if (! strcmp(infilename, "-")) { diff --git a/common/win/my_getopt-1.5/my_getopt.c b/common/win/my_getopt-1.5/my_getopt.c index e3737df8..5237b8e8 100644 --- a/common/win/my_getopt-1.5/my_getopt.c +++ b/common/win/my_getopt-1.5/my_getopt.c @@ -9,10 +9,10 @@ * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -198,7 +198,7 @@ int _my_getopt_internal(int argc, char * argv[], const char *shortopts, if(((my_optopt = argv[my_optind][1]) != '-') && ! argv[my_optind][2]) { int c; - + ind = shortoff; while((c = shortopts[ind++])) { if(((shortopts[ind] == ':') || diff --git a/common/win/my_getopt-1.5/my_getopt.h b/common/win/my_getopt-1.5/my_getopt.h index 2c1dd66f..c75101a1 100644 --- a/common/win/my_getopt-1.5/my_getopt.h +++ b/common/win/my_getopt-1.5/my_getopt.h @@ -9,10 +9,10 @@ * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |