[devel] Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED

is defined.  We are considering removing it entirely.
This commit is contained in:
Glenn Randers-Pehrson 2010-04-29 08:25:29 -05:00
parent 4a4de1899a
commit f10fa3c9f4
3 changed files with 8 additions and 4 deletions

View File

@ -216,6 +216,7 @@ version 1.5.0beta23 [April 29, 2010]
This makes the installed pnglibconf.h more readable but causes no
other change. The intention is that users of libpng will find it
easier to understand if an API they need is missing.
Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit

View File

@ -2698,6 +2698,7 @@ version 1.5.0beta23 [April 29, 2010]
This makes the installed pnglibconf.h more readable but causes no
other change. The intention is that users of libpng will find it
easier to understand if an API they need is missing.
Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

10
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.5.0 [April 28, 2010]
* Last changed in libpng 1.5.0 [April 29, 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.)
@ -548,13 +548,13 @@ png_get_copyright(png_structp png_ptr)
#else
# ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
"libpng version 1.5.0beta23 - April 28, 2010" PNG_STRING_NEWLINE \
"libpng version 1.5.0beta23 - April 29, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE);
# else
return ((png_charp) "libpng version 1.5.0beta23 - April 28, 2010\
return ((png_charp) "libpng version 1.5.0beta23 - April 29, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
@ -618,7 +618,9 @@ png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
return 0;
}
# endif
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
#ifdef PNG_READ_SUPPORTED
/* This function, added to libpng-1.0.6g, is untested. */
int PNGAPI
png_reset_zstream(png_structp png_ptr)
@ -627,7 +629,7 @@ png_reset_zstream(png_structp png_ptr)
return Z_STREAM_ERROR;
return (inflateReset(&png_ptr->zstream));
}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
#endif /* PNG_WRITE_SUPPORTED */
/* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI