summaryrefslogtreecommitdiff
path: root/pngrutil.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-04-28 07:49:28 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-04-28 07:49:28 -0500
commit34713ce23cdbc35de81049d89dcba5a1abbecd86 (patch)
treed1f139b1d422551507925505f3469650561eb749 /pngrutil.c
parentbb317fb0b26757b56c72265702c9d849fed9749d (diff)
downloadlibpng-34713ce23cdbc35de81049d89dcba5a1abbecd86.tar.gz
[devel] Fixed dependencies of GET_INT_32 - it doesn't require READ_INT_FUNCTIONS
because it has a macro equivalent.
Diffstat (limited to 'pngrutil.c')
-rw-r--r--pngrutil.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/pngrutil.c b/pngrutil.c
index b77af5129..04c1e639d 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.4.1 [April 27, 2010]
+ * Last changed in libpng 1.4.1 [April 28, 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.)
@@ -27,7 +27,11 @@ png_get_uint_31(png_structp png_ptr, png_bytep buf)
png_error(png_ptr, "PNG unsigned integer out of range");
return (i);
}
-#ifndef PNG_USE_READ_MACROS
+#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
+/* NOTE: the read macros will obscure these definitions, so that if
+ * PNG_USE_READ_MACROS is set the library will not use them internally,
+ * but the APIs will still be available externally.
+ */
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
png_uint_32 (PNGAPI
png_get_uint_32)(png_bytep buf)
@@ -44,7 +48,9 @@ png_get_uint_32)(png_bytep buf)
/* Grab a signed 32-bit integer from a buffer in big-endian format. The
* data is stored in the PNG file in two's complement format, and it is
* assumed that the machine format for signed integers is the same.
+ * Only used internally in this file.
*/
+#if defined(PNG_GET_INT_32_SUPPORTED)
png_int_32 (PNGAPI
png_get_int_32)(png_bytep buf)
{
@@ -55,6 +61,7 @@ png_get_int_32)(png_bytep buf)
return (i);
}
+#endif
/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
png_uint_16 (PNGAPI
@@ -65,7 +72,7 @@ png_get_uint_16)(png_bytep buf)
return (i);
}
-#endif /* PNG_USE_READ_MACROS */
+#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */
/* Read the chunk header (length + type name).
* Put the type name into png_ptr->chunk_name, and return the length.