[devel] Revised and renamed the typedef in png.h and png.c that was designed

to catch library and header mismatch, also found at the end of pngtest.c.
This commit is contained in:
Glenn Randers-Pehrson
2010-10-16 20:38:45 -05:00
parent a60f8a9c1f
commit 88910f5b9d
6 changed files with 20 additions and 15 deletions

21
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.5.0beta53 - October 16, 2010
* libpng version 1.5.0beta53 - October 17, 2010
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.5.0beta53 - October 16, 2010: Glenn
* libpng versions 0.97, January 1998, through 1.5.0beta53 - October 17, 2010: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -172,7 +172,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.5.0beta53, October 16, 2010, are
* libpng versions 1.2.6, August 15, 2004, through 1.5.0beta53, October 17, 2010, are
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -284,7 +284,7 @@
* Y2K compliance in libpng:
* =========================
*
* October 16, 2010
* October 17, 2010
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@@ -348,7 +348,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.5.0beta53"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.5.0beta53 - October 16, 2010\n"
" libpng version 1.5.0beta53 - October 17, 2010\n"
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
@@ -499,6 +499,12 @@ extern "C" {
* constants.
* See pngconf.h for base types that vary by machine/system
*/
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_5_0beta53;
/* Three color definitions. The order of the red, green, and blue, (and the
* exact size) is not important, although the size of the fields need to
* be png_byte or png_uint_16 (as defined below).
@@ -868,11 +874,6 @@ typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
png_alloc_size_t),);
typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp),);
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef png_structp version_1_5_0beta53;
typedef png_struct FAR * FAR * png_structpp;
/* Section 3: exported functions