diff options
author | Stanislav Malyshev <stas@php.net> | 2015-01-03 01:22:58 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-01-10 15:07:38 -0800 |
commit | b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc (patch) | |
tree | 0e09490075ee4f9a75a77ef4168d8ee254c52e5b /ext/gd | |
parent | 773c8b0c092a0e9ad5c5548815bcb9991d54d5c1 (diff) | |
download | php-git-b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc.tar.gz |
trailing whitespace removal
Diffstat (limited to 'ext/gd')
-rw-r--r-- | ext/gd/gd.c | 18 | ||||
-rw-r--r-- | ext/gd/gd_ctx.c | 8 | ||||
-rw-r--r-- | ext/gd/gdcache.c | 2 | ||||
-rw-r--r-- | ext/gd/libgd/gd.c | 18 | ||||
-rw-r--r-- | ext/gd/libgd/gd.h | 2 | ||||
-rw-r--r-- | ext/gd/libgd/gd_gif_in.c | 8 | ||||
-rw-r--r-- | ext/gd/libgd/gd_gif_out.c | 6 | ||||
-rw-r--r-- | ext/gd/libgd/gd_interpolation.c | 10 | ||||
-rw-r--r-- | ext/gd/libgd/gd_jpeg.c | 4 | ||||
-rw-r--r-- | ext/gd/libgd/gd_topal.c | 12 | ||||
-rw-r--r-- | ext/gd/libgd/gdft.c | 2 | ||||
-rw-r--r-- | ext/gd/libgd/gdhelpers.h | 2 | ||||
-rw-r--r-- | ext/gd/libgd/webpimg.c | 2 |
13 files changed, 47 insertions, 47 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 5a88acdb4a..3454bd2127 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -96,7 +96,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int, int); #include "gd_ctx.c" -/* as it is not really public, duplicate declaration here to avoid +/* as it is not really public, duplicate declaration here to avoid pointless warnings */ int overflow2(int a, int b); @@ -1180,7 +1180,7 @@ PHP_MINIT_FUNCTION(gd) REGISTER_LONG_CONSTANT("IMG_CROP_SIDES", GD_CROP_SIDES, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_CROP_THRESHOLD", GD_CROP_THRESHOLD, CONST_CS | CONST_PERSISTENT); - + REGISTER_LONG_CONSTANT("IMG_BELL", GD_BELL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_BESSEL", GD_BESSEL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_BILINEAR_FIXED", GD_BILINEAR_FIXED, CONST_CS | CONST_PERSISTENT); @@ -1732,7 +1732,7 @@ PHP_FUNCTION(imagefilledarc) zend_long cx, cy, w, h, ST, E, col, style; gdImagePtr im; int e, st; - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col, &style) == FAILURE) { return; } @@ -1973,7 +1973,7 @@ PHP_FUNCTION(imagegrabwindow) if ( handle == 0 ) { goto clean; } - pPrintWindow = (tPrintWindow) GetProcAddress(handle, "PrintWindow"); + pPrintWindow = (tPrintWindow) GetProcAddress(handle, "PrintWindow"); if ( pPrintWindow ) { pPrintWindow(window, memDC, (UINT) client_area); @@ -3846,7 +3846,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int #endif /* VIRTUAL_DIR */ PHP_GD_CHECK_OPEN_BASEDIR(fontname, "Invalid font filename"); - + #ifdef HAVE_GD_FREETYPE if (extended) { error = gdImageStringFTEx(im, brect, col, fontname, ptsize, angle, x, y, str, &strex); @@ -4244,11 +4244,11 @@ PHP_FUNCTION(imagepsbbox) if (argc != 3 && argc != 6) { ZEND_WRONG_PARAM_COUNT(); } - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "srl|lld", &str, &str_len, &fnt, &sz, &sp, &wd, &angle) == FAILURE) { return; } - + if (argc == 6) { space = sp; add_width = wd; @@ -4425,7 +4425,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) #ifdef HAVE_GD_JPG zend_long ignore_warning; #endif - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "pplll", &f_org, &f_org_len, &f_dest, &f_dest_len, &height, &width, &threshold) == FAILURE) { return; } @@ -5210,7 +5210,7 @@ PHP_FUNCTION(imageaffinematrixget) php_error_docref(NULL, E_WARNING, "Missing y position"); RETURN_FALSE; } - + if (type == GD_AFFINE_TRANSLATE) { res = gdAffineTranslate(affine, x, y); } else { diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 0d4a25b13c..9e3d61f8ff 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -93,10 +93,10 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } } else { /* PHP_GDIMG_TYPE_GIF - * PHP_GDIMG_TYPE_PNG - * PHP_GDIMG_TYPE_JPG - * PHP_GDIMG_TYPE_WBM - * PHP_GDIMG_TYPE_WEBP + * PHP_GDIMG_TYPE_PNG + * PHP_GDIMG_TYPE_JPG + * PHP_GDIMG_TYPE_WBM + * PHP_GDIMG_TYPE_WEBP * */ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z/!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) { return; diff --git a/ext/gd/gdcache.c b/ext/gd/gdcache.c index 2af6737f74..e6f9ce1b44 100644 --- a/ext/gd/gdcache.c +++ b/ext/gd/gdcache.c @@ -97,7 +97,7 @@ gdCacheGet( gdCache_head_t *head, void *keydata ) elem = head->mru; if (elem == NULL) { return NULL; - + } while(elem) { diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 10303032a1..3164a2cc9e 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1096,12 +1096,12 @@ void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) int thick = im->thick; if (color == gdAntiAliased) { - /* + /* gdAntiAliased passed as color: use the much faster, much cheaper and equally attractive gdImageAALine implementation. That clips too, so don't clip twice. */ - gdImageAALine(im, x1, y1, x2, y2, im->AA_color); + gdImageAALine(im, x1, y1, x2, y2, im->AA_color); return; } @@ -1874,7 +1874,7 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) return; } - alphablending_bak = im->alphaBlendingFlag; + alphablending_bak = im->alphaBlendingFlag; im->alphaBlendingFlag = 0; if (nc==gdTiled){ @@ -1886,7 +1886,7 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) wx2=im->sx;wy2=im->sy; oc = gdImageGetPixel(im, x, y); if (oc==nc || x<0 || x>wx2 || y<0 || y>wy2) { - im->alphaBlendingFlag = alphablending_bak; + im->alphaBlendingFlag = alphablending_bak; return; } @@ -1949,7 +1949,7 @@ skip: for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++); efree(stack); done: - im->alphaBlendingFlag = alphablending_bak; + im->alphaBlendingFlag = alphablending_bak; } static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) @@ -2055,7 +2055,7 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) x1ul = x1 - half; y1ul = y1 - half; - + x2lr = x2 + half; y2lr = y2 + half; @@ -2253,7 +2253,7 @@ void gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int s int tox, toy; int ncR, ncG, ncB; toy = dstY; - + for (y = srcY; y < (srcY + h); y++) { tox = dstX; for (x = srcX; x < (srcX + w); x++) { @@ -2350,7 +2350,7 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int int colorMap[gdMaxColors]; /* Stretch vectors */ int *stx, *sty; - + if (overflow2(sizeof(int), srcW)) { return; } @@ -2895,7 +2895,7 @@ int gdAlphaBlend (int dst, int src) { src_weight = gdAlphaTransparent - src_alpha; dst_weight = (gdAlphaTransparent - dst_alpha) * src_alpha / gdAlphaMax; tot_weight = src_weight + dst_weight; - + /* -------------------------------------------------------------------- */ /* What red, green and blue result values will we use? */ /* -------------------------------------------------------------------- */ diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index 0ace31ba03..2eb4fd8e1c 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -112,7 +112,7 @@ int gdAlphaBlend(int dest, int src); * GD_BELL - Bell * GD_BESSEL - Bessel - * GD_BILINEAR_FIXED - fixed point bilinear + * GD_BILINEAR_FIXED - fixed point bilinear * GD_BICUBIC - Bicubic * GD_BICUBIC_FIXED - fixed point bicubic integer * GD_BLACKMAN - Blackman diff --git a/ext/gd/libgd/gd_gif_in.c b/ext/gd/libgd/gd_gif_in.c index f41ec8460a..74b7493331 100644 --- a/ext/gd/libgd/gd_gif_in.c +++ b/ext/gd/libgd/gd_gif_in.c @@ -232,11 +232,11 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ } im->interlace = BitSet(buf[8], INTERLACE); if (!useGlobalColormap) { - if (ReadColorMap(fd, bitPixel, localColorMap)) { + if (ReadColorMap(fd, bitPixel, localColorMap)) { gdImageDestroy(im); return 0; } - ReadImage(im, fd, width, height, localColorMap, + ReadImage(im, fd, width, height, localColorMap, BitSet(buf[8], INTERLACE), &ZeroDataBlock); } else { if (!haveGlobalColormap) { @@ -244,7 +244,7 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ return 0; } ReadImage(im, fd, width, height, - ColorMap, + ColorMap, BitSet(buf[8], INTERLACE), &ZeroDataBlock); } if (Transparent != (-1)) { @@ -567,7 +567,7 @@ ReadImage(gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap) } if (c > MAX_LWZ_BITS) { - return; + return; } /* Stash the color map into the image */ diff --git a/ext/gd/libgd/gd_gif_out.c b/ext/gd/libgd/gd_gif_out.c index 14045385ab..f094f46d41 100644 --- a/ext/gd/libgd/gd_gif_out.c +++ b/ext/gd/libgd/gd_gif_out.c @@ -45,7 +45,7 @@ typedef long int count_int; #define maxmaxcode ((code_int)1 << GIFBITS) #define HSIZE 5003 /* 80% occupancy */ -#define hsize HSIZE /* Apparently invariant, left over from +#define hsize HSIZE /* Apparently invariant, left over from compress */ typedef struct { @@ -127,7 +127,7 @@ void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) if (!pim) { return; } - tim = pim; + tim = pim; } BitsPerPixel = colorstobpp(tim->colorsTotal); /* All set, let's do it. */ @@ -676,7 +676,7 @@ cl_block (GifCtx *ctx) /* table clear for block compress */ static void cl_hash(register count_int chsize, GifCtx *ctx) /* reset code table */ - + { register count_int *htab_p = ctx->htab+chsize; diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index c1bf061e0b..ed2fc188f9 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -41,8 +41,8 @@ downscaling using the fixed point implementations are usually much faster than the existing gdImageCopyResampled while having a similar or better quality. - - For image rotations, the optimized versions have a lazy antialiasing for + + For image rotations, the optimized versions have a lazy antialiasing for the edges of the images. For a much better antialiased result, the affine function is recommended. */ @@ -635,7 +635,7 @@ static inline int _color_blend (const int dst, const int src) } } -static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor) +static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor) { const gdFixed f_127 = gd_itofx(127); register int c = src->tpixels[y][x]; @@ -2276,7 +2276,7 @@ int gdTransformAffineGetImage(gdImagePtr *dst, if (!src->trueColor) { gdImagePaletteToTrueColor(src); } - + /* Translate to dst origin (0,0) */ gdAffineTranslate(m, -bbox.x, -bbox.y); gdAffineConcat(m, affine, m); @@ -2335,7 +2335,7 @@ int gdTransformAffineCopy(gdImagePtr dst, if (src->interpolation_id == GD_BILINEAR_FIXED || src->interpolation_id == GD_BICUBIC_FIXED || src->interpolation_id == GD_NEAREST_NEIGHBOUR) { interpolation_id_bak = src->interpolation_id; interpolation_bak = src->interpolation; - + gdImageSetInterpolationMethod(src, GD_BICUBIC); } diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c index 7189c28b58..f239ef8acd 100644 --- a/ext/gd/libgd/gd_jpeg.c +++ b/ext/gd/libgd/gd_jpeg.c @@ -468,7 +468,7 @@ gdImagePtr gdImageCreateFromJpegCtxEx (gdIOCtx * infile, int ignore_warning) *tpix = gdTrueColor (currow[0], currow[1], currow[2]); } } - } + } if (jpeg_finish_decompress (&cinfo) != TRUE) { php_gd_error("gd-jpeg: warning: jpeg_finish_decompress reports suspended data source"); @@ -478,7 +478,7 @@ gdImagePtr gdImageCreateFromJpegCtxEx (gdIOCtx * infile, int ignore_warning) goto error; } } - + jpeg_destroy_decompress (&cinfo); gdFree (row); diff --git a/ext/gd/libgd/gd_topal.c b/ext/gd/libgd/gd_topal.c index b9cb928648..0206860f05 100644 --- a/ext/gd/libgd/gd_topal.c +++ b/ext/gd/libgd/gd_topal.c @@ -43,7 +43,7 @@ * If it is not working, it's not Thomas G. Lane's fault. */ -/* +/* SETTING THIS ONE CAUSES STRIPED IMAGE to be done: solve this #define ORIGINAL_LIB_JPEG_REVERSE_ODD_ROWS @@ -152,7 +152,7 @@ * color space, and repeatedly splits the "largest" remaining box until we * have as many boxes as desired colors. Then the mean color in each * remaining box becomes one of the possible output colors. - * + * * The second pass over the image maps each input pixel to the closest output * color (optionally after applying a Floyd-Steinberg dithering correction). * This mapping is logically trivial, but making it go fast enough requires @@ -1320,9 +1320,9 @@ pass2_no_dither (j_decompress_ptr cinfo, #else r = gdTrueColorGetRed (*inptr); g = gdTrueColorGetGreen (*inptr); - /* + /* 2.0.24: inptr must not be incremented until after - transparency check, if any. Thanks to "Super Pikeman." + transparency check, if any. Thanks to "Super Pikeman." */ b = gdTrueColorGetBlue (*inptr); @@ -1795,7 +1795,7 @@ static void gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int color } } else { nim = oim; - } + } if (!oim->trueColor) { /* (Almost) nothing to do! */ @@ -2004,7 +2004,7 @@ static void gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int color } /* Success! Get rid of the truecolor image data. */ - if (!cimP) { + if (!cimP) { oim->trueColor = 0; /* Junk the truecolor pixels */ for (i = 0; i < oim->sy; i++) diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index c967de6ffb..d484b83e2e 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -338,7 +338,7 @@ static int fontTest (void *element, void *key) { font_t *a = (font_t *) element; fontkey_t *b = (fontkey_t *) key; - + if (strcmp (a->fontlist, b->fontlist) == 0) { switch (b->preferred_map) { case gdFTEX_Unicode: diff --git a/ext/gd/libgd/gdhelpers.h b/ext/gd/libgd/gdhelpers.h index 6c469726ec..768fde93b8 100644 --- a/ext/gd/libgd/gdhelpers.h +++ b/ext/gd/libgd/gdhelpers.h @@ -22,7 +22,7 @@ extern char *gd_strtok_r(char *s, char *sep, char **state); #define gdPEstrdup(ptr) pestrdup(ptr, 1) /* Returns nonzero if multiplying the two quantities will - result in integer overflow. Also returns nonzero if + result in integer overflow. Also returns nonzero if either quantity is negative. By Phil Knirsch based on netpbm fixes by Alan Cox. */ diff --git a/ext/gd/libgd/webpimg.c b/ext/gd/libgd/webpimg.c index 95a8081e05..1f1c02322e 100644 --- a/ext/gd/libgd/webpimg.c +++ b/ext/gd/libgd/webpimg.c @@ -547,7 +547,7 @@ void gd_RGBAToYUV420(gdImagePtr im2, if (!im2->trueColor) { /* Todo: Replace the color/YUV functions with our own and simplify - that should boost the conversion a bit as well, not only for + that should boost the conversion a bit as well, not only for palette image. */ im = gdImageCreateTrueColor(im2->sx, im2->sy); if (!im) { |