summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-11-06 22:11:39 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-11-06 22:11:39 -0600
commitcda68df8c17ac23083904c580a6115b06aa8675d (patch)
tree9fa3efe8995b7fefb39fc4a96277e5778e0aa5a4
parent70cb8f9a7eb3d0ea3bd7ac9308cd31e49111c09d (diff)
downloadlibpng-cda68df8c17ac23083904c580a6115b06aa8675d.tar.gz
[libpng16] Changed "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */"
-rw-r--r--example.c6
-rw-r--r--png.c20
-rw-r--r--pngerror.c20
-rw-r--r--pngget.c12
-rw-r--r--pngmem.c12
-rw-r--r--pngpread.c2
-rw-r--r--pngread.c30
-rw-r--r--pngrio.c4
-rw-r--r--pngrtran.c38
-rw-r--r--pngrutil.c32
-rw-r--r--pngset.c12
-rw-r--r--pngtest.c22
-rw-r--r--pngtrans.c13
-rw-r--r--pngwio.c6
-rw-r--r--pngwrite.c26
-rw-r--r--pngwtran.c12
-rw-r--r--pngwutil.c22
17 files changed, 144 insertions, 145 deletions
diff --git a/example.c b/example.c
index f8067b936..8bb27d79f 100644
--- a/example.c
+++ b/example.c
@@ -494,7 +494,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
max_screen_colors, histogram, 0);
}
}
-#endif /* PNG_READ_QUANTIZE_SUPPORTED */
+#endif /* READ_QUANTIZE /
/* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr);
@@ -532,7 +532,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
number_passes = png_set_interlace_handling(png_ptr);
#else
number_passes = 1;
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
+#endif /* READ_INTERLACING */
/* Optional call to gamma correct and add the background to the palette
@@ -744,7 +744,7 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
+#endif /* READ_INTERLACING */
}
end_callback(png_structp png_ptr, png_infop info)
diff --git a/png.c b/png.c
index ad7d4d161..c105374be 100644
--- a/png.c
+++ b/png.c
@@ -65,7 +65,7 @@ png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check)
return ((int)(memcmp(&sig[start], &png_signature[start], num_to_check)));
}
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Function to allocate memory for zlib */
@@ -631,7 +631,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
info_ptr->free_me &= ~mask;
}
-#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
+#endif /* READ || WRITE */
/* This function returns a pointer to the io_ptr associated with the user
* functions. The application should free any memory associated with this
@@ -756,9 +756,9 @@ png_convert_to_rfc1123(png_structrp png_ptr, png_const_timep ptime)
return NULL;
}
# endif
-# endif /* PNG_TIME_RFC1123_SUPPORTED */
+# endif /* TIME_RFC1123 */
-#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
+#endif /* READ || WRITE */
png_const_charp PNGAPI
png_get_copyright(png_const_structrp png_ptr)
@@ -937,7 +937,7 @@ png_reset_zstream(png_structrp png_ptr)
/* WARNING: this resets the window bits to the maximum! */
return (inflateReset(&png_ptr->zstream));
}
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
/* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI
@@ -2365,7 +2365,7 @@ png_icc_set_sRGB(png_const_structrp png_ptr,
(void)png_colorspace_set_sRGB(png_ptr, colorspace,
(int)/*already checked*/png_get_uint_32(profile+64));
}
-#endif /* PNG_READ_sRGB_SUPPORTED */
+#endif /* READ_sRGB */
int /* PRIVATE */
png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace,
@@ -2745,7 +2745,7 @@ png_check_fp_string(png_const_charp string, png_size_t size)
return 0; /* i.e. fail */
}
-#endif /* pCAL or sCAL */
+#endif /* pCAL || sCAL */
#ifdef PNG_sCAL_SUPPORTED
# ifdef PNG_FLOATING_POINT_SUPPORTED
@@ -3394,7 +3394,7 @@ png_product2(png_fixed_point a, png_fixed_point b)
return 0; /* overflow */
}
-#endif /* PNG_16BIT_SUPPORTED) || !PNG_FLOATING_ARITHMETIC_SUPPORTED */
+#endif /* 16BIT || !FLOATING_ARITHMETIC */
/* The inverse of the above. */
png_fixed_point
@@ -4257,7 +4257,7 @@ const png_uint_16 png_sRGB_table[256] =
57105,57646,58190,58737,59287,59840,60396,60955,
61517,62082,62650,63221,63795,64372,64952,65535
};
-#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
+#endif /* SIMPLIFIED_READ */
/* The base/delta tables are required for both read and write (but currently
* only the simplified versions.)
@@ -4457,4 +4457,4 @@ png_image_error(png_imagep image, png_const_charp error_message)
}
#endif /* SIMPLIFIED READ/WRITE */
-#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
+#endif /* READ || WRITE */
diff --git a/pngerror.c b/pngerror.c
index 24e5ad84f..701ccf077 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -27,7 +27,7 @@ static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr,
static void /* PRIVATE */
png_default_warning PNGARG((png_const_structrp png_ptr,
png_const_charp warning_message));
-#endif /* PNG_WARNINGS_SUPPORTED */
+#endif /* WARNINGS */
/* This function is called whenever there is a fatal error. This function
* should not be changed. If there is a need to handle errors differently,
@@ -103,7 +103,7 @@ png_err,(png_const_structrp png_ptr),PNG_NORETURN)
use the default handler, which will not return. */
png_default_error(png_ptr, "");
}
-#endif /* PNG_ERROR_TEXT_SUPPORTED */
+#endif /* ERROR_TEXT */
/* Utility to safely appends strings to a buffer. This never errors out so
* error checking is not required in the caller.
@@ -355,7 +355,7 @@ png_formatted_warning(png_const_structrp png_ptr, png_warning_parameters p,
*/
png_warning(png_ptr, msg);
}
-#endif /* PNG_WARNINGS_SUPPORTED */
+#endif /* WARNINGS */
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
@@ -473,7 +473,7 @@ png_format_buffer(png_const_structrp png_ptr, png_charp buffer, png_const_charp
buffer[iout] = '\0';
}
}
-#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
+#endif /* WARNINGS || ERROR_TEXT */
#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
PNG_FUNCTION(void,PNGAPI
@@ -490,7 +490,7 @@ png_chunk_error,(png_const_structrp png_ptr, png_const_charp error_message),
png_error(png_ptr, msg);
}
}
-#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */
+#endif /* READ && ERROR_TEXT */
#ifdef PNG_WARNINGS_SUPPORTED
void PNGAPI
@@ -506,7 +506,7 @@ png_chunk_warning(png_const_structrp png_ptr, png_const_charp warning_message)
png_warning(png_ptr, msg);
}
}
-#endif /* PNG_WARNINGS_SUPPORTED */
+#endif /* WARNINGS */
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -525,7 +525,7 @@ png_chunk_benign_error(png_const_structrp png_ptr, png_const_charp
# endif
}
#endif
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
void /* PRIVATE */
png_chunk_report(png_const_structrp png_ptr, png_const_charp message, int error)
@@ -824,7 +824,7 @@ png_default_warning(png_const_structrp png_ptr, png_const_charp warning_message)
#endif
PNG_UNUSED(png_ptr) /* Make compiler happy */
}
-#endif /* PNG_WARNINGS_SUPPORTED */
+#endif /* WARNINGS */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT
@@ -959,5 +959,5 @@ png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
return result;
}
-#endif /* SIMPLIFIED READ/WRITE */
-#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
+#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
+#endif /* READ || WRITE */
diff --git a/pngget.c b/pngget.c
index ed00f8b4b..858b22872 100644
--- a/pngget.c
+++ b/pngget.c
@@ -455,12 +455,12 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
return (retval);
}
-#endif /* PNG_pHYs_SUPPORTED */
-#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
+#endif /* pHYs */
+#endif /* INCH_CONVERSIONS */
/* png_get_channels really belongs in here, too, but it's been around longer */
-#endif /* PNG_EASY_ACCESS_SUPPORTED */
+#endif /* EASY_ACCESS */
png_byte PNGAPI
@@ -1180,7 +1180,7 @@ png_get_chunk_malloc_max (png_const_structrp png_ptr)
{
return (png_ptr ? png_ptr->user_chunk_malloc_max : 0);
}
-#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
+#endif /* SET_USER_LIMITS */
/* These functions were added to libpng 1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
@@ -1195,7 +1195,7 @@ png_get_io_chunk_type (png_const_structrp png_ptr)
{
return png_ptr->chunk_name;
}
-#endif /* ?PNG_IO_STATE_SUPPORTED */
+#endif /* IO_STATE */
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
# ifdef PNG_GET_PALETTE_MAX_SUPPORTED
@@ -1210,4 +1210,4 @@ png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
# endif
#endif
-#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
+#endif /* READ || WRITE */
diff --git a/pngmem.c b/pngmem.c
index 8ee0866f6..1ebc3b78d 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.6.8 [December 19, 2013]
- * Copyright (c) 1998-2013 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.15 [(PENDING RELEASE)]
+ * Copyright (c) 1998-2014 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.)
*
@@ -199,7 +199,7 @@ png_malloc_default,(png_const_structrp png_ptr, png_alloc_size_t size),
return ret;
}
-#endif /* PNG_USER_MEM_SUPPORTED */
+#endif /* USER_MEM */
/* This function was added at libpng version 1.2.3. The png_malloc_warn()
* function will issue a png_warning and return NULL instead of issuing a
@@ -244,7 +244,7 @@ png_free_default,(png_const_structrp png_ptr, png_voidp ptr),PNG_DEPRECATED)
{
if (png_ptr == NULL || ptr == NULL)
return;
-#endif /* PNG_USER_MEM_SUPPORTED */
+#endif /* USER_MEM */
free(ptr);
}
@@ -277,5 +277,5 @@ png_get_mem_ptr(png_const_structrp png_ptr)
return png_ptr->mem_ptr;
}
-#endif /* PNG_USER_MEM_SUPPORTED */
-#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
+#endif /* USER_MEM */
+#endif /* READ || WRITE */
diff --git a/pngpread.c b/pngpread.c
index e7eca1f87..fd209c29c 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1165,4 +1165,4 @@ png_get_progressive_ptr(png_const_structrp png_ptr)
return png_ptr->io_ptr;
}
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+#endif /* PROGRESSIVE_READ */
diff --git a/pngread.c b/pngread.c
index 61077e971..fed2b39bb 100644
--- a/pngread.c
+++ b/pngread.c
@@ -44,7 +44,7 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
{
png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr,
error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
-#endif /* PNG_USER_MEM_SUPPORTED */
+#endif /* USER_MEM */
if (png_ptr != NULL)
{
@@ -252,7 +252,7 @@ png_read_info(png_structrp png_ptr, png_inforp info_ptr)
PNG_HANDLE_CHUNK_AS_DEFAULT);
}
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
/* Optional call to update the users info_ptr structure */
void PNGAPI
@@ -302,7 +302,7 @@ png_start_read_image(png_structrp png_ptr)
"png_start_read_image/png_read_update_info: duplicate call");
}
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
#ifdef PNG_MNG_FEATURES_SUPPORTED
@@ -369,7 +369,7 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
}
}
}
-#endif /* PNG_MNG_FEATURES_SUPPORTED */
+#endif /* MNG_FEATURES */
void PNGAPI
png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
@@ -436,7 +436,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined");
#endif
}
-#endif /* PNG_WARNINGS_SUPPORTED */
+#endif /* WARNINGS */
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* If interlaced and we do not need a new row, combine row and return.
@@ -605,7 +605,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
(*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read one or more rows of image data. If the image is interlaced,
@@ -672,7 +672,7 @@ png_read_rows(png_structrp png_ptr, png_bytepp row,
dp++;
}
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the entire image. If the image has an alpha channel or a tRNS
@@ -746,7 +746,7 @@ png_read_image(png_structrp png_ptr, png_bytepp image)
}
}
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the end of the PNG file. Will not read past the end of the
@@ -913,7 +913,7 @@ png_read_end(png_structrp png_ptr, png_inforp info_ptr)
PNG_HANDLE_CHUNK_AS_DEFAULT);
} while ((png_ptr->mode & PNG_HAVE_IEND) == 0);
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
/* Free all memory used in the read struct */
static void
@@ -1221,8 +1221,8 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr,
PNG_UNUSED(params)
}
-#endif /* PNG_INFO_IMAGE_SUPPORTED */
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* INFO_IMAGE */
+#endif /* SEQUENTIAL_READ */
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
/* SIMPLIFIED READ
@@ -1508,7 +1508,7 @@ png_image_begin_read_from_file(png_imagep image, const char *file_name)
return 0;
}
-#endif /* PNG_STDIO_SUPPORTED */
+#endif /* STDIO */
static void PNGCBAPI
png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
@@ -1626,7 +1626,7 @@ png_image_skip_unused_chunks(png_structrp png_ptr)
# define PNG_SKIP_CHUNKS(p) png_image_skip_unused_chunks(p)
#else
# define PNG_SKIP_CHUNKS(p) ((void)0)
-#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */
+#endif /* HANDLE_AS_UNKNOWN */
/* The following macro gives the exact rounded answer for all values in the
* range 0..255 (it actually divides by 51.2, but the rounding still generates
@@ -4117,5 +4117,5 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
return 0;
}
-#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
-#endif /* PNG_READ_SUPPORTED */
+#endif /* SIMPLIFIED_READ */
+#endif /* READ */
diff --git a/pngrio.c b/pngrio.c
index d75ac5b4d..cf305c327 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
/* pngrio.c - functions for data input
*
- * Last changed in libpng 1.6.9 [February 6, 2014]
+ * Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Copyright (c) 1998-2014 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.)
@@ -117,4 +117,4 @@ png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr,
png_ptr->output_flush_fn = NULL;
#endif
}
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
diff --git a/pngrtran.c b/pngrtran.c
index d7a4f1ba7..7f9240b59 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -793,7 +793,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
png_free(png_ptr, distance);
}
}
-#endif /* PNG_READ_QUANTIZE_SUPPORTED */
+#endif /* READ_QUANTIZE */
#ifdef PNG_READ_GAMMA_SUPPORTED
void PNGFAPI
@@ -842,7 +842,7 @@ png_set_gamma(png_structrp png_ptr, double scrn_gamma, double file_gamma)
png_set_gamma_fixed(png_ptr, convert_gamma_value(png_ptr, scrn_gamma),
convert_gamma_value(png_ptr, file_gamma));
}
-# endif /* FLOATING_POINT_SUPPORTED */
+# endif /* FLOATING_POINT */
#endif /* READ_GAMMA */
#ifdef PNG_READ_EXPAND_SUPPORTED
@@ -914,7 +914,7 @@ png_set_tRNS_to_alpha(png_structrp png_ptr)
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
}
-#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
+#endif /* READ_EXPAND */
#ifdef PNG_READ_EXPAND_16_SUPPORTED
/* Expand to 16-bit channels, expand the tRNS chunk too (because otherwise
@@ -1179,10 +1179,10 @@ png_init_palette_transformations(png_structrp png_ptr)
png_ptr->trans_alpha[i]);
}
}
-#endif /* PNG_READ_INVERT_ALPHA_SUPPORTED */
+#endif /* READ_INVERT_ALPHA */
}
} /* background expand and (therefore) no alpha association. */
-#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */
+#endif /* READ_EXPAND && READ_BACKGROUND */
}
static void /* PRIVATE */
@@ -1267,7 +1267,7 @@ png_init_rgb_transformations(png_structrp png_ptr)
}
}
} /* background expand and (therefore) no alpha association. */
-#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */
+#endif /* READ_EXPAND && READ_BACKGROUND */
}
void /* PRIVATE */
@@ -1459,8 +1459,8 @@ png_init_read_transformations(png_structrp png_ptr)
}
}
}
-#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */
-#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED */
+#endif /* READ_EXPAND && READ_BACKGROUND */
+#endif /* READ_GRAY_TO_RGB */
/* For indexed PNG data (PNG_COLOR_TYPE_PALETTE) many of the transformations
* can be performed directly on the palette, and some (such as rgb to gray)
@@ -1503,7 +1503,7 @@ png_init_read_transformations(png_structrp png_ptr)
CHOP(png_ptr->background.gray);
# undef CHOP
}
-#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */
+#endif /* READ_BACKGROUND && READ_EXPAND_16 */
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
(defined(PNG_READ_SCALE_16_TO_8_SUPPORTED) || \
@@ -1797,7 +1797,7 @@ png_init_read_transformations(png_structrp png_ptr)
else
/* Transformation does not include PNG_BACKGROUND */
-#endif /* PNG_READ_BACKGROUND_SUPPORTED */
+#endif /* READ_BACKGROUND */
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* RGB_TO_GRAY needs to have non-gamma-corrected values! */
@@ -1827,7 +1827,7 @@ png_init_read_transformations(png_structrp png_ptr)
#ifdef PNG_READ_BACKGROUND_SUPPORTED
else
#endif
-#endif /* PNG_READ_GAMMA_SUPPORTED */
+#endif /* READ_GAMMA */
#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* No GAMMA transformation (see the hanging else 4 lines above) */
@@ -1866,7 +1866,7 @@ png_init_read_transformations(png_structrp png_ptr)
png_ptr->transformations &= ~PNG_COMPOSE;
}
-#endif /* PNG_READ_BACKGROUND_SUPPORTED */
+#endif /* READ_BACKGROUND */
#ifdef PNG_READ_SHIFT_SUPPORTED
if ((png_ptr->transformations & PNG_SHIFT) != 0 &&
@@ -1912,7 +1912,7 @@ png_init_read_transformations(png_structrp png_ptr)
png_ptr->palette[i].blue = (png_byte)component;
}
}
-#endif /* PNG_READ_SHIFT_SUPPORTED */
+#endif /* READ_SHIFT */
}
/* Modify the info structure to reflect the transformations. The
@@ -2017,7 +2017,7 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
CONFIGURATION ERROR: you must enable at least one 16 to 8 method
# endif
# endif
-#endif /* !READ_16BIT_SUPPORTED */
+#endif /* !READ_16BIT */
}
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
@@ -3911,7 +3911,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
}
}
}
-#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_READ_ALPHA_MODE_SUPPORTED */
+#endif /* READ_BACKGROUND || READ_ALPHA_MODE */
#ifdef PNG_READ_GAMMA_SUPPORTED
/* Gamma correct the image, avoiding the alpha channel. Make sure
@@ -4690,7 +4690,7 @@ png_do_quantize(png_row_infop row_info, png_bytep row,
}
}
}
-#endif /* PNG_READ_QUANTIZE_SUPPORTED */
+#endif /* READ_QUANTIZE */
/* Transform the row. The order of transformations is significant,
* and is very touchy. If you add a transformation, take care to
@@ -4885,7 +4885,7 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
if (row_info->rowbytes == 0)
png_error(png_ptr, "png_do_quantize returned rowbytes=0");
}
-#endif /* PNG_READ_QUANTIZE_SUPPORTED */
+#endif /* READ_QUANTIZE */
#ifdef PNG_READ_EXPAND_16_SUPPORTED
/* Do the expansion now, after all the arithmetic has been done. Notice
@@ -4989,5 +4989,5 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
#endif
}
-#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ_TRANSFORMS */
+#endif /* READ */
diff --git a/pngrutil.c b/pngrutil.c
index 1710da638..37dc9c1b0 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -108,7 +108,7 @@ png_get_uint_16)(png_const_bytep buf)
return (png_uint_16)val;
}
-#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */
+#endif /* READ_INT_FUNCTIONS */
/* Read and check the PNG file signature */
void /* PRIVATE */
@@ -321,7 +321,7 @@ png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn)
return buffer;
}
-#endif /* PNG_READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|SEQUENTIAL_READ */
+#endif /* READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|SEQUENTIAL_READ */
/* png_inflate_claim: claim the zstream for some nefarious purpose that involves
* decompression. Returns Z_OK on success, else a zlib error code. It checks
@@ -718,7 +718,7 @@ png_decompress_chunk(png_structrp png_ptr,
return Z_MEM_ERROR;
}
}
-#endif /* PNG_READ_COMPRESSED_TEXT_SUPPORTED */
+#endif /* READ_COMPRESSED_TEXT */
#ifdef PNG_READ_iCCP_SUPPORTED
/* Perform a partial read and decompress, producing 'avail_out' bytes and
@@ -1294,7 +1294,7 @@ png_handle_sRGB(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
(void)png_colorspace_set_sRGB(png_ptr, &png_ptr->colorspace, intent);
png_colorspace_sync(png_ptr, info_ptr);
}
-#endif /* PNG_READ_sRGB_SUPPORTED */
+#endif /* READ_sRGB */
#ifdef PNG_READ_iCCP_SUPPORTED
void /* PRIVATE */
@@ -1567,7 +1567,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if (errmsg != NULL) /* else already output */
png_chunk_benign_error(png_ptr, errmsg);
}
-#endif /* PNG_READ_iCCP_SUPPORTED */
+#endif /* READ_iCCP */
#ifdef PNG_READ_sPLT_SUPPORTED
void /* PRIVATE */
@@ -1744,7 +1744,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
png_free(png_ptr, new_palette.entries);
}
-#endif /* PNG_READ_sPLT_SUPPORTED */
+#endif /* READ_sPLT */
#ifdef PNG_READ_tRNS_SUPPORTED
void /* PRIVATE */
@@ -2758,7 +2758,7 @@ png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length)
return 1;
}
}
-#endif /* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
+#endif /* READ_UNKNOWN_CHUNKS */
/* Handle an unknown, or known but disabled, chunk */
void /* PRIVATE */
@@ -2858,7 +2858,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
else
/* Use the SAVE_UNKNOWN_CHUNKS code or skip the chunk */
-# endif /* PNG_READ_USER_CHUNKS_SUPPORTED */
+# endif /* READ_USER_CHUNKS */
# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
{
@@ -2925,7 +2925,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
--(png_ptr->user_chunk_cache_max);
/* FALL THROUGH */
case 0: /* no limit */
-# endif /* PNG_USER_LIMITS_SUPPORTED */
+# endif /* USER_LIMITS */
/* Here when the limit isn't reached or when limits are compiled
* out; store the chunk.
*/
@@ -2954,7 +2954,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
png_crc_finish(png_ptr, length);
PNG_UNUSED(info_ptr)
PNG_UNUSED(keep)
-#endif /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
+#endif /* !READ_UNKNOWN_CHUNKS */
/* Check for unhandled critical chunks */
if (handled == 0 && PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
@@ -3193,7 +3193,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
*/
# define MASK(pass,depth,display,png)\
((display)?B_MASK(pass,depth,png):S_MASK(pass,depth,png))
-#endif /* !PNG_USE_COMPILE_TIME_MASKS */
+#endif /* !USE_COMPILE_TIME_MASKS */
/* Use the appropriate mask to copy the required bits. In some cases
* the byte mask will be 0 or 0xff; optimize these cases. row_width is
@@ -3444,7 +3444,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
return;
}
}
-#endif /* PNG_ALIGN_ code */
+#endif /* ALIGN_TYPE code */
/* The true default - use a memcpy: */
for (;;)
@@ -3468,7 +3468,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* Here if pixel_depth < 8 to check 'end_ptr' below. */
}
else
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
+#endif /* READ_INTERLACING */
/* If here then the switch above wasn't used so just memcpy the whole row
* from the temporary row buffer (notice that this overwrites the end of the
@@ -3724,7 +3724,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
PNG_UNUSED(transformations) /* Silence compiler warning */
#endif
}
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
+#endif /* READ_INTERLACING */
static void
png_read_filter_row_sub(png_row_infop row_info, png_bytep row,
@@ -4178,7 +4178,7 @@ png_read_finish_row(png_structrp png_ptr)
/* Here after at the end of the last row of the last pass. */
png_read_finish_IDAT(png_ptr);
}
-#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+#endif /* SEQUENTIAL_READ */
void /* PRIVATE */
png_read_start_row(png_structrp png_ptr)
@@ -4471,4 +4471,4 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
diff --git a/pngset.c b/pngset.c
index 07d5eee5f..f9a8a5784 100644
--- a/pngset.c
+++ b/pngset.c
@@ -130,9 +130,9 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
png_fixed(png_ptr, blue_Y, "cHRM Red Y"),
png_fixed(png_ptr, blue_Z, "cHRM Red Z"));
}
-# endif /* PNG_FLOATING_POINT_SUPPORTED */
+# endif /* FLOATING_POINT */
-#endif /* PNG_cHRM_SUPPORTED */
+#endif /* cHRM */
#ifdef PNG_gAMA_SUPPORTED
void PNGFAPI
@@ -1069,7 +1069,7 @@ png_set_sPLT(png_const_structrp png_ptr,
if (nentries > 0)
png_chunk_report(png_ptr, "sPLT out of memory", PNG_CHUNK_WRITE_ERROR);
}
-#endif /* PNG_sPLT_SUPPORTED */
+#endif /* sPLT */
#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
static png_byte
@@ -1562,7 +1562,7 @@ png_set_chunk_malloc_max (png_structrp png_ptr,
if (png_ptr != NULL)
png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
}
-#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
+#endif /* ?SET_USER_LIMITS */
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -1585,7 +1585,7 @@ png_set_benign_errors(png_structrp png_ptr, int allowed)
png_ptr->flags &= ~(PNG_FLAG_BENIGN_ERRORS_WARN |
PNG_FLAG_APP_WARNINGS_WARN | PNG_FLAG_APP_ERRORS_WARN);
}
-#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
+#endif /* BENIGN_ERRORS */
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
/* Whether to report invalid palette index; added at libng-1.5.10.
@@ -1608,4 +1608,4 @@ png_set_check_for_invalid_index(png_structrp png_ptr, int allowed)
png_ptr->num_palette_max = -1;
}
#endif
-#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
+#endif /* READ || WRITE */
diff --git a/pngtest.c b/pngtest.c
index 314e7609c..ad2b408d3 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -311,7 +311,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
}
}
}
-#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */
+#endif /* WRITE_USER_TRANSFORM */
#ifndef PNG_STDIO_SUPPORTED
/* START of code to validate stdio-free compilation */
@@ -420,7 +420,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING);
#endif
}
-#endif /* !PNG_STDIO_SUPPORTED */
+#endif /* !STDIO */
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
@@ -605,7 +605,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
free(ptr);
ptr = NULL;
}
-#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
+#endif /* USER_MEM && DEBUG */
/* END of code to test memory allocation/deallocation */
@@ -780,8 +780,8 @@ write_chunks(png_structp write_ptr, int location)
write_vpAg_chunk(write_ptr);
}
}
-#endif /* PNG_WRITE_SUPPORTED */
-#else /* !PNG_READ_USER_CHUNKS_SUPPORTED */
+#endif /* WRITE */
+#else /* !READ_USER_CHUNKS */
# define write_chunks(pp,loc) ((void)0)
#endif
/* END of code to demonstrate user chunk support */
@@ -1290,7 +1290,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
tIME_chunk_present++;
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
+#endif /* TIME_RFC1123 */
}
}
#endif
@@ -1406,7 +1406,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
t_encode += (t_stop - t_start);
t_start = t_stop;
#endif
-#endif /* PNG_WRITE_SUPPORTED */
+#endif /* WRITE */
#ifndef SINGLE_ROWBUF_ALLOC
pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y);
@@ -1473,7 +1473,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
tIME_chunk_present++;
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
+#endif /* TIME_RFC1123 */
}
}
#endif
@@ -1678,7 +1678,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
}
-#endif /* PNG_WRITE_SUPPORTED */
+#endif /* WRITE */
FCLOSE(fpin);
FCLOSE(fpout);
@@ -1835,7 +1835,7 @@ main(int argc, char *argv[])
fprintf(STDERR, " tIME = %s\n", tIME_string);
tIME_chunk_present = 0;
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
+#endif /* TIME_RFC1123 */
}
else
@@ -1924,7 +1924,7 @@ main(int argc, char *argv[])
#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
fprintf(STDERR, " tIME = %s\n", tIME_string);
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
+#endif /* TIME_RFC1123 */
}
}
diff --git a/pngtrans.c b/pngtrans.c
index add42d461..86c15c317 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -478,7 +478,7 @@ png_do_packswap(png_row_infop row_info, png_bytep row)
*rp = table[*rp];
}
}
-#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */
+#endif /* PACKSWAP || WRITE_PACKSWAP */
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
@@ -675,7 +675,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
#endif
}
}
-#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
+#endif /* READ_BGR || WRITE_BGR */
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
@@ -778,7 +778,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
}
}
}
-#endif /* PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED */
+#endif /* CHECK_FOR_INVALID_INDEX */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
@@ -844,7 +844,6 @@ png_get_current_pass_number(png_const_structrp png_ptr)
return png_ptr->pass;
return 8; /* invalid */
}
-#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */
-#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
- PNG_WRITE_USER_TRANSFORM_SUPPORTED */
-#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
+#endif /* USER_TRANSFORM_INFO */
+#endif /* READ_USER_TRANSFORM || WRITE_USER_TRANSFORM */
+#endif /* READ || WRITE */
diff --git a/pngwio.c b/pngwio.c
index 1b525f948..64df02549 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
- * Last changed in libpng 1.6.9 [February 6, 2014]
+ * Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Copyright (c) 1998-2014 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.)
@@ -151,7 +151,7 @@ png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr,
# endif
#else
PNG_UNUSED(output_flush_fn)
-#endif /* PNG_WRITE_FLUSH_SUPPORTED */
+#endif /* WRITE_FLUSH */
#ifdef PNG_READ_SUPPORTED
/* It is an error to read while writing a png file */
@@ -165,4 +165,4 @@ png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr,
}
#endif
}
-#endif /* PNG_WRITE_SUPPORTED */
+#endif /* WRITE */
diff --git a/pngwrite.c b/pngwrite.c
index 4410797de..7db5d4b33 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -69,7 +69,7 @@ write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr,
}
}
}
-#endif /* PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED */
+#endif /* WRITE_UNKNOWN_CHUNKS */
/* Writes all the PNG information. This is the suggested way to use the
* library. If you have a new chunk to add, make a function to write it,
@@ -497,7 +497,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
{
png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr,
error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
-#endif /* PNG_USER_MEM_SUPPORTED */
+#endif /* USER_MEM */
if (png_ptr != NULL)
{
/* Set the zlib control values to defaults; they can be overridden by the
@@ -521,7 +521,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
png_ptr->zlib_text_mem_level = 8;
png_ptr->zlib_text_window_bits = 15;
png_ptr->zlib_text_method = 8;
-#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */
+#endif /* WRITE_COMPRESSED_TEXT */
/* This is a highly dubious configuration option; by default it is off,
* but it may be appropriate for private builds that are testing
@@ -671,10 +671,10 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
*(rp + 5) = (png_byte)(blue & 0xff);
}
}
-#endif /* PNG_WRITE_16BIT_SUPPORTED */
+#endif /* WRITE_16BIT */
}
}
-#endif /* PNG_MNG_FEATURES_SUPPORTED */
+#endif /* MNG_FEATURES */
/* Called by user to write a row of image data */
void PNGAPI
@@ -915,7 +915,7 @@ png_write_flush(png_structrp png_ptr)
png_ptr->flush_rows = 0;
png_flush(png_ptr);
}
-#endif /* PNG_WRITE_FLUSH_SUPPORTED */
+#endif /* WRITE_FLUSH */
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
static void png_reset_filter_heuristics(png_structrp png_ptr);/* forward decl */
@@ -1019,7 +1019,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
case 6:
case 7: png_app_error(png_ptr, "Unknown row filter for method 0");
/* FALL THROUGH */
-#endif /* PNG_WRITE_FILTER_SUPPORTED */
+#endif /* WRITE_FILTER */
case PNG_FILTER_VALUE_NONE:
png_ptr->do_filter = PNG_FILTER_NONE; break;
@@ -1041,7 +1041,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
#else
default:
png_app_error(png_ptr, "Unknown row filter for method 0");
-#endif /* PNG_WRITE_FILTER_SUPPORTED */
+#endif /* WRITE_FILTER */
}
/* If we have allocated the row_buf, this means we have already started
@@ -1118,7 +1118,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
}
if (png_ptr->do_filter == PNG_NO_FILTERS)
-#endif /* PNG_WRITE_FILTER_SUPPORTED */
+#endif /* WRITE_FILTER */
png_ptr->do_filter = PNG_FILTER_NONE;
}
}
@@ -1370,7 +1370,7 @@ png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method,
}
}
#endif /* FIXED_POINT */
-#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
+#endif /* WRITE_WEIGHTED_FILTER */
void PNGAPI
png_set_compression_level(png_structrp png_ptr, int level)
@@ -1527,7 +1527,7 @@ png_set_text_compression_method(png_structrp png_ptr, int method)
png_ptr->zlib_text_method = method;
}
-#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */
+#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
/* end of API added to libpng-1.5.4 */
void PNGAPI
@@ -2450,6 +2450,6 @@ png_image_write_to_file(png_imagep image, const char *file_name,
else
return 0;
}
-#endif /* PNG_STDIO_SUPPORTED */
+#endif /* STDIO */
#endif /* SIMPLIFIED_WRITE */
-#endif /* PNG_WRITE_SUPPORTED */
+#endif /* WRITE */
diff --git a/pngwtran.c b/pngwtran.c
index e905b3f4a..05f1466e6 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -353,7 +353,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1];
}
}
-#endif /* PNG_WRITE_16BIT_SUPPORTED */
+#endif /* WRITE_16BIT */
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
@@ -392,7 +392,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1];
}
}
-#endif /* PNG_WRITE_16BIT_SUPPORTED */
+#endif /* WRITE_16BIT */
}
}
}
@@ -449,7 +449,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
-#endif /* PNG_WRITE_16BIT_SUPPORTED */
+#endif /* WRITE_16BIT */
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
@@ -487,7 +487,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
-#endif /* PNG_WRITE_16BIT_SUPPORTED */
+#endif /* WRITE_16BIT */
}
}
}
@@ -570,5 +570,5 @@ png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
png_do_invert(row_info, png_ptr->row_buf + 1);
#endif
}
-#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
-#endif /* PNG_WRITE_SUPPORTED */
+#endif /* WRITE_TRANSFORMS */
+#endif /* WRITE */
diff --git a/pngwutil.c b/pngwutil.c
index 4fbf6b815..24263aaf2 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -286,7 +286,7 @@ optimize_cmf(png_bytep data, png_alloc_size_t data_size)
}
}
}
-#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */
+#endif /* WRITE_OPTIMIZE_CMF */
/* Initialize the compressor for the appropriate type of compression. */
static int
@@ -663,7 +663,7 @@ png_write_compressed_data_out(png_structrp png_ptr, compression_state *comp)
if (output_len > 0)
png_error(png_ptr, "error writing ancillary chunked compressed data");
}
-#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */
+#endif /* WRITE_COMPRESSED_TEXT */
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
@@ -743,11 +743,11 @@ png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'");
}
-#endif /* PNG_WARNINGS_SUPPORTED */
+#endif /* WARNINGS */
return key_len;
}
-#endif
+#endif /* WRITE_TEXT || WRITE_pCAL || WRITE_iCCP || WRITE_sPLT */
/* Write the IHDR chunk, and update the png_struct with the necessary
* information. Note that the rest of this code depends upon this
@@ -2015,7 +2015,7 @@ png_write_start_row(png_structrp png_ptr)
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
}
}
-#endif /* PNG_WRITE_FILTER_SUPPORTED */
+#endif /* WRITE_FILTER */
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* If interlaced, we need to set up width and height of pass */
@@ -2905,7 +2905,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
#endif
p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
-#else /* PNG_SLOW_PAETH */
+#else /* SLOW_PAETH */
p = a + b - c;
pa = abs(p - a);
pb = abs(p - b);
@@ -2919,7 +2919,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
else
p = c;
-#endif /* PNG_SLOW_PAETH */
+#endif /* SLOW_PAETH */
v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);
@@ -2968,7 +2968,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
best_row = png_ptr->paeth_row;
}
}
-#endif /* PNG_WRITE_FILTER_SUPPORTED */
+#endif /* WRITE_FILTER */
/* Do the actual writing of the filtered row data from the chosen filter. */
png_write_filtered_row(png_ptr, best_row, row_info->rowbytes+1);
@@ -2988,7 +2988,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
png_ptr->prev_filters[j] = best_row[0];
}
#endif
-#endif /* PNG_WRITE_FILTER_SUPPORTED */
+#endif /* WRITE_FILTER */
}
@@ -3024,6 +3024,6 @@ png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
{
png_write_flush(png_ptr);
}
-#endif
+#endif /* WRITE_FLUSH */
}
-#endif /* PNG_WRITE_SUPPORTED */
+#endif /* WRITE */