summaryrefslogtreecommitdiff
path: root/png/pngpriv.h
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-01-20 18:01:12 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-01-20 18:01:12 +0100
commit2f7d7adfcf4bec55fa5e007947e4a455e85d8930 (patch)
tree2258a700e13d8582fcf5eedb30394c78641d739a /png/pngpriv.h
parentd30ca1866463c4091c3e0bcf5ca730f409ddc78d (diff)
Update bundled libpng to last upstream version 1.6.54
Diffstat (limited to 'png/pngpriv.h')
-rw-r--r--png/pngpriv.h929
1 files changed, 570 insertions, 359 deletions
diff --git a/png/pngpriv.h b/png/pngpriv.h
index e3054b90a..f91666c70 100644
--- a/png/pngpriv.h
+++ b/png/pngpriv.h
@@ -302,7 +302,7 @@
# define PNG_LOONGARCH_LSX_IMPLEMENTATION 0
#endif
-#if PNG_RISCV_RVV_OPT > 0
+#if PNG_RISCV_RVV_OPT > 0 && __riscv_v >= 1000000
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_rvv
# ifndef PNG_RISCV_RVV_IMPLEMENTATION
/* Use the intrinsics code by default. */
@@ -310,7 +310,7 @@
# endif
#else
# define PNG_RISCV_RVV_IMPLEMENTATION 0
-#endif
+#endif /* PNG_RISCV_RVV_OPT > 0 && __riscv_v >= 1000000 */
/* Is this a build of a DLL where compilation of the object modules requires
* different preprocessor settings to those required for a simple library? If
@@ -710,7 +710,7 @@
/* #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000U */
/* #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000U */
#define PNG_FLAG_LIBRARY_MISMATCH 0x20000U
-#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000U
+ /* 0x40000U unused */
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000U
#define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000U /* Added to libpng-1.4.0 */
#define PNG_FLAG_APP_WARNINGS_WARN 0x200000U /* Added to libpng-1.6.0 */
@@ -1075,15 +1075,17 @@ extern "C" {
*/
/* Zlib support */
#define PNG_UNEXPECTED_ZLIB_RETURN (-7)
-PNG_INTERNAL_FUNCTION(void, png_zstream_error,(png_structrp png_ptr, int ret),
+PNG_INTERNAL_FUNCTION(void, png_zstream_error,
+ (png_structrp png_ptr, int ret),
PNG_EMPTY);
/* Used by the zlib handling functions to ensure that z_stream::msg is always
* set before they return.
*/
#ifdef PNG_WRITE_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_free_buffer_list,(png_structrp png_ptr,
- png_compression_bufferp *list),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_free_buffer_list,
+ (png_structrp png_ptr, png_compression_bufferp *list),
+ PNG_EMPTY);
/* Free the buffer list used by the compressed write code. */
#endif
@@ -1095,22 +1097,25 @@ PNG_INTERNAL_FUNCTION(void,png_free_buffer_list,(png_structrp png_ptr,
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \
(defined(PNG_sCAL_SUPPORTED) && \
defined(PNG_FLOATING_ARITHMETIC_SUPPORTED))
-PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr,
- double fp, png_const_charp text),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_fixed_point, png_fixed,
+ (png_const_structrp png_ptr, double fp, png_const_charp text),
+ PNG_EMPTY);
#endif
#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
!defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \
(defined(PNG_cLLI_SUPPORTED) || defined(PNG_mDCV_SUPPORTED))
-PNG_INTERNAL_FUNCTION(png_uint_32,png_fixed_ITU,(png_const_structrp png_ptr,
- double fp, png_const_charp text),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_uint_32, png_fixed_ITU,
+ (png_const_structrp png_ptr, double fp, png_const_charp text),
+ PNG_EMPTY);
#endif
/* Check the user version string for compatibility, returns false if the version
* numbers aren't compatible.
*/
-PNG_INTERNAL_FUNCTION(int,png_user_version_check,(png_structrp png_ptr,
- png_const_charp user_png_ver),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_user_version_check,
+ (png_structrp png_ptr, png_const_charp user_png_ver),
+ PNG_EMPTY);
#ifdef PNG_READ_SUPPORTED /* should only be used on read */
/* Security: read limits on the largest allocations while reading a PNG. This
@@ -1135,24 +1140,28 @@ PNG_INTERNAL_FUNCTION(int,png_user_version_check,(png_structrp png_ptr,
* does, however, call the application provided allocator and that could call
* png_error (although that would be a bug in the application implementation.)
*/
-PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_base,(png_const_structrp png_ptr,
- png_alloc_size_t size),PNG_ALLOCATED);
+PNG_INTERNAL_FUNCTION(png_voidp, png_malloc_base,
+ (png_const_structrp png_ptr, png_alloc_size_t size),
+ PNG_ALLOCATED);
#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\
defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED)
/* Internal array allocator, outputs no error or warning messages on failure,
* just returns NULL.
*/
-PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_array,(png_const_structrp png_ptr,
- int nelements, size_t element_size),PNG_ALLOCATED);
+PNG_INTERNAL_FUNCTION(png_voidp, png_malloc_array,
+ (png_const_structrp png_ptr, int nelements, size_t element_size),
+ PNG_ALLOCATED);
/* The same but an existing array is extended by add_elements. This function
* also memsets the new elements to 0 and copies the old elements. The old
* array is not freed or altered.
*/
-PNG_INTERNAL_FUNCTION(png_voidp,png_realloc_array,(png_const_structrp png_ptr,
- png_const_voidp array, int old_elements, int add_elements,
- size_t element_size),PNG_ALLOCATED);
+PNG_INTERNAL_FUNCTION(png_voidp, png_realloc_array,
+ (png_const_structrp png_ptr,
+ png_const_voidp array, int old_elements, int add_elements,
+ size_t element_size),
+ PNG_ALLOCATED);
#endif /* text, sPLT or unknown chunks */
/* Magic to create a struct when there is no struct to call the user supplied
@@ -1161,84 +1170,106 @@ PNG_INTERNAL_FUNCTION(png_voidp,png_realloc_array,(png_const_structrp png_ptr,
* restriction so libpng has to assume that the 'free' handler, at least, might
* call png_error.
*/
-PNG_INTERNAL_FUNCTION(png_structp,png_create_png_struct,
- (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
- png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn,
- png_free_ptr free_fn),PNG_ALLOCATED);
+PNG_INTERNAL_FUNCTION(png_structp, png_create_png_struct,
+ (png_const_charp user_png_ver,
+ png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn,
+ png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
+ PNG_ALLOCATED);
/* Free memory from internal libpng struct */
-PNG_INTERNAL_FUNCTION(void,png_destroy_png_struct,(png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(void, png_destroy_png_struct,
+ (png_structrp png_ptr),
PNG_EMPTY);
/* Free an allocated jmp_buf (always succeeds) */
-PNG_INTERNAL_FUNCTION(void,png_free_jmpbuf,(png_structrp png_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_free_jmpbuf,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
/* Function to allocate memory for zlib. PNGAPI is disallowed. */
-PNG_INTERNAL_FUNCTION(voidpf,png_zalloc,(voidpf png_ptr, uInt items, uInt size),
+PNG_INTERNAL_FUNCTION(voidpf, png_zalloc,
+ (voidpf png_ptr, uInt items, uInt size),
PNG_ALLOCATED);
/* Function to free memory for zlib. PNGAPI is disallowed. */
-PNG_INTERNAL_FUNCTION(void,png_zfree,(voidpf png_ptr, voidpf ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_zfree,
+ (voidpf png_ptr, voidpf ptr),
+ PNG_EMPTY);
/* Next four functions are used internally as callbacks. PNGCBAPI is required
* but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3, changed to
* PNGCBAPI at 1.5.0
*/
-PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_read_data,(png_structp png_ptr,
- png_bytep data, size_t length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void PNGCBAPI, png_default_read_data,
+ (png_structp png_ptr, png_bytep data, size_t length),
+ PNG_EMPTY);
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_push_fill_buffer,(png_structp png_ptr,
- png_bytep buffer, size_t length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void PNGCBAPI, png_push_fill_buffer,
+ (png_structp png_ptr, png_bytep buffer, size_t length),
+ PNG_EMPTY);
#endif
-PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_write_data,(png_structp png_ptr,
- png_bytep data, size_t length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void PNGCBAPI, png_default_write_data,
+ (png_structp png_ptr, png_bytep data, size_t length),
+ PNG_EMPTY);
#ifdef PNG_WRITE_FLUSH_SUPPORTED
# ifdef PNG_STDIO_SUPPORTED
-PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_flush,(png_structp png_ptr),
+PNG_INTERNAL_FUNCTION(void PNGCBAPI, png_default_flush,
+ (png_structp png_ptr),
PNG_EMPTY);
# endif
#endif
/* Reset the CRC variable */
-PNG_INTERNAL_FUNCTION(void,png_reset_crc,(png_structrp png_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_reset_crc,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
/* Write the "data" buffer to whatever output you are using */
-PNG_INTERNAL_FUNCTION(void,png_write_data,(png_structrp png_ptr,
- png_const_bytep data, size_t length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_data,
+ (png_structrp png_ptr, png_const_bytep data, size_t length),
+ PNG_EMPTY);
/* Read and check the PNG file signature */
-PNG_INTERNAL_FUNCTION(void,png_read_sig,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_sig,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
/* Read the chunk header (length + type name) */
-PNG_INTERNAL_FUNCTION(png_uint_32,png_read_chunk_header,(png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(png_uint_32, png_read_chunk_header,
+ (png_structrp png_ptr),
PNG_EMPTY);
/* Read data from whatever input you are using into the "data" buffer */
-PNG_INTERNAL_FUNCTION(void,png_read_data,(png_structrp png_ptr, png_bytep data,
- size_t length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_data,
+ (png_structrp png_ptr, png_bytep data, size_t length),
+ PNG_EMPTY);
/* Read bytes into buf, and update png_ptr->crc */
-PNG_INTERNAL_FUNCTION(void,png_crc_read,(png_structrp png_ptr, png_bytep buf,
- png_uint_32 length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_crc_read,
+ (png_structrp png_ptr, png_bytep buf, png_uint_32 length),
+ PNG_EMPTY);
/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
-PNG_INTERNAL_FUNCTION(int,png_crc_finish,(png_structrp png_ptr,
- png_uint_32 skip),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_crc_finish,
+ (png_structrp png_ptr, png_uint_32 skip),
+ PNG_EMPTY);
/* 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_INTERNAL_FUNCTION(void,png_calculate_crc,(png_structrp png_ptr,
- png_const_bytep ptr, size_t length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_calculate_crc,
+ (png_structrp png_ptr, png_const_bytep ptr, size_t length),
+ PNG_EMPTY);
#ifdef PNG_WRITE_FLUSH_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_flush,(png_structrp png_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_flush,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
#endif
/* Write various chunks */
@@ -1246,68 +1277,86 @@ PNG_INTERNAL_FUNCTION(void,png_flush,(png_structrp png_ptr),PNG_EMPTY);
/* Write the IHDR chunk, and update the png_struct with the necessary
* information.
*/
-PNG_INTERNAL_FUNCTION(void,png_write_IHDR,(png_structrp 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),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_IHDR,
+ (png_structrp 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),
+ PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_write_PLTE,(png_structrp png_ptr,
- png_const_colorp palette, png_uint_32 num_pal),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_PLTE,
+ (png_structrp png_ptr,
+ png_const_colorp palette, png_uint_32 num_pal),
+ PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_compress_IDAT,(png_structrp png_ptr,
- png_const_bytep row_data, png_alloc_size_t row_data_length, int flush),
+PNG_INTERNAL_FUNCTION(void, png_compress_IDAT,
+ (png_structrp png_ptr,
+ png_const_bytep row_data, png_alloc_size_t row_data_length, int flush),
PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_write_IEND,(png_structrp png_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_IEND,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
#ifdef PNG_WRITE_gAMA_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_gAMA_fixed,(png_structrp png_ptr,
- png_fixed_point file_gamma),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_gAMA_fixed,
+ (png_structrp png_ptr, png_fixed_point file_gamma),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_sBIT_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_sBIT,(png_structrp png_ptr,
- png_const_color_8p sbit, int color_type),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_sBIT,
+ (png_structrp png_ptr, png_const_color_8p sbit, int color_type),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_cHRM_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_cHRM_fixed,(png_structrp png_ptr,
- const png_xy *xy), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_cHRM_fixed,
+ (png_structrp png_ptr, const png_xy *xy),
+ PNG_EMPTY);
/* The xy value must have been previously validated */
#endif
#ifdef PNG_WRITE_cICP_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_cICP,(png_structrp png_ptr,
+PNG_INTERNAL_FUNCTION(void, png_write_cICP,
+ (png_structrp png_ptr,
png_byte colour_primaries, png_byte transfer_function,
- png_byte matrix_coefficients, png_byte video_full_range_flag), PNG_EMPTY);
+ png_byte matrix_coefficients, png_byte video_full_range_flag),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_cLLI_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_cLLI_fixed,(png_structrp png_ptr,
- png_uint_32 maxCLL, png_uint_32 maxFALL), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_cLLI_fixed,
+ (png_structrp png_ptr, png_uint_32 maxCLL, png_uint_32 maxFALL),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_mDCV_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_mDCV_fixed,(png_structrp png_ptr,
- png_uint_16 red_x, png_uint_16 red_y,
- png_uint_16 green_x, png_uint_16 green_y,
- png_uint_16 blue_x, png_uint_16 blue_y,
- png_uint_16 white_x, png_uint_16 white_y,
- png_uint_32 maxDL, png_uint_32 minDL), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_mDCV_fixed,
+ (png_structrp png_ptr,
+ png_uint_16 red_x, png_uint_16 red_y,
+ png_uint_16 green_x, png_uint_16 green_y,
+ png_uint_16 blue_x, png_uint_16 blue_y,
+ png_uint_16 white_x, png_uint_16 white_y,
+ png_uint_32 maxDL, png_uint_32 minDL),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_sRGB_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_sRGB,(png_structrp png_ptr,
- int intent),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_sRGB,
+ (png_structrp png_ptr, int intent),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_eXIf_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_eXIf,(png_structrp png_ptr,
- png_bytep exif, int num_exif),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_eXIf,
+ (png_structrp png_ptr, png_bytep exif, int num_exif),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_iCCP_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_iCCP,(png_structrp png_ptr,
- png_const_charp name, png_const_bytep profile, png_uint_32 proflen),
+PNG_INTERNAL_FUNCTION(void, png_write_iCCP,
+ (png_structrp png_ptr,
+ png_const_charp name, png_const_bytep profile, png_uint_32 proflen),
PNG_EMPTY);
/* Writes a previously 'set' profile. The profile argument is **not**
* compressed.
@@ -1315,82 +1364,106 @@ PNG_INTERNAL_FUNCTION(void,png_write_iCCP,(png_structrp png_ptr,
#endif
#ifdef PNG_WRITE_sPLT_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_sPLT,(png_structrp png_ptr,
- png_const_sPLT_tp palette),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_sPLT,
+ (png_structrp png_ptr, png_const_sPLT_tp palette),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_tRNS_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_tRNS,(png_structrp png_ptr,
+PNG_INTERNAL_FUNCTION(void, png_write_tRNS,
+ (png_structrp png_ptr,
png_const_bytep trans, png_const_color_16p values, int number,
- int color_type),PNG_EMPTY);
+ int color_type),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_bKGD_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_bKGD,(png_structrp png_ptr,
- png_const_color_16p values, int color_type),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_bKGD,
+ (png_structrp png_ptr, png_const_color_16p values, int color_type),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_hIST_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_hIST,(png_structrp png_ptr,
- png_const_uint_16p hist, int num_hist),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_hIST,
+ (png_structrp png_ptr, png_const_uint_16p hist, int num_hist),
+ PNG_EMPTY);
#endif
/* Chunks that have keywords */
#ifdef PNG_WRITE_tEXt_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_tEXt,(png_structrp png_ptr,
- png_const_charp key, png_const_charp text, size_t text_len),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_tEXt,
+ (png_structrp png_ptr,
+ png_const_charp key, png_const_charp text, size_t text_len),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_zTXt_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_zTXt,(png_structrp png_ptr, png_const_charp
- key, png_const_charp text, int compression),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_zTXt,
+ (png_structrp png_ptr,
+ png_const_charp key, png_const_charp text, int compression),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_iTXt_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_iTXt,(png_structrp png_ptr,
+PNG_INTERNAL_FUNCTION(void, png_write_iTXt,
+ (png_structrp png_ptr,
int compression, png_const_charp key, png_const_charp lang,
- png_const_charp lang_key, png_const_charp text),PNG_EMPTY);
+ png_const_charp lang_key, png_const_charp text),
+ PNG_EMPTY);
#endif
#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */
-PNG_INTERNAL_FUNCTION(int,png_set_text_2,(png_const_structrp png_ptr,
- png_inforp info_ptr, png_const_textp text_ptr, int num_text),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_set_text_2,
+ (png_const_structrp png_ptr,
+ png_inforp info_ptr, png_const_textp text_ptr, int num_text),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_oFFs_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_oFFs,(png_structrp png_ptr,
- png_int_32 x_offset, png_int_32 y_offset, int unit_type),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_oFFs,
+ (png_structrp png_ptr,
+ png_int_32 x_offset, png_int_32 y_offset, int unit_type),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_pCAL_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_pCAL,(png_structrp png_ptr,
- png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams,
- png_const_charp units, png_charpp params),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_pCAL,
+ (png_structrp png_ptr,
+ png_charp purpose, png_int_32 X0, png_int_32 X1,
+ int type, int nparams, png_const_charp units, png_charpp params),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_pHYs_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_pHYs,(png_structrp png_ptr,
+PNG_INTERNAL_FUNCTION(void, png_write_pHYs,
+ (png_structrp png_ptr,
png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
- int unit_type),PNG_EMPTY);
+ int unit_type),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_tIME_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_tIME,(png_structrp png_ptr,
- png_const_timep mod_time),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_tIME,
+ (png_structrp png_ptr, png_const_timep mod_time),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_sCAL_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_write_sCAL_s,(png_structrp png_ptr,
- int unit, png_const_charp width, png_const_charp height),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_sCAL_s,
+ (png_structrp png_ptr,
+ int unit, png_const_charp width, png_const_charp height),
+ PNG_EMPTY);
#endif
/* Called when finished processing a row of data */
-PNG_INTERNAL_FUNCTION(void,png_write_finish_row,(png_structrp png_ptr),
- PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_finish_row,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
/* Internal use only. Called before first row of data */
-PNG_INTERNAL_FUNCTION(void,png_write_start_row,(png_structrp png_ptr),
- PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_start_row,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
/* Combine a row of data, dealing with alpha, etc. if requested. 'row' is an
* array of png_ptr->width pixels. If the image is not interlaced or this
@@ -1418,8 +1491,9 @@ PNG_INTERNAL_FUNCTION(void,png_write_start_row,(png_structrp png_ptr),
#ifndef PNG_USE_COMPILE_TIME_MASKS
# define PNG_USE_COMPILE_TIME_MASKS 1
#endif
-PNG_INTERNAL_FUNCTION(void,png_combine_row,(png_const_structrp png_ptr,
- png_bytep row, int display),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_combine_row,
+ (png_const_structrp png_ptr, png_bytep row, int display),
+ PNG_EMPTY);
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Expand an interlaced row: the 'row_info' describes the pass data that has
@@ -1428,170 +1502,230 @@ PNG_INTERNAL_FUNCTION(void,png_combine_row,(png_const_structrp png_ptr,
* the pixels are *replicated* to the intervening space. This is essential for
* the correct operation of png_combine_row, above.
*/
-PNG_INTERNAL_FUNCTION(void,png_do_read_interlace,(png_row_infop row_info,
- png_bytep row, int pass, png_uint_32 transformations),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_read_interlace,
+ (png_row_infop row_info,
+ png_bytep row, int pass, png_uint_32 transformations),
+ PNG_EMPTY);
#endif
/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Grab pixels out of a row for an interlaced pass */
-PNG_INTERNAL_FUNCTION(void,png_do_write_interlace,(png_row_infop row_info,
- png_bytep row, int pass),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_write_interlace,
+ (png_row_infop row_info, png_bytep row, int pass),
+ PNG_EMPTY);
#endif
/* Unfilter a row: check the filter value before calling this, there is no point
* calling it for PNG_FILTER_VALUE_NONE.
*/
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row,(png_structrp pp, png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row, int filter),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row,
+ (png_structrp pp, png_row_infop row_info,
+ png_bytep row, png_const_bytep prev_row, int filter),
+ PNG_EMPTY);
#if PNG_ARM_NEON_OPT > 0
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_neon,(png_row_infop row_info,
- png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_neon,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_neon,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_neon,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_neon,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_neon,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_neon,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_up_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_neon,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
#endif
#if PNG_MIPS_MSA_IMPLEMENTATION == 1
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_msa,(png_row_infop row_info,
- png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_msa,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_msa,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_msa,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_msa,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_msa,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_up_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_msa,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
#endif
#if PNG_MIPS_MMI_IMPLEMENTATION > 0
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_mmi,(png_row_infop row_info,
- png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_mmi,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_mmi,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_mmi,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_mmi,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_mmi,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_mmi,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_up_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_mmi,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
#endif
#if PNG_POWERPC_VSX_OPT > 0
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_vsx,(png_row_infop row_info,
- png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_vsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_vsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_vsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_vsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_vsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_vsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_up_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_vsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
#endif
#if PNG_INTEL_SSE_IMPLEMENTATION > 0
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_sse2,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_sse2,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_sse2,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_sse2,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_sse2,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_sse2,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_sse2,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_sse2,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_sse2,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_sse2,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_sse2,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
#endif
#if PNG_LOONGARCH_LSX_IMPLEMENTATION == 1
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_lsx,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-#endif
-
-#if PNG_RISCV_RVV_OPT > 0
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_rvv,(png_row_infop
- row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_up_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_lsx,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+#endif
+
+#if PNG_RISCV_RVV_IMPLEMENTATION == 1
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_up_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub3_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_sub4_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg3_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_avg4_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth3_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_filter_row_paeth4_rvv,
+ (png_row_infop row_info, png_bytep row, png_const_bytep prev_row),
+ PNG_EMPTY);
#endif
/* Choose the best filter to use and filter the row data */
-PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr,
- png_row_infop row_info),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_write_find_filter,
+ (png_structrp png_ptr, png_row_infop row_info),
+ PNG_EMPTY);
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_read_IDAT_data,(png_structrp png_ptr,
- png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_IDAT_data,
+ (png_structrp png_ptr, png_bytep output, png_alloc_size_t avail_out),
+ PNG_EMPTY);
/* Read 'avail_out' bytes of data from the IDAT stream. If the output buffer
* is NULL the function checks, instead, for the end of the stream. In this
* case a benign error will be issued if the stream end is not found or if
* extra data has to be consumed.
*/
-PNG_INTERNAL_FUNCTION(void,png_read_finish_IDAT,(png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(void, png_read_finish_IDAT,
+ (png_structrp png_ptr),
PNG_EMPTY);
/* This cleans up when the IDAT LZ stream does not end when the last image
* byte is read; there is still some pending input.
*/
-PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(void, png_read_finish_row,
+ (png_structrp png_ptr),
PNG_EMPTY);
/* Finish a row while reading, dealing with interlacing passes, etc. */
#endif /* SEQUENTIAL_READ */
/* Initialize the row buffers, etc. */
-PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_start_row,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
#if ZLIB_VERNUM >= 0x1240
-PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush),
- PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_zlib_inflate,
+ (png_structrp png_ptr, int flush),
+ PNG_EMPTY);
# define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush)
#else /* Zlib < 1.2.4 */
# define PNG_INFLATE(pp, flush) inflate(&(pp)->zstream, flush)
@@ -1599,38 +1733,44 @@ PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush),
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
/* Optional call to update the users info structure */
-PNG_INTERNAL_FUNCTION(void,png_read_transform_info,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_transform_info,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
#endif
/* Shared transform functions, defined in pngtran.c */
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_do_strip_channel,(png_row_infop row_info,
- png_bytep row, int at_start),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_strip_channel,
+ (png_row_infop row_info, png_bytep row, int at_start),
+ PNG_EMPTY);
#endif
#ifdef PNG_16BIT_SUPPORTED
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_do_swap,(png_row_infop row_info,
- png_bytep row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_swap,
+ (png_row_infop row_info, png_bytep row),
+ PNG_EMPTY);
#endif
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_do_packswap,(png_row_infop row_info,
- png_bytep row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_packswap,
+ (png_row_infop row_info, png_bytep row),
+ PNG_EMPTY);
#endif
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_do_invert,(png_row_infop row_info,
- png_bytep row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_invert,
+ (png_row_infop row_info, png_bytep row),
+ PNG_EMPTY);
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_do_bgr,(png_row_infop row_info,
- png_bytep row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_bgr,
+ (png_row_infop row_info, png_bytep row),
+ PNG_EMPTY);
#endif
/* The following decodes the appropriate chunks, and does error correction,
@@ -1651,25 +1791,27 @@ typedef enum
handled_ok /* known, supported and handled without error */
} png_handle_result_code;
-PNG_INTERNAL_FUNCTION(png_handle_result_code,png_handle_unknown,
- (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length, int keep),
- PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_handle_result_code, png_handle_unknown,
+ (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length, int keep),
+ PNG_EMPTY);
/* This is the function that gets called for unknown chunks. The 'keep'
* argument is either non-zero for a known chunk that has been set to be
* handled as unknown or zero for an unknown chunk. By default the function
* just skips the chunk or errors out if it is critical.
*/
-PNG_INTERNAL_FUNCTION(png_handle_result_code,png_handle_chunk,
- (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_handle_result_code, png_handle_chunk,
+ (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length),
+ PNG_EMPTY);
/* This handles the current chunk png_ptr->chunk_name with unread
* data[length] and returns one of the above result codes.
*/
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) ||\
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
-PNG_INTERNAL_FUNCTION(int,png_chunk_unknown_handling,
- (png_const_structrp png_ptr, png_uint_32 chunk_name),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_chunk_unknown_handling,
+ (png_const_structrp png_ptr, png_uint_32 chunk_name),
+ PNG_EMPTY);
/* Exactly as the API png_handle_as_unknown() except that the argument is a
* 32-bit chunk name, not a string.
*/
@@ -1677,93 +1819,122 @@ PNG_INTERNAL_FUNCTION(int,png_chunk_unknown_handling,
/* Handle the transformations for reading and writing */
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_do_read_transformations,(png_structrp png_ptr,
- png_row_infop row_info),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_read_transformations,
+ (png_structrp png_ptr, png_row_infop row_info),
+ PNG_EMPTY);
#endif
#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_do_write_transformations,(png_structrp png_ptr,
- png_row_infop row_info),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_write_transformations,
+ (png_structrp png_ptr, png_row_infop row_info),
+ PNG_EMPTY);
#endif
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_init_read_transformations,(png_structrp png_ptr),
- PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_init_read_transformations,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
#endif
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_push_read_chunk,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_read_sig,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_check_crc,(png_structrp png_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_save_buffer,(png_structrp png_ptr),
- PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_restore_buffer,(png_structrp png_ptr,
- png_bytep buffer, size_t buffer_length),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_read_IDAT,(png_structrp png_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_process_IDAT_data,(png_structrp png_ptr,
- png_bytep buffer, size_t buffer_length),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_process_row,(png_structrp png_ptr),
- PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_have_info,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_have_end,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_have_row,(png_structrp png_ptr,
- png_bytep row),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_push_read_end,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_process_some_data,(png_structrp png_ptr,
- png_inforp info_ptr),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_read_push_finish_row,(png_structrp png_ptr),
- PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_read_chunk,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_read_sig,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_check_crc,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_save_buffer,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_restore_buffer,
+ (png_structrp png_ptr, png_bytep buffer, size_t buffer_length),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_read_IDAT,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_process_IDAT_data,
+ (png_structrp png_ptr, png_bytep buffer, size_t buffer_length),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_process_row,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_have_info,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_have_end,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_have_row,
+ (png_structrp png_ptr, png_bytep row),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_push_read_end,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_process_some_data,
+ (png_structrp png_ptr, png_inforp info_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_read_push_finish_row,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
#endif /* PROGRESSIVE_READ */
#ifdef PNG_iCCP_SUPPORTED
/* Routines for checking parts of an ICC profile. */
#ifdef PNG_READ_iCCP_SUPPORTED
-PNG_INTERNAL_FUNCTION(int,png_icc_check_length,(png_const_structrp png_ptr,
- png_const_charp name, png_uint_32 profile_length), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_icc_check_length,
+ (png_const_structrp png_ptr,
+ png_const_charp name, png_uint_32 profile_length),
+ PNG_EMPTY);
#endif /* READ_iCCP */
-PNG_INTERNAL_FUNCTION(int,png_icc_check_header,(png_const_structrp png_ptr,
- png_const_charp name, png_uint_32 profile_length,
- png_const_bytep profile /* first 132 bytes only */, int color_type),
+PNG_INTERNAL_FUNCTION(int, png_icc_check_header,
+ (png_const_structrp png_ptr,
+ png_const_charp name, png_uint_32 profile_length,
+ png_const_bytep profile /* first 132 bytes only */, int color_type),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_icc_check_tag_table,
+ (png_const_structrp png_ptr,
+ png_const_charp name, png_uint_32 profile_length,
+ png_const_bytep profile /* header plus whole tag table */),
PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(int,png_icc_check_tag_table,(png_const_structrp png_ptr,
- png_const_charp name, png_uint_32 profile_length,
- png_const_bytep profile /* header plus whole tag table */), PNG_EMPTY);
#endif /* iCCP */
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_set_rgb_coefficients, (png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(void, png_set_rgb_coefficients,
+ (png_structrp png_ptr),
PNG_EMPTY);
/* Set the rgb_to_gray coefficients from the cHRM Y values (if unset) */
#endif /* READ_RGB_TO_GRAY */
/* Added at libpng version 1.4.0 */
-PNG_INTERNAL_FUNCTION(void,png_check_IHDR,(png_const_structrp 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),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_check_IHDR,
+ (png_const_structrp 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),
+ PNG_EMPTY);
/* Added at libpng version 1.5.10 */
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_do_check_palette_indexes,
- (png_structrp png_ptr, png_row_infop row_info),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_do_check_palette_indexes,
+ (png_structrp png_ptr, png_row_infop row_info),
+ PNG_EMPTY);
#endif
#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
-PNG_INTERNAL_FUNCTION(void,png_fixed_error,(png_const_structrp png_ptr,
- png_const_charp name),PNG_NORETURN);
+PNG_INTERNAL_FUNCTION(void, png_fixed_error,
+ (png_const_structrp png_ptr, png_const_charp name),
+ PNG_NORETURN);
#endif
/* Puts 'string' into 'buffer' at buffer[pos], taking care never to overwrite
* the end. Always leaves the buffer nul terminated. Never errors out (and
* there is no error code.)
*/
-PNG_INTERNAL_FUNCTION(size_t,png_safecat,(png_charp buffer, size_t bufsize,
- size_t pos, png_const_charp string),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(size_t, png_safecat,
+ (png_charp buffer, size_t bufsize, size_t pos, png_const_charp string),
+ PNG_EMPTY);
/* Various internal functions to handle formatted warning messages, currently
* only implemented for warnings.
@@ -1774,8 +1945,9 @@ PNG_INTERNAL_FUNCTION(size_t,png_safecat,(png_charp buffer, size_t bufsize,
* Returns the pointer to the start of the formatted string. This utility only
* does unsigned values.
*/
-PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start,
- png_charp end, int format, png_alloc_size_t number),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_charp, png_format_number,
+ (png_const_charp start, png_charp end, int format, png_alloc_size_t number),
+ PNG_EMPTY);
/* Convenience macro that takes an array: */
#define PNG_FORMAT_NUMBER(buffer,format,number) \
@@ -1807,23 +1979,26 @@ PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start,
typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][
PNG_WARNING_PARAMETER_SIZE];
-PNG_INTERNAL_FUNCTION(void,png_warning_parameter,(png_warning_parameters p,
- int number, png_const_charp string),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_warning_parameter,
+ (png_warning_parameters p, int number, png_const_charp string),
+ PNG_EMPTY);
/* Parameters are limited in size to PNG_WARNING_PARAMETER_SIZE characters,
* including the trailing '\0'.
*/
-PNG_INTERNAL_FUNCTION(void,png_warning_parameter_unsigned,
+PNG_INTERNAL_FUNCTION(void, png_warning_parameter_unsigned,
(png_warning_parameters p, int number, int format, png_alloc_size_t value),
PNG_EMPTY);
/* Use png_alloc_size_t because it is an unsigned type as big as any we
* need to output. Use the following for a signed value.
*/
-PNG_INTERNAL_FUNCTION(void,png_warning_parameter_signed,
+PNG_INTERNAL_FUNCTION(void, png_warning_parameter_signed,
(png_warning_parameters p, int number, int format, png_int_32 value),
PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_formatted_warning,(png_const_structrp png_ptr,
- png_warning_parameters p, png_const_charp message),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_formatted_warning,
+ (png_const_structrp png_ptr,
+ png_warning_parameters p, png_const_charp message),
+ PNG_EMPTY);
/* 'message' follows the X/Open approach of using @1, @2 to insert
* parameters previously supplied using the above functions. Errors in
* specifying the parameters will simply result in garbage substitutions.
@@ -1845,14 +2020,16 @@ PNG_INTERNAL_FUNCTION(void,png_formatted_warning,(png_const_structrp png_ptr,
* If benign errors aren't supported they end up as the corresponding base call
* (png_warning or png_error.)
*/
-PNG_INTERNAL_FUNCTION(void,png_app_warning,(png_const_structrp png_ptr,
- png_const_charp message),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_app_warning,
+ (png_const_structrp png_ptr, png_const_charp message),
+ PNG_EMPTY);
/* The application provided invalid parameters to an API function or called
* an API function at the wrong time, libpng can completely recover.
*/
-PNG_INTERNAL_FUNCTION(void,png_app_error,(png_const_structrp png_ptr,
- png_const_charp message),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_app_error,
+ (png_const_structrp png_ptr, png_const_charp message),
+ PNG_EMPTY);
/* As above but libpng will ignore the call, or attempt some other partial
* recovery from the error.
*/
@@ -1861,8 +2038,9 @@ PNG_INTERNAL_FUNCTION(void,png_app_error,(png_const_structrp png_ptr,
# define png_app_error(pp,s) png_error(pp,s)
#endif
-PNG_INTERNAL_FUNCTION(void,png_chunk_report,(png_const_structrp png_ptr,
- png_const_charp message, int error),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_chunk_report,
+ (png_const_structrp png_ptr, png_const_charp message, int error),
+ PNG_EMPTY);
/* Report a recoverable issue in chunk data. On read this is used to report
* a problem found while reading a particular chunk and the
* png_chunk_benign_error or png_chunk_warning function is used as
@@ -1888,14 +2066,17 @@ PNG_INTERNAL_FUNCTION(void,png_chunk_report,(png_const_structrp png_ptr,
#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/)
#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_ascii_from_fp,(png_const_structrp png_ptr,
- png_charp ascii, size_t size, double fp, unsigned int precision),
+PNG_INTERNAL_FUNCTION(void, png_ascii_from_fp,
+ (png_const_structrp png_ptr,
+ png_charp ascii, size_t size, double fp, unsigned int precision),
PNG_EMPTY);
#endif /* FLOATING_POINT */
#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
- png_charp ascii, size_t size, png_fixed_point fp),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_ascii_from_fixed,
+ (png_const_structrp png_ptr,
+ png_charp ascii, size_t size, png_fixed_point fp),
+ PNG_EMPTY);
#endif /* FIXED_POINT */
#endif /* sCAL */
@@ -1987,8 +2168,9 @@ PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
* that omits the last character (i.e. set the size to the index of
* the problem character.) This has not been tested within libpng.
*/
-PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
- size_t size, int *statep, size_t *whereami),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_check_fp_number,
+ (png_const_charp string, size_t size, int *statep, size_t *whereami),
+ PNG_EMPTY);
/* This is the same but it checks a complete string and returns true
* only if it just contains a floating point number. As of 1.5.4 this
@@ -1996,8 +2178,9 @@ PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
* it was valid (otherwise it returns 0.) This can be used for testing
* for negative or zero values using the sticky flag.
*/
-PNG_INTERNAL_FUNCTION(int,png_check_fp_string,(png_const_charp string,
- size_t size),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_check_fp_string,
+ (png_const_charp string, size_t size),
+ PNG_EMPTY);
#endif /* pCAL || sCAL */
#if defined(PNG_READ_GAMMA_SUPPORTED) ||\
@@ -2010,14 +2193,17 @@ PNG_INTERNAL_FUNCTION(int,png_check_fp_string,(png_const_charp string,
* for overflow, true (1) if no overflow, in which case *res
* holds the result.
*/
-PNG_INTERNAL_FUNCTION(int,png_muldiv,(png_fixed_point_p res, png_fixed_point a,
- png_int_32 multiplied_by, png_int_32 divided_by),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_muldiv,
+ (png_fixed_point_p res, png_fixed_point a,
+ png_int_32 multiplied_by, png_int_32 divided_by),
+ PNG_EMPTY);
/* Calculate a reciprocal - used for gamma values. This returns
* 0 if the argument is 0 in order to maintain an undefined value;
* there are no warnings.
*/
-PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal,(png_fixed_point a),
+PNG_INTERNAL_FUNCTION(png_fixed_point, png_reciprocal,
+ (png_fixed_point a),
PNG_EMPTY);
#endif
@@ -2026,11 +2212,13 @@ PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal,(png_fixed_point a),
* values. Accuracy is suitable for gamma calculations but this is
* not exact - use png_muldiv for that. Only required at present on read.
*/
-PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal2,(png_fixed_point a,
- png_fixed_point b),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_fixed_point, png_reciprocal2,
+ (png_fixed_point a, png_fixed_point b),
+ PNG_EMPTY);
/* Return true if the gamma value is significantly different from 1.0 */
-PNG_INTERNAL_FUNCTION(int,png_gamma_significant,(png_fixed_point gamma_value),
+PNG_INTERNAL_FUNCTION(int, png_gamma_significant,
+ (png_fixed_point gamma_value),
PNG_EMPTY);
/* PNGv3: 'resolve' the file gamma according to the new PNGv3 rules for colour
@@ -2041,8 +2229,9 @@ PNG_INTERNAL_FUNCTION(int,png_gamma_significant,(png_fixed_point gamma_value),
* transforms. For this reason a gamma specified by png_set_gamma always takes
* precedence.
*/
-PNG_INTERNAL_FUNCTION(png_fixed_point,png_resolve_file_gamma,
- (png_const_structrp png_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_fixed_point, png_resolve_file_gamma,
+ (png_const_structrp png_ptr),
+ PNG_EMPTY);
/* Internal fixed point gamma correction. These APIs are called as
* required to convert single values - they don't need to be fast,
@@ -2051,37 +2240,45 @@ PNG_INTERNAL_FUNCTION(png_fixed_point,png_resolve_file_gamma,
* While the input is an 'unsigned' value it must actually be the
* correct bit value - 0..255 or 0..65535 as required.
*/
-PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_correct,(png_structrp png_ptr,
- unsigned int value, png_fixed_point gamma_value),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_16bit_correct,(unsigned int value,
- png_fixed_point gamma_value),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(png_byte,png_gamma_8bit_correct,(unsigned int value,
- png_fixed_point gamma_value),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_destroy_gamma_table,(png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(png_uint_16, png_gamma_correct,
+ (png_structrp png_ptr, unsigned int value, png_fixed_point gamma_value),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_uint_16, png_gamma_16bit_correct,
+ (unsigned int value, png_fixed_point gamma_value),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_byte, png_gamma_8bit_correct,
+ (unsigned int value, png_fixed_point gamma_value),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_destroy_gamma_table,
+ (png_structrp png_ptr),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_build_gamma_table,
+ (png_structrp png_ptr, int bit_depth),
PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_build_gamma_table,(png_structrp png_ptr,
- int bit_depth),PNG_EMPTY);
#endif /* READ_GAMMA */
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* Set the RGB coefficients if not already set by png_set_rgb_to_gray */
-PNG_INTERNAL_FUNCTION(void,png_set_rgb_coefficients,(png_structrp png_ptr),
+PNG_INTERNAL_FUNCTION(void, png_set_rgb_coefficients,
+ (png_structrp png_ptr),
PNG_EMPTY);
#endif
#if defined(PNG_cHRM_SUPPORTED) || defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-PNG_INTERNAL_FUNCTION(int,png_XYZ_from_xy,(png_XYZ *XYZ, const png_xy *xy),
+PNG_INTERNAL_FUNCTION(int, png_XYZ_from_xy,
+ (png_XYZ *XYZ, const png_xy *xy),
PNG_EMPTY);
#endif /* cHRM || READ_RGB_TO_GRAY */
#ifdef PNG_COLORSPACE_SUPPORTED
-PNG_INTERNAL_FUNCTION(int,png_xy_from_XYZ,(png_xy *xy, const png_XYZ *XYZ),
+PNG_INTERNAL_FUNCTION(int, png_xy_from_XYZ,
+ (png_xy *xy, const png_XYZ *XYZ),
PNG_EMPTY);
#endif
/* SIMPLIFIED READ/WRITE SUPPORT */
#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\
- defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
+ defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
/* The internal structure that png_image::opaque points to. */
typedef struct png_control
{
@@ -2109,28 +2306,34 @@ typedef struct png_control
* errors that might occur. Returns true on success, false on failure (either
* of the function or as a result of a png_error.)
*/
-PNG_INTERNAL_CALLBACK(void,png_safe_error,(png_structp png_ptr,
- png_const_charp error_message),PNG_NORETURN);
+PNG_INTERNAL_CALLBACK(void, png_safe_error,
+ (png_structp png_ptr, png_const_charp error_message),
+ PNG_NORETURN);
#ifdef PNG_WARNINGS_SUPPORTED
-PNG_INTERNAL_CALLBACK(void,png_safe_warning,(png_structp png_ptr,
- png_const_charp warning_message),PNG_EMPTY);
+PNG_INTERNAL_CALLBACK(void, png_safe_warning,
+ (png_structp png_ptr, png_const_charp warning_message),
+ PNG_EMPTY);
#else
# define png_safe_warning 0/*dummy argument*/
#endif
-PNG_INTERNAL_FUNCTION(int,png_safe_execute,(png_imagep image,
- int (*function)(png_voidp), png_voidp arg),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_safe_execute,
+ (png_imagep image, int (*function)(png_voidp), png_voidp arg),
+ PNG_EMPTY);
/* Utility to log an error; this also cleans up the png_image; the function
* always returns 0 (false).
*/
-PNG_INTERNAL_FUNCTION(int,png_image_error,(png_imagep image,
- png_const_charp error_message),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int, png_image_error,
+ (png_imagep image, png_const_charp error_message),
+ PNG_EMPTY);
#ifndef PNG_SIMPLIFIED_READ_SUPPORTED
/* png_image_free is used by the write code but not exported */
-PNG_INTERNAL_FUNCTION(void, png_image_free, (png_imagep image), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, png_image_free,
+ (png_imagep image),
+ PNG_EMPTY);
#endif /* !SIMPLIFIED_READ */
#endif /* SIMPLIFIED READ/WRITE */
@@ -2141,8 +2344,9 @@ PNG_INTERNAL_FUNCTION(void, png_image_free, (png_imagep image), PNG_EMPTY);
* the generic code is used.
*/
#ifdef PNG_FILTER_OPTIMIZATIONS
-PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS, (png_structp png_ptr,
- unsigned int bpp), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS,
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
/* Just declare the optimization that will be used */
#else
/* List *all* the possible optimizations here - this branch is required if
@@ -2151,37 +2355,44 @@ PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS, (png_structp png_ptr,
*/
# if PNG_ARM_NEON_OPT > 0
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon,
- (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
#endif
#if PNG_MIPS_MSA_IMPLEMENTATION == 1
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips,
- (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
#endif
# if PNG_MIPS_MMI_IMPLEMENTATION > 0
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips,
- (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
# endif
# if PNG_INTEL_SSE_IMPLEMENTATION > 0
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
- (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
# endif
#endif
#if PNG_LOONGARCH_LSX_OPT > 0
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_lsx,
- (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
#endif
-# if PNG_RISCV_RVV_OPT > 0
+# if PNG_RISCV_RVV_IMPLEMENTATION == 1
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_rvv,
- (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ (png_structp png_ptr, unsigned int bpp),
+ PNG_EMPTY);
#endif
-PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
- png_const_charp key, png_bytep new_key), PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword,
+ (png_structrp png_ptr, png_const_charp key, png_bytep new_key),
+ PNG_EMPTY);
#if PNG_ARM_NEON_IMPLEMENTATION == 1
PNG_INTERNAL_FUNCTION(void,