update Sun Jun 13 18:37:00 PDT 2010
[pkgsrc.git] / cad / nelma / patches / patch-ac
1 $NetBSD: patch-ac,v 1.1 2010/06/13 22:43:55 wiz Exp $
2
3 --- src/pngutil.c.orig  2006-12-10 15:50:19.000000000 +0000
4 +++ src/pngutil.c
5 @@ -145,7 +145,7 @@ int png_read(struct image **dest, char *
6         {
7                 error("Can't allocate memory");
8                 fclose(fp);
9 -               png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
10 +               png_destroy_read_struct(&png_ptr, NULL, NULL);
11                 return -1;
12         }
13  
14 @@ -159,7 +159,7 @@ int png_read(struct image **dest, char *
15                 error("libpng error");
16                 /* Free all of the memory associated with the png_ptr and 
17                  * info_ptr */
18 -               png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
19 +               png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
20                 fclose(fp);
21                 /* If we get here, we had a problem reading the file */
22                 return -1;
23 @@ -185,7 +185,7 @@ int png_read(struct image **dest, char *
24                                 PNG_TRANSFORM_PACKING | 
25                                 PNG_TRANSFORM_EXPAND;
26  
27 -       png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
28 +       png_read_png(png_ptr, info_ptr, png_transforms, NULL);
29  
30         /* At this point you have read the entire image */
31         img=png_alloc(  png_get_image_width(png_ptr, info_ptr), 
32 @@ -209,7 +209,7 @@ int png_read(struct image **dest, char *
33         *dest=img;
34  
35         /* Clean up after the read, and free any memory allocated - REQUIRED */
36 -       png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
37 +       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
38  
39         /* close the file */
40         fclose(fp);
41 @@ -253,7 +253,7 @@ int png_write(struct image *img, char *f
42         if (info_ptr == NULL) {
43                 error("Can't allocate memory");
44                 fclose(fp);
45 -               png_destroy_write_struct(&png_ptr,  png_infopp_NULL);
46 +               png_destroy_write_struct(&png_ptr,  NULL);
47                 return -1;
48         }
49