提交 4e6b5e91 编写于 作者: G Glenn Randers-Pehrson

[devel] Changed some "#if defined(" to "ifdef"

and revised libpng style to mention not using the TAB character.
上级 9bf60833
Libpng 1.4.0beta81 - September 20, 2009 Libpng 1.4.0beta81 - September 23, 2009
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
...@@ -550,11 +550,12 @@ version 1.4.0beta80 [September 17, 2009] ...@@ -550,11 +550,12 @@ version 1.4.0beta80 [September 17, 2009]
(Dennis Gustafsson) (Dennis Gustafsson)
Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ")
version 1.4.0beta81 [September 20, 2009] version 1.4.0beta81 [September 23, 2009]
Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h
Expanded TAB characters in pngrtran.c Expanded TAB characters in pngrtran.c
Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid
compiler complaints about doubly declaring things "const". compiler complaints about doubly declaring things "const".
Changed some "#if defined(" to "ifdef"
version 1.4.0betaN [future] version 1.4.0betaN [future]
Build shared libraries with -lz and sometimes -lm. Build shared libraries with -lz and sometimes -lm.
......
...@@ -2236,11 +2236,12 @@ version 1.4.0beta80 [September 17, 2009] ...@@ -2236,11 +2236,12 @@ version 1.4.0beta80 [September 17, 2009]
(Dennis Gustafsson) (Dennis Gustafsson)
Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ")
version 1.4.0beta81 [September 20, 2009] version 1.4.0beta81 [September 23, 2009]
Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h
Expanded TAB characters in pngrtran.c Expanded TAB characters in pngrtran.c
Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid
compiler complaints about doubly declaring things "const". compiler complaints about doubly declaring things "const".
Changed some "#if defined(" to "ifdef"
version 1.4.0betaN [future] version 1.4.0betaN [future]
Build shared libraries with -lz and sometimes -lm. Build shared libraries with -lz and sometimes -lm.
......
libpng.txt - A description on how to use and modify libpng libpng.txt - A description on how to use and modify libpng
libpng version 1.4.0beta81 - September 17, 2009 libpng version 1.4.0beta81 - September 23, 2009
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson
...@@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng ...@@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.4.0beta81 - September 17, 2009 libpng versions 0.97, January 1998, through 1.4.0beta81 - September 23, 2009
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson
...@@ -3183,17 +3183,19 @@ cast, nor do we put one between a function name and the ...@@ -3183,17 +3183,19 @@ cast, nor do we put one between a function name and the
left parenthesis that follows it: left parenthesis that follows it:
for (i = 2; i > 0; --i) for (i = 2; i > 0; --i)
x[i] = a(x) + (int)b; y[i] = a(x) + (int)b;
We prefer #ifdef and #ifndef to #if defined() and if !defined() We prefer #ifdef and #ifndef to #if defined() and if !defined()
when there is only one macro being tested. when there is only one macro being tested.
We do not use the TAB character for indentation in the C sources.
Other rules can be inferred by inspecting the libpng Other rules can be inferred by inspecting the libpng
source. source.
XIII. Y2K Compliance in libpng XIII. Y2K Compliance in libpng
September 17, 2009 September 23, 2009
Since the PNG Development group is an ad-hoc body, we can't make Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
......
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.4.0beta81 - September 17, 2009 * libpng version 1.4.0beta81 - September 23, 2009
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.4.0beta81 - September 17, 2009: Glenn * libpng versions 0.97, January 1998, through 1.4.0beta81 - September 23, 2009: Glenn
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* *
* libpng versions 1.2.6, August 15, 2004, through 1.4.0beta81, September 17, 2009, are * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta81, September 23, 2009, are
* Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are * Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5 * distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors: * with the following individual added to the list of Contributing Authors:
...@@ -337,7 +337,7 @@ ...@@ -337,7 +337,7 @@
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.4.0beta81" #define PNG_LIBPNG_VER_STRING "1.4.0beta81"
#define PNG_HEADER_VERSION_STRING \ #define PNG_HEADER_VERSION_STRING \
" libpng version 1.4.0beta81 - September 17, 2009\n" " libpng version 1.4.0beta81 - September 23, 2009\n"
#define PNG_LIBPNG_VER_SONUM 14 #define PNG_LIBPNG_VER_SONUM 14
#define PNG_LIBPNG_VER_DLLNUM 14 #define PNG_LIBPNG_VER_DLLNUM 14
...@@ -403,11 +403,11 @@ ...@@ -403,11 +403,11 @@
* StringFileInfo block must contain a SpecialBuild string. * StringFileInfo block must contain a SpecialBuild string.
*/ */
#if defined(PNG_USER_PRIVATEBUILD) #ifdef PNG_USER_PRIVATEBUILD
# define PNG_LIBPNG_BUILD_TYPE \ # define PNG_LIBPNG_BUILD_TYPE \
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
#else #else
# if defined(PNG_LIBPNG_SPECIALBUILD) # ifdef PNG_LIBPNG_SPECIALBUILD
# define PNG_LIBPNG_BUILD_TYPE \ # define PNG_LIBPNG_BUILD_TYPE \
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
# else # else
...@@ -659,13 +659,13 @@ typedef struct png_info_struct ...@@ -659,13 +659,13 @@ typedef struct png_info_struct
float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
#endif #endif
#if defined(PNG_sRGB_SUPPORTED) #ifdef PNG_sRGB_SUPPORTED
/* GR-P, 0.96a */ /* GR-P, 0.96a */
/* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
#endif #endif
#if defined(PNG_TEXT_SUPPORTED) #ifdef PNG_TEXT_SUPPORTED
/* The tEXt, and zTXt chunks contain human-readable textual data in /* The tEXt, and zTXt chunks contain human-readable textual data in
* uncompressed, compressed, and optionally compressed forms, respectively. * uncompressed, compressed, and optionally compressed forms, respectively.
* The data in "text" is an array of pointers to uncompressed, * The data in "text" is an array of pointers to uncompressed,
...@@ -679,14 +679,14 @@ typedef struct png_info_struct ...@@ -679,14 +679,14 @@ typedef struct png_info_struct
png_textp text; /* array of comments read/to write */ png_textp text; /* array of comments read/to write */
#endif /* PNG_TEXT_SUPPORTED */ #endif /* PNG_TEXT_SUPPORTED */
#if defined(PNG_tIME_SUPPORTED) #ifdef PNG_tIME_SUPPORTED
/* The tIME chunk holds the last time the displayed image data was /* The tIME chunk holds the last time the displayed image data was
* modified. See the png_time struct for the contents of this struct. * modified. See the png_time struct for the contents of this struct.
*/ */
png_time mod_time; png_time mod_time;
#endif #endif
#if defined(PNG_sBIT_SUPPORTED) #ifdef PNG_sBIT_SUPPORTED
/* The sBIT chunk specifies the number of significant high-order bits /* The sBIT chunk specifies the number of significant high-order bits
* in the pixel data. Values are in the range [1, bit_depth], and are * in the pixel data. Values are in the range [1, bit_depth], and are
* only specified for the channels in the pixel data. The contents of * only specified for the channels in the pixel data. The contents of
...@@ -721,7 +721,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -721,7 +721,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
png_color_16 background; png_color_16 background;
#endif #endif
#if defined(PNG_oFFs_SUPPORTED) #ifdef PNG_oFFs_SUPPORTED
/* The oFFs chunk gives the offset in "offset_unit_type" units rightwards /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
* and downwards from the top-left corner of the display, page, or other * and downwards from the top-left corner of the display, page, or other
* application-specific co-ordinate space. See the PNG_OFFSET_ defines * application-specific co-ordinate space. See the PNG_OFFSET_ defines
...@@ -732,7 +732,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -732,7 +732,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
png_byte offset_unit_type; /* offset units type */ png_byte offset_unit_type; /* offset units type */
#endif #endif
#if defined(PNG_pHYs_SUPPORTED) #ifdef PNG_pHYs_SUPPORTED
/* The pHYs chunk gives the physical pixel density of the image for /* The pHYs chunk gives the physical pixel density of the image for
* display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
* defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
...@@ -742,7 +742,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -742,7 +742,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
#endif #endif
#if defined(PNG_hIST_SUPPORTED) #ifdef PNG_hIST_SUPPORTED
/* The hIST chunk contains the relative frequency or importance of the /* The hIST chunk contains the relative frequency or importance of the
* various palette entries, so that a viewer can intelligently select a * various palette entries, so that a viewer can intelligently select a
* reduced-color palette, if required. Data is an array of "num_palette" * reduced-color palette, if required. Data is an array of "num_palette"
...@@ -771,7 +771,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -771,7 +771,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
#endif #endif
#endif #endif
#if defined(PNG_pCAL_SUPPORTED) #ifdef PNG_pCAL_SUPPORTED
/* The pCAL chunk describes a transformation between the stored pixel /* The pCAL chunk describes a transformation between the stored pixel
* values and original physical data values used to create the image. * values and original physical data values used to create the image.
* The integer range [0, 2^bit_depth - 1] maps to the floating-point * The integer range [0, 2^bit_depth - 1] maps to the floating-point
...@@ -802,7 +802,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -802,7 +802,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
png_size_t unknown_chunks_num; png_size_t unknown_chunks_num;
#endif #endif
#if defined(PNG_iCCP_SUPPORTED) #ifdef PNG_iCCP_SUPPORTED
/* iCCP chunk data. */ /* iCCP chunk data. */
png_charp iccp_name; /* profile name */ png_charp iccp_name; /* profile name */
png_charp iccp_profile; /* International Color Consortium profile data */ png_charp iccp_profile; /* International Color Consortium profile data */
...@@ -811,13 +811,13 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -811,13 +811,13 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
png_byte iccp_compression; /* Always zero */ png_byte iccp_compression; /* Always zero */
#endif #endif
#if defined(PNG_sPLT_SUPPORTED) #ifdef PNG_sPLT_SUPPORTED
/* Data on sPLT chunks (there may be more than one). */ /* Data on sPLT chunks (there may be more than one). */
png_sPLT_tp splt_palettes; png_sPLT_tp splt_palettes;
png_uint_32 splt_palettes_num; png_uint_32 splt_palettes_num;
#endif #endif
#if defined(PNG_sCAL_SUPPORTED) #ifdef PNG_sCAL_SUPPORTED
/* The sCAL chunk describes the actual physical dimensions of the /* The sCAL chunk describes the actual physical dimensions of the
* subject matter of the graphic. The chunk contains a unit specification * subject matter of the graphic. The chunk contains a unit specification
* a byte value, and two ASCII strings representing floating-point * a byte value, and two ASCII strings representing floating-point
...@@ -836,7 +836,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) ...@@ -836,7 +836,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
#endif #endif
#endif #endif
#if defined(PNG_INFO_IMAGE_SUPPORTED) #ifdef PNG_INFO_IMAGE_SUPPORTED
/* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
/* Data valid if (valid & PNG_INFO_IDAT) non-zero */ /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
png_bytepp row_pointers; /* the image bits */ png_bytepp row_pointers; /* the image bits */
...@@ -1002,10 +1002,10 @@ typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, ...@@ -1002,10 +1002,10 @@ typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
png_row_infop, png_bytep)); png_row_infop, png_bytep));
#endif #endif
#if defined(PNG_USER_CHUNKS_SUPPORTED) #ifdef PNG_USER_CHUNKS_SUPPORTED
typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));
#endif #endif
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
#endif #endif
...@@ -1056,16 +1056,16 @@ struct png_struct_def ...@@ -1056,16 +1056,16 @@ struct png_struct_def
png_rw_ptr read_data_fn; /* function for reading input data */ png_rw_ptr read_data_fn; /* function for reading input data */
png_voidp io_ptr; /* ptr to application struct for I/O functions */ png_voidp io_ptr; /* ptr to application struct for I/O functions */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
png_user_transform_ptr read_user_transform_fn; /* user read transform */ png_user_transform_ptr read_user_transform_fn; /* user read transform */
#endif #endif
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
png_user_transform_ptr write_user_transform_fn; /* user write transform */ png_user_transform_ptr write_user_transform_fn; /* user write transform */
#endif #endif
/* These were added in libpng-1.0.2 */ /* These were added in libpng-1.0.2 */
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
png_voidp user_transform_ptr; /* user supplied struct for user transform */ png_voidp user_transform_ptr; /* user supplied struct for user transform */
...@@ -1126,18 +1126,18 @@ struct png_struct_def ...@@ -1126,18 +1126,18 @@ struct png_struct_def
png_uint_16 filler; /* filler bytes for pixel expansion */ png_uint_16 filler; /* filler bytes for pixel expansion */
#endif #endif
#if defined(PNG_bKGD_SUPPORTED) #ifdef PNG_bKGD_SUPPORTED
png_byte background_gamma_type; png_byte background_gamma_type;
# ifdef PNG_FLOATING_POINT_SUPPORTED # ifdef PNG_FLOATING_POINT_SUPPORTED
float background_gamma; float background_gamma;
# endif # endif
png_color_16 background; /* background color in screen gamma space */ png_color_16 background; /* background color in screen gamma space */
#if defined(PNG_READ_GAMMA_SUPPORTED) #ifdef PNG_READ_GAMMA_SUPPORTED
png_color_16 background_1; /* background normalized to gamma 1.0 */ png_color_16 background_1; /* background normalized to gamma 1.0 */
#endif #endif
#endif /* PNG_bKGD_SUPPORTED */ #endif /* PNG_bKGD_SUPPORTED */
#if defined(PNG_WRITE_FLUSH_SUPPORTED) #ifdef PNG_WRITE_FLUSH_SUPPORTED
png_flush_ptr output_flush_fn; /* Function for flushing output */ png_flush_ptr output_flush_fn; /* Function for flushing output */
png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */
png_uint_32 flush_rows; /* number of rows written since last flush */ png_uint_32 flush_rows; /* number of rows written since last flush */
...@@ -1193,7 +1193,7 @@ struct png_struct_def ...@@ -1193,7 +1193,7 @@ struct png_struct_def
int process_mode; /* what push library is currently doing */ int process_mode; /* what push library is currently doing */
int cur_palette; /* current push library palette index */ int cur_palette; /* current push library palette index */
# if defined(PNG_TEXT_SUPPORTED) # ifdef PNG_TEXT_SUPPORTED
png_size_t current_text_size; /* current size of text input data */ png_size_t current_text_size; /* current size of text input data */
png_size_t current_text_left; /* how much text left to read in input */ png_size_t current_text_left; /* how much text left to read in input */
png_charp current_text; /* current text chunk buffer */ png_charp current_text; /* current text chunk buffer */
...@@ -1211,7 +1211,7 @@ struct png_struct_def ...@@ -1211,7 +1211,7 @@ struct png_struct_def
png_uint_16 offset_table_count_free; png_uint_16 offset_table_count_free;
#endif #endif
#if defined(PNG_READ_DITHER_SUPPORTED) #ifdef PNG_READ_DITHER_SUPPORTED
png_bytep palette_lookup; /* lookup table for dithering */ png_bytep palette_lookup; /* lookup table for dithering */
png_bytep dither_index; /* index translation for palette files */ png_bytep dither_index; /* index translation for palette files */
#endif #endif
...@@ -1220,7 +1220,7 @@ struct png_struct_def ...@@ -1220,7 +1220,7 @@ struct png_struct_def
png_uint_16p hist; /* histogram */ png_uint_16p hist; /* histogram */
#endif #endif
#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
png_byte heuristic_method; /* heuristic for row filter selection */ png_byte heuristic_method; /* heuristic for row filter selection */
png_byte num_prev_filters; /* number of weights for previous rows */ png_byte num_prev_filters; /* number of weights for previous rows */
png_bytep prev_filters; /* filter type(s) of previous row(s) */ png_bytep prev_filters; /* filter type(s) of previous row(s) */
...@@ -1230,7 +1230,7 @@ struct png_struct_def ...@@ -1230,7 +1230,7 @@ struct png_struct_def
png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */
#endif #endif
#if defined(PNG_TIME_RFC1123_SUPPORTED) #ifdef PNG_TIME_RFC1123_SUPPORTED
png_charp time_buffer; /* String to hold RFC 1123 time text */ png_charp time_buffer; /* String to hold RFC 1123 time text */
#endif #endif
...@@ -1238,18 +1238,18 @@ struct png_struct_def ...@@ -1238,18 +1238,18 @@ struct png_struct_def
png_uint_32 free_me; /* flags items libpng is responsible for freeing */ png_uint_32 free_me; /* flags items libpng is responsible for freeing */
#if defined(PNG_USER_CHUNKS_SUPPORTED) #ifdef PNG_USER_CHUNKS_SUPPORTED
png_voidp user_chunk_ptr; png_voidp user_chunk_ptr;
png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
#endif #endif
#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int num_chunk_list; int num_chunk_list;
png_bytep chunk_list; png_bytep chunk_list;
#endif #endif
/* New members added in libpng-1.0.3 */ /* New members added in libpng-1.0.3 */
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
png_byte rgb_to_gray_status; png_byte rgb_to_gray_status;
/* These were changed from png_byte in libpng-1.0.6 */ /* These were changed from png_byte in libpng-1.0.6 */
png_uint_16 rgb_to_gray_red_coeff; png_uint_16 rgb_to_gray_red_coeff;
...@@ -1271,7 +1271,7 @@ struct png_struct_def ...@@ -1271,7 +1271,7 @@ struct png_struct_def
#endif #endif
/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
#if defined(PNG_MNG_FEATURES_SUPPORTED) #ifdef PNG_MNG_FEATURES_SUPPORTED
png_byte filter_type; png_byte filter_type;
#endif #endif
...@@ -1292,7 +1292,7 @@ struct png_struct_def ...@@ -1292,7 +1292,7 @@ struct png_struct_def
/* New member added in libpng-1.0.13 and 1.2.0 */ /* New member added in libpng-1.0.13 and 1.2.0 */
png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
#if defined(PNG_READ_DITHER_SUPPORTED) #ifdef PNG_READ_DITHER_SUPPORTED
/* The following three members were added at version 1.0.14 and 1.2.4 */ /* The following three members were added at version 1.0.14 and 1.2.4 */
png_bytep dither_sort; /* working sort array */ png_bytep dither_sort; /* working sort array */
png_bytep index_to_palette; /* where the original index currently is */ png_bytep index_to_palette; /* where the original index currently is */
...@@ -1314,7 +1314,7 @@ struct png_struct_def ...@@ -1314,7 +1314,7 @@ struct png_struct_def
#endif #endif
/* New member added in libpng-1.0.25 and 1.2.17 */ /* New member added in libpng-1.0.25 and 1.2.17 */
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
/* Storage for unknown chunk that the library doesn't recognize. */ /* Storage for unknown chunk that the library doesn't recognize. */
png_unknown_chunk unknown_chunk; png_unknown_chunk unknown_chunk;
#endif #endif
...@@ -1439,12 +1439,12 @@ extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, ...@@ -1439,12 +1439,12 @@ extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
#endif #endif
#if defined(PNG_TIME_RFC1123_SUPPORTED) #ifdef PNG_TIME_RFC1123_SUPPORTED
extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
PNGARG((png_structp png_ptr, png_timep ptime)); PNGARG((png_structp png_ptr, png_timep ptime));
#endif #endif
#if defined(PNG_WRITE_tIME_SUPPORTED) #ifdef PNG_WRITE_tIME_SUPPORTED
/* Convert from a struct tm to png_time */ /* Convert from a struct tm to png_time */
extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
struct tm FAR * ttime)); struct tm FAR * ttime));
...@@ -1454,7 +1454,7 @@ extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, ...@@ -1454,7 +1454,7 @@ extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
time_t ttime)); time_t ttime));
#endif /* PNG_WRITE_tIME_SUPPORTED */ #endif /* PNG_WRITE_tIME_SUPPORTED */
#if defined(PNG_READ_EXPAND_SUPPORTED) #ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
...@@ -1468,12 +1468,12 @@ extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); ...@@ -1468,12 +1468,12 @@ extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
#endif #endif
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* Expand the grayscale to 24-bit RGB if necessary. */ /* Expand the grayscale to 24-bit RGB if necessary. */
extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
#endif #endif
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* Reduce RGB to grayscale. */ /* Reduce RGB to grayscale. */
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
...@@ -1488,7 +1488,7 @@ extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp ...@@ -1488,7 +1488,7 @@ extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
png_colorp palette)); png_colorp palette));
#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
#endif #endif
...@@ -1502,7 +1502,7 @@ extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); ...@@ -1502,7 +1502,7 @@ extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
#endif #endif
#if defined(PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED) #ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
extern PNG_EXPORT(void,png_set_premultiply_alpha) extern PNG_EXPORT(void,png_set_premultiply_alpha)
PNGARG((png_structp png_ptr)); PNGARG((png_structp png_ptr));
#endif #endif
...@@ -1551,7 +1551,7 @@ extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); ...@@ -1551,7 +1551,7 @@ extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
#endif #endif
#if defined(PNG_READ_BACKGROUND_SUPPORTED) #ifdef PNG_READ_BACKGROUND_SUPPORTED
/* Handle alpha and tRNS by replacing with a background color. */ /* Handle alpha and tRNS by replacing with a background color. */
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
...@@ -1564,19 +1564,19 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, ...@@ -1564,19 +1564,19 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
#define PNG_BACKGROUND_GAMMA_UNIQUE 3 #define PNG_BACKGROUND_GAMMA_UNIQUE 3
#endif #endif
#if defined(PNG_READ_16_TO_8_SUPPORTED) #ifdef PNG_READ_16_TO_8_SUPPORTED
/* Strip the second byte of information from a 16-bit depth file. */ /* Strip the second byte of information from a 16-bit depth file. */
extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
#endif #endif
#if defined(PNG_READ_DITHER_SUPPORTED) #ifdef PNG_READ_DITHER_SUPPORTED
/* Turn on dithering, and reduce the palette to the number of colors available. */ /* Turn on dithering, and reduce the palette to the number of colors available. */
extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
png_colorp palette, int num_palette, int maximum_colors, png_colorp palette, int num_palette, int maximum_colors,
png_uint_16p histogram, int full_dither)); png_uint_16p histogram, int full_dither));
#endif #endif
#if defined(PNG_READ_GAMMA_SUPPORTED) #ifdef PNG_READ_GAMMA_SUPPORTED
/* Handle gamma correction. Screen_gamma=(display_exponent) */ /* Handle gamma correction. Screen_gamma=(display_exponent) */
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
...@@ -1585,7 +1585,7 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, ...@@ -1585,7 +1585,7 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
#endif #endif
#if defined(PNG_WRITE_FLUSH_SUPPORTED) #ifdef PNG_WRITE_FLUSH_SUPPORTED
/* Set how many lines between output flushes - 0 for no flushing */ /* Set how many lines between output flushes - 0 for no flushing */
extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
/* Flush the current PNG output buffer */ /* Flush the current PNG output buffer */
...@@ -1717,7 +1717,7 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, ...@@ -1717,7 +1717,7 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
#define PNG_FILTER_VALUE_PAETH 4 #define PNG_FILTER_VALUE_PAETH 4
#define PNG_FILTER_VALUE_LAST 5 #define PNG_FILTER_VALUE_LAST 5
#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */ #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */
/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ /* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
* defines, either the default (minimum-sum-of-absolute-differences), or * defines, either the default (minimum-sum-of-absolute-differences), or
* the experimental method (weighted-minimum-sum-of-absolute-differences). * the experimental method (weighted-minimum-sum-of-absolute-differences).
...@@ -1942,7 +1942,7 @@ extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, ...@@ -1942,7 +1942,7 @@ extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
png_voidp ptr)); png_voidp ptr));
#endif #endif
#if defined(USE_FAR_KEYWORD) /* memory model conversion function */ #ifdef USE_FAR_KEYWORD /* memory model conversion function */
extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
int check)); int check));
#endif /* USE_FAR_KEYWORD */ #endif /* USE_FAR_KEYWORD */
...@@ -1997,7 +1997,7 @@ png_infop info_ptr, png_uint_32 flag)); ...@@ -1997,7 +1997,7 @@ png_infop info_ptr, png_uint_32 flag));
extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
#if defined(PNG_INFO_IMAGE_SUPPORTED) #ifdef PNG_INFO_IMAGE_SUPPORTED
/* Returns row_pointers, which is an array of pointers to scanlines that was /* Returns row_pointers, which is an array of pointers to scanlines that was
* returned from png_read_png(). * returned from png_read_png().
*/ */
...@@ -2073,17 +2073,17 @@ png_ptr, png_infop info_ptr)); ...@@ -2073,17 +2073,17 @@ png_ptr, png_infop info_ptr));
extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
#if defined(PNG_bKGD_SUPPORTED) #ifdef PNG_bKGD_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_16p *background)); png_infop info_ptr, png_color_16p *background));
#endif #endif
#if defined(PNG_bKGD_SUPPORTED) #ifdef PNG_bKGD_SUPPORTED
extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_16p background)); png_infop info_ptr, png_color_16p background));
#endif #endif
#if defined(PNG_cHRM_SUPPORTED) #ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
png_infop info_ptr, double *white_x, double *white_y, double *red_x, png_infop info_ptr, double *white_x, double *white_y, double *red_x,
...@@ -2099,7 +2099,7 @@ extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, ...@@ -2099,7 +2099,7 @@ extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
#endif #endif
#endif #endif
#if defined(PNG_cHRM_SUPPORTED) #ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
png_infop info_ptr, double white_x, double white_y, double red_x, png_infop info_ptr, double white_x, double white_y, double red_x,
...@@ -2114,7 +2114,7 @@ extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, ...@@ -2114,7 +2114,7 @@ extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
#endif #endif
#endif #endif
#if defined(PNG_gAMA_SUPPORTED) #ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
png_infop info_ptr, double *file_gamma)); png_infop info_ptr, double *file_gamma));
...@@ -2123,7 +2123,7 @@ extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, ...@@ -2123,7 +2123,7 @@ extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_fixed_point *int_file_gamma)); png_infop info_ptr, png_fixed_point *int_file_gamma));
#endif #endif
#if defined(PNG_gAMA_SUPPORTED) #ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
png_infop info_ptr, double file_gamma)); png_infop info_ptr, double file_gamma));
...@@ -2132,12 +2132,12 @@ extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, ...@@ -2132,12 +2132,12 @@ extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_fixed_point int_file_gamma)); png_infop info_ptr, png_fixed_point int_file_gamma));
#endif #endif
#if defined(PNG_hIST_SUPPORTED) #ifdef PNG_hIST_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_16p *hist)); png_infop info_ptr, png_uint_16p *hist));
#endif #endif
#if defined(PNG_hIST_SUPPORTED) #ifdef PNG_hIST_SUPPORTED
extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_16p hist)); png_infop info_ptr, png_uint_16p hist));
#endif #endif
...@@ -2152,36 +2152,36 @@ extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, ...@@ -2152,36 +2152,36 @@ extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
int color_type, int interlace_method, int compression_method, int color_type, int interlace_method, int compression_method,
int filter_method)); int filter_method));
#if defined(PNG_oFFs_SUPPORTED) #ifdef PNG_oFFs_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
int *unit_type)); int *unit_type));
#endif #endif
#if defined(PNG_oFFs_SUPPORTED) #ifdef PNG_oFFs_SUPPORTED
extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
int unit_type)); int unit_type));
#endif #endif
#if defined(PNG_pCAL_SUPPORTED) #ifdef PNG_pCAL_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
int *type, int *nparams, png_charp *units, png_charpp *params)); int *type, int *nparams, png_charp *units, png_charpp *params));
#endif #endif
#if defined(PNG_pCAL_SUPPORTED) #ifdef PNG_pCAL_SUPPORTED
extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
int type, int nparams, png_charp units, png_charpp params)); int type, int nparams, png_charp units, png_charpp params));
#endif #endif
#if defined(PNG_pHYs_SUPPORTED) #ifdef PNG_pHYs_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
#endif #endif
#if defined(PNG_pHYs_SUPPORTED) #ifdef PNG_pHYs_SUPPORTED
extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
#endif #endif
...@@ -2192,53 +2192,53 @@ extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, ...@@ -2192,53 +2192,53 @@ extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_colorp palette, int num_palette)); png_infop info_ptr, png_colorp palette, int num_palette));
#if defined(PNG_sBIT_SUPPORTED) #ifdef PNG_sBIT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_8p *sig_bit)); png_infop info_ptr, png_color_8p *sig_bit));
#endif #endif
#if defined(PNG_sBIT_SUPPORTED) #ifdef PNG_sBIT_SUPPORTED
extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_8p sig_bit)); png_infop info_ptr, png_color_8p sig_bit));
#endif #endif
#if defined(PNG_sRGB_SUPPORTED) #ifdef PNG_sRGB_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
png_infop info_ptr, int *intent)); png_infop info_ptr, int *intent));
#endif #endif
#if defined(PNG_sRGB_SUPPORTED) #ifdef PNG_sRGB_SUPPORTED
extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
png_infop info_ptr, int intent)); png_infop info_ptr, int intent));
extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
png_infop info_ptr, int intent)); png_infop info_ptr, int intent));
#endif #endif
#if defined(PNG_iCCP_SUPPORTED) #ifdef PNG_iCCP_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charpp name, int *compression_type, png_infop info_ptr, png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen)); png_charpp profile, png_uint_32 *proflen));
/* Note to maintainer: profile should be png_bytepp */ /* Note to maintainer: profile should be png_bytepp */
#endif #endif
#if defined(PNG_iCCP_SUPPORTED) #ifdef PNG_iCCP_SUPPORTED
extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charp name, int compression_type, png_infop info_ptr, png_charp name, int compression_type,
png_charp profile, png_uint_32 proflen)); png_charp profile, png_uint_32 proflen));
/* Note to maintainer: profile should be png_bytep */ /* Note to maintainer: profile should be png_bytep */
#endif #endif
#if defined(PNG_sPLT_SUPPORTED) #ifdef PNG_sPLT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_sPLT_tpp entries)); png_infop info_ptr, png_sPLT_tpp entries));
#endif #endif
#if defined(PNG_sPLT_SUPPORTED) #ifdef PNG_sPLT_SUPPORTED
extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_sPLT_tp entries, int nentries)); png_infop info_ptr, png_sPLT_tp entries, int nentries));
#endif #endif
#if defined(PNG_TEXT_SUPPORTED) #ifdef PNG_TEXT_SUPPORTED
/* png_get_text also returns the number of text chunks in *num_text */ /* png_get_text also returns the number of text chunks in *num_text */
extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_textp *text_ptr, int *num_text)); png_infop info_ptr, png_textp *text_ptr, int *num_text));
...@@ -2251,37 +2251,37 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, ...@@ -2251,37 +2251,37 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
* they will never be NULL pointers. * they will never be NULL pointers.
*/ */
#if defined(PNG_TEXT_SUPPORTED) #ifdef PNG_TEXT_SUPPORTED
extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_textp text_ptr, int num_text)); png_infop info_ptr, png_textp text_ptr, int num_text));
#endif #endif
#if defined(PNG_tIME_SUPPORTED) #ifdef PNG_tIME_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_timep *mod_time)); png_infop info_ptr, png_timep *mod_time));
#endif #endif
#if defined(PNG_tIME_SUPPORTED) #ifdef PNG_tIME_SUPPORTED
extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_timep mod_time)); png_infop info_ptr, png_timep mod_time));
#endif #endif
#if defined(PNG_tRNS_SUPPORTED) #ifdef PNG_tRNS_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_bytep *trans_alpha, int *num_trans, png_infop info_ptr, png_bytep *trans_alpha, int *num_trans,
png_color_16p *trans_color)); png_color_16p *trans_color));
#endif #endif
#if defined(PNG_tRNS_SUPPORTED) #ifdef PNG_tRNS_SUPPORTED
extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_bytep trans_alpha, int num_trans, png_infop info_ptr, png_bytep trans_alpha, int num_trans,
png_color_16p trans_color)); png_color_16p trans_color));
#endif #endif
#if defined(PNG_tRNS_SUPPORTED) #ifdef PNG_tRNS_SUPPORTED
#endif #endif
#if defined(PNG_sCAL_SUPPORTED) #ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, int *unit, double *width, double *height)); png_infop info_ptr, int *unit, double *width, double *height));
...@@ -2293,7 +2293,7 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, ...@@ -2293,7 +2293,7 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
#endif #endif
#endif /* PNG_sCAL_SUPPORTED */ #endif /* PNG_sCAL_SUPPORTED */
#if defined(PNG_sCAL_SUPPORTED) #ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, int unit, double width, double height)); png_infop info_ptr, int unit, double width, double height));
...@@ -2320,7 +2320,7 @@ extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp ...@@ -2320,7 +2320,7 @@ extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
chunk_name)); chunk_name));
#endif #endif
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
extern PNG_EXPORT(void, png_set_unknown_chunk_location) extern PNG_EXPORT(void, png_set_unknown_chunk_location)
...@@ -2336,7 +2336,7 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp ...@@ -2336,7 +2336,7 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
png_infop info_ptr, int mask)); png_infop info_ptr, int mask));
#if defined(PNG_INFO_IMAGE_SUPPORTED) #ifdef PNG_INFO_IMAGE_SUPPORTED
/* The "params" pointer is currently not used and is for future expansion. */ /* The "params" pointer is currently not used and is for future expansion. */
extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_infop info_ptr,
...@@ -2514,7 +2514,7 @@ png_infop info_ptr)); ...@@ -2514,7 +2514,7 @@ png_infop info_ptr));
PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr, PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
#if defined(PNG_pHYs_SUPPORTED) #ifdef PNG_pHYs_SUPPORTED
PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr, PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
#endif /* PNG_pHYs_SUPPORTED */ #endif /* PNG_pHYs_SUPPORTED */
...@@ -2598,7 +2598,7 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) ...@@ -2598,7 +2598,7 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
# define png_get_uint_16(buf) \ # define png_get_uint_16(buf) \
(((png_uint_32)(*(buf)) << 8) + \ (((png_uint_32)(*(buf)) << 8) + \
((png_uint_32)(*((buf) + 1)))) ((png_uint_32)(*((buf) + 1))))
#if defined(PNG_GET_INT_32_SUPPORTED) #ifdef PNG_GET_INT_32_SUPPORTED
# define png_get_int_32(buf) \ # define png_get_int_32(buf) \
(((png_int_32)(*(buf)) << 24) + \ (((png_int_32)(*(buf)) << 24) + \
((png_int_32)(*((buf) + 1)) << 16) + \ ((png_int_32)(*((buf) + 1)) << 16) + \
...@@ -2608,7 +2608,7 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) ...@@ -2608,7 +2608,7 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
#else #else
extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
#if defined(PNG_GET_INT_32_SUPPORTED) #ifdef PNG_GET_INT_32_SUPPORTED
extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
#endif #endif
#endif #endif
......
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.4.0beta81 - September 17, 2009 * libpng version 1.4.0beta81 - September 23, 2009
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
/* Enabled by default in 1.2.0. You can disable this if you don't need to /* Enabled by default in 1.2.0. You can disable this if you don't need to
support PNGs that are embedded in MNG datastreams */ support PNGs that are embedded in MNG datastreams */
#if !defined(PNG_NO_MNG_FEATURES) #ifndef PNG_NO_MNG_FEATURES
# ifndef PNG_MNG_FEATURES_SUPPORTED # ifndef PNG_MNG_FEATURES_SUPPORTED
# define PNG_MNG_FEATURES_SUPPORTED # define PNG_MNG_FEATURES_SUPPORTED
# endif # endif
...@@ -200,44 +200,44 @@ ...@@ -200,44 +200,44 @@
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults * PNG_BUILD_DLL and PNG_STATIC because those change some defaults
* such as CONSOLE_IO. * such as CONSOLE_IO.
*/ */
#if defined(__CYGWIN__) #ifdef __CYGWIN__
# if defined(ALL_STATIC) # ifdef ALL_STATIC
# if defined(PNG_BUILD_DLL) # ifdef PNG_BUILD_DLL
# undef PNG_BUILD_DLL # undef PNG_BUILD_DLL
# endif # endif
# if defined(PNG_USE_DLL) # ifdef PNG_USE_DLL
# undef PNG_USE_DLL # undef PNG_USE_DLL
# endif # endif
# if defined(PNG_DLL) # ifdef PNG_DLL
# undef PNG_DLL # undef PNG_DLL
# endif # endif
# if !defined(PNG_STATIC) # ifndef PNG_STATIC
# define PNG_STATIC # define PNG_STATIC
# endif # endif
# else # else
# if defined (PNG_BUILD_DLL) # ifdef PNG_BUILD_DLL
# if defined(PNG_STATIC) # ifdef PNG_STATIC
# undef PNG_STATIC # undef PNG_STATIC
# endif # endif
# if defined(PNG_USE_DLL) # ifdef PNG_USE_DLL
# undef PNG_USE_DLL # undef PNG_USE_DLL
# endif # endif
# if !defined(PNG_DLL) # ifndef PNG_DLL
# define PNG_DLL # define PNG_DLL
# endif # endif
# else # else
# if defined(PNG_STATIC) # ifdef PNG_STATIC
# if defined(PNG_USE_DLL) # ifdef PNG_USE_DLL
# undef PNG_USE_DLL # undef PNG_USE_DLL
# endif # endif
# if defined(PNG_DLL) # ifdef PNG_DLL
# undef PNG_DLL # undef PNG_DLL
# endif # endif
# else # else
# if !defined(PNG_USE_DLL) # ifndef PNG_USE_DLL
# define PNG_USE_DLL # define PNG_USE_DLL
# endif # endif
# if !defined(PNG_DLL) # ifndef PNG_DLL
# define PNG_DLL # define PNG_DLL
# endif # endif
# endif # endif
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
# define PNG_STDIO_SUPPORTED # define PNG_STDIO_SUPPORTED
#endif #endif
#if defined(_WIN32_WCE) #ifdef _WIN32_WCE
# include <windows.h> # include <windows.h>
/* Console I/O functions are not supported on WindowsCE */ /* Console I/O functions are not supported on WindowsCE */
# define PNG_NO_CONSOLE_IO # define PNG_NO_CONSOLE_IO
...@@ -1029,8 +1029,8 @@ ...@@ -1029,8 +1029,8 @@
#endif #endif
/* need the time information for reading tIME chunks */ /* need the time information for reading tIME chunks */
#if defined(PNG_tIME_SUPPORTED) #ifdef PNG_tIME_SUPPORTED
# if !defined(_WIN32_WCE) # ifndef _WIN32_WCE
/* "time.h" functions are not supported on WindowsCE */ /* "time.h" functions are not supported on WindowsCE */
# include <time.h> # include <time.h>
# endif # endif
...@@ -1103,8 +1103,8 @@ typedef unsigned char png_byte; ...@@ -1103,8 +1103,8 @@ typedef unsigned char png_byte;
*/ */
/* MSC Medium model */ /* MSC Medium model */
#if defined(FAR) #ifdef FAR
# if defined(M_I86MM) # ifdef M_I86MM
# define USE_FAR_KEYWORD # define USE_FAR_KEYWORD
# define FARDATA FAR # define FARDATA FAR
# include <dos.h> # include <dos.h>
...@@ -1137,7 +1137,7 @@ typedef char FAR * png_charp; ...@@ -1137,7 +1137,7 @@ typedef char FAR * png_charp;
typedef png_fixed_point FAR * png_fixed_point_p; typedef png_fixed_point FAR * png_fixed_point_p;
#ifndef PNG_NO_STDIO #ifndef PNG_NO_STDIO
#if defined(_WIN32_WCE) #ifdef _WIN32_WCE
typedef HANDLE png_FILE_p; typedef HANDLE png_FILE_p;
#else #else
typedef FILE * png_FILE_p; typedef FILE * png_FILE_p;
...@@ -1186,7 +1186,7 @@ typedef char FAR * FAR * FAR * png_charppp; ...@@ -1186,7 +1186,7 @@ typedef char FAR * FAR * FAR * png_charppp;
# define PNG_DLL # define PNG_DLL
#endif #endif
#if defined(__CYGWIN__) #ifdef __CYGWIN__
# undef PNGAPI # undef PNGAPI
# define PNGAPI __cdecl # define PNGAPI __cdecl
# undef PNG_IMPEXP # undef PNG_IMPEXP
...@@ -1229,7 +1229,7 @@ typedef char FAR * FAR * FAR * png_charppp; ...@@ -1229,7 +1229,7 @@ typedef char FAR * FAR * FAR * png_charppp;
# define PNG_IMPEXP # define PNG_IMPEXP
# endif # endif
# if !defined(PNG_IMPEXP) # ifndef PNG_IMPEXP
# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
...@@ -1240,7 +1240,7 @@ typedef char FAR * FAR * FAR * png_charppp; ...@@ -1240,7 +1240,7 @@ typedef char FAR * FAR * FAR * png_charppp;
# define PNG_EXPORT PNG_EXPORT_TYPE1 # define PNG_EXPORT PNG_EXPORT_TYPE1
# else # else
# define PNG_EXPORT PNG_EXPORT_TYPE2 # define PNG_EXPORT PNG_EXPORT_TYPE2
# if defined(PNG_BUILD_DLL) # ifdef PNG_BUILD_DLL
# define PNG_IMPEXP __export # define PNG_IMPEXP __export
# else # else
# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
...@@ -1250,8 +1250,8 @@ typedef char FAR * FAR * FAR * png_charppp; ...@@ -1250,8 +1250,8 @@ typedef char FAR * FAR * FAR * png_charppp;
# endif # endif
# endif # endif
# if !defined(PNG_IMPEXP) # ifndef PNG_IMPEXP
# if defined(PNG_BUILD_DLL) # ifdef PNG_BUILD_DLL
# define PNG_IMPEXP __declspec(dllexport) # define PNG_IMPEXP __declspec(dllexport)
# else # else
# define PNG_IMPEXP __declspec(dllimport) # define PNG_IMPEXP __declspec(dllimport)
...@@ -1306,7 +1306,7 @@ typedef char FAR * FAR * FAR * png_charppp; ...@@ -1306,7 +1306,7 @@ typedef char FAR * FAR * FAR * png_charppp;
# endif # endif
#endif #endif
#if defined(USE_FAR_KEYWORD) #ifdef USE_FAR_KEYWORD
/* use this to make far-to-near assignments */ /* use this to make far-to-near assignments */
# define CHECK 1 # define CHECK 1
# define NOCHECK 0 # define NOCHECK 0
...@@ -1320,7 +1320,7 @@ typedef char FAR * FAR * FAR * png_charppp; ...@@ -1320,7 +1320,7 @@ typedef char FAR * FAR * FAR * png_charppp;
# define png_memset _fmemset # define png_memset _fmemset
# define png_sprintf sprintf # define png_sprintf sprintf
#else #else
# if defined(_WINDOWS_) /* favor Windows over C runtime fns */ # ifdef _WINDOWS_ /* favor Windows over C runtime fns */
# define CVT_PTR(ptr) (ptr) # define CVT_PTR(ptr) (ptr)
# define CVT_PTR_NOCHECK(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr)
# define png_strcpy lstrcpyA # define png_strcpy lstrcpyA
......
/* pngpriv.h - private declarations for use inside libpng /* pngpriv.h - private declarations for use inside libpng
* *
* libpng version 1.4.0beta81 - September 20, 2009 * libpng version 1.4.0beta81 - September 23, 2009
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
* them inside an appropriate ifdef/endif pair for portability. * them inside an appropriate ifdef/endif pair for portability.
*/ */
#if defined(PNG_FLOATING_POINT_SUPPORTED) #ifdef PNG_FLOATING_POINT_SUPPORTED
# if defined(MACOS) # ifdef MACOS
/* We need to check that <math.h> hasn't already been included earlier /* We need to check that <math.h> hasn't already been included earlier
* as it seems it doesn't agree with <fp.h>, yet we should really use * as it seems it doesn't agree with <fp.h>, yet we should really use
* <fp.h> if possible. * <fp.h> if possible.
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
defined(_WIN32) || defined(__WIN32__) defined(_WIN32) || defined(__WIN32__)
# include <windows.h> /* defines _WINDOWS_ macro */ # include <windows.h> /* defines _WINDOWS_ macro */
/* I have no idea why is this necessary... */ /* I have no idea why is this necessary... */
# if defined(_MSC_VER) # ifdef _MSC_VER
# include <malloc.h> # include <malloc.h>
# endif # endif
#endif #endif
...@@ -325,7 +325,7 @@ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); ...@@ -325,7 +325,7 @@ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
png_size_t length)); png_size_t length));
#if defined(PNG_WRITE_FLUSH_SUPPORTED) #ifdef PNG_WRITE_FLUSH_SUPPORTED
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
#endif #endif
...@@ -347,7 +347,7 @@ PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, ...@@ -347,7 +347,7 @@ PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
#if defined(PNG_WRITE_gAMA_SUPPORTED) #ifdef PNG_WRITE_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
#endif #endif
...@@ -357,12 +357,12 @@ PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_poin ...@@ -357,12 +357,12 @@ PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_poin
#endif #endif
#endif #endif
#if defined(PNG_WRITE_sBIT_SUPPORTED) #ifdef PNG_WRITE_sBIT_SUPPORTED
PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
int color_type)); int color_type));
#endif #endif
#if defined(PNG_WRITE_cHRM_SUPPORTED) #ifdef PNG_WRITE_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
double white_x, double white_y, double white_x, double white_y,
...@@ -376,34 +376,34 @@ PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, ...@@ -376,34 +376,34 @@ PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
png_fixed_point int_blue_y)); png_fixed_point int_blue_y));
#endif #endif
#if defined(PNG_WRITE_sRGB_SUPPORTED) #ifdef PNG_WRITE_sRGB_SUPPORTED
PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
int intent)); int intent));
#endif #endif
#if defined(PNG_WRITE_iCCP_SUPPORTED) #ifdef PNG_WRITE_iCCP_SUPPORTED
PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
png_charp name, int compression_type, png_charp name, int compression_type,
png_charp profile, int proflen)); png_charp profile, int proflen));
/* Note to maintainer: profile should be png_bytep */ /* Note to maintainer: profile should be png_bytep */
#endif #endif
#if defined(PNG_WRITE_sPLT_SUPPORTED) #ifdef PNG_WRITE_sPLT_SUPPORTED
PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
png_sPLT_tp palette)); png_sPLT_tp palette));
#endif #endif
#if defined(PNG_WRITE_tRNS_SUPPORTED) #ifdef PNG_WRITE_tRNS_SUPPORTED
PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
png_color_16p values, int number, int color_type)); png_color_16p values, int number, int color_type));
#endif #endif
#if defined(PNG_WRITE_bKGD_SUPPORTED) #ifdef PNG_WRITE_bKGD_SUPPORTED
PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
png_color_16p values, int color_type)); png_color_16p values, int color_type));
#endif #endif
#if defined(PNG_WRITE_hIST_SUPPORTED) #ifdef PNG_WRITE_hIST_SUPPORTED
PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
int num_hist)); int num_hist));
#endif #endif
...@@ -414,50 +414,50 @@ PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, ...@@ -414,50 +414,50 @@ PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
png_charp key, png_charpp new_key)); png_charp key, png_charpp new_key));
#endif #endif
#if defined(PNG_WRITE_tEXt_SUPPORTED) #ifdef PNG_WRITE_tEXt_SUPPORTED
PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
png_charp text, png_size_t text_len)); png_charp text, png_size_t text_len));
#endif #endif
#if defined(PNG_WRITE_zTXt_SUPPORTED) #ifdef PNG_WRITE_zTXt_SUPPORTED
PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
png_charp text, png_size_t text_len, int compression)); png_charp text, png_size_t text_len, int compression));
#endif #endif
#if defined(PNG_WRITE_iTXt_SUPPORTED) #ifdef PNG_WRITE_iTXt_SUPPORTED
PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
int compression, png_charp key, png_charp lang, png_charp lang_key, int compression, png_charp key, png_charp lang, png_charp lang_key,
png_charp text)); png_charp text));
#endif #endif
#if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.0.14 and 1.2.4 */ #ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */
PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
png_infop info_ptr, png_textp text_ptr, int num_text)); png_infop info_ptr, png_textp text_ptr, int num_text));
#endif #endif
#if defined(PNG_WRITE_oFFs_SUPPORTED) #ifdef PNG_WRITE_oFFs_SUPPORTED
PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
png_int_32 x_offset, png_int_32 y_offset, int unit_type)); png_int_32 x_offset, png_int_32 y_offset, int unit_type));
#endif #endif
#if defined(PNG_WRITE_pCAL_SUPPORTED) #ifdef PNG_WRITE_pCAL_SUPPORTED
PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
png_int_32 X0, png_int_32 X1, int type, int nparams, png_int_32 X0, png_int_32 X1, int type, int nparams,
png_charp units, png_charpp params)); png_charp units, png_charpp params));
#endif #endif
#if defined(PNG_WRITE_pHYs_SUPPORTED) #ifdef PNG_WRITE_pHYs_SUPPORTED
PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
int unit_type)); int unit_type));
#endif #endif
#if defined(PNG_WRITE_tIME_SUPPORTED) #ifdef PNG_WRITE_tIME_SUPPORTED
PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
png_timep mod_time)); png_timep mod_time));
#endif #endif
#if defined(PNG_WRITE_sCAL_SUPPORTED) #ifdef PNG_WRITE_sCAL_SUPPORTED
#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) #if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
int unit, double width, double height)); int unit, double width, double height));
...@@ -475,7 +475,7 @@ PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); ...@@ -475,7 +475,7 @@ PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
/* Internal use only. Called before first row of data */ /* Internal use only. Called before first row of data */
PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
#if defined(PNG_READ_GAMMA_SUPPORTED) #ifdef PNG_READ_GAMMA_SUPPORTED
PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)); PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
#endif #endif
...@@ -483,7 +483,7 @@ PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)); ...@@ -483,7 +483,7 @@ PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
int mask)); int mask));
#if defined(PNG_READ_INTERLACING_SUPPORTED) #ifdef PNG_READ_INTERLACING_SUPPORTED
/* Expand an interlaced row */ /* Expand an interlaced row */
/* OLD pre-1.0.9 interface: /* OLD pre-1.0.9 interface:
PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
...@@ -494,7 +494,7 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); ...@@ -494,7 +494,7 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ /* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
#if defined(PNG_WRITE_INTERLACING_SUPPORTED) #ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Grab pixels out of a row for an interlaced pass */ /* Grab pixels out of a row for an interlaced pass */
PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
png_bytep row, int pass)); png_bytep row, int pass));
...@@ -521,27 +521,27 @@ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, ...@@ -521,27 +521,27 @@ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
/* These are the functions that do the transformations */ /* These are the functions that do the transformations */
#if defined(PNG_READ_FILLER_SUPPORTED) #ifdef PNG_READ_FILLER_SUPPORTED
PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 filler, png_uint_32 flags)); png_bytep row, png_uint_32 filler, png_uint_32 flags));
#endif #endif
#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
png_bytep row)); png_bytep row));
#endif #endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
png_bytep row)); png_bytep row));
#endif #endif
#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
png_bytep row)); png_bytep row));
#endif #endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
png_bytep row)); png_bytep row));
#endif #endif
...@@ -552,7 +552,7 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, ...@@ -552,7 +552,7 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 flags)); png_bytep row, png_uint_32 flags));
#endif #endif
#if defined(PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED) #ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_premultiply_alpha PNG_EXTERN void png_do_read_premultiply_alpha
PNGARG((png_row_infop row_info, png_bytep row)); PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
...@@ -565,21 +565,21 @@ PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); ...@@ -565,21 +565,21 @@ PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
row_info, png_bytep row)); row_info, png_bytep row));
#endif #endif
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
png_bytep row)); png_bytep row));
#endif #endif
#if defined(PNG_READ_PACK_SUPPORTED) #ifdef PNG_READ_PACK_SUPPORTED
PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
#if defined(PNG_READ_SHIFT_SUPPORTED) #ifdef PNG_READ_SHIFT_SUPPORTED
PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
png_color_8p sig_bits)); png_color_8p sig_bits));
#endif #endif
...@@ -588,15 +588,15 @@ PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, ...@@ -588,15 +588,15 @@ PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
#if defined(PNG_READ_16_TO_8_SUPPORTED) #ifdef PNG_READ_16_TO_8_SUPPORTED
PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
#if defined(PNG_READ_DITHER_SUPPORTED) #ifdef PNG_READ_DITHER_SUPPORTED
PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
# if defined(PNG_CORRECT_PALETTE_SUPPORTED) # ifdef PNG_CORRECT_PALETTE_SUPPORTED
PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
png_colorp palette, int num_palette)); png_colorp palette, int num_palette));
# endif # endif
...@@ -606,18 +606,18 @@ PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, ...@@ -606,18 +606,18 @@ PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
#if defined(PNG_WRITE_PACK_SUPPORTED) #ifdef PNG_WRITE_PACK_SUPPORTED
PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 bit_depth)); png_bytep row, png_uint_32 bit_depth));
#endif #endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED) #ifdef PNG_WRITE_SHIFT_SUPPORTED
PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
png_color_8p bit_depth)); png_color_8p bit_depth));
#endif #endif
#if defined(PNG_READ_BACKGROUND_SUPPORTED) #ifdef PNG_READ_BACKGROUND_SUPPORTED
#if defined(PNG_READ_GAMMA_SUPPORTED) #ifdef PNG_READ_GAMMA_SUPPORTED
PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
png_color_16p trans_color, png_color_16p background, png_color_16p trans_color, png_color_16p background,
png_color_16p background_1, png_color_16p background_1,
...@@ -630,13 +630,13 @@ PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, ...@@ -630,13 +630,13 @@ PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
#endif #endif
#endif #endif
#if defined(PNG_READ_GAMMA_SUPPORTED) #ifdef PNG_READ_GAMMA_SUPPORTED
PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
png_bytep gamma_table, png_uint_16pp gamma_16_table, png_bytep gamma_table, png_uint_16pp gamma_16_table,
int gamma_shift)); int gamma_shift));
#endif #endif
#if defined(PNG_READ_EXPAND_SUPPORTED) #ifdef PNG_READ_EXPAND_SUPPORTED
PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
...@@ -655,87 +655,87 @@ PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, ...@@ -655,87 +655,87 @@ PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#if defined(PNG_READ_bKGD_SUPPORTED) #ifdef PNG_READ_bKGD_SUPPORTED
PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_cHRM_SUPPORTED) #ifdef PNG_READ_cHRM_SUPPORTED
PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_gAMA_SUPPORTED) #ifdef PNG_READ_gAMA_SUPPORTED
PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_hIST_SUPPORTED) #ifdef PNG_READ_hIST_SUPPORTED
PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_iCCP_SUPPORTED) #ifdef PNG_READ_iCCP_SUPPORTED
extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif /* PNG_READ_iCCP_SUPPORTED */ #endif /* PNG_READ_iCCP_SUPPORTED */
#if defined(PNG_READ_iTXt_SUPPORTED) #ifdef PNG_READ_iTXt_SUPPORTED
PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_oFFs_SUPPORTED) #ifdef PNG_READ_oFFs_SUPPORTED
PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_pCAL_SUPPORTED) #ifdef PNG_READ_pCAL_SUPPORTED
PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_pHYs_SUPPORTED) #ifdef PNG_READ_pHYs_SUPPORTED
PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_sBIT_SUPPORTED) #ifdef PNG_READ_sBIT_SUPPORTED
PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_sCAL_SUPPORTED) #ifdef PNG_READ_sCAL_SUPPORTED
PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_sPLT_SUPPORTED) #ifdef PNG_READ_sPLT_SUPPORTED
extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif /* PNG_READ_sPLT_SUPPORTED */ #endif /* PNG_READ_sPLT_SUPPORTED */
#if defined(PNG_READ_sRGB_SUPPORTED) #ifdef PNG_READ_sRGB_SUPPORTED
PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_tEXt_SUPPORTED) #ifdef PNG_READ_tEXt_SUPPORTED
PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_tIME_SUPPORTED) #ifdef PNG_READ_tIME_SUPPORTED
PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_tRNS_SUPPORTED) #ifdef PNG_READ_tRNS_SUPPORTED
PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
#if defined(PNG_READ_zTXt_SUPPORTED) #ifdef PNG_READ_zTXt_SUPPORTED
PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length)); png_uint_32 length));
#endif #endif
...@@ -780,19 +780,19 @@ PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, ...@@ -780,19 +780,19 @@ PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
#if defined(PNG_READ_tEXt_SUPPORTED) #ifdef PNG_READ_tEXt_SUPPORTED
PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length)); png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
#endif #endif
#if defined(PNG_READ_zTXt_SUPPORTED) #ifdef PNG_READ_zTXt_SUPPORTED
PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length)); png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
png_infop info_ptr)); png_infop info_ptr));
#endif #endif
#if defined(PNG_READ_iTXt_SUPPORTED) #ifdef PNG_READ_iTXt_SUPPORTED
PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length)); png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
...@@ -809,7 +809,7 @@ PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, ...@@ -809,7 +809,7 @@ PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
#endif #endif
/* Added at libpng version 1.4.0 */ /* Added at libpng version 1.4.0 */
#if defined(PNG_cHRM_SUPPORTED) #ifdef PNG_cHRM_SUPPORTED
PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_white_x, png_fixed_point int_white_y,
png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册