[devel] Slightly expanded the documentation of PNG_ABORT()
This commit is contained in:
parent
f136155383
commit
54ac9a918e
@ -1,6 +1,6 @@
|
|||||||
libpng.txt - A description on how to use and modify libpng
|
libpng.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.0beta17 - April 1, 2010
|
libpng version 1.5.0beta17 - April 2, 2010
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 1, 2010
|
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 2, 2010
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -241,9 +241,13 @@ free any memory.
|
|||||||
}
|
}
|
||||||
|
|
||||||
If you would rather avoid the complexity of setjmp/longjmp issues,
|
If you would rather avoid the complexity of setjmp/longjmp issues,
|
||||||
you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
|
you can compile libpng with PNG_NO_SETJMP, in which case
|
||||||
errors will result in a call to PNG_ABORT() which defaults to abort().
|
errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||||
|
|
||||||
|
You can #define PNG_ABORT() to a function that does something
|
||||||
|
more useful than abort(), as long as your function does not
|
||||||
|
return.
|
||||||
|
|
||||||
Now you need to set up the input code. The default for libpng is to
|
Now you need to set up the input code. The default for libpng is to
|
||||||
use the C function fread(). If you use this, you will need to pass a
|
use the C function fread(). If you use this, you will need to pass a
|
||||||
valid FILE * in the function png_init_io(). Be sure that the file is
|
valid FILE * in the function png_init_io(). Be sure that the file is
|
||||||
@ -1691,9 +1695,13 @@ section below for more information on the libpng error handling.
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
If you would rather avoid the complexity of setjmp/longjmp issues,
|
If you would rather avoid the complexity of setjmp/longjmp issues,
|
||||||
you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
|
you can compile libpng with PNG_NO_SETJMP, in which case
|
||||||
errors will result in a call to PNG_ABORT() which defaults to abort().
|
errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||||
|
|
||||||
|
You can #define PNG_ABORT() to a function that does something
|
||||||
|
more useful than abort(), as long as your function does not
|
||||||
|
return.
|
||||||
|
|
||||||
Now you need to set up the output code. The default for libpng is to
|
Now you need to set up the output code. The default for libpng is to
|
||||||
use the C function fwrite(). If you use this, you will need to pass a
|
use the C function fwrite(). If you use this, you will need to pass a
|
||||||
valid FILE * in the function png_init_io(). Be sure that the file is
|
valid FILE * in the function png_init_io(). Be sure that the file is
|
||||||
@ -2554,8 +2562,9 @@ Error handling in libpng is done through png_error() and png_warning().
|
|||||||
Errors handled through png_error() are fatal, meaning that png_error()
|
Errors handled through png_error() are fatal, meaning that png_error()
|
||||||
should never return to its caller. Currently, this is handled via
|
should never return to its caller. Currently, this is handled via
|
||||||
setjmp() and longjmp() (unless you have compiled libpng with
|
setjmp() and longjmp() (unless you have compiled libpng with
|
||||||
PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
|
PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
|
||||||
but you could change this to do things like exit() if you should wish.
|
but you could change this to do things like exit() if you should wish.
|
||||||
|
as long as your function does not return.
|
||||||
|
|
||||||
On non-fatal errors, png_warning() is called
|
On non-fatal errors, png_warning() is called
|
||||||
to print a warning message, and then control returns to the calling code.
|
to print a warning message, and then control returns to the calling code.
|
||||||
@ -3249,7 +3258,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIII. Y2K Compliance in libpng
|
XIII. Y2K Compliance in libpng
|
||||||
|
|
||||||
April 1, 2010
|
April 2, 2010
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
29
libpng.3
29
libpng.3
@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNG 3 "April 1, 2010"
|
.TH LIBPNG 3 "April 2, 2010"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta17
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta17
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -789,7 +789,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng.txt - A description on how to use and modify libpng
|
libpng.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.0beta17 - April 1, 2010
|
libpng version 1.5.0beta17 - April 2, 2010
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
@ -800,7 +800,7 @@ libpng.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 1, 2010
|
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 2, 2010
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -1030,9 +1030,13 @@ free any memory.
|
|||||||
}
|
}
|
||||||
|
|
||||||
If you would rather avoid the complexity of setjmp/longjmp issues,
|
If you would rather avoid the complexity of setjmp/longjmp issues,
|
||||||
you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
|
you can compile libpng with PNG_NO_SETJMP, in which case
|
||||||
errors will result in a call to PNG_ABORT() which defaults to abort().
|
errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||||
|
|
||||||
|
You can #define PNG_ABORT() to a function that does something
|
||||||
|
more useful than abort(), as long as your function does not
|
||||||
|
return.
|
||||||
|
|
||||||
Now you need to set up the input code. The default for libpng is to
|
Now you need to set up the input code. The default for libpng is to
|
||||||
use the C function fread(). If you use this, you will need to pass a
|
use the C function fread(). If you use this, you will need to pass a
|
||||||
valid FILE * in the function png_init_io(). Be sure that the file is
|
valid FILE * in the function png_init_io(). Be sure that the file is
|
||||||
@ -2480,9 +2484,13 @@ section below for more information on the libpng error handling.
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
If you would rather avoid the complexity of setjmp/longjmp issues,
|
If you would rather avoid the complexity of setjmp/longjmp issues,
|
||||||
you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
|
you can compile libpng with PNG_NO_SETJMP, in which case
|
||||||
errors will result in a call to PNG_ABORT() which defaults to abort().
|
errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||||
|
|
||||||
|
You can #define PNG_ABORT() to a function that does something
|
||||||
|
more useful than abort(), as long as your function does not
|
||||||
|
return.
|
||||||
|
|
||||||
Now you need to set up the output code. The default for libpng is to
|
Now you need to set up the output code. The default for libpng is to
|
||||||
use the C function fwrite(). If you use this, you will need to pass a
|
use the C function fwrite(). If you use this, you will need to pass a
|
||||||
valid FILE * in the function png_init_io(). Be sure that the file is
|
valid FILE * in the function png_init_io(). Be sure that the file is
|
||||||
@ -3343,8 +3351,9 @@ Error handling in libpng is done through png_error() and png_warning().
|
|||||||
Errors handled through png_error() are fatal, meaning that png_error()
|
Errors handled through png_error() are fatal, meaning that png_error()
|
||||||
should never return to its caller. Currently, this is handled via
|
should never return to its caller. Currently, this is handled via
|
||||||
setjmp() and longjmp() (unless you have compiled libpng with
|
setjmp() and longjmp() (unless you have compiled libpng with
|
||||||
PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
|
PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
|
||||||
but you could change this to do things like exit() if you should wish.
|
but you could change this to do things like exit() if you should wish.
|
||||||
|
as long as your function does not return.
|
||||||
|
|
||||||
On non-fatal errors, png_warning() is called
|
On non-fatal errors, png_warning() is called
|
||||||
to print a warning message, and then control returns to the calling code.
|
to print a warning message, and then control returns to the calling code.
|
||||||
@ -4038,7 +4047,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIII. Y2K Compliance in libpng
|
.SH XIII. Y2K Compliance in libpng
|
||||||
|
|
||||||
April 1, 2010
|
April 2, 2010
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
@ -4278,7 +4287,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.5.0beta17 - April 1, 2010:
|
Libpng version 1.5.0beta17 - April 2, 2010:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@ -4301,7 +4310,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta17, April 1, 2010, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta17, April 2, 2010, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@ -4400,7 +4409,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
April 1, 2010
|
April 2, 2010
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user