20#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
26#ifdef PNG_WARNINGS_SUPPORTED
37#ifdef PNG_ERROR_TEXT_SUPPORTED
88#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED)
109 static const char digits[] =
"0123456789ABCDEF";
113 case PNG_NUMBER_FORMAT_fixed:
116 if (output != 0 ||
number % 10 != 0)
124 case PNG_NUMBER_FORMAT_02u:
129 case PNG_NUMBER_FORMAT_u:
134 case PNG_NUMBER_FORMAT_02x:
139 case PNG_NUMBER_FORMAT_x:
170#ifdef PNG_WARNINGS_SUPPORTED
182 warning_message +
offset);
196 if (
number > 0 &&
number <= PNG_WARNING_PARAMETER_COUNT)
204 char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
214 char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
223 if (value < 0 && str >
buffer)
254 int parameter_char = *++
message;
255 static const char valid_parameters[] =
"123456789";
261 while (valid_parameters[parameter] != parameter_char &&
262 valid_parameters[parameter] !=
'\0')
266 if (parameter < PNG_WARNING_PARAMETER_COUNT)
276 while (
i<(
sizeof msg)-1 && *parm !=
'\0' && parm < pend)
306#ifdef PNG_BENIGN_ERRORS_SUPPORTED
312# ifdef PNG_READ_SUPPORTED
323# ifdef PNG_READ_SUPPORTED
332# ifndef PNG_ERROR_TEXT_SUPPORTED
345# ifndef PNG_ERROR_TEXT_SUPPORTED
358# ifndef PNG_ERROR_TEXT_SUPPORTED
364#define PNG_MAX_ERROR_TEXT 196
365#if defined(PNG_WARNINGS_SUPPORTED) || \
366 (defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED))
373#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
374static const char png_digit[16] = {
375 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
376 'A',
'B',
'C',
'D',
'E',
'F'
384 int iout = 0, ishift = 24;
388 int c = (
int)(chunk_name >> ishift) & 0xff;
391 if (isnonalpha(
c) != 0)
394 buffer[iout++] = png_digit[(
c & 0xf0) >> 4];
395 buffer[iout++] = png_digit[
c & 0x0f];
415 while (iin < PNG_MAX_ERROR_TEXT-1 &&
error_message[iin] !=
'\0')
424#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
429 char msg[18+PNG_MAX_ERROR_TEXT];
441#ifdef PNG_WARNINGS_SUPPORTED
445 char msg[18+PNG_MAX_ERROR_TEXT];
447 png_warning(
png_ptr, warning_message);
451 png_format_buffer(
png_ptr,
msg, warning_message);
457#ifdef PNG_READ_SUPPORTED
458#ifdef PNG_BENIGN_ERRORS_SUPPORTED
469# ifndef PNG_ERROR_TEXT_SUPPORTED
479# ifndef PNG_WARNINGS_SUPPORTED
486# if defined(PNG_READ_SUPPORTED) && defined(PNG_WRITE_SUPPORTED)
490# ifdef PNG_READ_SUPPORTED
500# if defined(PNG_READ_SUPPORTED) && defined(PNG_WRITE_SUPPORTED)
504# ifdef PNG_WRITE_SUPPORTED
515#ifdef PNG_ERROR_TEXT_SUPPORTED
516#ifdef PNG_FLOATING_POINT_SUPPORTED
521# define fixed_message "fixed point overflow in "
522# define fixed_message_ln ((sizeof fixed_message)-1)
524 char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT];
525 memcpy(
msg, fixed_message, fixed_message_ln);
528 while (iin < (PNG_MAX_ERROR_TEXT-1) &&
name[iin] != 0)
530 msg[fixed_message_ln + iin] =
name[iin];
533 msg[fixed_message_ln + iin] = 0;
539#ifdef PNG_SETJMP_SUPPORTED
564 if (jmp_buf_size <= (
sizeof png_ptr->jmp_buf_local))
570 png_malloc_warn(
png_ptr, jmp_buf_size));
575 png_ptr->jmp_buf_size = jmp_buf_size;
593 png_error(
png_ptr,
"Libpng jmp_buf still allocated");
598 if (
size != jmp_buf_size)
600 png_warning(
png_ptr,
"Application jmp_buf size changed");
608 png_ptr->longjmp_fn = longjmp_fn;
629 if (jb != &
png_ptr->jmp_buf_local)
634 if (!
setjmp(free_jmp_buf))
636 png_ptr->jmp_buf_ptr = &free_jmp_buf;
661#ifdef PNG_CONSOLE_IO_SUPPORTED
675#ifdef PNG_SETJMP_SUPPORTED
693#ifdef PNG_WARNINGS_SUPPORTED
702#ifdef PNG_CONSOLE_IO_SUPPORTED
719 png_error_ptr error_fn, png_error_ptr warning_fn)
724 png_ptr->error_ptr = error_ptr;
726#ifdef PNG_WARNINGS_SUPPORTED
727 png_ptr->warning_fn = warning_fn;
748#ifdef PNG_ERROR_NUMBERS_SUPPORTED
757#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\
758 defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
787 size_t pos = png_safecat(
image->message, (
sizeof image->message), 0,
798#ifdef PNG_WARNINGS_SUPPORTED
806 if (
image->warning_or_error == 0)
808 png_safecat(
image->message, (
sizeof image->message), 0, warning_message);
821 if (
setjmp(safe_jmpbuf) == 0)
825 image->opaque->error_buf = safe_jmpbuf;
827 image->opaque->error_buf = saved_error_buf;
838 image->opaque->error_buf = saved_error_buf;
844 if (saved_error_buf ==
NULL)
845 png_image_free(
image);
void error_message(HWND hwnd, const char *msg)
int WINAPIV fprintf(FILE *file, const char *format,...)
_ACRTIMP void __cdecl longjmp(jmp_buf, int)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLuint GLuint GLsizei count
GLenum GLuint GLsizei bufsize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static const int digits[]
#define memcpy(s1, s2, n)
static unsigned int number
#define PNG_IMAGE_WARNING
const png_struct *PNG_RESTRICT png_const_structrp
png_struct *PNG_RESTRICT png_structrp
#define PNG_FUNCTION(type, name, args, attributes)
const char * png_const_charp
#define PNG_STRING_NEWLINE
#define PNG_LITERAL_LEFT_SQUARE_BRACKET
#define PNG_LITERAL_RIGHT_SQUARE_BRACKET
#define PNG_UNUSED(param)
#define png_constcast(type, value)
#define PNG_CHUNK_WRITE_ERROR
#define png_fixed_error(s1, s2)
#define PNG_FLAG_APP_ERRORS_WARN
#define png_warning_parameter_unsigned(p, number, format, value)
#define png_app_error(pp, s)
#define png_app_warning(pp, s)
#define PNG_FLAG_BENIGN_ERRORS_WARN
#define png_warning_parameter_signed(p, number, format, value)
#define PNG_FLAG_APP_WARNINGS_WARN
#define PNG_IS_READ_STRUCT
#define png_warning_parameter(p, number, string)
#define png_voidcast(type, value)
#define png_formatted_warning(pp, p, message)