diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-29 22:44:16 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-29 23:22:28 +0800 |
commit | 4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9 (patch) | |
tree | ce1154c5d7487fbd566c5b68df90fb8259b4604e /libart_lgpl | |
parent | e6c42ecc596fb16247e8d1d591a5d244a61d0e24 (diff) | |
download | gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.gz gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.bz2 gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.lz gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.xz gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.zst gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'libart_lgpl')
-rw-r--r-- | libart_lgpl/art_misc.c | 12 | ||||
-rw-r--r-- | libart_lgpl/art_misc.h | 8 | ||||
-rw-r--r-- | libart_lgpl/art_rect_svp.c | 2 | ||||
-rw-r--r-- | libart_lgpl/art_rect_uta.c | 12 | ||||
-rw-r--r-- | libart_lgpl/art_render.h | 2 | ||||
-rw-r--r-- | libart_lgpl/art_svp_intersect.c | 10 | ||||
-rw-r--r-- | libart_lgpl/art_svp_ops.c | 4 | ||||
-rw-r--r-- | libart_lgpl/art_svp_render_aa.c | 14 | ||||
-rw-r--r-- | libart_lgpl/art_svp_vpath.c | 16 | ||||
-rw-r--r-- | libart_lgpl/art_uta.c | 2 | ||||
-rw-r--r-- | libart_lgpl/art_uta_vpath.c | 64 | ||||
-rw-r--r-- | libart_lgpl/art_vpath_bpath.c | 4 |
12 files changed, 75 insertions, 75 deletions
diff --git a/libart_lgpl/art_misc.c b/libart_lgpl/art_misc.c index 713522b580..08ddcd184c 100644 --- a/libart_lgpl/art_misc.c +++ b/libart_lgpl/art_misc.c @@ -61,17 +61,17 @@ art_warn (const gchar *fmt, ...) va_end (ap); } -gpointer art_alloc(gsize size) +gpointer art_alloc (gsize size) { - return malloc(size); + return malloc (size); } -void art_free(gpointer ptr) +void art_free (gpointer ptr) { - free(ptr); + free (ptr); } -gpointer art_realloc(gpointer ptr, gsize size) +gpointer art_realloc (gpointer ptr, gsize size) { - return realloc(ptr, size); + return realloc (ptr, size); } diff --git a/libart_lgpl/art_misc.h b/libart_lgpl/art_misc.h index de91432c5a..a124413e70 100644 --- a/libart_lgpl/art_misc.h +++ b/libart_lgpl/art_misc.h @@ -29,9 +29,9 @@ #ifdef __cplusplus extern "C" { #endif -gpointer art_alloc(gsize size); -void art_free(gpointer ptr); -gpointer art_realloc(gpointer ptr, gsize size); +gpointer art_alloc (gsize size); +void art_free (gpointer ptr); +gpointer art_realloc (gpointer ptr, gsize size); #ifdef __cplusplus } #endif /* __cplusplus */ @@ -47,7 +47,7 @@ gpointer art_realloc(gpointer ptr, gsize size); be variables. They can also be pstruct->el lvalues. */ #define art_expand(p, type, max) \ do { if (max) { p = art_renew (p, type, max <<= 1); } \ - else { max = 1; p = art_new(type, 1); } } while (0) + else { max = 1; p = art_new (type, 1); } } while (0) typedef gint art_boolean; #define ART_FALSE 0 diff --git a/libart_lgpl/art_rect_svp.c b/libart_lgpl/art_rect_svp.c index 5d92100179..0c4d39643e 100644 --- a/libart_lgpl/art_rect_svp.c +++ b/libart_lgpl/art_rect_svp.c @@ -65,7 +65,7 @@ art_drect_svp (ArtDRect *bbox, const ArtSVP *svp) } /** - * art_drect_svp_union: Compute the bounding box of the svp and union it in to the existing bounding box. + * art_drect_svp_union: * @bbox: Initial boundin box and where to store the bounding box. * @svp: The SVP. * diff --git a/libart_lgpl/art_rect_uta.c b/libart_lgpl/art_rect_uta.c index e7d1c77a5c..9a2f0c8ce9 100644 --- a/libart_lgpl/art_rect_uta.c +++ b/libart_lgpl/art_rect_uta.c @@ -77,24 +77,24 @@ art_rect_list_from_uta (ArtUta *uta, gint max_width, gint max_height, bb = utiles[ix]; if (bb) { - x0 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X0(bb); - y0 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y0(bb); - y1 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y1(bb); + x0 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X0 (bb); + y0 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y0 (bb); + y1 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y1 (bb); left_ix = ix; /* now try to extend to the right */ while (x != width - 1 && - ART_UTA_BBOX_X1(bb) == ART_UTILE_SIZE && + ART_UTA_BBOX_X1 (bb) == ART_UTILE_SIZE && (((bb & 0xffffff) ^ utiles[ix + 1]) & 0xffff00ff) == 0 && (((uta->x0 + x + 1) << ART_UTILE_SHIFT) + - ART_UTA_BBOX_X1(utiles[ix + 1]) - + ART_UTA_BBOX_X1 (utiles[ix + 1]) - x0) <= max_width) { bb = utiles[ix + 1]; ix++; x++; } - x1 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X1(bb); + x1 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X1 (bb); /* if rectangle nonempty */ if ((x1 ^ x0) | (y1 ^ y0)) diff --git a/libart_lgpl/art_render.h b/libart_lgpl/art_render.h index e97d3bbddc..2f80368abd 100644 --- a/libart_lgpl/art_render.h +++ b/libart_lgpl/art_render.h @@ -97,7 +97,7 @@ struct _ArtMaskSource { ArtRenderCallback super; gint (*can_drive) (ArtMaskSource *self, ArtRender *render); /* For each mask source, ::prepare() is invoked if it is not - a driver, or ::invoke_driver() if it is. */ + a driver, or ::invoke_driver () if it is. */ void (*invoke_driver) (ArtMaskSource *self, ArtRender *render); void (*prepare) (ArtMaskSource *self, ArtRender *render, art_boolean first); }; diff --git a/libart_lgpl/art_svp_intersect.c b/libart_lgpl/art_svp_intersect.c index f79216c13a..1074d084d7 100644 --- a/libart_lgpl/art_svp_intersect.c +++ b/libart_lgpl/art_svp_intersect.c @@ -353,9 +353,9 @@ art_svp_writer_rewind_add_segment (ArtSvpWriter *self, gint wind_left, if (swr->n_segs_max == seg_num) { swr->n_segs_max <<= 1; - svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) + + svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) + (swr->n_segs_max - 1) * - sizeof(ArtSVPSeg)); + sizeof (ArtSVPSeg)); swr->svp = svp; swr->n_points_max = art_renew (swr->n_points_max, int, swr->n_segs_max); @@ -441,8 +441,8 @@ art_svp_writer_rewind_new (ArtWindRule rule) result->rule = rule; result->n_segs_max = 16; - result->svp = art_alloc (sizeof(ArtSVP) + - (result->n_segs_max - 1) * sizeof(ArtSVPSeg)); + result->svp = art_alloc (sizeof (ArtSVP) + + (result->n_segs_max - 1) * sizeof (ArtSVPSeg)); result->svp->n_segs = 0; result->n_points_max = art_new (int, result->n_segs_max); @@ -1625,7 +1625,7 @@ art_svp_intersector (const ArtSVP *in, ArtSvpWriter *out) ArtActiveSeg *seg = (ArtActiveSeg *)pri_point->user_data; #ifdef SANITYCHECK - art_svp_intersect_sanitycheck(ctx); + art_svp_intersect_sanitycheck (ctx); #endif if (ctx->y != pri_point->y) diff --git a/libart_lgpl/art_svp_ops.c b/libart_lgpl/art_svp_ops.c index 9c5d461bfd..72d360282a 100644 --- a/libart_lgpl/art_svp_ops.c +++ b/libart_lgpl/art_svp_ops.c @@ -57,9 +57,9 @@ art_svp_merge (const ArtSVP *svp1, const ArtSVP *svp2) gint ix; gint ix1, ix2; - svp_new = (ArtSVP *)art_alloc (sizeof(ArtSVP) + + svp_new = (ArtSVP *)art_alloc (sizeof (ArtSVP) + (svp1->n_segs + svp2->n_segs - 1) * - sizeof(ArtSVPSeg)); + sizeof (ArtSVPSeg)); ix1 = 0; ix2 = 0; for (ix = 0; ix < svp1->n_segs + svp2->n_segs; ix++) diff --git a/libart_lgpl/art_svp_render_aa.c b/libart_lgpl/art_svp_render_aa.c index e9ca3c9ba5..26f06e0ac8 100644 --- a/libart_lgpl/art_svp_render_aa.c +++ b/libart_lgpl/art_svp_render_aa.c @@ -176,7 +176,7 @@ art_svp_render_aa_iter (const ArtSVP *svp, if (sx < n_steps) \ { \ memmove (&steps[sx + 1], &steps[sx], \ - (n_steps - sx) * sizeof(steps[0])); \ + (n_steps - sx) * sizeof (steps[0])); \ steps[sx].x = xpos; \ steps[sx].delta = xdelta; \ n_steps++; \ @@ -289,13 +289,13 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start, /* case 1, antialias a single pixel */ xdelta = (ix_min + 1 - (x_min + x_max) * 0.5) * delta; - ADD_STEP(ix_min, xdelta) + ADD_STEP (ix_min, xdelta) if (ix_min + 1 < x1) { xdelta = delta - xdelta; - ADD_STEP(ix_min + 1, xdelta) + ADD_STEP (ix_min + 1, xdelta) } } else @@ -309,7 +309,7 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start, xdelta = last; if (ix_min >= x0) { - ADD_STEP(ix_min, xdelta) + ADD_STEP (ix_min, xdelta) x = ix_min + 1; } @@ -327,7 +327,7 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start, xdelta = this - last; last = this; - ADD_STEP(x, xdelta) + ADD_STEP (x, xdelta) } if (x < x1) { @@ -338,13 +338,13 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start, xdelta = this - last; last = this; - ADD_STEP(x, xdelta) + ADD_STEP (x, xdelta) if (x + 1 < x1) { xdelta = delta - last; - ADD_STEP(x + 1, xdelta) + ADD_STEP (x + 1, xdelta) } } } diff --git a/libart_lgpl/art_svp_vpath.c b/libart_lgpl/art_svp_vpath.c index 47b1931140..b75bbea6f7 100644 --- a/libart_lgpl/art_svp_vpath.c +++ b/libart_lgpl/art_svp_vpath.c @@ -77,8 +77,8 @@ art_svp_from_vpath (ArtVpath *vpath) n_segs = 0; n_segs_max = 16; - svp = (ArtSVP *)art_alloc (sizeof(ArtSVP) + - (n_segs_max - 1) * sizeof(ArtSVPSeg)); + svp = (ArtSVP *)art_alloc (sizeof (ArtSVP) + + (n_segs_max - 1) * sizeof (ArtSVPSeg)); dir = 0; n_points = 0; @@ -98,9 +98,9 @@ art_svp_from_vpath (ArtVpath *vpath) if (n_segs == n_segs_max) { n_segs_max <<= 1; - svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) + + svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) + (n_segs_max - 1) * - sizeof(ArtSVPSeg)); + sizeof (ArtSVPSeg)); } svp->segs[n_segs].n_points = n_points; svp->segs[n_segs].dir = (dir > 0); @@ -140,9 +140,9 @@ art_svp_from_vpath (ArtVpath *vpath) if (n_segs == n_segs_max) { n_segs_max <<= 1; - svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) + + svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) + (n_segs_max - 1) * - sizeof(ArtSVPSeg)); + sizeof (ArtSVPSeg)); } svp->segs[n_segs].n_points = n_points; svp->segs[n_segs].dir = (dir > 0); @@ -186,9 +186,9 @@ art_svp_from_vpath (ArtVpath *vpath) if (n_segs == n_segs_max) { n_segs_max <<= 1; - svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) + + svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) + (n_segs_max - 1) * - sizeof(ArtSVPSeg)); + sizeof (ArtSVPSeg)); } svp->segs[n_segs].n_points = n_points; svp->segs[n_segs].dir = (dir > 0); diff --git a/libart_lgpl/art_uta.c b/libart_lgpl/art_uta.c index 4396e2b6c6..138fd8b30c 100644 --- a/libart_lgpl/art_uta.c +++ b/libart_lgpl/art_uta.c @@ -48,7 +48,7 @@ art_uta_new (gint x0, gint y0, gint x1, gint y1) uta->utiles = art_new (ArtUtaBbox, uta->width * uta->height); - memset (uta->utiles, 0, uta->width * uta->height * sizeof(ArtUtaBbox)); + memset (uta->utiles, 0, uta->width * uta->height * sizeof (ArtUtaBbox)); return uta; } diff --git a/libart_lgpl/art_uta_vpath.c b/libart_lgpl/art_uta_vpath.c index 9d5af1e844..841b9614d2 100644 --- a/libart_lgpl/art_uta_vpath.c +++ b/libart_lgpl/art_uta_vpath.c @@ -69,12 +69,12 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1, gint ix, ix1; ArtUtaBbox bb; - xmin = floor (MIN(x0, x1)); - xmax = MAX(x0, x1); + xmin = floor (MIN (x0, x1)); + xmax = MAX (x0, x1); xmaxf = floor (xmax); xmaxc = ceil (xmax); - ymin = floor (MIN(y0, y1)); - ymax = MAX(y0, y1); + ymin = floor (MIN (y0, y1)); + ymax = MAX (y0, y1); ymaxf = floor (ymax); ymaxc = ceil (ymax); xt0 = (xmin >> ART_UTILE_SHIFT) - uta->x0; @@ -92,12 +92,12 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1, ix = yt0 * uta->width + xt0; bb = uta->utiles[ix]; if (bb == 0) - bb = ART_UTA_BBOX_CONS(xf0, yf0, xf1, yf1); + bb = ART_UTA_BBOX_CONS (xf0, yf0, xf1, yf1); else - bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0), - MIN(ART_UTA_BBOX_Y0(bb), yf0), - MAX(ART_UTA_BBOX_X1(bb), xf1), - MAX(ART_UTA_BBOX_Y1(bb), yf1)); + bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0), + MIN (ART_UTA_BBOX_Y0 (bb), yf0), + MAX (ART_UTA_BBOX_X1 (bb), xf1), + MAX (ART_UTA_BBOX_Y1 (bb), yf1)); uta->utiles[ix] = bb; } else @@ -123,24 +123,24 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1, { bb = uta->utiles[ix]; if (bb == 0) - bb = ART_UTA_BBOX_CONS(xf0, yf0, ART_UTILE_SIZE, yf1); + bb = ART_UTA_BBOX_CONS (xf0, yf0, ART_UTILE_SIZE, yf1); else - bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0), - MIN(ART_UTA_BBOX_Y0(bb), yf0), + bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0), + MIN (ART_UTA_BBOX_Y0 (bb), yf0), ART_UTILE_SIZE, - MAX(ART_UTA_BBOX_Y1(bb), yf1)); + MAX (ART_UTA_BBOX_Y1 (bb), yf1)); uta->utiles[ix] = bb; xf0 = 0; ix++; } bb = uta->utiles[ix]; if (bb == 0) - bb = ART_UTA_BBOX_CONS(0, yf0, xf1, yf1); + bb = ART_UTA_BBOX_CONS (0, yf0, xf1, yf1); else - bb = ART_UTA_BBOX_CONS(0, - MIN(ART_UTA_BBOX_Y0(bb), yf0), - MAX(ART_UTA_BBOX_X1(bb), xf1), - MAX(ART_UTA_BBOX_Y1(bb), yf1)); + bb = ART_UTA_BBOX_CONS (0, + MIN (ART_UTA_BBOX_Y0 (bb), yf0), + MAX (ART_UTA_BBOX_X1 (bb), xf1), + MAX (ART_UTA_BBOX_Y1 (bb), yf1)); uta->utiles[ix] = bb; } else @@ -225,8 +225,8 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1, { /* vertical crossing */ dix = uta->width; - xf0 = (gint)floor (MIN(x, xn)) & (ART_UTILE_SIZE - 1); - xmax = MAX(x, xn); + xf0 = (gint)floor (MIN (x, xn)) & (ART_UTILE_SIZE - 1); + xmax = MAX (x, xn); xmaxc = (gint)ceil (xmax); xf1 = xmaxc - (xt0 << ART_UTILE_SHIFT); yf1 = ART_UTILE_SIZE; @@ -239,33 +239,33 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1, yf0 = (gint)floor (y) & (ART_UTILE_SIZE - 1); bb = uta->utiles[ix]; if (bb == 0) - bb = ART_UTA_BBOX_CONS(xf0, yf0, xf1, yf1); + bb = ART_UTA_BBOX_CONS (xf0, yf0, xf1, yf1); else - bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0), - MIN(ART_UTA_BBOX_Y0(bb), yf0), - MAX(ART_UTA_BBOX_X1(bb), xf1), - MAX(ART_UTA_BBOX_Y1(bb), yf1)); + bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0), + MIN (ART_UTA_BBOX_Y0 (bb), yf0), + MAX (ART_UTA_BBOX_X1 (bb), xf1), + MAX (ART_UTA_BBOX_Y1 (bb), yf1)); uta->utiles[ix] = bb; x = xn; y = yn; ix += dix; } - xmax = MAX(x, x1); + xmax = MAX (x, x1); xmaxc = ceil (xmax); ymaxc = ceil (y1); - xf0 = (gint)floor (MIN(x1, x)) & (ART_UTILE_SIZE - 1); + xf0 = (gint)floor (MIN (x1, x)) & (ART_UTILE_SIZE - 1); yf0 = (gint)floor (y) & (ART_UTILE_SIZE - 1); xf1 = xmaxc - (xt0 << ART_UTILE_SHIFT); yf1 = ymaxc - (yt0 << ART_UTILE_SHIFT); bb = uta->utiles[ix]; if (bb == 0) - bb = ART_UTA_BBOX_CONS(xf0, yf0, xf1, yf1); + bb = ART_UTA_BBOX_CONS (xf0, yf0, xf1, yf1); else - bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0), - MIN(ART_UTA_BBOX_Y0(bb), yf0), - MAX(ART_UTA_BBOX_X1(bb), xf1), - MAX(ART_UTA_BBOX_Y1(bb), yf1)); + bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0), + MIN (ART_UTA_BBOX_Y0 (bb), yf0), + MAX (ART_UTA_BBOX_X1 (bb), xf1), + MAX (ART_UTA_BBOX_Y1 (bb), yf1)); uta->utiles[ix] = bb; } } diff --git a/libart_lgpl/art_vpath_bpath.c b/libart_lgpl/art_vpath_bpath.c index a748dfbec5..b662051e85 100644 --- a/libart_lgpl/art_vpath_bpath.c +++ b/libart_lgpl/art_vpath_bpath.c @@ -160,8 +160,8 @@ art_vpath_render_bez (ArtVpath **p_vpath, gint *pn, gint *pn_max, * the other two control points are the same as the start point, * too. */ - if (hypot(x1 - x0, y1 - y0) < 0.001 - && hypot(x2 - x0, y2 - y0) < 0.001) + if (hypot (x1 - x0, y1 - y0) < 0.001 + && hypot (x2 - x0, y2 - y0) < 0.001) goto nosubdivide; else goto subdivide; |