"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gd_io_dp.c" between
libgd-2.2.4.tar.gz and libgd-2.2.5.tar.gz

About: LibGD is a library for the dynamic creation of images by programmers (PNG, JPEG, GIF, WebP, XPM, BMP support).

gd_io_dp.c  (libgd-2.2.4):gd_io_dp.c  (libgd-2.2.5)
skipping to change at line 183 skipping to change at line 183
dctx = (dpIOCtx *)ctx; dctx = (dpIOCtx *)ctx;
return (dctx->dp->pos); return (dctx->dp->pos);
} }
static int dynamicSeek(struct gdIOCtx *ctx, const int pos) static int dynamicSeek(struct gdIOCtx *ctx, const int pos)
{ {
int bytesNeeded; int bytesNeeded;
dynamicPtr *dp; dynamicPtr *dp;
dpIOCtx *dctx; dpIOCtx *dctx;
if (pos < 0) {
return FALSE;
}
dctx = (dpIOCtx *)ctx; dctx = (dpIOCtx *)ctx;
dp = dctx->dp; dp = dctx->dp;
if(!dp->dataGood) { if(!dp->dataGood) {
return FALSE; return FALSE;
} }
bytesNeeded = pos; bytesNeeded = pos;
if(bytesNeeded > dp->realSize) { if(bytesNeeded > dp->realSize) {
/* 2.0.21 */ /* 2.0.21 */
skipping to change at line 295 skipping to change at line 298
return 0; return 0;
} }
rlen = remain; rlen = remain;
} }
if (dp->pos + rlen > dp->realSize) { if (dp->pos + rlen > dp->realSize) {
rlen = dp->realSize - dp->pos; rlen = dp->realSize - dp->pos;
} }
if (rlen < 0) {
return 0;
}
memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen); memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen);
dp->pos += rlen; dp->pos += rlen;
return rlen; return rlen;
} }
static int dynamicGetchar(gdIOCtxPtr ctx) static int dynamicGetchar(gdIOCtxPtr ctx)
{ {
unsigned char b; unsigned char b;
int rv; int rv;
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)