summaryrefslogtreecommitdiff
path: root/graphics/fbv/giflib5_api.diff
blob: 6de9afd0edfa28799fad6c836dd9c13102547cfb (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
diff -Naur fbv-1.0b/gif.c fbv-1.0b.patched/gif.c
--- fbv-1.0b/gif.c	2003-08-24 16:23:02.000000000 -0400
+++ fbv-1.0b.patched/gif.c	2015-11-22 12:16:54.093999000 -0500
@@ -31,10 +31,10 @@
 #include <string.h>
 #define min(a,b) ((a) < (b) ? (a) : (b))
 #define gflush return(FH_ERROR_FILE);
-#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
-#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
+#define grflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
+#define mgrflush { int dummy; free(lb); free(slb); DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
 #define agflush return(FH_ERROR_FORMAT);
-#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
+#define agrflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
 
 
 int fh_gif_id(char *name)
@@ -80,8 +80,9 @@
     GifRecordType rt;
     ColorMapObject *cmap;
     int cmaps;
+    int dummyopenarg;
 
-    gft=DGifOpenFileName(name);
+    gft=DGifOpenFileName(name, &dummyopenarg);
     if(gft==NULL){printf("err5\n"); gflush;} //////////
     do
     {
@@ -170,7 +171,7 @@
 	}
     }
     while( rt!= TERMINATE_RECORD_TYPE );
-    DGifCloseFile(gft);
+    DGifCloseFile(gft, &dummyopenarg);
     return(FH_ERROR_OK);
 }
 
@@ -183,8 +184,9 @@
     GifByteType *extension;
     int extcode;
     GifRecordType rt;
+    int dummyopenarg;
 
-    gft=DGifOpenFileName(name);
+    gft=DGifOpenFileName(name, &dummyopenarg);
     if(gft==NULL) gflush;
     do
     {
@@ -197,7 +199,7 @@
 		px=gft->Image.Width;
 		py=gft->Image.Height;
 		*x=px; *y=py;
-		DGifCloseFile(gft);
+		DGifCloseFile(gft, &dummyopenarg);
 		return(FH_ERROR_OK);
 		break;
 	    case EXTENSION_RECORD_TYPE:
@@ -210,7 +212,7 @@
 	}  
     }
     while( rt!= TERMINATE_RECORD_TYPE );
-    DGifCloseFile(gft);
+    DGifCloseFile(gft, &dummyopenarg);
     return(FH_ERROR_FORMAT);
 }
 #endif