summaryrefslogtreecommitdiff
path: root/contrib/pngminus/pnm2png.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2000-03-21 05:13:06 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:04:52 -0500
commit520a764cd79aea2d282cb4d2b9187f0aafb72404 (patch)
tree0ca2fa9bece8a4d4eeeda049bd37b3fda61c6ee3 /contrib/pngminus/pnm2png.c
parenta77ef625a6bb7d7808e0f084df2ca1d9d2627154 (diff)
downloadlibpng-520a764cd79aea2d282cb4d2b9187f0aafb72404.tar.gz
Imported from libpng-1.0.6.tarv1.0.6
Diffstat (limited to 'contrib/pngminus/pnm2png.c')
-rw-r--r--contrib/pngminus/pnm2png.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/pngminus/pnm2png.c b/contrib/pngminus/pnm2png.c
index 9329fcd3b..4cdfad831 100644
--- a/contrib/pngminus/pnm2png.c
+++ b/contrib/pngminus/pnm2png.c
@@ -40,6 +40,11 @@
#include "png.h"
+/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
+#ifndef png_jmpbuf
+# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
+#endif
+
/* function prototypes */
int main (int argc, char *argv[]);
@@ -386,7 +391,7 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
}
/* setjmp() must be called in every function that calls a PNG-reading libpng function */
- if (setjmp (png_jmp_env(png_ptr)))
+ if (setjmp (png_jmpbuf(png_ptr)))
{
png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
return FALSE;