|
|
@ -39,6 +39,22 @@ extern "C" {
|
|
|
|
|
|
|
|
|
|
|
|
#include "../xpm/codec_gif.xpm"
|
|
|
|
#include "../xpm/codec_gif.xpm"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */
|
|
|
|
|
|
|
|
/* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */
|
|
|
|
|
|
|
|
#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
|
|
|
|
|
|
|
|
((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
|
|
|
|
|
|
|
|
static void PrintGifError(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
char *Err = GifErrorString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Err != NULL) {
|
|
|
|
|
|
|
|
fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Originally designed to facilitate image transfer and online
|
|
|
|
* Originally designed to facilitate image transfer and online
|
|
|
|