return <<'CODE';
/* TODO: test DGifOpen() and processing with callbacks */
GifFileType *gf;
+#ifdef GIF_LIB_VERSION
const char vers[] = GIF_LIB_VERSION;
const char *versp = vers;
int ver_maj;
int ver_min;
+#else
+int ver_maj = GIFLIB_MAJOR;
+int ver_min = GIFLIB_MINOR;
+#endif
gf=DGifOpenFileName("testimg/expected.gif");
if (!gf) {
fprintf(stderr, "GIF: Cannot open testimg/expected.gif\n");
EGifSetGifVersion("89a");
EGifSetGifVersion("87a");
+#ifdef GIF_LIB_VERSION
/* skip the " Version " */
while (*versp && (*versp < '0' || *versp > '9'))
++versp;
ver_min *= 10;
ver_min += *versp++ - '0';
}
+#endif
if (ver_maj < 4) {
fprintf(stderr, "GIF: gif lib version 3 is no longer supported\n");
return 1;
}
}
+#ifdef GIF_LIB_VERSION
+
static const
char gif_version_str[] = GIF_LIB_VERSION;
return strtod(p, NULL);
}
+#else
+
+double
+i_giflib_version(void) {
+ return GIFLIB_MAJOR + GIFLIB_MINOR * 0.1;
+}
+
+#endif
+
/*
=item i_readgif_low(GifFileType *GifFile, int **colour_table, int *colours)