[libpng16] Document deprecation of png_convert_to_rfc1123() and its

replacement with png_convert_to_rfc1123_buffer().
This commit is contained in:
Glenn Randers-Pehrson 2012-06-12 13:06:52 -05:00
parent 05af5cd8fb
commit 0546e4e579
7 changed files with 39 additions and 29 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.0beta25 - June 7, 2012
Libpng 1.6.0beta25 - June 12, 2012
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -76,6 +76,8 @@ Version 1.6.0beta03 [December 22, 2011]
so is particularly valuable. Overall on a 64-bit system the libpng DLL
decreases in code size by 1733 bytes. pngerror.o increases in size by
about 465 bytes because of the new functionality.
Added png_convert_to_rfc1123_buffer() and deprecated png_convert_to_rfc1123()
to avoid including a spurious buffer in the png_struct.
Version 1.6.0beta04 [December 30, 2011]
Regenerated configure scripts with automake-1.11.2
@ -383,7 +385,7 @@ Version 1.6.0beta23 [June 6, 2012]
Version 1.6.0beta24 [June 7, 2012]
Don't check palette indexes if num_palette is 0 (as it can be in MNG files).
Version 1.6.0beta25 [June 7, 2012]
Version 1.6.0beta25 [June 12, 2012]
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -3827,6 +3827,8 @@ Version 1.6.0beta03 [December 22, 2011]
so is particularly valuable. Overall on a 64-bit system the libpng DLL
decreases in code size by 1733 bytes. pngerror.o increases in size by
about 465 bytes because of the new functionality.
Added png_convert_to_rfc1123_buffer() and deprecated png_convert_to_rfc1123()
to avoid including a spurious buffer in the png_struct.
Version 1.6.0beta04 [December 30, 2011]
Regenerated configure scripts with automake-1.11.2
@ -4134,7 +4136,7 @@ Version 1.6.0beta23 [June 6, 2012]
Version 1.6.0beta24 [June 7, 2012]
Don't check palette indexes if num_palette is 0 (as it can be in MNG files).
Version 1.6.0beta25 [June 7, 2012]
Version 1.6.0beta25 [June 12, 2012]
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.0beta25 - June 9, 2012
libpng version 1.6.0beta25 - June 12, 2012
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.0beta25 - June 9, 2012
libpng versions 0.97, January 1998, through 1.6.0beta25 - June 12, 2012
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -3063,8 +3063,9 @@ tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"),
although this isn't a requirement. Unlike the tIME chunk, the
"Creation Time" tEXt chunk is not expected to be automatically changed
by the software. To facilitate the use of RFC 1123 dates, a function
png_convert_to_rfc1123(png_timep) is provided to convert from PNG
time to an RFC 1123 format string.
png_convert_to_rfc1123_buffer(buffer, png_timep) is provided to convert
from PNG time to an RFC 1123 format string. The caller must provide
a writeable buffer of at least 29 bytes.
Writing unknown chunks
@ -5012,7 +5013,7 @@ Other rules can be inferred by inspecting the libpng source.
XVI. Y2K Compliance in libpng
June 9, 2012
June 12, 2012
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "June 9, 2012"
.TH LIBPNG 3 "June 12, 2012"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.0beta25
.SH SYNOPSIS
@ -1007,7 +1007,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.0beta25 - June 9, 2012
libpng version 1.6.0beta25 - June 12, 2012
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -1018,7 +1018,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.0beta25 - June 9, 2012
libpng versions 0.97, January 1998, through 1.6.0beta25 - June 12, 2012
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -4070,8 +4070,9 @@ tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"),
although this isn't a requirement. Unlike the tIME chunk, the
"Creation Time" tEXt chunk is not expected to be automatically changed
by the software. To facilitate the use of RFC 1123 dates, a function
png_convert_to_rfc1123(png_timep) is provided to convert from PNG
time to an RFC 1123 format string.
png_convert_to_rfc1123_buffer(buffer, png_timep) is provided to convert
from PNG time to an RFC 1123 format string. The caller must provide
a writeable buffer of at least 29 bytes.
.SS Writing unknown chunks
@ -6020,7 +6021,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVI. Y2K Compliance in libpng
June 9, 2012
June 12, 2012
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -6288,7 +6289,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.0beta25 - June 9, 2012:
Libpng version 1.6.0beta25 - June 12, 2012:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6311,7 +6312,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.0beta25, June 9, 2012, are
libpng versions 1.2.6, August 15, 2004, through 1.6.0beta25, June 12, 2012, are
Copyright (c) 2004,2006-2007 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
@ -6410,7 +6411,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
June 9, 2012
June 12, 2012
.\" end of man page

7
png.c
View File

@ -714,8 +714,9 @@ png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime)
}
# if PNG_LIBPNG_VER < 10700
/* To do: remove the following from libpng-1.7 */
/* Original API that uses a private buffer in png_struct.
* TODO: deprecate this, it causes png_struct to carry a spurious temporary
* Deprecated because it causes png_struct to carry a spurious temporary
* buffer (png_struct::time_buffer), better to have the caller pass this in.
*/
png_const_charp PNGAPI
@ -747,13 +748,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.0beta25 - June 7, 2012" PNG_STRING_NEWLINE \
"libpng version 1.6.0beta25 - June 12, 2012" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2012 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 "libpng version 1.6.0beta25 - June 7, 2012\
return "libpng version 1.6.0beta25 - June 12, 2012\
Copyright (c) 1998-2012 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";

20
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.0beta25 - June 7, 2012
* libpng version 1.6.0beta25 - June 12, 2012
* Copyright (c) 1998-2012 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.6.0beta25 - June 7, 2012: Glenn
* libpng versions 0.97, January 1998, through 1.6.0beta25 - June 12, 2012: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -198,7 +198,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.6.0beta25, June 7, 2012, are
* libpng versions 1.2.6, August 15, 2004, through 1.6.0beta25, June 12, 2012, are
* Copyright (c) 2004, 2006-2012 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:
@ -310,7 +310,7 @@
* Y2K compliance in libpng:
* =========================
*
* June 7, 2012
* June 12, 2012
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@ -330,8 +330,9 @@
* "png_char time_buffer" in png_struct
*
* There are seven time-related functions:
* png.c: png_convert_to_rfc_1123() in png.c
* (formerly png_convert_to_rfc_1152() in error)
* png.c: png_convert_to_rfc_1123_buffer() in png.c
* (formerly png_convert_to_rfc_1123() prior to libpng-1.5.x and
* png_convert_to_rfc_1152() in error prior to libpng-0.98)
* png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
* png_convert_from_time_t() in pngwrite.c
* png_get_tIME() in pngget.c
@ -342,8 +343,8 @@
* All handle dates properly in a Y2K environment. The
* png_convert_from_time_t() function calls gmtime() to convert from system
* clock time, which returns (year - 1900), which we properly convert to
* the full 4-digit year. There is a possibility that applications using
* libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
* the full 4-digit year. There is a possibility that libpng applications
* are not passing 4-digit years into the png_convert_to_rfc_1123_buffer()
* function, or that they are incorrectly passing only a 2-digit year
* instead of "year - 1900" into the png_convert_from_struct_tm() function,
* but this is not under our control. The libpng documentation has always
@ -376,7 +377,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.0beta25"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.0beta25 - June 7, 2012\n"
" libpng version 1.6.0beta25 - June 12, 2012\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@ -1111,6 +1112,7 @@ PNG_EXPORT(22, void, png_read_info,
* png_struct, this will be removed in future versions.
*/
#if PNG_LIBPNG_VER < 10700
/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */
PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr,
png_const_timep ptime),PNG_DEPRECATED);
#endif

View File

@ -354,6 +354,7 @@ struct png_struct_def
#endif
#if PNG_LIBPNG_VER < 10700
/* To do: remove this from libpng-1.7 */
#ifdef PNG_TIME_RFC1123_SUPPORTED
char time_buffer[29]; /* String to hold RFC 1123 time text */
#endif