Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.1:Update
mtpaint
mtpaint-3.40-giflib5.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mtpaint-3.40-giflib5.diff of Package mtpaint
diff --git a/src/png.c b/src/png.c index 2b30821..e2ecf8f 100644 --- a/src/png.c +++ b/src/png.c @@ -1509,8 +1509,11 @@ static int load_gif_frames(char *file_name, ani_settings *ani) ls_settings w_set, init_set; int res, val, disposal, bpp, cmask, lastzero = FALSE; - +#if GIFLIB_MAJOR < 5 if (!(giffy = DGifOpenFileName(file_name))) return (-1); +#else + if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1); +#endif /* Init state structure */ memset(&stat, 0, sizeof(stat)); @@ -1621,7 +1624,11 @@ static int load_gif(char *file_name, ls_settings *settings) int delay = settings->gif_delay, trans = -1;//, disposal = 0; +#if GIFLIB_MAJOR < 5 if (!(giffy = DGifOpenFileName(file_name))) return (-1); +#else + if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1); +#endif /* Get global palette */ settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap); @@ -1682,10 +1689,17 @@ static int save_gif(char *file_name, ls_settings *settings) nc |= nc >> 1; nc |= nc >> 2; nc |= nc >> 4; nc += !nc + 1; // No less than 2 colors +#if GIFLIB_MAJOR < 5 gif_map = MakeMapObject(nc, NULL); if (!gif_map) return -1; giffy = EGifOpenFileName(file_name, FALSE); +#else + gif_map = GifMakeMapObject(nc, NULL); + if (!gif_map) return -1; + + giffy = EGifOpenFileName(file_name, FALSE, NULL); +#endif if (!giffy) goto fail0; for (i = 0; i < settings->colors; i++) @@ -1732,7 +1746,12 @@ fail: EGifCloseFile(giffy); umask(mode); chmod(file_name, 0666 & ~mode); #endif -fail0: FreeMapObject(gif_map); +fail0: +#if GIFLIB_MAJOR < 5 + FreeMapObject(gif_map); +#else + GifFreeMapObject(gif_map); +#endif return (msg); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor