summaryrefslogtreecommitdiff
path: root/community/leptonica/giflib6.patch
blob: 10dc02eeec5fad61e8212bdcec94ef068e93f78c (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
diff -wbBur leptonica-1.69/src/gifio.c /home/sergej/tmp/BUILD/staging-i686/sergej/build/leptonica/src/leptonica-1.69/src/gifio.c
--- leptonica-1.69/src/gifio.c	2012-01-22 22:29:15.000000000 +0400
+++ /home/sergej/tmp/BUILD/staging-i686/sergej/build/leptonica/src/leptonica-1.69/src/gifio.c	2013-07-30 18:27:19.269137200 +0400
@@ -100,7 +100,7 @@
     _lseek(fd, 0, SEEK_SET);
 #endif  /* _MSC_VER */
 
-    if ((gif = DGifOpenFileHandle(fd)) == NULL)
+    if ((gif = DGifOpenFileHandle(fd, NULL)) == NULL)
         return (PIX *)ERROR_PTR("invalid file or file not found",
                                 procName, NULL);
 
@@ -316,7 +316,7 @@
     }
 
         /* Save the cmap colors in a gif_cmap */
-    if ((gif_cmap = MakeMapObject(gif_ncolor, NULL)) == NULL) {
+    if ((gif_cmap = GifMakeMapObject(gif_ncolor, NULL)) == NULL) {
         pixDestroy(&pixd);
         return ERROR_INT("failed to create GIF color map", procName, 1);
     }
@@ -325,7 +325,7 @@
         if (ncolor > 0) {
             if (pixcmapGetColor(cmap, i, &rval, &gval, &bval) != 0) {
                 pixDestroy(&pixd);
-                FreeMapObject(gif_cmap);
+                GifFreeMapObject(gif_cmap);
                 return ERROR_INT("failed to get color from color map",
                                  procName, 1);
             }
@@ -337,9 +337,9 @@
     }
 
         /* Get the gif file handle */
-    if ((gif = EGifOpenFileHandle(fd)) == NULL) {
+    if ((gif = EGifOpenFileHandle(fd, NULL)) == NULL) {
         pixDestroy(&pixd);
-        FreeMapObject(gif_cmap);
+        GifFreeMapObject(gif_cmap);
         return ERROR_INT("failed to create GIF image handle", procName, 1);
     }
 
@@ -347,11 +347,11 @@
     if (EGifPutScreenDesc(gif, w, h, gif_cmap->BitsPerPixel, 0, gif_cmap)
         != GIF_OK) {
         pixDestroy(&pixd);
-        FreeMapObject(gif_cmap);
+        GifFreeMapObject(gif_cmap);
         EGifCloseFile(gif);
         return ERROR_INT("failed to write screen description", procName, 1);
     }
-    FreeMapObject(gif_cmap); /* not needed after this point */
+    GifFreeMapObject(gif_cmap); /* not needed after this point */
 
     if (EGifPutImageDesc(gif, 0, 0, w, h, FALSE, NULL) != GIF_OK) {
         pixDestroy(&pixd);