pngcrush  1.8.13
About: Pngcrush is an optimizer for PNG (Portable Network Graphics) files.
  Fossies Dox: pngcrush-1.8.13.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

pngerror.c File Reference
#include "pngpriv.h"
Include dependency graph for pngerror.c:

Go to the source code of this file.

Macros

#define PNG_MAX_ERROR_TEXT   196 /* Currently limited by profile_error in png.c */
 
#define isnonalpha(c)   ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
 
#define fixed_message   "fixed point overflow in "
 
#define fixed_message_ln   ((sizeof fixed_message)-1)
 

Functions

static void png_default_error (png_const_structrp png_ptr, png_const_charp error_message)
 
static void png_default_warning (png_const_structrp png_ptr, png_const_charp warning_message)
 
void png_error (png_const_structrp png_ptr, png_const_charp error_message)
 
size_t png_safecat (png_charp buffer, size_t bufsize, size_t pos, png_const_charp string)
 
png_charp png_format_number (png_const_charp start, png_charp end, int format, png_alloc_size_t number)
 
void png_warning (png_const_structrp png_ptr, png_const_charp warning_message)
 
void png_warning_parameter (png_warning_parameters p, int number, png_const_charp string)
 
void png_warning_parameter_unsigned (png_warning_parameters p, int number, int format, png_alloc_size_t value)
 
void png_warning_parameter_signed (png_warning_parameters p, int number, int format, png_int_32 value)
 
void png_formatted_warning (png_const_structrp png_ptr, png_warning_parameters p, png_const_charp message)
 
void png_benign_error (png_const_structrp png_ptr, png_const_charp error_message)
 
void png_app_warning (png_const_structrp png_ptr, png_const_charp error_message)
 
void png_app_error (png_const_structrp png_ptr, png_const_charp error_message)
 
static void png_format_buffer (png_const_structrp png_ptr, png_charp buffer, png_const_charp error_message)
 
void png_chunk_error (png_const_structrp png_ptr, png_const_charp error_message)
 
void png_chunk_warning (png_const_structrp png_ptr, png_const_charp warning_message)
 
void png_chunk_benign_error (png_const_structrp png_ptr, png_const_charp error_message)
 
void png_chunk_report (png_const_structrp png_ptr, png_const_charp message, int error)
 
void png_fixed_error (png_const_structrp png_ptr, png_const_charp name)
 
jmp_buf * png_set_longjmp_fn (png_structrp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)
 
void png_free_jmpbuf (png_structrp png_ptr)
 
void png_longjmp (png_const_structrp png_ptr, int val)
 
void png_set_error_fn (png_structrp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)
 
png_voidp png_get_error_ptr (png_const_structrp png_ptr)
 

Variables

static const char png_digit [16]
 

Macro Definition Documentation

◆ fixed_message

#define fixed_message   "fixed point overflow in "

◆ fixed_message_ln

#define fixed_message_ln   ((sizeof fixed_message)-1)

◆ isnonalpha

#define isnonalpha (   c)    ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))

Definition at line 427 of file pngerror.c.

◆ PNG_MAX_ERROR_TEXT

#define PNG_MAX_ERROR_TEXT   196 /* Currently limited by profile_error in png.c */

Definition at line 418 of file pngerror.c.

Function Documentation

◆ png_app_error()

◆ png_app_warning()

◆ png_benign_error()

◆ png_chunk_benign_error()

◆ png_chunk_error()

◆ png_chunk_report()

◆ png_chunk_warning()

◆ png_default_error()

static void png_default_error ( png_const_structrp  png_ptr,
png_const_charp  error_message 
)
static

Definition at line 712 of file pngerror.c.

References PNG_LITERAL_SHARP, png_longjmp(), PNG_STRING_NEWLINE, and PNG_UNUSED.

Referenced by png_error().

◆ png_default_warning()

static void png_default_warning ( png_const_structrp  png_ptr,
png_const_charp  warning_message 
)
static

Definition at line 785 of file pngerror.c.

References PNG_LITERAL_SHARP, PNG_STRING_NEWLINE, and PNG_UNUSED.

Referenced by png_warning().

◆ png_error()

void png_error ( png_const_structrp  png_ptr,
png_const_charp  error_message 
)

Definition at line 40 of file pngerror.c.

References msg, png_constcast, png_default_error(), PNG_FLAG_STRIP_ERROR_NUMBERS, PNG_FLAG_STRIP_ERROR_TEXT, and PNG_LITERAL_SHARP.

Referenced by check_location(), decode_gamma(), image_memory_write(), main(), png_app_error(), png_app_warning(), png_ascii_from_fixed(), png_ascii_from_fp(), png_benign_error(), png_check_IHDR(), png_chunk_error(), png_colorspace_set_chromaticities(), png_colorspace_set_endpoints(), png_colorspace_set_rgb_coefficients(), png_combine_row(), png_compress_IDAT(), png_create_colormap_entry(), png_data_freer(), png_default_read_data(), png_default_write_data(), png_deflate_claim(), png_do_read_transformations(), png_fixed_error(), png_get_uint_31(), png_image_memory_read(), png_image_read_and_map(), png_image_read_background(), png_image_read_colormap(), png_image_read_colormapped(), png_image_read_composite(), png_image_read_direct(), png_image_write_main(), png_init_read_transformations(), png_malloc(), png_malloc_array(), png_malloc_default(), png_process_IDAT_data(), png_push_process_row(), png_push_read_chunk(), png_push_read_IDAT(), png_push_read_sig(), png_push_save_buffer(), png_read_data(), png_read_IDAT_data(), png_read_image(), png_read_png(), png_read_row(), png_read_sig(), png_read_start_row(), png_read_transform_info(), png_realloc_array(), png_set_alpha_mode_fixed(), png_set_compression_buffer_size(), png_set_filter(), png_set_gamma_fixed(), png_set_longjmp_fn(), png_set_PLTE(), png_set_rgb_to_gray_fixed(), png_set_sCAL_s(), png_set_sig_bytes(), png_set_text(), png_write_complete_chunk(), png_write_compressed_data_out(), png_write_data(), png_write_end(), png_write_iCCP(), png_write_IHDR(), png_write_image_16bit(), png_write_info(), png_write_iTXt(), png_write_pCAL(), png_write_PLTE(), png_write_row(), png_write_sPLT(), png_write_tEXt(), png_write_zTXt(), pngcrush_default_read_data(), pngcrush_default_write_data(), pngcrush_get_uint_31(), and pngcrush_measure_idat().

◆ png_fixed_error()

void png_fixed_error ( png_const_structrp  png_ptr,
png_const_charp  name 
)

Definition at line 572 of file pngerror.c.

References fixed_message, fixed_message_ln, msg, png_error(), and PNG_MAX_ERROR_TEXT.

Referenced by convert_gamma_value(), and png_fixed().

◆ png_format_buffer()

static void png_format_buffer ( png_const_structrp  png_ptr,
png_charp  buffer,
png_const_charp  error_message 
)
static

◆ png_format_number()

png_charp png_format_number ( png_const_charp  start,
png_charp  end,
int  format,
png_alloc_size_t  number 
)

◆ png_formatted_warning()

void png_formatted_warning ( png_const_structrp  png_ptr,
png_warning_parameters  p,
png_const_charp  message 
)

Definition at line 284 of file pngerror.c.

References msg, png_const_charp, png_warning(), and PNG_WARNING_PARAMETER_COUNT.

Referenced by png_check_keyword().

◆ png_free_jmpbuf()

void png_free_jmpbuf ( png_structrp  png_ptr)

Definition at line 666 of file pngerror.c.

References png_free().

Referenced by png_destroy_png_struct().

◆ png_get_error_ptr()

png_voidp png_get_error_ptr ( png_const_structrp  png_ptr)

Definition at line 856 of file pngerror.c.

◆ png_longjmp()

void png_longjmp ( png_const_structrp  png_ptr,
int  val 
)

Definition at line 758 of file pngerror.c.

References PNG_ABORT, and PNG_UNUSED.

Referenced by png_default_error().

◆ png_safecat()

size_t png_safecat ( png_charp  buffer,
size_t  bufsize,
size_t  pos,
png_const_charp  string 
)

◆ png_set_error_fn()

void png_set_error_fn ( png_structrp  png_ptr,
png_voidp  error_ptr,
png_error_ptr  error_fn,
png_error_ptr  warning_fn 
)

Definition at line 835 of file pngerror.c.

References png_struct_def::error_fn, png_struct_def::error_ptr, and PNG_UNUSED.

Referenced by png_create_png_struct().

◆ png_set_longjmp_fn()

jmp_buf* png_set_longjmp_fn ( png_structrp  png_ptr,
png_longjmp_ptr  longjmp_fn,
size_t  jmp_buf_size 
)

Definition at line 597 of file pngerror.c.

References png_error(), png_malloc_warn(), png_voidcast, and png_warning().

◆ png_warning()

void png_warning ( png_const_structrp  png_ptr,
png_const_charp  warning_message 
)

◆ png_warning_parameter()

void png_warning_parameter ( png_warning_parameters  p,
int  number,
png_const_charp  string 
)

◆ png_warning_parameter_signed()

void png_warning_parameter_signed ( png_warning_parameters  p,
int  number,
int  format,
png_int_32  value 
)

Definition at line 263 of file pngerror.c.

References buffer, PNG_FORMAT_NUMBER, PNG_NUMBER_BUFFER_SIZE, and png_warning_parameter().

Referenced by png_check_keyword().

◆ png_warning_parameter_unsigned()

void png_warning_parameter_unsigned ( png_warning_parameters  p,
int  number,
int  format,
png_alloc_size_t  value 
)

Definition at line 255 of file pngerror.c.

References buffer, PNG_FORMAT_NUMBER, PNG_NUMBER_BUFFER_SIZE, and png_warning_parameter().

Variable Documentation

◆ png_digit

const char png_digit[16]
static
Initial value:
= {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}

Definition at line 428 of file pngerror.c.

Referenced by png_format_buffer().