From c87f913eb98354f9d11a9a7e1befc81053e4a73f Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 11 Nov 2009 14:24:27 -0600 Subject: [PATCH] [master] Marked "internally exported" functions with PNG_PRIVATE. --- ANNOUNCE | 2 +- CHANGES | 2 +- png.h | 300 +++++++++++++++++++++++++++++------------------------- pngconf.h | 12 +++ 4 files changed, 175 insertions(+), 141 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 6a9ab72d2..318102592 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -151,7 +151,7 @@ version 1.2.41beta17 [November 10, 2009] Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c Added "-DPNG_CONFIGURE_LIBPNG" to the contrib/pngminum makefiles. -version 1.2.41beta18 [November 11, 2009] +version 1.2.41rc01 [November 11, 2009] Renamed scripts/makefile.wce to scripts/makefile.cegcc Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/CHANGES b/CHANGES index 174d94a6b..25efe53a1 100644 --- a/CHANGES +++ b/CHANGES @@ -2582,7 +2582,7 @@ version 1.2.41beta17 [November 10, 2009] Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c Added "-DPNG_CONFIGURE_LIBPNG" to the contrib/pngminum makefiles. -version 1.2.beta18 [November 11, 2009] +version 1.2.41rc01 [November 11, 2009] Renamed scripts/makefile.wce to scripts/makefile.cegcc Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/png.h b/png.h index 11e1e7511..96b31a8db 100644 --- a/png.h +++ b/png.h @@ -245,7 +245,7 @@ * 1.2.40rc01 13 10240 12.so.0.40[.0] * 1.0.49 10 10049 10.so.0.49[.0] * 1.2.40 13 10240 12.so.0.40[.0] - * 1.2.41beta01-18 13 10241 12.so.0.41[.0] + * 1.2.41beta01-17 13 10241 12.so.0.41[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -3097,30 +3097,32 @@ extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr, png_info_size)); /* Allocate memory for an internal libpng struct */ -PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); +PNG_EXTERN png_voidp png_create_struct PNGARG((int type)) PNG_PRIVATE; /* Free memory from internal libpng struct */ -PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); +PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)) PNG_PRIVATE; PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr - malloc_fn, png_voidp mem_ptr)); + malloc_fn, png_voidp mem_ptr)) PNG_PRIVATE; PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, - png_free_ptr free_fn, png_voidp mem_ptr)); + png_free_ptr free_fn, png_voidp mem_ptr)) PNG_PRIVATE; /* Free any memory that info_ptr points to and reset struct. */ PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; #ifndef PNG_1_0_X /* Function to allocate memory for zlib. */ -PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); +PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, + uInt size)) PNG_PRIVATE; /* Function to free memory for zlib */ -PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); +PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) PNG_PRIVATE; #ifdef PNG_SIZE_T /* Function to convert a sizeof an item to png_sizeof item */ - PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)); + PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)) + PNG_PRIVATE; #endif /* Next four functions are used internally as callbacks. PNGAPI is required @@ -3128,70 +3130,72 @@ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); */ PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); + png_bytep data, png_size_t length)) PNG_PRIVATE; #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); + png_bytep buffer, png_size_t length)) PNG_PRIVATE; #endif PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); + png_bytep data, png_size_t length)) PNG_PRIVATE; #ifdef PNG_WRITE_FLUSH_SUPPORTED #ifdef PNG_STDIO_SUPPORTED -PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); +PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)) + PNG_PRIVATE; #endif #endif #else /* PNG_1_0_X */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); + png_bytep buffer, png_size_t length)) PNG_PRIVATE; #endif #endif /* PNG_1_0_X */ /* Reset the CRC variable */ -PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Write the "data" buffer to whatever output you are using. */ PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); + png_size_t length)) PNG_PRIVATE; /* Read data from whatever input you are using into the "data" buffer */ PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); + png_size_t length)) PNG_PRIVATE; /* Read bytes into buf, and update png_ptr->crc */ PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)); + png_size_t length)) PNG_PRIVATE; /* Decompress data in a chunk that uses compression */ #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, int comp_type, png_size_t chunklength, - png_size_t prefix_length, png_size_t *data_length)); + png_size_t prefix_length, png_size_t *data_length)) PNG_PRIVATE; #endif /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ -PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); +PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip) + PNG_PRIVATE); /* Read the CRC from the file and compare it to the libpng calculated CRC */ -PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); +PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Calculate the CRC over a section of data. Note that we are only * passing a maximum of 64K on systems that have this as a memory limit, * since this is the maximum buffer size we can specify. */ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, - png_size_t length)); + png_size_t length)) PNG_PRIVATE; #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)) PNG_PRIVATE; #endif /* Simple function to write the signature */ -PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Write various chunks */ @@ -3201,29 +3205,30 @@ PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_method, int filter_method, - int interlace_method)); + int interlace_method)) PNG_PRIVATE; PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, - png_uint_32 num_pal)); + png_uint_32 num_pal)) PNG_PRIVATE; PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); + png_size_t length)) PNG_PRIVATE; -PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_WRITE_gAMA_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)) + PNG_PRIVATE; #endif #ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point - file_gamma)); +PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, + png_fixed_point file_gamma)) PNG_PRIVATE; #endif #endif #ifdef PNG_WRITE_sBIT_SUPPORTED PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, - int color_type)); + int color_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_cHRM_SUPPORTED @@ -3231,131 +3236,131 @@ PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y)); + double blue_x, double blue_y)) PNG_PRIVATE; #endif #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, 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 int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); + png_fixed_point int_blue_y)) PNG_PRIVATE; #endif #endif #ifdef PNG_WRITE_sRGB_SUPPORTED PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)); + int intent)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_iCCP_SUPPORTED PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, png_charp name, int compression_type, - png_charp profile, int proflen)); + png_charp profile, int proflen)) PNG_PRIVATE; /* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_WRITE_sPLT_SUPPORTED PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, - png_sPLT_tp palette)); + png_sPLT_tp palette)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_tRNS_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_bKGD_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_hIST_SUPPORTED PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, - int num_hist)); + int num_hist)) PNG_PRIVATE; #endif #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_tEXt_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_zTXt_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_iTXt_SUPPORTED PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, int compression, png_charp key, png_charp lang, png_charp lang_key, - png_charp text)); + png_charp text)) PNG_PRIVATE; #endif #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_infop info_ptr, png_textp text_ptr, int num_text)); + png_infop info_ptr, png_textp text_ptr, int num_text)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_oFFs_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_pCAL_SUPPORTED 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_charp units, png_charpp params)); + png_charp units, png_charpp params)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_pHYs_SUPPORTED 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, - int unit_type)); + int unit_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_tIME_SUPPORTED PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_timep mod_time)); + png_timep mod_time)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_sCAL_SUPPORTED #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, - int unit, double width, double height)); + int unit, double width, double height)) PNG_PRIVATE; #else #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, - int unit, png_charp width, png_charp height)); + int unit, png_charp width, png_charp height)) PNG_PRIVATE; #endif #endif #endif /* Called when finished processing a row of data */ -PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* 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)) PNG_PRIVATE; #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)) PNG_PRIVATE; #endif /* Combine a row of data, dealing with alpha, etc. if requested */ PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int mask)); + int mask)) PNG_PRIVATE; #ifdef PNG_READ_INTERLACING_SUPPORTED /* Expand an interlaced row */ /* OLD pre-1.0.9 interface: PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass, png_uint_32 transformations)); + png_bytep row, int pass, png_uint_32 transformations)) PNG_PRIVATE; */ -PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)) PNG_PRIVATE; #endif /* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ @@ -3363,118 +3368,126 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); #ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Grab pixels out of a row for an interlaced pass */ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)); + png_bytep row, int pass)) PNG_PRIVATE; #endif /* Unfilter a row */ PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); + png_row_infop row_info, png_bytep row, png_bytep prev_row, + int filter)) PNG_PRIVATE; /* Choose the best filter to use and filter the row data */ PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)); + png_row_infop row_info)) PNG_PRIVATE; /* Write out the filtered row. */ PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)); + png_bytep filtered_row)) PNG_PRIVATE; /* Finish a row while reading, dealing with interlacing passes, etc. */ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); /* Initialize the row buffers, etc. */ -PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Optional call to update the users info structure */ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; /* These are the functions that do the transformations */ #ifdef PNG_READ_FILLER_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; #endif #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) 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)) PNG_PRIVATE; #endif #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, + png_bytep row)) PNG_PRIVATE; #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) -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)) PNG_PRIVATE; #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; #endif #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)) PNG_PRIVATE; #endif #ifdef PNG_READ_SHIFT_SUPPORTED 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)) PNG_PRIVATE; #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -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)) PNG_PRIVATE; #endif #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)) PNG_PRIVATE; #endif #ifdef PNG_READ_DITHER_SUPPORTED 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)) PNG_PRIVATE; # ifdef PNG_CORRECT_PALETTE_SUPPORTED PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)); + png_colorp palette, int num_palette)) PNG_PRIVATE; # endif #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_PACK_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_SHIFT_SUPPORTED 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)) PNG_PRIVATE; #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED @@ -3484,24 +3497,25 @@ PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, png_color_16p background_1, png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift)); + png_uint_16pp gamma_16_to_1, int gamma_shift)) PNG_PRIVATE; #else PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background)); + png_color_16p trans_values, png_color_16p background)) PNG_PRIVATE; #endif #endif #ifdef PNG_READ_GAMMA_SUPPORTED 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, - int gamma_shift)); + int gamma_shift)) PNG_PRIVATE; #endif #ifdef PNG_READ_EXPAND_SUPPORTED 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_PRIVATE; PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_color_16p trans_value)); + png_bytep row, png_color_16p trans_value)) PNG_PRIVATE; #endif /* The following decodes the appropriate chunks, and does error correction, @@ -3510,7 +3524,7 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, /* Decode the IHDR chunk */ PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, @@ -3518,22 +3532,22 @@ PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, #ifdef PNG_READ_bKGD_SUPPORTED PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_cHRM_SUPPORTED PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_gAMA_SUPPORTED PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_hIST_SUPPORTED PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_iCCP_SUPPORTED @@ -3543,139 +3557,146 @@ extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, #ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_oFFs_SUPPORTED PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_pCAL_SUPPORTED PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_pHYs_SUPPORTED PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_sBIT_SUPPORTED PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_sCAL_SUPPORTED PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_sPLT_SUPPORTED extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif /* PNG_READ_sPLT_SUPPORTED */ #ifdef PNG_READ_sRGB_SUPPORTED PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_tIME_SUPPORTED PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_tRNS_SUPPORTED PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)) PNG_PRIVATE; #endif PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_bytep chunk_name)); + png_bytep chunk_name)) PNG_PRIVATE; /* Handle the transformations for reading and writing */ -PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_do_read_transformations + PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNG_EXTERN void png_do_write_transformations + PNGARG((png_structp png_ptr)) PNG_PRIVATE; -PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_init_read_transformations + PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); + png_infop info_ptr)) PNG_PRIVATE; +PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)); -PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); + png_uint_32 length)) PNG_PRIVATE; +PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); + png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; +PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); + png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; +PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); + png_infop info_ptr)) PNG_PRIVATE; +PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, + png_bytep row)) PNG_PRIVATE; PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); + png_infop info_ptr)) PNG_PRIVATE; +PNG_EXTERN void png_read_push_finish_row + PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_READ_tEXt_SUPPORTED 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_PRIVATE; PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; #endif #ifdef PNG_READ_zTXt_SUPPORTED 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_PRIVATE; PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; #endif #ifdef PNG_READ_iTXt_SUPPORTED 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_PRIVATE; PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)) PNG_PRIVATE; #endif #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_ASSEMBLER_CODE_SUPPORTED #ifdef PNG_MMX_CODE_SUPPORTED /* png.c */ /* PRIVATE */ -PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)) PNG_PRIVATE; #endif #endif + +/* The following six functions will be exported in libpng-1.4.0. */ #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr, png_infop info_ptr)); @@ -3699,7 +3720,8 @@ png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ /* Read the chunk header (length + type name) */ -PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); +PNG_EXTERN png_uint_32 png_read_chunk_header + PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Added at libpng version 1.2.34 */ #ifdef PNG_cHRM_SUPPORTED @@ -3707,14 +3729,14 @@ 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_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); + png_fixed_point int_blue_y)) PNG_PRIVATE; #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_CHECK_cHRM_SUPPORTED /* Added at libpng version 1.2.34 */ PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, - unsigned long *hi_product, unsigned long *lo_product)); + unsigned long *hi_product, unsigned long *lo_product)) PNG_PRIVATE; #endif #endif @@ -3722,7 +3744,7 @@ PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, - int filter_type)); + int filter_type)) PNG_PRIVATE; /* Added at libpng version 1.2.41 */ PNG_EXTERN png_voidp png_calloc PNGARG((png_structp png_ptr, diff --git a/pngconf.h b/pngconf.h index f3484fede..fa10ca307 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1549,6 +1549,15 @@ typedef z_stream FAR * png_zstreamp; # ifndef PNG_DEPSTRUCT # define PNG_DEPSTRUCT __attribute__((__deprecated__)) # endif +# ifndef PNG_PRIVATE +#if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +#else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +#endif +# endif # endif #endif @@ -1567,6 +1576,9 @@ typedef z_stream FAR * png_zstreamp; #ifndef PNG_DEPSTRUCT # define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ #endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif /* User may want to use these so they are not in PNG_INTERNAL. Any library * functions that are passed far data must be model independent.