Advertisement
Guest User

WindowMaker-0.95.2-gliflib.patch

a guest
Aug 28th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.13 KB | None | 0 0
  1. --- WindowMaker-0.95.2/wrlib/gif.c.orig 2013-03-13 14:06:50.073630735 -0300
  2. +++ WindowMaker-0.95.2/wrlib/gif.c  2013-03-13 14:07:57.415402332 -0300
  3. @@ -43,6 +43,9 @@ RImage *RLoadGIF(char *file, int index)
  4.     unsigned char *cptr;
  5.     GifFileType *gif = NULL;
  6.     GifPixelType *buffer = NULL;
  7. +#if GIFLIB_MAJOR >= 5
  8. +   int GifLastError;
  9. +#endif
  10.     int i, j, k;
  11.     int width, height;
  12.     GifRecordType recType;
  13. @@ -57,10 +60,18 @@ RImage *RLoadGIF(char *file, int index)
  14.     /* default error message */
  15.     RErrorCode = RERR_BADINDEX;
  16.  
  17. -   gif = DGifOpenFileName(file);
  18. +   gif = DGifOpenFileName(file
  19. +#if GIFLIB_MAJOR >= 5
  20. +                  , &GifLastError
  21. +#endif
  22. +                  );
  23.  
  24.     if (!gif) {
  25. -       switch (GifLastError()) {
  26. +       switch (GifLastError
  27. +#if GIFLIB_MAJOR < 5
  28. +           ()
  29. +#endif
  30. +           ) {
  31.         case D_GIF_ERR_OPEN_FAILED:
  32.             RErrorCode = RERR_OPEN;
  33.             break;
  34. @@ -197,7 +208,11 @@ RImage *RLoadGIF(char *file, int index)
  35.     /* yuck! */
  36.     goto did_not_get_any_errors;
  37.   giferr:
  38. -   switch (GifLastError()) {
  39. +   switch (GifLastError
  40. +#if GIFLIB_MAJOR < 5
  41. +       ()
  42. +#endif
  43. +       ) {
  44.     case D_GIF_ERR_OPEN_FAILED:
  45.         RErrorCode = RERR_OPEN;
  46.         break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement