diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2014-06-20 10:25:57 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-06-20 10:25:57 -0700 |
commit | 1c0b8ffa1778e0274b660d657a6112676c421f66 (patch) | |
tree | c0b87698ff8e03837cb7f26808289c4521c223f9 /src | |
parent | ac61822e72b401a37b26e77b2c2b716e21ba46b7 (diff) | |
parent | 1170e23e38b8bf619928d30fd107d8753e71989f (diff) | |
download | mirror-meh-1c0b8ffa1778e0274b660d657a6112676c421f66.tar.gz mirror-meh-1c0b8ffa1778e0274b660d657a6112676c421f66.tar.bz2 mirror-meh-1c0b8ffa1778e0274b660d657a6112676c421f66.zip |
Merge pull request #10 from andreasbaumann/master
fixed for API change in DGifCloseFile (giflib 5.1)
Diffstat (limited to 'src')
-rw-r--r-- | src/gif.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -96,7 +96,24 @@ error: void gif_close(struct image *img){ struct gif_t *g = (struct gif_t *)img; +#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) + int ret; +#endif + +#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) + DGifCloseFile(g->gif,&ret); + if(ret != GIF_OK) { +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + fprintf(stderr, "GIFLIB: %s\n", GifErrorString(ret)); +#elif defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4) + fprintf(stderr, "GIFLIB: %s\n", GifErrorString()); +#else + PrintGifError(); +#endif + } +#else DGifCloseFile(g->gif); +#endif fclose(g->f); } |