cvs: php-src(PHP_5_1) /ext/gd/libgd gd_gif_in.c

From: Date: Wed, 13 Sep 2006 12:20:59 +0000
Subject: cvs: php-src(PHP_5_1) /ext/gd/libgd gd_gif_in.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-40477@lists.php.net to get a copy of this message
pajoye Wed Sep 13 12:20:59 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/gd/libgd gd_gif_in.c Log: - #38801, bug #38112 was not MFH'ed correctly (or reintroduced) - sync (sorry for the WS/cosmetic changes, but easier) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.5.4.5&r2=1.5.4.6&diff_format=u Index: php-src/ext/gd/libgd/gd_gif_in.c diff -u php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.5 php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.6 --- php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.5 Thu Aug 10 18:34:22 2006 +++ php-src/ext/gd/libgd/gd_gif_in.c Wed Sep 13 12:20:59 2006 @@ -78,7 +78,7 @@ int ZeroDataBlock; -gdImagePtr gdImageCreateFromGifSource(gdSourcePtr inSource) +gdImagePtr gdImageCreateFromGifSource(gdSourcePtr inSource) /* {{{ */ { gdIOCtx *in = gdNewSSCtx(inSource, NULL); gdImagePtr im; @@ -89,9 +89,9 @@ return im; } +/* }}} */ -gdImagePtr -gdImageCreateFromGif(FILE *fdFile) +gdImagePtr gdImageCreateFromGif(FILE *fdFile) /* {{{ */ { gdIOCtx *fd = gdNewFileCtx(fdFile); gdImagePtr im = 0; @@ -102,9 +102,9 @@ return im; } +/* }}} */ -gdImagePtr -gdImageCreateFromGifCtx(gdIOCtxPtr fd) +gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ { /* 1.4 int imageNumber; */ int BitPixel; @@ -185,15 +185,18 @@ bitPixel = 1<<((buf[8]&0x07)+1); + if (!useGlobalColormap) { + if (ReadColorMap(fd, bitPixel, localColorMap)) { + return 0; + } + } + if (!(im = gdImageCreate(imw, imh))) { return 0; } im->interlace = BitSet(buf[8], INTERLACE); if (! useGlobalColormap) { - if (ReadColorMap(fd, bitPixel, localColorMap)) { - return 0; - } ReadImage(im, fd, imw, imh, localColorMap, BitSet(buf[8], INTERLACE)); /*1.4//imageCount != imageNumber); */ @@ -230,9 +233,9 @@ } return im; } +/* }}} */ -static int -ReadColorMap(gdIOCtx *fd, int number, unsigned char (*buffer)[256]) +static int ReadColorMap(gdIOCtx *fd, int number, unsigned char (*buffer)[256]) /* {{{ */ { int i; unsigned char rgb[3]; @@ -250,9 +253,9 @@ return FALSE; } +/* }}} */ -static int -DoExtension(gdIOCtx *fd, int label, int *Transparent) +static int DoExtension(gdIOCtx *fd, int label, int *Transparent) /* {{{ */ { static unsigned char buf[256]; @@ -276,9 +279,9 @@ return FALSE; } +/* }}} */ -static int -GetDataBlock_(gdIOCtx *fd, unsigned char *buf) +static int GetDataBlock_(gdIOCtx *fd, unsigned char *buf) /* {{{ */ { unsigned char count; @@ -294,9 +297,9 @@ return count; } +/* }}} */ -static int -GetDataBlock(gdIOCtx *fd, unsigned char *buf) +static int GetDataBlock(gdIOCtx *fd, unsigned char *buf) /* {{{ */ { int rv; int i; @@ -317,9 +320,9 @@ } return(rv); } +/* }}} */ -static int -GetCode_(gdIOCtx *fd, int code_size, int flag) +static int GetCode_(gdIOCtx *fd, int code_size, int flag) /* {{{ */ { static unsigned char buf[280]; static int curbit, lastbit, done, last_byte; @@ -359,8 +362,7 @@ return ret; } -static int -GetCode(gdIOCtx *fd, int code_size, int flag) +static int GetCode(gdIOCtx *fd, int code_size, int flag) /* {{{ */ { int rv; @@ -368,10 +370,10 @@ if (VERBOSE) php_gd_error_ex(E_NOTICE, "[GetCode(,%d,%d) returning %d]",code_size,flag,rv); return(rv); } +/* }}} */ #define STACK_SIZE ((1<<(MAX_LWZ_BITS))*2) -static int -LWZReadByte_(gdIOCtx *fd, int flag, int input_code_size) +static int LWZReadByte_(gdIOCtx *fd, int flag, int input_code_size) /* {{{ */ { static int fresh = FALSE; int code, incode; @@ -490,9 +492,9 @@ } return code; } +/* }}} */ -static int -LWZReadByte(gdIOCtx *fd, int flag, int input_code_size) +static int LWZReadByte(gdIOCtx *fd, int flag, int input_code_size) /* {{{ */ { int rv; @@ -500,9 +502,9 @@ if (VERBOSE) php_gd_error_ex(E_NOTICE, "[LWZReadByte(,%d,%d) returning %d]",flag,input_code_size,rv); return(rv); } +/* }}} */ -static void -ReadImage(gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlace) /*1.4//, int ignore) */ +static void ReadImage(gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlace) /* {{{ */ /*1.4//, int ignore) */ { unsigned char c; int v; @@ -590,4 +592,4 @@ /* Ignore extra */ } } - +/* }}} */

« previous php.cvs (#40477) next »