[mupen64plus] 169/262: Update fix_readpng.patch to use png_sig_cmp and minimize changes
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:59:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch master
in repository mupen64plus.
commit c3e740f9799a298f5f197375fd51f9c57d4f525d
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date: Mon Mar 15 16:10:02 2010 +0100
Update fix_readpng.patch to use png_sig_cmp and minimize changes
---
debian/changelog | 5 +--
debian/patches/fix_readpng.patch | 77 ++++++++++------------------------------
2 files changed, 22 insertions(+), 60 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 667e448..60d1ef2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,8 @@ mupen64plus (1.5+dfsg1-8) unstable; urgency=low
* debian/patches:
- Add rice_fog.patch, Reduce flickering when enabling fog in rice
- - Update fix_readpng.patch, Fix FTBFS with libpng14
+ - Update fix_readpng.patch, Fix FTBFS with libpng14 and remove coding style
+ only changes
* Convert to 3.0 (quilt) source format
* Remove outdated README.source
* debian/control:
@@ -13,7 +14,7 @@ mupen64plus (1.5+dfsg1-8) unstable; urgency=low
* debian/copyright: Update copyright years
* Check all files ever published on the download page in debian/watch
- -- Sven Eckelmann <sven.eckelmann at gmx.de> Wed, 10 Mar 2010 13:27:03 +0100
+ -- Sven Eckelmann <sven.eckelmann at gmx.de> Mon, 15 Mar 2010 16:22:03 +0100
mupen64plus (1.5+dfsg1-7) unstable; urgency=low
diff --git a/debian/patches/fix_readpng.patch b/debian/patches/fix_readpng.patch
index 650996f..9597ecb 100644
--- a/debian/patches/fix_readpng.patch
+++ b/debian/patches/fix_readpng.patch
@@ -10,7 +10,7 @@ Author: Richard Goedeken <Richard at fascinationsoftware.com>
---
diff --git a/rice_video/liblinux/bmp.c b/rice_video/liblinux/bmp.c
-index 13c66fdc427c6fc94bff5e3434a1067199d7353f..e1e821db0ec45854faff4c0710195b759b423741 100644
+index 13c66fdc427c6fc94bff5e3434a1067199d7353f..f941b2cff8d2a6731d2eca7d8493343ab74b9312 100644
--- a/rice_video/liblinux/bmp.c
+++ b/rice_video/liblinux/bmp.c
@@ -205,18 +205,18 @@ err_jmp:
@@ -35,36 +35,8 @@ index 13c66fdc427c6fc94bff5e3434a1067199d7353f..e1e821db0ec45854faff4c0710195b75
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
-@@ -224,17 +224,17 @@ BMGError WriteBMP( const char *filename,
- SetLastBMGError( BMG_OK );
-
- /* error handler */
-- error = setjmp( err_jmp );
-- if ( error != 0 )
-+ error = setjmp(err_jmp);
-+ if (error != 0)
- {
-- if ( file != NULL )
-- fclose( file );
-- if ( bits != NULL )
-- free( bits );
-- if ( pColor != NULL )
-- free( pColor );
-- SetLastBMGError( (BMGError)error );
-- return (BMGError)error;
-+ if (file != NULL)
-+ fclose(file);
-+ if (bits != NULL)
-+ free(bits);
-+ if (pColor != NULL)
-+ free(pColor);
-+ SetLastBMGError((BMGError)error);
-+ return (BMGError) error;
- }
-
- if ( img.bits == NULL )
diff --git a/rice_video/liblinux/pngrw.c b/rice_video/liblinux/pngrw.c
-index 673741adbc1d75499100624572a6512fdefd39dc..c13e5d4f410163635d307503acbc13ff6899c2a0 100644
+index 673741adbc1d75499100624572a6512fdefd39dc..8a103e7aefd10c50c542727310b6efe82c8fda2f 100644
--- a/rice_video/liblinux/pngrw.c
+++ b/rice_video/liblinux/pngrw.c
@@ -94,12 +94,12 @@ Comments:
@@ -106,44 +78,42 @@ index 673741adbc1d75499100624572a6512fdefd39dc..c13e5d4f410163635d307503acbc13ff
int NumColors = 0;
unsigned char BgdRed = 0;
unsigned char BgdGreen = 0;
-@@ -130,20 +131,26 @@ BMGError ReadPNG( const char *filename,
-
- /* error handler */
+@@ -132,16 +133,22 @@ BMGError ReadPNG( const char *filename,
error = setjmp( err_jmp );
-- if ( error != 0 )
-+ if (error != 0)
+ if ( error != 0 )
{
- if ( png_ptr != NULL )
- png_destroy_read_struct( &png_ptr, NULL, NULL );
-- if ( rows )
-+ if (end_info != NULL)
++ if ( end_info != NULL )
+ png_destroy_read_struct((png_structp *) &png_ptr, (png_infop *) &info_ptr, (png_infop *) &end_info);
+ else if (info_ptr != NULL)
+ png_destroy_read_struct((png_structp *) &png_ptr, (png_infop *) &info_ptr, NULL);
+ else if (png_ptr != NULL)
+ png_destroy_read_struct((png_structp *) &png_ptr, NULL, NULL);
-+ if (rows)
+ if ( rows )
{
-- if ( rows[0] )
-- free( rows[0] );
-- free( rows );
-+ if (rows[0])
-+ free(rows[0]);
-+ free(rows);
+ if ( rows[0] )
+ free( rows[0] );
+ free( rows );
}
- FreeBMGImage( img );
- fclose( file );
-- SetLastBMGError( (BMGError)error );
-- return (BMGError)error;
+ if (img)
+ FreeBMGImage(img);
+ if (file)
+ fclose(file);
-+ SetLastBMGError((BMGError) error);
-+ return (BMGError) error;
+ SetLastBMGError( (BMGError)error );
+ return (BMGError)error;
}
+@@ -155,7 +162,7 @@ BMGError ReadPNG( const char *filename,
+
+ /* check the signature */
+ fread( signature, 1, 8, file );
+- if ( !png_check_sig( signature, 8 ) )
++ if ( png_sig_cmp( signature, 0, 8 ) )
+ longjmp( err_jmp, (int)errUnsupportedFileFormat );
- if ( img == NULL )
+ /* create a pointer to the png read structure */
@@ -163,6 +170,16 @@ BMGError ReadPNG( const char *filename,
if ( !png_ptr )
longjmp( err_jmp, (int)errMemoryAllocation );
@@ -173,15 +143,6 @@ index 673741adbc1d75499100624572a6512fdefd39dc..c13e5d4f410163635d307503acbc13ff
/* attach file buffer to the png read pointer */
png_init_io( png_ptr, file );
-@@ -187,7 +199,7 @@ BMGError ReadPNG( const char *filename,
-
- /* extract the data we need to form the HBITMAP from the PNG header */
- png_get_IHDR( png_ptr, info_ptr, &Width, &Height, &BitDepth, &ColorType,
-- &InterlaceType, NULL, NULL );
-+ &InterlaceType, NULL, NULL);
-
- img->width = Width;
- img->height = Height;
@@ -475,7 +487,7 @@ BMGError ReadPNG( const char *filename,
free( rows[0] );
free( rows );
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus.git
More information about the Pkg-games-commits
mailing list