mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Converted all PNG_NO_* tests to PNG_*_SUPPORTED
everywhere except pngconf.h as in libpng-1.4.0beta78 and later.
This commit is contained in:
14
pngwrite.c
14
pngwrite.c
@@ -189,7 +189,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
||||
#ifdef PNG_sCAL_SUPPORTED
|
||||
if (info_ptr->valid & PNG_INFO_sCAL)
|
||||
#ifdef PNG_WRITE_sCAL_SUPPORTED
|
||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
|
||||
png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
|
||||
info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
|
||||
#else /* !FLOATING_POINT */
|
||||
@@ -546,7 +546,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
(user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
|
||||
(user_png_ver[0] == '0' && user_png_ver[2] < '9'))
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)
|
||||
char msg[80];
|
||||
if (user_png_ver)
|
||||
{
|
||||
@@ -615,7 +615,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
{
|
||||
/* We only come here via pre-1.0.12-compiled applications */
|
||||
if (png_ptr == NULL) return;
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)
|
||||
if (png_sizeof(png_struct) > png_struct_size ||
|
||||
png_sizeof(png_info) > png_info_size)
|
||||
{
|
||||
@@ -1123,7 +1123,7 @@ png_write_destroy(png_structp png_ptr)
|
||||
/* Free our memory. png_free checks NULL for us. */
|
||||
png_free(png_ptr, png_ptr->zbuf);
|
||||
png_free(png_ptr, png_ptr->row_buf);
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||
png_free(png_ptr, png_ptr->prev_row);
|
||||
png_free(png_ptr, png_ptr->sub_row);
|
||||
png_free(png_ptr, png_ptr->up_row);
|
||||
@@ -1186,14 +1186,14 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
||||
{
|
||||
switch (filters & (PNG_ALL_FILTERS | 0x07))
|
||||
{
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||
case 5:
|
||||
case 6:
|
||||
case 7: png_warning(png_ptr, "Unknown row filter for method 0");
|
||||
#endif /* PNG_WRITE_FILTER_SUPPORTED */
|
||||
case PNG_FILTER_VALUE_NONE:
|
||||
png_ptr->do_filter = PNG_FILTER_NONE; break;
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||
case PNG_FILTER_VALUE_SUB:
|
||||
png_ptr->do_filter = PNG_FILTER_SUB; break;
|
||||
case PNG_FILTER_VALUE_UP:
|
||||
@@ -1219,7 +1219,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
||||
*/
|
||||
if (png_ptr->row_buf != NULL)
|
||||
{
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||
if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
|
||||
{
|
||||
png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
|
||||
|
||||
Reference in New Issue
Block a user