mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Replaced all "PNG_NO_FEATURE" tests with "PNG_FEATURE_SUPPORTED" tests
except in pngconf.h where they can be used to request that PNG_FEATURE_SUPPORTED not be defined.
This commit is contained in:
26
pngrutil.c
26
pngrutil.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 [August 28, 2009]
|
||||
* Last changed in libpng 1.4.0 [August 31, 2009]
|
||||
* Copyright (c) 1998-2009 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.)
|
||||
@@ -315,7 +315,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
}
|
||||
if (ret != Z_STREAM_END)
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if defined(PNG_STDIO_SUPPORTED)
|
||||
char umsg[52];
|
||||
|
||||
if (ret == Z_BUF_ERROR)
|
||||
@@ -362,7 +362,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
}
|
||||
else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if defined(PNG_STDIO_SUPPORTED)
|
||||
char umsg[50];
|
||||
|
||||
png_snprintf(umsg, 50, "Unknown zTXt compression type %d", comp_type);
|
||||
@@ -457,7 +457,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_color palette[PNG_MAX_PALETTE_LENGTH];
|
||||
int num, i;
|
||||
#ifndef PNG_NO_POINTER_INDEXING
|
||||
#ifdef PNG_POINTER_INDEXING_SUPPORTED
|
||||
png_colorp pal_ptr;
|
||||
#endif
|
||||
|
||||
@@ -510,7 +510,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
num = (int)length / 3;
|
||||
|
||||
#ifndef PNG_NO_POINTER_INDEXING
|
||||
#ifdef PNG_POINTER_INDEXING_SUPPORTED
|
||||
for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)
|
||||
{
|
||||
png_byte buf[3];
|
||||
@@ -676,7 +676,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect gAMA value when sRGB is also present");
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
#ifdef PNG_CONSOLE_IO_SUPPORTED
|
||||
fprintf(stderr, "gamma = (%d/100000)", (int)igamma);
|
||||
#endif
|
||||
return;
|
||||
@@ -856,7 +856,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect cHRM value when sRGB is also present");
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
#ifdef PNG_CONSOLE_IO_SUPPORTED
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
fprintf(stderr, "wx=%f, wy=%f, rx=%f, ry=%f\n",
|
||||
white_x, white_y, red_x, red_y);
|
||||
@@ -868,7 +868,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
fprintf(stderr, "gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
|
||||
int_x_green, int_y_green, int_x_blue, int_y_blue);
|
||||
#endif
|
||||
#endif /* PNG_NO_CONSOLE_IO */
|
||||
#endif /* PNG_CONSOLE_IO_SUPPORTED */
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -948,7 +948,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect gAMA value when sRGB is also present");
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
#ifdef PNG_CONSOLE_IO_SUPPORTED
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
fprintf(stderr, "incorrect gamma=(%d/100000)\n",
|
||||
(int)png_ptr->int_gamma);
|
||||
@@ -1111,7 +1111,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_bytep entry_start;
|
||||
png_sPLT_t new_palette;
|
||||
#ifdef PNG_NO_POINTER_INDEXING
|
||||
#ifndef PNG_POINTER_INDEXING_SUPPORTED
|
||||
png_sPLT_entryp pp;
|
||||
#endif
|
||||
int data_length, entry_size, i;
|
||||
@@ -1211,7 +1211,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef PNG_NO_POINTER_INDEXING
|
||||
#ifdef PNG_POINTER_INDEXING_SUPPORTED
|
||||
for (i = 0; i < new_palette.nentries; i++)
|
||||
{
|
||||
png_sPLT_entryp pp = new_palette.entries + i;
|
||||
@@ -2976,7 +2976,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
void /* PRIVATE */
|
||||
png_read_finish_row(png_structp png_ptr)
|
||||
{
|
||||
@@ -3108,7 +3108,7 @@ png_read_finish_row(png_structp png_ptr)
|
||||
|
||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||
}
|
||||
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
|
||||
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
|
||||
|
||||
void /* PRIVATE */
|
||||
png_read_start_row(png_structp png_ptr)
|
||||
|
||||
Reference in New Issue
Block a user