Remove trailing whitespace from end of lines

This commit is contained in:
Daniel P. Berrange 2012-01-10 15:26:55 +00:00 committed by Alon Levy
parent 38ee339bd8
commit 3e50b41dc2
10 changed files with 37 additions and 38 deletions

View File

@ -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) {

View File

@ -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, &copy->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, &copy->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) {

2
lz.c
View File

@ -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

View File

@ -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++;

View File

@ -170,7 +170,7 @@
out->b = (out->b << 3) | ((out->b >> 2) & 0x07); \
out->pad = 0; \
out++; \
}
}
#endif
#endif

2
quic.c
View File

@ -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;

View File

@ -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

View File

@ -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, "-"))
{

View File

@ -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] == ':') ||

View File

@ -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