]>
Commit | Line | Data |
---|---|---|
97b5c27a JB |
1 | --- pslib-0.4.5/src/pslib.c.orig 2011-03-29 11:12:25.000000000 +0200 |
2 | +++ pslib-0.4.5/src/pslib.c 2014-02-01 16:48:19.912189358 +0100 | |
3 | @@ -4906,13 +4906,13 @@ | |
4 | } | |
5 | memset(psimage, 0, sizeof(PSImage)); | |
6 | ||
7 | - if ((gft = DGifOpenFileName(filename)) == NULL) { | |
8 | + if ((gft = DGifOpenFileName(filename, NULL)) == NULL) { | |
9 | ps_error(psdoc, PS_RuntimeError, _("%s is not a gif file!"), filename); | |
10 | fclose(fp); | |
11 | return(0); | |
12 | } | |
13 | if (DGifSlurp(gft) != GIF_OK) { | |
14 | - ps_error(psdoc, PS_RuntimeError, _("Error %d while reading gif file!"), GifLastError()); | |
15 | + ps_error(psdoc, PS_RuntimeError, _("Error %d while reading gif file!"), gft->Error); | |
16 | fclose(fp); | |
17 | return(0); | |
18 | } | |
5155a756 JR |
19 | @@ -4939,7 +4939,7 @@ |
20 | ||
21 | if(NULL == (psimage->palette = psdoc->malloc(psdoc, sizeof(PSColor) * numcolors, _("Allocate memory for color palette.")))) { | |
22 | ps_error(psdoc, PS_MemoryError, _("Could not allocate memory for color palette.")); | |
23 | - DGifCloseFile(gft); | |
24 | + DGifCloseFile(gft, NULL); | |
25 | psdoc->free(psdoc, psimage); | |
26 | fclose(fp); | |
27 | return(0); | |
28 | @@ -4964,7 +4964,7 @@ | |
29 | psimage->length = psimage->width * psimage->height; | |
30 | if(NULL == (psimage->data = psdoc->malloc(psdoc, psimage->length, _("Allocate memory for image data.")))) { | |
31 | ps_error(psdoc, PS_MemoryError, _("Could not allocate memory for image data.")); | |
32 | - DGifCloseFile(gft); | |
33 | + DGifCloseFile(gft, NULL); | |
34 | psdoc->free(psdoc, psimage->palette); | |
35 | psdoc->free(psdoc, psimage); | |
36 | fclose(fp); | |
37 | @@ -4998,7 +4998,7 @@ | |
38 | memcpy(psimage->data, dataptr, psimage->length); | |
39 | } | |
40 | ||
41 | - DGifCloseFile(gft); | |
42 | + DGifCloseFile(gft, NULL); | |
43 | ||
44 | } else | |
45 | #endif /* HAVE_LIBGIF */ |