summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-03-03 05:38:29 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-03-03 05:39:36 -0600
commit65a223794a127fcec36286cd68cddf53d7dcd308 (patch)
treef39621cbcdb64057b7536161a9e09be8076998b3 /contrib
parent6c2e919c7eb736d230581a4c925fa67bd901fcf8 (diff)
downloadlibpng-65a223794a127fcec36286cd68cddf53d7dcd308.tar.gz
[devel] Bump to version libpng-1.5.0beta11
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gregbook/readpng2.c34
-rw-r--r--contrib/gregbook/rpng-win.c2
-rw-r--r--contrib/gregbook/rpng-x.c2
-rw-r--r--contrib/gregbook/rpng2-win.c4
-rw-r--r--contrib/gregbook/rpng2-x.c2
-rw-r--r--contrib/gregbook/wpng.c2
-rw-r--r--contrib/gregbook/writepng.c37
7 files changed, 13 insertions, 70 deletions
diff --git a/contrib/gregbook/readpng2.c b/contrib/gregbook/readpng2.c
index f127ef58c..cc36027e0 100644
--- a/contrib/gregbook/readpng2.c
+++ b/contrib/gregbook/readpng2.c
@@ -66,7 +66,6 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr);
static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass);
static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr);
-static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg);
@@ -102,7 +101,7 @@ int readpng2_init(mainprog_info *mainprog_ptr)
/* could also replace libpng warning-handler (final NULL), but no need: */
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr,
- readpng2_error_handler, NULL);
+ NULL, NULL);
if (!png_ptr)
return 4; /* out of memory */
@@ -451,34 +450,3 @@ void readpng2_cleanup(mainprog_info *mainprog_ptr)
mainprog_ptr->png_ptr = NULL;
mainprog_ptr->info_ptr = NULL;
}
-
-
-
-
-
-static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg)
-{
- mainprog_info *mainprog_ptr;
-
- /* This function, aside from the extra step of retrieving the "error
- * pointer" (below) and the fact that it exists within the application
- * rather than within libpng, is essentially identical to libpng's
- * default error handler. The second point is critical: since both
- * setjmp() and longjmp() are called from the same code, they are
- * guaranteed to have compatible notions of how big a jmp_buf is,
- * regardless of whether _BSD_SOURCE or anything else has (or has not)
- * been defined. */
-
- fprintf(stderr, "readpng2 libpng error: %s\n", msg);
- fflush(stderr);
-
- mainprog_ptr = png_get_error_ptr(png_ptr);
- if (mainprog_ptr == NULL) { /* we are completely hosed now */
- fprintf(stderr,
- "readpng2 severe error: jmpbuf not recoverable; terminating.\n");
- fflush(stderr);
- exit(99);
- }
-
- png_longjmp(png_ptr, 1);
-}
diff --git a/contrib/gregbook/rpng-win.c b/contrib/gregbook/rpng-win.c
index 20209611e..543a0bbe3 100644
--- a/contrib/gregbook/rpng-win.c
+++ b/contrib/gregbook/rpng-win.c
@@ -24,6 +24,8 @@
- 1.10: enabled "message window"/console (thanks to David Geldreich)
- 2.00: dual-licensed (added GNU GPL)
- 2.01: fixed improper display of usage screen on PNG error(s)
+ - 2.02: removed special error-handling which is no longer needed
+ because of the new libpng png_longjmp() feature in libpng-1.5.0.
---------------------------------------------------------------------------
diff --git a/contrib/gregbook/rpng-x.c b/contrib/gregbook/rpng-x.c
index 0a9817029..3ffd4d974 100644
--- a/contrib/gregbook/rpng-x.c
+++ b/contrib/gregbook/rpng-x.c
@@ -26,6 +26,8 @@
- 1.14: added support for X resources (thanks to Gerhard Niklasch)
- 2.00: dual-licensed (added GNU GPL)
- 2.01: fixed improper display of usage screen on PNG error(s)
+ - 2.02: removed special error-handling which is no longer needed
+ because of the new libpng png_longjmp() feature in libpng-1.5.0.
---------------------------------------------------------------------------
diff --git a/contrib/gregbook/rpng2-win.c b/contrib/gregbook/rpng2-win.c
index 8c831db12..638024b66 100644
--- a/contrib/gregbook/rpng2-win.c
+++ b/contrib/gregbook/rpng2-win.c
@@ -32,7 +32,9 @@
- 2.01: fixed 64-bit typo in readpng2.c
- 2.02: fixed improper display of usage screen on PNG error(s); fixed
unexpected-EOF and file-read-error cases
- - 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options
+ - 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options;
+ removed special error-handling which is no longer needed
+ because of the new libpng png_longjmp() feature in libpng-1.5.0.
---------------------------------------------------------------------------
diff --git a/contrib/gregbook/rpng2-x.c b/contrib/gregbook/rpng2-x.c
index 238ec0b82..cde53eb5c 100644
--- a/contrib/gregbook/rpng2-x.c
+++ b/contrib/gregbook/rpng2-x.c
@@ -41,6 +41,8 @@
unexpected-EOF and file-read-error cases; fixed Trace() cut-and-
paste bugs
- 2.03: deleted runtime MMX-enabling/disabling and obsolete -mmx* options
+ removed special error-handling which is no longer needed
+ because of the new libpng png_longjmp() feature in libpng-1.5.0.
---------------------------------------------------------------------------
diff --git a/contrib/gregbook/wpng.c b/contrib/gregbook/wpng.c
index a06e3529e..753fef3ac 100644
--- a/contrib/gregbook/wpng.c
+++ b/contrib/gregbook/wpng.c
@@ -29,6 +29,8 @@
- 1.04: fixed DOS/OS2/Win32 detection, including partial Cygwin fix
(see http://home.att.net/~perlspinr/diffs/GregBook_cygwin.diff)
- 2.00: dual-licensed (added GNU GPL)
+ - 2.01: removed special error-handling which is no longer needed
+ because of the new libpng png_longjmp() feature in libpng-1.5.0.
[REPORTED BUG (win32 only): "contrib/gregbook/wpng.c - cmd line
dose not work! In order to do something useful I needed to redirect
diff --git a/contrib/gregbook/writepng.c b/contrib/gregbook/writepng.c
index 2b0e98c3b..1d67f89de 100644
--- a/contrib/gregbook/writepng.c
+++ b/contrib/gregbook/writepng.c
@@ -60,10 +60,6 @@
#include "writepng.h" /* typedefs, common macros, public prototypes */
-/* local prototype */
-
-static void writepng_error_handler(png_structp png_ptr, png_const_charp msg);
-
void writepng_version_info(void)
@@ -90,7 +86,7 @@ int writepng_init(mainprog_info *mainprog_ptr)
/* could also replace libpng warning-handler (final NULL), but no need: */
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr,
- writepng_error_handler, NULL);
+ NULL, NULL);
if (!png_ptr)
return 4; /* out of memory */
@@ -359,34 +355,3 @@ void writepng_cleanup(mainprog_info *mainprog_ptr)
if (png_ptr && info_ptr)
png_destroy_write_struct(&png_ptr, &info_ptr);
}
-
-
-
-
-
-static void writepng_error_handler(png_structp png_ptr, png_const_charp msg)
-{
- mainprog_info *mainprog_ptr;
-
- /* This function, aside from the extra step of retrieving the "error
- * pointer" (below) and the fact that it exists within the application
- * rather than within libpng, is essentially identical to libpng's
- * default error handler. The second point is critical: since both
- * setjmp() and longjmp() are called from the same code, they are
- * guaranteed to have compatible notions of how big a jmp_buf is,
- * regardless of whether _BSD_SOURCE or anything else has (or has not)
- * been defined. */
-
- fprintf(stderr, "writepng libpng error: %s\n", msg);
- fflush(stderr);
-
- mainprog_ptr = png_get_error_ptr(png_ptr);
- if (mainprog_ptr == NULL) { /* we are completely hosed now */
- fprintf(stderr,
- "writepng severe error: jmpbuf not recoverable; terminating.\n");
- fflush(stderr);
- exit(99);
- }
-
- png_longjmp(png_ptr, 1);
-}