1 diff -ruN imlib-1.9.15.orig/gdk_imlib/io-gif.c imlib-1.9.15/gdk_imlib/io-gif.c
2 --- imlib-1.9.15.orig/gdk_imlib/io-gif.c 2014-05-27 09:38:13.210527763 +0000
3 +++ imlib-1.9.15/gdk_imlib/io-gif.c 2014-05-27 09:43:55.435910398 +0000
6 /* Apparently rewind(f) isn't sufficient */
7 lseek(fd, (long) 0, 0);
8 - gif = DGifOpenFileHandle(fd);
9 + gif = DGifOpenFileHandle(fd, NULL);
15 if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
18 + fprintf(stderr, "giflib error: %s\n", GifErrorString(gif->Error));
19 rec = TERMINATE_RECORD_TYPE;
21 if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
23 if (DGifGetImageDesc(gif) == GIF_ERROR)
26 + fprintf(stderr, "giflib error: %s\n", GifErrorString(gif->Error));
27 rec = TERMINATE_RECORD_TYPE;
29 *w = gif->Image.Width;
31 rows = malloc(*h * sizeof(GifRowType *));
35 + DGifCloseFile(gif, NULL);
38 data = _gdk_malloc_image(*w, *h);
42 + DGifCloseFile(gif, NULL);
47 rows[i] = malloc(*w * sizeof(GifPixelType));
51 + DGifCloseFile(gif, NULL);
52 for (i = 0; i < *h; i++)
60 + DGifCloseFile(gif, NULL);
61 for (i = 0; i < *h; i++)
64 diff -ruN imlib-1.9.15.orig/Imlib/load.c imlib-1.9.15/Imlib/load.c
65 --- imlib-1.9.15.orig/Imlib/load.c 2014-05-27 09:38:13.220527723 +0000
66 +++ imlib-1.9.15/Imlib/load.c 2014-05-27 09:45:25.775576104 +0000
69 /* Apparently rewind(f) isn't sufficient */
70 lseek(fd, (long) 0, 0);
71 - gif = DGifOpenFileHandle(fd);
72 + gif = DGifOpenFileHandle(fd, NULL);
78 if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
81 + fprintf(stderr, "Imlib ERROR: JPEG uses line buffers > 16. Cannot load.\n");
82 rec = TERMINATE_RECORD_TYPE;
84 if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
86 if (DGifGetImageDesc(gif) == GIF_ERROR)
89 + fprintf(stderr, "Imlib ERROR: JPEG uses line buffers > 16. Cannot load.\n");
90 rec = TERMINATE_RECORD_TYPE;
92 *w = gif->Image.Width;
94 rows = malloc(*h * sizeof(GifRowType *));
98 + DGifCloseFile(gif, NULL);
101 data = _imlib_malloc_image(*w, *h);
104 - DGifCloseFile(gif);
105 + DGifCloseFile(gif, NULL);
110 rows[i] = malloc(*w * sizeof(GifPixelType));
113 - DGifCloseFile(gif);
114 + DGifCloseFile(gif, NULL);
115 for (i = 0; i < *h; i++)
122 - DGifCloseFile(gif);
123 + DGifCloseFile(gif, NULL);
124 for (i = 0; i < *h; i++)