mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
parent
a60f8a9c1f
commit
88910f5b9d
2
ANNOUNCE
2
ANNOUNCE
@ -429,6 +429,8 @@ Version 1.5.0beta53 [October 17, 2010]
|
|||||||
Use document name "libpng.txt" instead of "libpng-version.txt" as it was
|
Use document name "libpng.txt" instead of "libpng-version.txt" as it was
|
||||||
prior to libpng-1.2.16beta2, to simplify version differences.
|
prior to libpng-1.2.16beta2, to simplify version differences.
|
||||||
Removed obsolete remarks about setjmp handling from INSTALL.
|
Removed obsolete remarks about setjmp handling from INSTALL.
|
||||||
|
Revised and renamed the typedef in png.h and png.c that was designed
|
||||||
|
to catch library and header mismatch.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
2
CHANGES
2
CHANGES
@ -3067,6 +3067,8 @@ Version 1.5.0beta53 [October 17, 2010]
|
|||||||
Use document name "libpng.txt" instead of "libpng-version.txt" as it was
|
Use document name "libpng.txt" instead of "libpng-version.txt" as it was
|
||||||
prior to libpng-1.2.16beta2, to simplify version differences.
|
prior to libpng-1.2.16beta2, to simplify version differences.
|
||||||
Removed obsolete remarks about setjmp handling from INSTALL.
|
Removed obsolete remarks about setjmp handling from INSTALL.
|
||||||
|
Revised and renamed the typedef in png.h and png.c that was designed
|
||||||
|
to catch library and header mismatch.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "October 16, 2010"
|
.TH PNG 5 "October 17, 2010"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
6
png.c
6
png.c
@ -14,7 +14,7 @@
|
|||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef version_1_5_0beta53 Your_png_h_is_not_version_1_5_0beta53;
|
typedef png_libpng_version_1_5_0beta53 Your_png_h_is_not_version_1_5_0beta53;
|
||||||
|
|
||||||
/* Version information for C files. This had better match the version
|
/* Version information for C files. This had better match the version
|
||||||
* string defined in png.h.
|
* string defined in png.h.
|
||||||
@ -560,13 +560,13 @@ png_get_copyright(png_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.0beta53 - October 16, 2010" PNG_STRING_NEWLINE \
|
"libpng version 1.5.0beta53 - October 17, 2010" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.5.0beta53 - October 16, 2010\
|
return "libpng version 1.5.0beta53 - October 17, 2010\
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
|
21
png.h
21
png.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* 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
|
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* 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.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.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@ -172,7 +172,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* 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
|
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@ -284,7 +284,7 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* October 16, 2010
|
* October 17, 2010
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
@ -348,7 +348,7 @@
|
|||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.5.0beta53"
|
#define PNG_LIBPNG_VER_STRING "1.5.0beta53"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#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_SONUM 15
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||||
@ -499,6 +499,12 @@ extern "C" {
|
|||||||
* constants.
|
* constants.
|
||||||
* See pngconf.h for base types that vary by machine/system
|
* 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
|
/* 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
|
* exact size) is not important, although the size of the fields need to
|
||||||
* be png_byte or png_uint_16 (as defined below).
|
* 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),);
|
png_alloc_size_t),);
|
||||||
typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp),);
|
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;
|
typedef png_struct FAR * FAR * png_structpp;
|
||||||
|
|
||||||
/* Section 3: exported functions
|
/* Section 3: exported functions
|
||||||
|
@ -1726,4 +1726,4 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef version_1_5_0beta53 your_png_h_is_not_version_1_5_0beta53;
|
typedef png_libpng_version_1_5_0beta53 Your_png_h_is_not_version_1_5_0beta53;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user