summaryrefslogtreecommitdiff
path: root/graphics/camlimages/patches/patch-src_gifread.c
blob: 41d11b8f2f2ce9539ebd78d63c0f8b232d436410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-src_gifread.c,v 1.2 2014/05/24 04:05:24 obache Exp $

* DGifOpenFileName API change for giflib-5
* DGifCloseFile API change for giflib-5.1
* PrintGifError API removal for giflib-4.2.0

--- src/gifread.c.orig	2011-06-22 18:04:32.000000000 +0000
+++ src/gifread.c
@@ -140,7 +140,7 @@ value dGifOpenFileName( value name )
   GifFileType *GifFile;
   int i;
 
-  if((GifFile = DGifOpenFileName( String_val(name) )) == NULL){
+  if((GifFile = DGifOpenFileName( String_val(name), NULL )) == NULL){
     failwith("DGifOpenFileName");
   }
 
@@ -161,7 +161,7 @@ value dGifCloseFile( value hdl )
      segmentation faults */
   ((GifFileType *)hdl)->Image.ColorMap = NULL; 
 
-  DGifCloseFile( (GifFileType *) hdl );
+  DGifCloseFile( (GifFileType *) hdl, NULL);
   CAMLreturn(Val_unit);
 }
 
@@ -200,7 +200,6 @@ value dGifGetLine( value hdl )
 
   if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width ) 
       == GIF_ERROR ){
-    PrintGifError ();
     failwith("DGifGetLine");
   }
   CAMLreturn(buf);