* updated kmousetool (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / x11 / imlib / giflib51.patch
blobae0cf7043af056b0dc73d983eba0ed4c1ce539c1
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
4 @@ -30,7 +30,7 @@
5 fd = fileno(f);
6 /* Apparently rewind(f) isn't sufficient */
7 lseek(fd, (long) 0, 0);
8 - gif = DGifOpenFileHandle(fd);
9 + gif = DGifOpenFileHandle(fd, NULL);
11 transp = -1;
12 data = NULL;
13 @@ -43,14 +43,14 @@
15 if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
17 - PrintGifError();
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)
25 - PrintGifError();
26 + fprintf(stderr, "giflib error: %s\n", GifErrorString(gif->Error));
27 rec = TERMINATE_RECORD_TYPE;
29 *w = gif->Image.Width;
30 @@ -62,13 +62,13 @@
31 rows = malloc(*h * sizeof(GifRowType *));
32 if (!rows)
34 - DGifCloseFile(gif);
35 + DGifCloseFile(gif, NULL);
36 return NULL;
38 data = _gdk_malloc_image(*w, *h);
39 if (!data)
41 - DGifCloseFile(gif);
42 + DGifCloseFile(gif, NULL);
43 free(rows);
44 return NULL;
46 @@ -79,7 +79,7 @@
47 rows[i] = malloc(*w * sizeof(GifPixelType));
48 if (!rows[i])
50 - DGifCloseFile(gif);
51 + DGifCloseFile(gif, NULL);
52 for (i = 0; i < *h; i++)
53 if (rows[i])
54 free(rows[i]);
55 @@ -168,7 +168,7 @@
59 - DGifCloseFile(gif);
60 + DGifCloseFile(gif, NULL);
61 for (i = 0; i < *h; i++)
62 free(rows[i]);
63 free(rows);
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
67 @@ -454,7 +454,7 @@
68 fd = fileno(f);
69 /* Apparently rewind(f) isn't sufficient */
70 lseek(fd, (long) 0, 0);
71 - gif = DGifOpenFileHandle(fd);
72 + gif = DGifOpenFileHandle(fd, NULL);
74 if (!gif)
75 return NULL;
76 @@ -462,14 +462,14 @@
78 if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
80 - PrintGifError();
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)
88 - PrintGifError();
89 + fprintf(stderr, "Imlib ERROR: JPEG uses line buffers > 16. Cannot load.\n");
90 rec = TERMINATE_RECORD_TYPE;
92 *w = gif->Image.Width;
93 @@ -481,13 +481,13 @@
94 rows = malloc(*h * sizeof(GifRowType *));
95 if (!rows)
97 - DGifCloseFile(gif);
98 + DGifCloseFile(gif, NULL);
99 return NULL;
101 data = _imlib_malloc_image(*w, *h);
102 if (!data)
104 - DGifCloseFile(gif);
105 + DGifCloseFile(gif, NULL);
106 free(rows);
107 return NULL;
109 @@ -498,7 +498,7 @@
110 rows[i] = malloc(*w * sizeof(GifPixelType));
111 if (!rows[i])
113 - DGifCloseFile(gif);
114 + DGifCloseFile(gif, NULL);
115 for (i = 0; i < *h; i++)
116 if (rows[i])
117 free(rows[i]);
118 @@ -587,7 +587,7 @@
122 - DGifCloseFile(gif);
123 + DGifCloseFile(gif, NULL);
124 for (i = 0; i < *h; i++)
125 free(rows[i]);
126 free(rows);