Make this display PNG files again, with png>1.0.6.

This commit is contained in:
fredb 2002-03-14 05:23:03 +00:00
parent 06b2904603
commit 8710707e6e
3 changed files with 39 additions and 3 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.13 2002/03/13 17:37:18 fredb Exp $
# $NetBSD: Makefile,v 1.14 2002/03/14 05:23:03 fredb Exp $
DISTNAME= xli-1.16
PKGREVISION= 2
PKGREVISION= 3
CATEGORIES= graphics x11
MASTER_SITES= ftp://ftp.libpng.org/pub/png/src/ \
${MASTER_SITE_XCONTRIB:=applications/}

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.7 2001/09/12 06:17:14 jlam Exp $
$NetBSD: distinfo,v 1.8 2002/03/14 05:23:03 fredb Exp $
SHA1 (xli.1.16.tar.gz) = ee1f390bacc94760ee5ae83c3c979d4c01eb7986
Size (xli.1.16.tar.gz) = 287692 bytes
SHA1 (xli-png.tar.gz) = 18ae7d10c31b68be3f978cfa137f5cbad706cfd1
Size (xli-png.tar.gz) = 6393 bytes
SHA1 (patch-aa) = 0e9bbf5d290db20d67e34f59ce63cf5c78b44ed6
SHA1 (patch-ab) = 6aaeb485e6bc59f486c4cc1534f03bfa47587441

View file

@ -0,0 +1,35 @@
$NetBSD: patch-ab,v 1.1 2002/03/14 05:23:04 fredb Exp $
--- png.c.orig Fri Apr 19 21:57:13 1996
+++ png.c
@@ -120,10 +120,17 @@
return (Image *) 0;
}
+ /* initialize the structures */
+ pngp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ info = png_create_info_struct(pngp);
+
/* set error handling */
- if (setjmp(pngp->jmpbuf))
+ if (setjmp(png_jmpbuf(pngp)))
{
- png_read_destroy(pngp, info, (png_info *)0);
+ if (info)
+ png_destroy_read_struct(&pngp, &info, NULL);
+ else
+ png_destroy_read_struct(&pngp, NULL, NULL);
zclose(zfp);
lfree(pngp);
lfree(info);
@@ -132,10 +139,6 @@
/* If we get here, we had a problem reading the file */
return (Image *) 0;
}
-
- /* initialize the structures, info first for error handling */
- png_info_init(info);
- png_read_init(pngp);
/* set up the input control */
png_set_read_fn(pngp, (void *) zfp, xli_png_read_data);