提交 1d3c9904 编写于 作者: J John Bowler 提交者: Glenn Randers-Pehrson

[libpng16] Added checks for libpng 1.5 to pngvalid.c. This supports the use of

this version of pngvalid in libpng 1.5
上级 79f0ba49
Libpng 1.6.9beta02 - December 26, 2013
Libpng 1.6.9beta02 - December 27, 2013
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.
......@@ -42,7 +42,9 @@ Version 1.6.9beta01 [December 26, 2013]
Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69
in the tar distributions.
Version 1.6.9beta02 [December 26, 2013]
Version 1.6.9beta02 [December 27, 2013]
Added checks for libpng 1.5 to pngvalid.c. This supports the use of
this version of pngvalid in libpng 1.5
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -4767,7 +4767,9 @@ Version 1.6.9beta01 [December 26, 2013]
Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69
in the tar distributions.
Version 1.6.9beta02 [December 26, 2013]
Version 1.6.9beta02 [December 27, 2013]
Added checks for libpng 1.5 to pngvalid.c. This supports the use of
this version of pngvalid in libpng 1.5
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
/* pngvalid.c - validate libpng by constructing then reading png files.
*
* Last changed in libpng 1.6.8 [December 19, 2013]
* Last changed in libpng 1.6.9 [(PENDING RELEASE)]
* Copyright (c) 2013 Glenn Randers-Pehrson
* Written by John Cunningham Bowler
*
......@@ -4849,7 +4849,7 @@ standard_check_text(png_const_structp pp, png_const_textp tp,
static void
standard_text_validate(standard_display *dp, png_const_structp pp,
png_infop pi)
png_infop pi, int check_end)
{
png_textp tp = NULL;
png_uint_32 num_text = png_get_text(pp, pi, &tp, NULL);
......@@ -4857,7 +4857,13 @@ standard_text_validate(standard_display *dp, png_const_structp pp,
if (num_text == 2 && tp != NULL)
{
standard_check_text(pp, tp, "image name", dp->ps->current->name);
standard_check_text(pp, tp+1, "end marker", "end");
/* This exists because prior to 1.6 the progressive reader left the
* png_struct z_stream unreset at the end of the image, so subsequent
* attempts to use it simply returns Z_STREAM_END.
*/
if (check_end)
standard_check_text(pp, tp+1, "end marker", "end");
}
else
......@@ -4870,7 +4876,7 @@ standard_text_validate(standard_display *dp, png_const_structp pp,
}
}
#else
# define standard_text_validate(dp,pp,pi) ((void)0)
# define standard_text_validate(dp,pp,pi,check_end) ((void)0)
#endif
static void
......@@ -4960,7 +4966,8 @@ standard_end(png_structp ppIn, png_infop pi)
/* Validate the image - progressive reading only produces one variant for
* interlaced images.
*/
standard_text_validate(dp, pp, pi);
standard_text_validate(dp, pp, pi,
PNG_LIBPNG_VER >= 10600/*check_end: see comments above*/);
standard_image_validate(dp, pp, 0, -1);
}
......@@ -5031,7 +5038,7 @@ standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id,
*/
if (!d.speed)
{
standard_text_validate(&d, pp, pi);
standard_text_validate(&d, pp, pi, 1/*check_end*/);
standard_image_validate(&d, pp, 0, 1);
}
else
......@@ -10276,6 +10283,11 @@ int main(void)
fprintf(stderr,
"pngvalid: no low level write support in libpng, all tests skipped\n");
/* So the test is skipped: */
#if PNG_LIBPNG_VER < 10601
/* Test harness support was only added in libpng 1.6.1: */
return 0;
#else
return 77;
#endif
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册