提交 526a6ad5 编写于 作者: G Glenn Randers-Pehrson

[devel] Removed direct access to png_ptr->io_ptr from the pngtest Windows code

上级 2f7cbabf
Libpng 1.5.0beta14 - March 10, 2010
Libpng 1.5.0beta14 - March 11, 2010
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.
......@@ -97,7 +97,8 @@ version 1.5.0beta13 [March 10, 2010]
expressions (i.e. a trailing ';' must always be added) and correct
the format statements in various png_debug messages.
version 1.5.0beta14 [March 10, 2010]
version 1.5.0beta14 [March 11, 2010]
Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -2574,7 +2574,8 @@ version 1.5.0beta13 [March 10, 2010]
expressions (i.e. a trailing ';' must always be added) and correct
the format statements in various png_debug messages.
version 1.5.0beta14 [March 10, 2010]
version 1.5.0beta14 [March 11, 2010]
Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
/* pngtest.c - a simple test program to test libpng
*
* Last changed in libpng 1.5.0 [March 10, 2010]
* Last changed in libpng 1.5.0 [March 11, 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.)
......@@ -306,7 +306,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
/* Check if data really is near. If so, use usual code. */
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr));
if ((png_bytep)n_data == data)
{
check = fread(n_data, 1, length, io_ptr);
......@@ -356,7 +356,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
if (check != length)
{
png_error(png_ptr, "Write Error");
......@@ -380,7 +380,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
/* Check if data really is near. If so, use usual code. */
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr));
if ((png_bytep)near_data == data)
{
check = fwrite(near_data, 1, length, io_ptr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册