From b4ec1f8451763a76d79f6e761c498da45ccc696b Mon Sep 17 00:00:00 2001 From: John Bowler Date: Tue, 2 Jul 2013 23:47:57 -0500 Subject: [PATCH] [libpng16] Unified pngfix.c source with libpng17. --- ANNOUNCE | 1 + CHANGES | 1 + contrib/tools/pngfix.c | 9 ++++----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 060a7ca50..f592cb78d 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -122,6 +122,7 @@ Version 1.6.3beta10 [July 3, 2013] been clarified, with --strip=transform now stripping the bKGD chunk, which was stripped previously with --strip=unused. Added all documented chunk types to pngpriv.h + Unified pngfix.c source with libpng17. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index e1ba695af..c5cbbca81 100644 --- a/CHANGES +++ b/CHANGES @@ -4606,6 +4606,7 @@ Version 1.6.3beta10 [July 3, 2013] been clarified, with --strip=transform now stripping the bKGD chunk, which was stripped previously with --strip=unused. Added all documented chunk types to pngpriv.h + Unified pngfix.c source with libpng17. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c index f0667fc7d..edd4f11f9 100644 --- a/contrib/tools/pngfix.c +++ b/contrib/tools/pngfix.c @@ -73,15 +73,13 @@ # define png_aligncastconst(type, value) ((const void*)(value)) #endif /* __cplusplus */ +#if PNG_LIBPNG_VER < 10700 /* Chunk tags (copied from pngpriv.h) */ #define PNG_32b(b,s) ((png_uint_32)(b) << (s)) #define PNG_U32(b1,b2,b3,b4) \ (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0)) -/* Constants for known chunk types. - * - * Copied from ../../pngpriv.h. - */ +/* Constants for known chunk types. */ #define png_IDAT PNG_U32( 73, 68, 65, 84) #define png_IEND PNG_U32( 73, 69, 78, 68) #define png_IHDR PNG_U32( 73, 72, 68, 82) @@ -108,6 +106,7 @@ #define png_tIME PNG_U32(116, 73, 77, 69) #define png_tRNS PNG_U32(116, 82, 78, 83) #define png_zTXt PNG_U32(122, 84, 88, 116) +#endif /* The 8 byte signature as a pair of 32 bit quantities */ #define sig1 PNG_U32(137, 80, 78, 71) @@ -3791,7 +3790,7 @@ usage(const char *prog) " OPT: The zlib stream window bits value could be improved (and was).", " SKP: The chunk was skipped because of a zlib issue (zlib-rc) with", " explanation 'message'", -" ERR: The read of the file was aborted. The parameters explain why.", +" ERR: The read of the file was aborted. The parameters explain why.", "$3 status: For 'ERR' the accumulate status code from 'EXIT CODES' above.", " This is printed as a 2 digit hexadecimal value", " comp-level: The recorded compression level (FLEVEL) of a zlib stream",