From 00592e075754594605fddfb2a702f3d2caa7c55c Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 6 Jun 2006 15:38:58 -0700 Subject: [PATCH] Remove trailing whitespace from lines with a single brace. This patch was produced with the following (GNU) sed script: sed -i -r -e '/^[ \t]*[{}][ \t]*/ s/[ \t]+$//' run on all *.[ch] files within cairo. --- pixman/src/fbmmx.c | 6 +++--- pixman/src/icimage.c | 4 ++-- src/cairo-atsui-font.c | 2 +- src/cairo-clip.c | 2 +- src/cairo-directfb-surface.c | 4 ++-- src/cairo-font-options.c | 2 +- src/cairo-font-subset.c | 2 +- src/cairo-font.c | 2 +- src/cairo-ft-font.c | 2 +- src/cairo-hash.c | 4 ++-- src/cairo-image-surface.c | 2 +- src/cairo-pattern.c | 2 +- src/cairo-png.c | 2 +- src/cairo-rectangle.c | 2 +- src/cairo-surface.c | 2 +- src/cairo-svg-surface.c | 4 ++-- src/cairo-win32-surface.c | 4 ++-- test/clip-operator.c | 2 +- test/operator-clear.c | 4 ++-- test/operator-source.c | 4 ++-- test/unbounded-operator.c | 4 ++-- 21 files changed, 31 insertions(+), 31 deletions(-) diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c index 408c22cf0..8ff9f9f63 100644 --- a/pixman/src/fbmmx.c +++ b/pixman/src/fbmmx.c @@ -171,7 +171,7 @@ static __inline__ __m64 expand_alpha_rev (__m64 pixel) { return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(0, 0, 0, 0)); -} +} static __inline__ __m64 invert_colors (__m64 pixel) @@ -860,7 +860,7 @@ void fbComposeSetupMMX(void) composeFunctions.combineC[PIXMAN_OPERATOR_ADD] = mmxCombineAddC; composeFunctions.combineMaskU = mmxCombineMaskU; - } + } } @@ -2237,7 +2237,7 @@ fbSolidFillmmx (FbPixels *pDraw, int width, int height, FbBits xor) -{ +{ FbStride stride; int bpp; ullong fill; diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c index ce03a973d..5425f6537 100644 --- a/pixman/src/icimage.c +++ b/pixman/src/icimage.c @@ -521,7 +521,7 @@ pixman_image_destroyClip (pixman_image_t *image) } image->clientClip = NULL; image->clientClipType = CT_NONE; -} +} int pixman_image_set_clip_region (pixman_image_t *image, @@ -883,7 +883,7 @@ FbComputeCompositeRegion (pixman_region16_t *region, { pixman_region_destroy (region); return 0; - } + } if (iMask->alphaMap) { if (!FbClipImageSrc (region, iMask->alphaMap, diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c index 4adeabdcd..c94f17844 100644 --- a/src/cairo-atsui-font.c +++ b/src/cairo-atsui-font.c @@ -535,7 +535,7 @@ _cairo_atsui_font_text_to_glyphs (void *abstract_font, &glyphCount); *num_glyphs = glyphCount - 1; - *glyphs = + *glyphs = (cairo_glyph_t *) malloc(*num_glyphs * (sizeof (cairo_glyph_t))); if (*glyphs == NULL) { return CAIRO_STATUS_NO_MEMORY; diff --git a/src/cairo-clip.c b/src/cairo-clip.c index b0d142b14..d14dd2f0a 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -317,7 +317,7 @@ _cairo_clip_intersect_region (cairo_clip_t *clip, == PIXMAN_REGION_STATUS_SUCCESS) { pixman_region_destroy (clip->region); clip->region = intersection; - } else { + } else { status = CAIRO_STATUS_NO_MEMORY; } pixman_region_destroy (region); diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c index 8776581b4..11bd3f465 100644 --- a/src/cairo-directfb-surface.c +++ b/src/cairo-directfb-surface.c @@ -228,7 +228,7 @@ static IDirectFBSurface *cairo_directfb_buffer_surface_create(IDirectFB *dfb,voi buffer->Lock(buffer,DSLF_READ,&ndata,&npitch); buffer->Unlock(buffer); assert( ( nwidth == width) && (nheight == height)); - } + } #endif return buffer; } @@ -252,7 +252,7 @@ _cairo_directfb_surface_get_image (cairo_directfb_surface_t *surface, if( surface->buffer_data == data ) { cairo_surface_reference(surface->buffer_image); } - } + } if( surface->buffer_data != data ){ /* new off screen buffer */ diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c index 5ffae4681..6764c2cd1 100644 --- a/src/cairo-font-options.c +++ b/src/cairo-font-options.c @@ -154,7 +154,7 @@ cairo_font_options_status (cairo_font_options_t *options) return CAIRO_STATUS_NO_MEMORY; else return CAIRO_STATUS_SUCCESS; -} +} /** * cairo_font_options_merge: diff --git a/src/cairo-font-subset.c b/src/cairo-font-subset.c index f96b2a4b2..bb5056680 100644 --- a/src/cairo-font-subset.c +++ b/src/cairo-font-subset.c @@ -652,7 +652,7 @@ cairo_pdf_ft_font_write_offset_table (cairo_pdf_ft_font_t *font) return status; return font->status; -} +} static unsigned long cairo_pdf_ft_font_calculate_checksum (cairo_pdf_ft_font_t *font, diff --git a/src/cairo-font.c b/src/cairo-font.c index f3b1c9d6b..87f300e2c 100644 --- a/src/cairo-font.c +++ b/src/cairo-font.c @@ -447,7 +447,7 @@ _cairo_unscaled_font_reference (cairo_unscaled_font_t *unscaled_font) void _cairo_unscaled_font_destroy (cairo_unscaled_font_t *unscaled_font) -{ +{ if (unscaled_font == NULL) return; diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 4bc8aecf8..0d03d4e21 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -1407,7 +1407,7 @@ _cairo_ft_scaled_font_create (cairo_ft_unscaled_font_t *unscaled, const cairo_matrix_t *ctm, const cairo_font_options_t *options, cairo_ft_options_t ft_options) -{ +{ cairo_ft_scaled_font_t *scaled_font = NULL; FT_Face face; FT_Size_Metrics *metrics; diff --git a/src/cairo-hash.c b/src/cairo-hash.c index e6494120a..6b9f3d08d 100644 --- a/src/cairo-hash.c +++ b/src/cairo-hash.c @@ -145,7 +145,7 @@ struct _cairo_hash_table { **/ cairo_hash_table_t * _cairo_hash_table_create (cairo_hash_keys_equal_func_t keys_equal) -{ +{ cairo_hash_table_t *hash_table; hash_table = malloc (sizeof (cairo_hash_table_t)); @@ -231,7 +231,7 @@ static cairo_hash_entry_t ** _cairo_hash_table_lookup_internal (cairo_hash_table_t *hash_table, cairo_hash_entry_t *key, cairo_bool_t key_is_unique) -{ +{ cairo_hash_entry_t **entry, **first_available = NULL; unsigned long table_size, i, idx, step; diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 75f923429..da0649fbf 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -566,7 +566,7 @@ _cairo_image_surface_clone_similar (void *abstract_surface, *clone_out = cairo_surface_reference (src); return CAIRO_STATUS_SUCCESS; - } + } return CAIRO_INT_STATUS_UNSUPPORTED; } diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index f5e468ce9..1e8015b95 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -1109,7 +1109,7 @@ _cairo_pattern_is_opaque (const cairo_pattern_t *abstract_pattern) case CAIRO_PATTERN_TYPE_LINEAR: case CAIRO_PATTERN_TYPE_RADIAL: return _gradient_is_opaque (&pattern->gradient.base); - } + } ASSERT_NOT_REACHED; return FALSE; diff --git a/src/cairo-png.c b/src/cairo-png.c index a4fcd4e0f..06c6efbe1 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -286,7 +286,7 @@ cairo_surface_write_to_png_stream (cairo_surface_t *surface, png_closure.closure = closure; return write_png (surface, stream_write_func, &png_closure); -} +} static INLINE int multiply_alpha (int alpha, int color) diff --git a/src/cairo-rectangle.c b/src/cairo-rectangle.c index 2f30e92d7..bf04978d9 100644 --- a/src/cairo-rectangle.c +++ b/src/cairo-rectangle.c @@ -81,5 +81,5 @@ _cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed dest->y = y1; dest->width = x2 - x1; dest->height = y2 - y1; - } + } } diff --git a/src/cairo-surface.c b/src/cairo-surface.c index e7f203bc3..2d3218d48 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -1899,7 +1899,7 @@ _format_is_opaque (cairo_format_t format) */ cairo_bool_t _cairo_surface_is_opaque (const cairo_surface_t *surface) -{ +{ if (_cairo_surface_is_image (surface)) { const cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface; diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 4019639d3..720d93699 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -1481,7 +1481,7 @@ _cairo_svg_surface_paint (void *abstract_surface, _cairo_dtostr (buffer, sizeof buffer, surface->height); xmlSetProp (rect, CC2XML ("height"), C2XML (buffer)); xmlSetProp (rect, CC2XML ("style"), CC2XML ("opacity:1; stroke:none; fill:rgb(0,0,0);")); - } + } return CAIRO_STATUS_SUCCESS; } } @@ -1764,7 +1764,7 @@ _cairo_svg_surface_intersect_clip_path (void *dst, document->clip_id++; surface->xml_node = group; surface->clip_level++; - } + } return status; } diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c index e931a805e..ff14d5bbb 100644 --- a/src/cairo-win32-surface.c +++ b/src/cairo-win32-surface.c @@ -801,7 +801,7 @@ categorize_solid_dest_operator (cairo_operator_t op, else return DO_UNSUPPORTED; break; - } + } ASSERT_NOT_REACHED; return DO_UNSUPPORTED; @@ -1081,7 +1081,7 @@ FAIL: free(dx_buf); } return (win_result) ? CAIRO_STATUS_SUCCESS : CAIRO_INT_STATUS_UNSUPPORTED; -} +} #undef STACK_GLYPH_SIZE diff --git a/test/clip-operator.c b/test/clip-operator.c index c11f33d38..10df2b358 100644 --- a/test/clip-operator.c +++ b/test/clip-operator.c @@ -102,7 +102,7 @@ draw_polygon (cairo_t *cr, int x, int y) static void draw_rects (cairo_t *cr, int x, int y) -{ +{ double block_width = (int)(0.33 * WIDTH + 0.5); double block_height = (int)(0.33 * HEIGHT + 0.5); int i, j; diff --git a/test/operator-clear.c b/test/operator-clear.c index 34f1a858b..6bd5298c5 100644 --- a/test/operator-clear.c +++ b/test/operator-clear.c @@ -96,7 +96,7 @@ draw_glyphs (cairo_t *cr, int x, int y) static void draw_polygon (cairo_t *cr, int x, int y) -{ +{ double width = (int)(0.9 * WIDTH); double height = (int)(0.9 * HEIGHT); x += 0.05 * WIDTH; @@ -115,7 +115,7 @@ draw_polygon (cairo_t *cr, int x, int y) static void draw_rects (cairo_t *cr, int x, int y) -{ +{ double block_width = (int)(0.33 * WIDTH + 0.5); double block_height = (int)(0.33 * HEIGHT + 0.5); int i, j; diff --git a/test/operator-source.c b/test/operator-source.c index b61a6c521..fd9ad5bf9 100644 --- a/test/operator-source.c +++ b/test/operator-source.c @@ -133,7 +133,7 @@ draw_glyphs (cairo_t *cr, int x, int y) static void draw_polygon (cairo_t *cr, int x, int y) -{ +{ double width = (int)(0.9 * WIDTH); double height = (int)(0.9 * HEIGHT); x += 0.05 * WIDTH; @@ -152,7 +152,7 @@ draw_polygon (cairo_t *cr, int x, int y) static void draw_rects (cairo_t *cr, int x, int y) -{ +{ double block_width = (int)(0.33 * WIDTH + 0.5); double block_height = (int)(0.33 * HEIGHT + 0.5); int i, j; diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c index 853627b6e..74c95373d 100644 --- a/test/unbounded-operator.c +++ b/test/unbounded-operator.c @@ -82,7 +82,7 @@ draw_glyphs (cairo_t *cr, int x, int y) static void draw_polygon (cairo_t *cr, int x, int y) -{ +{ double width = (int)(0.9 * WIDTH); double height = (int)(0.9 * HEIGHT); x += 0.05 * WIDTH; @@ -101,7 +101,7 @@ draw_polygon (cairo_t *cr, int x, int y) static void draw_rects (cairo_t *cr, int x, int y) -{ +{ double block_width = (int)(0.33 * WIDTH + 0.5); double block_height = (int)(0.33 * HEIGHT + 0.5); int i, j;