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

[devel] Added exported png_longjmp() function.

上级 946199e8
......@@ -58,6 +58,7 @@ version 1.5.0beta07 [February 19, 2010]
wherever png_snprintf() is used to construct error and warning messages.
Noted in scripts/makefile.mingw that it expects to be run under MSYS.
Removed obsolete unused MMX-querying support from contrib/gregbook
Added exported png_longjmp() function.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -2534,6 +2534,7 @@ version 1.5.0beta07 [February 19, 2010]
Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED
wherever png_snprintf() is used to construct error and warning messages.
Removed obsolete unused MMX-querying support from contrib/gregbook
Added exported png_longjmp() function.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -480,5 +480,5 @@ static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg)
exit(99);
}
longjmp(mainprog_ptr->jmpbuf, 1);
png_longjmp(mainprog_ptr, 1);
}
......@@ -388,5 +388,5 @@ static void writepng_error_handler(png_structp png_ptr, png_const_charp msg)
exit(99);
}
longjmp(mainprog_ptr->jmpbuf, 1);
png_longjmp(mainprog_ptr, 1);
}
libpng.txt - A description on how to use and modify libpng
libpng version 1.5.0beta07 - February 14, 2010
libpng version 1.5.0beta07 - February 19, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
......@@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.0beta07 - February 14, 2010
libpng versions 0.97, January 1998, through 1.5.0beta07 - February 19, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
......@@ -3245,7 +3245,7 @@ Other rules can be inferred by inspecting the libpng source.
XIII. Y2K Compliance in libpng
February 14, 2010
February 19, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
......
.TH LIBPNG 3 "February 14, 2010"
.TH LIBPNG 3 "February 19, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta07
.SH SYNOPSIS
......@@ -338,6 +338,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta07
\fI\fB
\fBvoid png_longjmp (png_structp \fP\fIpng_ptr\fP\fB, int \fIval\fP\fB);\fP
\fI\fB
\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
......@@ -785,7 +789,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.5.0beta07 - February 14, 2010
libpng version 1.5.0beta07 - February 19, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
......@@ -796,7 +800,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.0beta07 - February 14, 2010
libpng versions 0.97, January 1998, through 1.5.0beta07 - February 19, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
......@@ -4030,7 +4034,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIII. Y2K Compliance in libpng
February 14, 2010
February 19, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
......@@ -4268,7 +4272,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.5.0beta07 - February 14, 2010:
Libpng version 1.5.0beta07 - February 19, 2010:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
......@@ -4291,7 +4295,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta07, February 14, 2010, are
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta07, February 19, 2010, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
......@@ -4390,7 +4394,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
February 14, 2010
February 19, 2010
.\" end of man page
/* png.h - header file for PNG reference library
*
* libpng version 1.5.0beta07 - February 14, 2010
* libpng version 1.5.0beta07 - February 19, 2010
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.5.0beta07 - February 14, 2010: Glenn
* libpng versions 0.97, January 1998, through 1.5.0beta07 - February 19, 2010: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
......@@ -169,7 +169,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.5.0beta07, February 14, 2010, are
* libpng versions 1.2.6, August 15, 2004, through 1.5.0beta07, February 19, 2010, are
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
......@@ -281,7 +281,7 @@
* Y2K compliance in libpng:
* =========================
*
* February 14, 2010
* February 19, 2010
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
......@@ -345,7 +345,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.5.0beta07"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.5.0beta07 - February 14, 2010\n"
" libpng version 1.5.0beta07 - February 19, 2010\n"
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
......@@ -863,6 +863,12 @@ extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn)
# define png_jmpbuf(png_ptr) \
(LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
#endif
/* This function should be used by libpng applications in place of
* longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it
* will use it; otherwise it will call PNG_ABORT(). This function was
* added in libpng-1.5.0.
*/
extern PNG_EXPORT(void, png_longjmp) PNGARG((png_structp png_ptr, int val));
/* Reset the compression stream */
extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
......
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.5.0 [February 14, 2010]
* Last changed in libpng 1.5.0 [February 19, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -289,7 +289,15 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
fprintf(stderr, PNG_STRING_NEWLINE);
}
#endif
png_longjmp(png_ptr, 1);
#ifndef PNG_CONSOLE_IO_SUPPORTED
error_message = error_message; /* Make compiler happy */
#endif
}
void PNGAPI
png_longjmp(png_structp png_ptr, int val)
{
#ifdef PNG_SETJMP_SUPPORTED
if (png_ptr && png_ptr->longjmp_fn)
{
......@@ -297,18 +305,15 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
{
jmp_buf jmpbuf;
png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
png_ptr->longjmp_fn(jmpbuf, 1);
png_ptr->longjmp_fn(jmpbuf, val);
}
# else
png_ptr->longjmp_fn(png_ptr->jmpbuf, 1);
png_ptr->longjmp_fn(png_ptr->jmpbuf, val);
# endif
}
#endif
/* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT();
#ifndef PNG_CONSOLE_IO_SUPPORTED
error_message = error_message; /* Make compiler happy */
#endif
}
#ifdef PNG_WARNINGS_SUPPORTED
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册