You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-games/crystalspace/files/crystalspace-1.4.0-png15.patch

57 lines
1.7 KiB

--- plugins/video/loader/png/pngimage.cpp.old 2011-09-09 10:39:57.218570796 +0200
+++ plugins/video/loader/png/pngimage.cpp 2011-09-09 10:46:45.733522309 +0200
@@ -60,7 +60,7 @@
static void png_write (png_structp png, png_bytep data, png_size_t length)
{
- datastore *ds = (datastore *)png->io_ptr;
+ datastore *ds = (datastore *)png_get_io_ptr(png);
if (ds->pos + (long)length > ds->length)
{
ds->data = (unsigned char*)cs_realloc (ds->data, ds->pos + (long)length);
@@ -173,7 +173,7 @@
}
/* Catch processing errors */
- if (setjmp(png->jmpbuf))
+ if (setjmp(png_jmpbuf(png)))
{
/* If we get here, we had a problem reading the file */
png_destroy_write_struct (&png, &info);
@@ -355,7 +355,7 @@
void ImagePngFile::PngLoader::ImagePngRead (png_structp png, png_bytep data,
png_size_t size)
{
- ImagePngRawData *self = (ImagePngRawData *) png->io_ptr;
+ ImagePngRawData *self = (ImagePngRawData *) png_get_io_ptr(png);
if (self->r_size < size)
png_error (png, "Read Error");
@@ -394,7 +394,7 @@
return false;
}
- if (setjmp (png->jmpbuf))
+ if (setjmp (png_jmpbuf(png)))
{
nomem2:
// If we get here, we had a problem reading the file
@@ -524,7 +524,7 @@
{
size_t rowbytes, exp_rowbytes;
- if (setjmp (png->jmpbuf))
+ if (setjmp (png_jmpbuf(png)))
{
nomem2:
// If we get here, we had a problem reading the file
@@ -560,7 +560,7 @@
png_bytep * const row_pointers = new png_bytep[Height];
- if (setjmp (png->jmpbuf)) // Set a new exception handler
+ if (setjmp (png_jmpbuf(png))) // Set a new exception handler
{
delete [] row_pointers;
goto nomem2;